diff --git a/flake.nix b/flake.nix index 236092d..e515f13 100644 --- a/flake.nix +++ b/flake.nix @@ -48,7 +48,14 @@ # This function produces a module that adds the home-manager module to the # system and configures the given module to the user's Home Manager # configuration - homeManagerInit = {system, username ? _username , module}: { config, lib, pkgs, ... }: { + homeManagerInit = {system, username ? _username , module ? _ : {}, users ? { ${username} = module;} }: + let + # TODO ooprs i forgor home-manager needs a state version and i currently + # don't pass the system name to this so there is no way to derive this + # value properly and it should probably be derived with mkSystem + users = users // { root = ./home/root.nix;}; + in + { config, lib, pkgs, ... }: { imports = [ inputs.home-manager.nixosModules.home-manager ]; @@ -56,7 +63,7 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - users.${username} = module; + inherit users; extraSpecialArgs = { inherit inputs outputs vars; extraPkgs = mkExtraPkgs system; diff --git a/home/root.nix b/home/root.nix new file mode 100644 index 0000000..f857ce8 --- /dev/null +++ b/home/root.nix @@ -0,0 +1,2 @@ +{ config, lib, pkgs, ... }@args: +{ }