diff --git a/flake.nix b/flake.nix index 7ceb3bf0..ad258213 100644 --- a/flake.nix +++ b/flake.nix @@ -40,7 +40,6 @@ "albert@nixos-rpi4-03" = libx.mkHome { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; }; }; imageConfigurations = { - # Raspberry Pi 4 Image nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; platform = "aarch64-linux"; installer = nixpkgs + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix"; }; }; }; diff --git a/lib/default.nix b/lib/default.nix index cfa83505..e17ecd8e 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -43,11 +43,21 @@ installer ? null, gpu ? null, theme ? "default" - }: { - libx = import . { inherit inputs outputs stateVersion hmStateVersion; }; + }: inputs.nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu platform theme; }; - hostname = libx.mkHost { hostname = hostname; platform = platform; installer = installer; }; - "$username@$hostname" = libx.mkHome { hostname = hostname; platform = platform; }; + modules = [ + ../nixos + inputs.sops-nix.nixosModules.sops + inputs.lanzaboote.nixosModules.lanzaboote + inputs.home-manager.lib.homeManagerConfiguration { + 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 ]); }; forAllSystems = inputs.nixpkgs.lib.genAttrs [ @@ -57,4 +67,6 @@ "aarch64-darwin" "x86_64-darwin" ]; -} \ No newline at end of file +} +mkTest = {}: {}; +nixosConfigurations \ No newline at end of file