diff --git a/lib/default.nix b/lib/default.nix index 83bce26d..34c980a8 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -21,7 +21,6 @@ hostname, username ? "albert", desktop ? null, - installer ? null, gpu ? null, platform ? "x86_64-linux", theme ? "default" @@ -31,33 +30,34 @@ ../nixos inputs.sops-nix.nixosModules.sops inputs.lanzaboote.nixosModules.lanzaboote - ] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]); + ]; }; # Combines mkHost and mkHome for image building mkImage = { hostname, - username ? "albert", - desktop ? null, - platform ? "x86_64-linux", + username ? "albert", + desktop ? null, + platform ? "x86_64-linux", installer ? null, gpu ? null, theme ? "default" }: inputs.nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu platform theme; }; modules = [ - ../nixos - inputs.sops-nix.nixosModules.sops - inputs.lanzaboote.nixosModules.lanzaboote - inputs.home-manager.nixosModules.home-manager { - pkgs = inputs.nixpkgs.legacyPackages.${platform}; - extraSpecialArgs = { inherit inputs outputs desktop hostname platform username hmStateVersion theme; }; - modules = [ - ../home-manager - inputs.doom-emacs.hmModule - ]; - } - ] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]); + ../nixos + installer + inputs.sops-nix.nixosModules.sops + inputs.lanzaboote.nixosModules.lanzaboote + inputs.home-manager.nixosModules.home-manager { + pkgs = inputs.nixpkgs.legacyPackages.${platform}; + extraSpecialArgs = { inherit inputs outputs desktop hostname platform username hmStateVersion theme; }; + modules = [ + ../home-manager + inputs.doom-emacs.hmModule + ]; + } + ]; }; forAllSystems = inputs.nixpkgs.lib.genAttrs [ diff --git a/nixos/hosts/nixos-rpi4-img/default.nix b/nixos/hosts/nixos-rpi4-img/default.nix index 11ae1642..6b1f1448 100644 --- a/nixos/hosts/nixos-rpi4-img/default.nix +++ b/nixos/hosts/nixos-rpi4-img/default.nix @@ -2,7 +2,7 @@ # Build this image with: # nix build .#nixosConfigurations.nixos-rpi4-img.config.system.build.sdImage nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; - nixpkgs.buildPlatform.system = "${platform}"; + nixpkgs.buildPlatform.system = "x86_64-linux"; networking.hostName = "nixos-rpi4-img"; networking.firewall.allowedTCPPorts = [ 22 ]; } \ No newline at end of file