nixos machine and package configurations.
Go to file
Jake Hillion caa3128310
All checks were successful
flake / flake (push) Successful in 1m27s
home-manager: pass through nixos stateVersion if >24.05
home-manager currently has a pinned stateVersion on all hosts, even though many
of the hosts were initialised after that point. Create a condition such that
any hosts initialised after 24.05 (the latest currently host) will use that
version in home-manager instead of pinning to 22.11.

Any future users can pass the stateVersion through without the `if`.

Test plan:
```
# system.stateVersion = "23.11";
$ nix eval '.#nixosConfigurations."boron.cx.ts.hillion.co.uk".config.home-manager.users.root.home.stateVersion'
"22.11"
```
```
# system.stateVersion = "24.05";
$ nix eval '.#nixosConfigurations."phoenix.st.ts.hillion.co.uk".config.home-manager.users.root.home.stateVersion'
"22.11"
```
```
# system.stateVersion = "24.11"; // no-commit change
$ nix eval '.#nixosConfigurations."phoenix.st.ts.hillion.co.uk".config.home-manager.users.root.home.stateVersion'
nix eval '.#nixosConfigurations."phoenix.st.ts.hillion.co.uk".config.home-manager.users.root.home.stateVersion'
error:
       ...
       (stack trace truncated; use '--show-trace' to show the full trace)

       error: A definition for option `home-manager.users.root.home.stateVersion' is not of type `one of "18.09", "19.03", "19.09", "20.03", "20.09", "21.03", "21.05", "21.11", "22.05", "22.11", "23.05", "23.11", "24.05"'. Definition values:
       - In `/nix/store/8dhsknmlnv571bg100j9v9yqq1nnh346-source/modules/home/default.nix': "24.11"
```
2024-10-26 19:13:08 +01:00
.gitea/workflows chore(deps): update actions/checkout action to v4.2.2 2024-10-24 23:00:54 +00:00
darwin/jakehillion-mba-m2-15 macbook: add shell utilities 2024-09-14 02:39:26 +01:00
hosts ssh: allow on all ports for sodium/phoenix 2024-10-26 18:15:31 +01:00
modules home-manager: pass through nixos stateVersion if >24.05 2024-10-26 19:13:08 +01:00
pkgs scx_layered: get from forked nixpkgs 2024-10-18 13:56:40 +01:00
scripts scripts: add update_nixpkgs 2024-03-01 14:44:25 +00:00
secrets phoenix: enable resilio sync and backups 2024-10-21 20:49:13 +01:00
flake.lock chore(deps): lock file maintenance 2024-10-26 14:00:16 +00:00
flake.nix flake: fix unstable path pointing at github instead of gitea 2024-10-24 09:39:20 +01:00
README.md microserver.parents -> li.pop 2024-04-20 13:45:00 +01:00
renovate.json renovate: fix gitea actions schedule 2024-04-25 19:40:00 +01:00

nixos

Building Raspberry Pi images

Raspberry Pi images that support Tailscale and headless SSH can be built using a command. It is easiest to run this command on AArch64 on Linux, such as within a Linux VM or Docker container on an M1 Mac.

docker run -v $PWD:/src -it --rm nixos/nix:latest /bin/sh
nix-env -f https://github.com/nix-community/nixos-generators/archive/master.tar.gz -i
cd /src
nixos-generate -f sd-aarch64-installer --system aarch64-linux -c hosts/microserver.home.ts.hillion.co.uk/default.nix
cp SOME_OUTPUT out.img.zst

Alternatively, a Raspberry Pi image with headless SSH can be easily built using the logic in this repo.