Skip to content

Commit 4274d2d

Browse files
committed
lix key fix
1 parent 5afecd6 commit 4274d2d

File tree

4 files changed

+34
-4
lines changed

4 files changed

+34
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Lix: multi-user install baked in with persistence at `/var/home/nix`; `nix-daemon.service` enabled.
88
(D) - First-login bootstrap: installs Lix/nix packages `devbox`, `mc`, and `micro` via `curator`
99
- System packages added: `syncthing`, `uv`, `vscodium`, `waydroid`;
10-
- System flatpaks added: Telegram Desktop, Waterfox
10+
- System flatpaks added: Telegram Desktop, Zen Browser
1111

1212
## First login behavior
1313
- Triggers for each non-root user on their first session.

files/scripts/install-nix.sh

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,42 @@ set -euo pipefail
33

44
rpm_url="https://nix-community.github.io/nix-installers/lix/x86_64/lix-multi-user-2.91.1.rpm"
55

6-
install -d /usr/share/nix-store /var/lib/nix-store /var/cache/nix-store /nix
6+
install -d /usr/share/nix-store /var/lib/nix-store /var/cache/nix-store /nix /etc/nix
77

88
# Avoid systemd calls during RPM %post in the image build environment.
99
export SYSTEMD_OFFLINE=1
1010

1111
# Install the RPM; allow missing GPG key since we fetch directly by URL.
1212
dnf install -y --nogpgcheck "$rpm_url"
1313

14+
nix_conf=/etc/nix/nix.conf
15+
lix_cache_url="https://cache.lix.systems/"
16+
lix_cache_key="cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
17+
18+
ensure_list_value() {
19+
local key="$1" value="$2" escaped_value
20+
escaped_value=$(printf '%s' "$value" | sed 's/[\\&]/\\&/g')
21+
22+
touch "$nix_conf"
23+
24+
if grep -Eq "^${key}[[:space:]]*=.*${escaped_value}" "$nix_conf"; then
25+
return
26+
fi
27+
28+
if grep -Eq "^${key}[[:space:]]*=" "$nix_conf"; then
29+
sed -i "s|^${key}[[:space:]]*= *\\(.*\\)|${key} = \\1 ${escaped_value}|" "$nix_conf"
30+
else
31+
echo "${key} = ${value}" >>"$nix_conf"
32+
fi
33+
}
34+
35+
ensure_list_value "substituters" "$lix_cache_url"
36+
ensure_list_value "trusted-public-keys" "$lix_cache_key"
37+
38+
# # Ensure the overlay mount service is enabled so /nix is populated on boot.
39+
# mkdir -p /etc/systemd/system/multi-user.target.wants
40+
# ln -sf /usr/lib/systemd/system/nix-overlay.service /etc/systemd/system/multi-user.target.wants/nix-overlay.service
41+
1442
# Move the pre-populated store out of /nix so it can serve as the immutable lowerdir.
1543
if compgen -G "/nix/*" >/dev/null; then
1644
mv /nix/* /usr/share/nix-store/

files/system/usr/libexec/deinonyxus/curator.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ curator_git="--from git+https://codeberg.org/randogoth/curator/"
66
uvx $curator_git curator init
77
uvx $curator_git curator add nix:mc nix:micro nix:devbox
88
uvx $curator_git curator switch
9-
uv tool install $curator_git curator
9+
uv tool install $curator_git curator
10+
11+
nix upgrade-nix

recipes/recipe.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ modules:
6666
scope: system
6767
# If no repo information is specified, Flathub will be used by default
6868
install: # system flatpaks we want all users to have and not remove
69-
- net.waterfox.waterfox
69+
- app.zen_browser.zen
7070
- org.telegram.desktop
7171
remove: # replace default Firefox with Waterfox
7272
- org.mozilla.firefox

0 commit comments

Comments
 (0)