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
|
}: let
|
||||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||||
inherit (builtins) baseNameOf elem map;
|
inherit (builtins) baseNameOf elem map mapAttrs;
|
||||||
inherit (lib) filterAttrs attrValues attrNames;
|
inherit (lib) filterAttrs attrValues attrNames;
|
||||||
inherit (lib.modules) mkAliasOptionModule mkDefault mkIf;
|
inherit (lib.modules) mkAliasOptionModule mkDefault mkIf;
|
||||||
inherit (lib.strings) removeSuffix;
|
inherit (lib.strings) removeSuffix;
|
||||||
|
@ -25,7 +25,7 @@ in rec
|
||||||
users = attrNames (mapModules "${path}/users" (p: p));
|
users = attrNames (mapModules "${path}/users" (p: p));
|
||||||
in [
|
in [
|
||||||
inputs.nixos-boot.nixosModules.default
|
inputs.nixos-boot.nixosModules.default
|
||||||
{
|
({ options, config, ...}: {
|
||||||
nixpkgs.pkgs = pkgs;
|
nixpkgs.pkgs = pkgs;
|
||||||
networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
|
networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
|
||||||
|
|
||||||
|
@ -52,9 +52,9 @@ in rec
|
||||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
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)
|
(filterAttrs (n: v: !elem n ["system"]) attrs)
|
||||||
../. # ../default.nix
|
../. # ../default.nix
|
||||||
(import path)
|
(import path)
|
||||||
|
|
|
@ -22,12 +22,11 @@ in rec
|
||||||
group = "users";
|
group = "users";
|
||||||
};
|
};
|
||||||
|
|
||||||
mkHmUser = path: stateVersion: let
|
mkHmUser = path: args@{stateVersion, ...}: let
|
||||||
# user = import path {};
|
|
||||||
name = removeSuffix ".nix" (baseNameOf path);
|
name = removeSuffix ".nix" (baseNameOf path);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# imports = (mapModulesRec' ../modules/home (file: file));
|
# imports = (mapModulesRec' ../modules/home (file: import file (args // { user = name; })));
|
||||||
home = {
|
home = {
|
||||||
inherit stateVersion;
|
inherit stateVersion;
|
||||||
sessionPath = [ "$SNEEUWVLOK_BIN" "$XDG_BIN_HOME" "$PATH" ]; # Pretty sure I don't need this.
|
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