From 9571a6cc97565072f50852ab4fa45d4b67224a4e Mon Sep 17 00:00:00 2001 From: Joshua Yuen Date: Sun, 27 Jul 2025 16:28:50 -0400 Subject: [PATCH] Add live .iso build configuration --- build-iso.sh | 6 ++++++ flake.nix | 15 +++++++++++++++ rebuild.sh | 2 ++ 3 files changed, 23 insertions(+) create mode 100755 build-iso.sh diff --git a/build-iso.sh b/build-iso.sh new file mode 100755 index 0000000..ed6c32a --- /dev/null +++ b/build-iso.sh @@ -0,0 +1,6 @@ +#/usr/bin/env bash + +echo "Building ISO ..." +nix build .#nixosConfigurations.live.config.system.build.isoImage + +echo "Done!" diff --git a/flake.nix b/flake.nix index a9e0e07..60c6616 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,21 @@ ]; }; + live = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + inherit host; + inherit profile; + inherit username; + inherit hashedPassword; + }; + modules = [ + (nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix") + ./hosts/${host} + ]; + }; + nixosvm = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { diff --git a/rebuild.sh b/rebuild.sh index 68801ac..e43c57f 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -1,3 +1,5 @@ +#/usr/bin/env bash + echo "Removing old qcow2 disk ..." rm -f ./nixos.qcow2