From 9f29593d306447e4fbb9d04f502e9ed5b86d1dc4 Mon Sep 17 00:00:00 2001 From: iFargle Date: Wed, 23 Aug 2023 17:11:24 +0900 Subject: [PATCH] test --- flake.nix | 4 ++-- lib/default.nix | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 57d1490c..a9ca18eb 100644 --- a/flake.nix +++ b/flake.nix @@ -19,8 +19,8 @@ libx = import ./lib { inherit inputs outputs stateVersion; }; in { nixosConfigurations = { - nixos-laptop = libx.mkHost { hostname = "nixos-laptop"; username = "albert"; desktop = "gnome"; }; - nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; username = "albert"; desktop = "gnome"; }; + nixos-laptop = libx.nixosSystem { hostname = "nixos-laptop"; username = "albert"; desktop = "gnome"; }; + nixos-desktop = libx.nixosSystem { hostname = "nixos-desktop"; username = "albert"; desktop = "gnome"; }; }; homeConfigurations = { "albert@nixos-laptop" = libx.mkHome { hostname = "nixos-laptop"; username = "albert"; desktop = "gnome"; }; diff --git a/lib/default.nix b/lib/default.nix index 8f2d642d..25e07300 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,11 +1,13 @@ { inputs, outputs, stateVersion, ... }: { # Helper function for generating home-manager configs mkHome = { hostname, username, desktop ? null, platform ? "x86_64-linux" }: inputs.home-manager.lib.homeManagerConfiguration { - pkgs = inputs.nixpkgs.legacyPackages.${platform}; + # pkgs = inputs.nixpkgs.legacyPackages.${platform}; extraSpecialArgs = { - inherit inputs outputs desktop hostname platform username stateVersion; + inherit inputs outputs desktop hostname platform username hmStateVersion; }; - modules = [ ../home-manager ]; + modules = [ + ../home-manager + ]; }; # Helper function for generating host configs @@ -14,8 +16,10 @@ inherit inputs outputs desktop hostname username stateVersion; }; modules = [ - ../nixos - inputs.agenix.nixosModules.default + ../nixos + sops-nix.nixosModules.sops # Handle secrets + lanzaboote.nixosModules.lanzaboote # SecureBoot Configuration + nur.nixosModules.nur # NixOS User Repository ] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]); };