Only set up home dirs for local users
This commit is contained in:
parent
94f5f2560a
commit
a77fbf9682
36
module.nix
36
module.nix
|
@ -14,6 +14,20 @@ let
|
|||
hostname = config.instance.hostname;
|
||||
enable-gui = config.fudo.hosts.${hostname}.enable-gui;
|
||||
|
||||
user-config-map = {
|
||||
niten = ./niten.nix;
|
||||
# FIXME: Root shouldn't have all this stuff installed!
|
||||
root = ./niten.nix;
|
||||
viator = ./niten.nix;
|
||||
xiaoxuan = ./xiaoxuan.nix;
|
||||
};
|
||||
|
||||
local-users = let
|
||||
local-usernames = attrNames config.instance.local-users;
|
||||
in filterAttrs
|
||||
(username: userOpts: elem username local-usernames)
|
||||
user-config-map;
|
||||
|
||||
in {
|
||||
|
||||
config.home-manager = {
|
||||
|
@ -24,14 +38,18 @@ in {
|
|||
user-cfg = config.fudo.users.${username};
|
||||
user-email = user-cfg.email;
|
||||
home-dir = user-cfg.home-directory;
|
||||
in import user-configs.${username}
|
||||
{ inherit username user-email home-dir; };
|
||||
in mapAttrs generate-config {
|
||||
niten = ./niten.nix;
|
||||
# FIXME: Root shouldn't have all this stuff installed!
|
||||
root = ./niten.nix;
|
||||
viator = ./niten.nix;
|
||||
xiaoxuan = ./xiaoxuan.nix;
|
||||
};
|
||||
in (import user-configs.${username} {
|
||||
inherit
|
||||
config
|
||||
lib
|
||||
pkgs
|
||||
doom-emacs
|
||||
niten-doom-config
|
||||
username
|
||||
user-email
|
||||
home-dir
|
||||
enable-gui;
|
||||
});
|
||||
in mapAttrs generate-config local-users;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue