From 1d7b04a71c7222153ffa9cd48f73b51ea72204d1 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 18 Feb 2023 05:13:27 -0500 Subject: major refactor - `mkHost` now accepts an optional `specialArgs` argument to be passed to `nixosSystem()` - the `modules` argument for `mkHMUser` is now optional --- util/host.nix | 10 +++++++--- util/user.nix | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'util') diff --git a/util/host.nix b/util/host.nix index 90f1dec..869b674 100644 --- a/util/host.nix +++ b/util/host.nix @@ -3,12 +3,13 @@ name, modules, system ? "x86_64-linux", + specialArgs ? {}, version ? "22.11", pkgs, }: { ${name} = with pkgs.lib; nixosSystem { - inherit system; + inherit system specialArgs; modules = [ ../hosts/common @@ -27,8 +28,11 @@ home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = specialArgs; + }; } ] ++ modules; diff --git a/util/user.nix b/util/user.nix index 3d16651..62c29f2 100644 --- a/util/user.nix +++ b/util/user.nix @@ -4,7 +4,7 @@ stateVersion ? "22.11", system ? "x86_64-linux", channel, - modules, + modules ? [], }: home-manager.lib.homeManagerConfiguration { pkgs = channel.legacyPackages.${system}; -- cgit v1.2.3