mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
Fix home-manager import issue
This commit is contained in:
parent
8a6fb6c6cc
commit
0793eaa1c3
@ -91,7 +91,12 @@
|
|||||||
nixos-hardware = inputs.nixos-hardware.nixosModules;
|
nixos-hardware = inputs.nixos-hardware.nixosModules;
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
};
|
};
|
||||||
extraArgs = { inherit homeConfigurations; };
|
extraArgs = {
|
||||||
|
homeConfigurations = discoverModules ./users
|
||||||
|
(name:
|
||||||
|
import (./users + "/${name}")
|
||||||
|
);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hosts = discoverModules ./machines (name: {
|
hosts = discoverModules ./machines (name: {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, homeConfigurations, ... }:
|
||||||
|
|
||||||
with lib; {
|
with lib; {
|
||||||
options.elss.users = {
|
options.elss.users = {
|
||||||
@ -142,7 +142,7 @@ with lib; {
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
assertion = mutuallyExclusive cfg.users cfg.admins;
|
assertion = mutuallyExclusive cfg.users cfg.admins;
|
||||||
message = "kbs.users.users and kbs.users.admins are mutually exclusive";
|
message = "elss.users.users and elss.users.admins are mutually exclusive";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
assertion = all (hash: hash != "")
|
assertion = all (hash: hash != "")
|
||||||
@ -163,6 +163,11 @@ with lib; {
|
|||||||
(mapUsers mkUser)
|
(mapUsers mkUser)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
home-manager.users = (mapAllUsers mkGitUser) // (mapAllUsers mkX11User) // (mapAllUsersAndRoot (_: { config.home.stateVersion = mkDefault "21.05"; }));
|
home-manager.users = mapAllUsersAndRoot (login:
|
||||||
|
mkMerge [
|
||||||
|
{ config.home.stateVersion = mkDefault "21.11"; }
|
||||||
|
(if homeConfigurations ? "${login}" then homeConfigurations."${login}" else { })
|
||||||
|
]
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user