From 28f78bb67e64e0acf9b0f931ca9576d16b07cbf9 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Tue, 21 Oct 2025 20:03:46 +0200 Subject: [PATCH] flake: add nixos-generators for output pianonix-image --- flake.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 9b1c216..ffecbf8 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,11 @@ nix-colors.url = "github:misterio77/nix-colors"; deploy-rs.url = "github:serokell/deploy-rs"; + nixos-generators = { + url = "github:nix-community/nixos-generators"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; @@ -84,7 +89,7 @@ packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;}); devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;}); - formatter = forEachSystem (pkgs: pkgs.alejandra); + formatter = forEachSystem (pkgs: pkgs.alejandra); # nix fmt * nixosConfigurations = { # Main laptop @@ -183,5 +188,15 @@ }; }; }; + + # substitutes: nixos-generate --flake .#pianonix -f sd-aarch64 --system aarch64-linux + pianonix-image = inputs.nixos-generators.nixosGenerate { + system = "aarch64-linux"; + format = "sd-aarch64"; + modules = [./hosts/pianonix]; + specialArgs = { + inherit inputs outputs; + }; + }; }; }