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;
|
hostname = config.instance.hostname;
|
||||||
enable-gui = config.fudo.hosts.${hostname}.enable-gui;
|
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 {
|
in {
|
||||||
|
|
||||||
config.home-manager = {
|
config.home-manager = {
|
||||||
|
@ -24,14 +38,18 @@ in {
|
||||||
user-cfg = config.fudo.users.${username};
|
user-cfg = config.fudo.users.${username};
|
||||||
user-email = user-cfg.email;
|
user-email = user-cfg.email;
|
||||||
home-dir = user-cfg.home-directory;
|
home-dir = user-cfg.home-directory;
|
||||||
in import user-configs.${username}
|
in (import user-configs.${username} {
|
||||||
{ inherit username user-email home-dir; };
|
inherit
|
||||||
in mapAttrs generate-config {
|
config
|
||||||
niten = ./niten.nix;
|
lib
|
||||||
# FIXME: Root shouldn't have all this stuff installed!
|
pkgs
|
||||||
root = ./niten.nix;
|
doom-emacs
|
||||||
viator = ./niten.nix;
|
niten-doom-config
|
||||||
xiaoxuan = ./xiaoxuan.nix;
|
username
|
||||||
};
|
user-email
|
||||||
|
home-dir
|
||||||
|
enable-gui;
|
||||||
|
});
|
||||||
|
in mapAttrs generate-config local-users;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue