.files/Justfile
Léana 江 b50954a4ef Upgrade to 25.11 (#25)
Reviewed-on: https://codeberg.org/leana8959/.files/pulls/25
Co-authored-by: Léana 江 <leana.jiang+git@icloud.com>
Co-committed-by: Léana 江 <leana.jiang+git@icloud.com>
2025-11-28 04:30:58 +01:00

35 lines
1.2 KiB
Makefile

# Note:
# add `--option substitute false` to the command so it builds properly offline
# rfkill block all helps too
os host action:
#!/usr/bin/env bash
set -euo pipefail
nixpkgs=$(nix-instantiate --eval -E "let sources = import ./npins; in sources.nixpkgs.outPath" | jq -r .)
nixos-rebuild {{ action }} \
-I nixpkgs=${nixpkgs} \
-I nixos-config=./nix/configurations/{{ host }}.nix \
--no-reexec \
--file ./default.nix \
--attr "nixosConfigurations.{{ host }}"
install host:
#!/usr/bin/env bash
set -euo pipefail
nixpkgs=$(nix-instantiate --eval -E "let sources = import ./npins; in sources.nixpkgs.outPath" | jq -r .)
nixos-install \
-I nixpkgs=${nixpkgs} \
-I nixos-config=./nix/configurations/{{ host }}.nix \
--file ./default.nix \
--attr "nixosConfigurations.{{ host }}"
# Retain four weeks of generations so I don't fuck up
clean-os:
nix-env --delete-generations 28d -p /nix/var/nix/profiles/system
clean-hm:
nix-env --delete-generations 28d -p ~/.local/state/nix/profiles/home-manager
update:
npins update