Skip to content

Commit ea4ed7a

Browse files
authored
Merge pull request #5 from randogoth/lix-rpm
Replaced Nix with Lix
2 parents c8830fc + 67a413b commit ea4ed7a

File tree

5 files changed

+72
-30
lines changed

5 files changed

+72
-30
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
# Deinonyxus   [![bluebuild build badge](https://github.com/randogoth/deinonyxus/actions/workflows/build.yml/badge.svg)](https://github.com/randogoth/deinonyxus/actions/workflows/build.yml)
22

3-
*Deinonyxus* is a personal spin of the UBlue Bluefin DX image with experimental Nix package manager baked in (borrowed from the great [Daemonix](https://github.com/DXC-0/daemonix/) image) and a first-login bootstrap for `nix/home-manager`-like declarative package management using [curator](https://codeberg.org/randogoth/curator).
3+
*Deinonyxus* is a personal spin of the UBlue Bluefin DX image with the 🍦[Lix](https://lix.systems/) flavored Nix package manager baked in and a first-login bootstrap for simple declarative package management using [curator](https://codeberg.org/randogoth/curator).
44

55
## What’s inside
66
- Base: `ghcr.io/ublue-os/bluefin-dx:latest` without Cockpit, Docker, Firefox, VS Code
7-
- Nix: multi-user install baked in; `nix-overlay.service` and `nix-daemon.service` enabled.
8-
(D) - First-login bootstrap: installs nix packages `devbox`, `mc`,and `micro` via `curator`
7+
- Lix: multi-user install baked in with persistence at `/var/home/nix`; `nix-daemon.service` enabled.
8+
(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

12-
## First login behavior
12+
## First login
1313
- Triggers for each non-root user on their first session.
1414
- Writes state to `~/.local/state/deinonyxus/curator-init.done`; delete it to rerun.
1515
- Bootstraps `~/.config/curator/inventory.toml` and runs `curator switch` with the packages set above.
1616

17+
## Just Recipes
18+
- `upgrade-nix`: upgrades to the latest version of Lix via the user profile. Replaces `nix upgrade-nix` which does not work with an immutable lowerdir `/nix/store` folder
19+
- `install-nix-software-center`: installs a graphical app store for Nix packages
20+
1721
## Install / Rebase
1822

1923
```bash
@@ -30,11 +34,11 @@ The `latest` tag always tracks the latest build for the Fedora base set in `reci
3034

3135
## Building locally
3236
```bash
33-
bluebuild build --recipe recipes/recipe.yml
37+
bluebuild build
3438
```
3539

3640
## Signature verification
3741
Images are signed with Sigstore/cosign. Verify with the repo's `cosign.pub`:
3842
```bash
3943
cosign verify --key cosign.pub ghcr.io/randogoth/deinonyxus
40-
```
44+
```

files/justfiles/nixpkgs.just

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
upgrade-nix:
2+
echo 'Installing latest Lix package'
3+
nix profile install nixpkgs#lix && nix upgrade-nix
4+
5+
install-nix-software-center:
6+
echo 'Installing Nix Software Center'
7+
nix profile install github:snowfallorg/nix-software-center

files/scripts/install-lix.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# === INSTALL LIX FROM RPM ===
5+
6+
rpm_url="https://nix-community.github.io/nix-installers/lix/x86_64/lix-multi-user-2.91.1.rpm"
7+
8+
install -d /usr/share/nix-store /var/lib/nix-store /var/cache/nix-store /nix /etc/nix
9+
10+
# Avoid systemd calls during RPM %post in the image build environment.
11+
export SYSTEMD_OFFLINE=1
12+
13+
# Install the RPM; allow missing GPG key since we fetch directly by URL.
14+
dnf install -y --nogpgcheck "$rpm_url"
15+
16+
17+
# === ADD MISSING LIX CACHE ACCESS PUBKEY ===
18+
19+
nix_conf=/etc/nix/nix.conf
20+
lix_cache_url="https://cache.lix.systems/"
21+
lix_cache_key="cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
22+
23+
ensure_list_value() {
24+
local key="$1" value="$2" escaped_value
25+
escaped_value=$(printf '%s' "$value" | sed 's/[\\&]/\\&/g')
26+
27+
touch "$nix_conf"
28+
29+
if grep -Eq "^${key}[[:space:]]*=.*${escaped_value}" "$nix_conf"; then
30+
return
31+
fi
32+
33+
if grep -Eq "^${key}[[:space:]]*=" "$nix_conf"; then
34+
sed -i "s|^${key}[[:space:]]*= *\\(.*\\)|${key} = \\1 ${escaped_value}|" "$nix_conf"
35+
else
36+
echo "${key} = ${value}" >>"$nix_conf"
37+
fi
38+
}
39+
40+
ensure_list_value "substituters" "$lix_cache_url"
41+
ensure_list_value "trusted-public-keys" "$lix_cache_key"
42+
43+
# === MOVE INITIAL NIX STORE TO LOWERDIR ===
44+
45+
if compgen -G "/nix/*" >/dev/null; then
46+
mv /nix/* /usr/share/nix-store/
47+
fi

files/scripts/install-nix.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

recipes/recipe.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# image will be published to ghcr.io/<user>/<name>
44
name: deinonyxus
55
# description will be included in the image's metadata
6-
description: This is my personal spin based on the latest bluefin image.
6+
description: Bluefin DX with Nix and sprinkles.
77

88
# the base image to build on top of (FROM) and the version tag to use
99
base-image: ghcr.io/ublue-os/bluefin-dx
@@ -20,7 +20,7 @@ modules:
2020

2121
- type: script
2222
scripts:
23-
- install-nix.sh
23+
- install-lix.sh
2424

2525
- type: systemd
2626
system:
@@ -60,13 +60,17 @@ modules:
6060
- containerd
6161
- moby-engine
6262

63+
- type: justfiles
64+
include:
65+
- nixpkgs.just
66+
6367
- type: default-flatpaks
6468
configurations:
6569
- notify: true # Send notification after install/uninstall is finished (true/false)
6670
scope: system
6771
# If no repo information is specified, Flathub will be used by default
6872
install: # system flatpaks we want all users to have and not remove
69-
- net.waterfox.waterfox
73+
- app.zen_browser.zen
7074
- org.telegram.desktop
7175
remove: # replace default Firefox with Waterfox
7276
- org.mozilla.firefox

0 commit comments

Comments
 (0)