ok, _module.args
is not the solution I am looking for. still limited to a single user for now
This commit is contained in:
parent
34874dd592
commit
65e0b4932e
3 changed files with 6 additions and 16 deletions
|
@ -1,9 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
# full_name = "Kaas Mans";
|
||||
# is_trusted = false;
|
||||
|
||||
shell = {
|
||||
default = "fish";
|
||||
};
|
||||
}
|
|
@ -6,7 +6,7 @@ args@{
|
|||
...
|
||||
}: let
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
inherit (builtins) baseNameOf elem map;
|
||||
inherit (builtins) baseNameOf elem map mapAttrs;
|
||||
inherit (lib) filterAttrs attrValues attrNames;
|
||||
inherit (lib.modules) mkAliasOptionModule mkDefault mkIf;
|
||||
inherit (lib.strings) removeSuffix;
|
||||
|
@ -25,7 +25,7 @@ in rec
|
|||
users = attrNames (mapModules "${path}/users" (p: p));
|
||||
in [
|
||||
inputs.nixos-boot.nixosModules.default
|
||||
{
|
||||
({ options, config, ...}: {
|
||||
nixpkgs.pkgs = pkgs;
|
||||
networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
|
||||
|
||||
|
@ -52,9 +52,9 @@ in rec
|
|||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
];
|
||||
|
||||
users = mapModules "${path}/users" (p: mkHmUser p stateVersion);
|
||||
users = mapModules "${path}/users" (p: mkHmUser p { inherit inputs lib options config system pkgs self stateVersion; });
|
||||
};
|
||||
}
|
||||
})
|
||||
(filterAttrs (n: v: !elem n ["system"]) attrs)
|
||||
../. # ../default.nix
|
||||
(import path)
|
||||
|
|
|
@ -22,12 +22,11 @@ in rec
|
|||
group = "users";
|
||||
};
|
||||
|
||||
mkHmUser = path: stateVersion: let
|
||||
# user = import path {};
|
||||
mkHmUser = path: args@{stateVersion, ...}: let
|
||||
name = removeSuffix ".nix" (baseNameOf path);
|
||||
in
|
||||
{
|
||||
# imports = (mapModulesRec' ../modules/home (file: file));
|
||||
# imports = (mapModulesRec' ../modules/home (file: import file (args // { user = name; })));
|
||||
home = {
|
||||
inherit stateVersion;
|
||||
sessionPath = [ "$SNEEUWVLOK_BIN" "$XDG_BIN_HOME" "$PATH" ]; # Pretty sure I don't need this.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue