Justfile: add nixos-install step

And update README.
This commit is contained in:
Gabriel Arazas 2025-03-15 19:39:26 +08:00
parent fa6f1354cd
commit 855e552f99
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 16 additions and 0 deletions

View File

@ -10,6 +10,10 @@ update:
host-build HOST *ARGS:
nixos-rebuild --flake '.#{{HOST}}-{{arch()}}-{{os()}}' {{ARGS}}
# Small wrapper for installing NixOS systems.
nixos-install HOST *ARGS:
disko-install --flake '.#{{HOST}}-{{arch()}}-{{os()}}' {{ARGS}}
# Update a package with nix-update.
pkg-update PKG *ARGS:
nix-update -f pkgs {{PKG}} {{ARGS}}

View File

@ -82,6 +82,12 @@ nix-shell -p disko git
# Run the following commands as root.
disko --mode disko [--arg disk "/dev/sda"] --flake {canonical_flake_url}#external-hdd
nixos-install --no-root-passwd --root /mnt --flake {canonical_flake_url}#graphical-installer-x86_64-linux
# As an alternative, you can also run the following command.
disko-install --mode disko --flake {canonical_flake_url}#graphical-installer-x86_64-linux
# Or this...
just nixos-install graphical-installer
----
Also, the installer configuration also includes Guix which means it's also a Guix System installer.
@ -96,6 +102,12 @@ NO ADDITIONAL `mount` COMMANDS NEEDED!
# Also run these as root.
disko --mode disko [--arg disk "/dev/nvme0n1"] --flake {canonical_flake_url}#ni-x86_64-linux
nixos-install --flake {canonical_flake_url}#ni-x86_64-linux
# Or just run this.
disko-install --mode disko --flake {canonical_flake_url}#ni-x86_64-linux
# Or this...
just nixos-install ni
----
And voilà!