diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mk_home.nix | 11 | ||||
-rw-r--r-- | lib/mk_system.nix | 12 |
2 files changed, 14 insertions, 9 deletions
diff --git a/lib/mk_home.nix b/lib/mk_home.nix index 7abe42a..52acc96 100644 --- a/lib/mk_home.nix +++ b/lib/mk_home.nix @@ -1,20 +1,23 @@ { self, home-manager, ... } @ inputs: -username: hostname: system: nixpkgs: version: +{ username, hostname, system, pkgs, version, extraModules }: let args = inputs; - entrypoint = "${self}/home/configurations/${username}@${hostname}.nix"; + entrypoint = "${self}/home/${hostname}/${username}.nix"; in home-manager.lib.homeManagerConfiguration { inherit username system; homeDirectory = "/home/${username}"; stateVersion = version; - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = pkgs; configuration = { lib, ... }: { _module = { inherit args; }; + + profiles.base.enable = true; + imports = [ entrypoint - ] ++ __attrValues self.homeModules; + ] ++ lib.optionals (extraModules != null) extraModules; }; } diff --git a/lib/mk_system.nix b/lib/mk_system.nix index ee0037b..d6a6d79 100644 --- a/lib/mk_system.nix +++ b/lib/mk_system.nix @@ -1,11 +1,11 @@ { self, ... } @ args: -name: nixpkgs: +{ name, nixpkgs, extraModules }: nixpkgs.lib.nixosSystem ( let - configFolder = "${self}/nixos/configurations"; - entryPoint = "${configFolder}/${name}.nix"; - hardware = "${configFolder}/hardware/${name}.nix"; + configFolder = "${self}/nixos"; + entryPoint = "${configFolder}/${name}/configuration.nix"; + hardware = "${configFolder}/${name}/hardware-configuration.nix"; in { system = "x86_64-linux"; @@ -20,6 +20,8 @@ nixpkgs.lib.nixosSystem ( } entryPoint hardware - ] ++ __attrValues self.nixosModules; + ../nixos/modules/flake.nix + ../nixos/modules/nix.nix + ] ++ nixpkgs.lib.optionals (extraModules != null) extraModules; } ) |