summaryrefslogtreecommitdiff
path: root/users.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users.nix')
-rw-r--r--users.nix33
1 files changed, 10 insertions, 23 deletions
diff --git a/users.nix b/users.nix
index 6f21c51d..06d465a2 100644
--- a/users.nix
+++ b/users.nix
@@ -1,30 +1,17 @@
1{config, ...}: 1{ config, lib, ...}:
2
3with lib;
2 4
3let 5let
4 baseUsers = { 6 genUsersList = dirPath: concatLists (let contents = builtins.readDir dirPath; in map (name: (dirEntryToList."${contents."${name}"}" or (x: [])) "${dirPath}/${name}") (attrNames contents));
5 "gkleen" = import ./users/gkleen.nix; 7 dirEntryToList = {
6 }; 8 "regular" = path: [(import (builtins.toPath path))];
7 extraUsers = {
8 ymir = {
9 "mherold" = import ./users/mherold.nix;
10 "some" = import ./users/some.nix;
11 "llovisa" = import ./users/llovisa.nix;
12 "vkleen" = import ./users/vkleen.nix;
13 "tkleen" = import ./users/tkleen.nix;
14 "mkleen" = import ./users/mkleen.nix;
15 "lkellers" = import ./users/lkellers.nix;
16 "mwgnr" = import ./users/mwagner.nix;
17 "ineumann" = import ./users/ineumann.nix;
18 "sselle" = import ./users/sselle.nix;
19 "sgoebels" = import ./users/sgoebels.nix;
20 "mtrinh" = import ./users/mtrinh.nix;
21 };
22 odin = {
23 "mherold" = import ./users/mherold.nix;
24 };
25 }; 9 };
10
11 users = genUsersList ./users;
26 host = config.networking.hostName; 12 host = config.networking.hostName;
27in { 13in {
28 users.mutableUsers = false; 14 users.mutableUsers = false;
29 users.extraUsers = baseUsers // (if builtins.hasAttr host extraUsers then builtins.getAttr host extraUsers else {}); 15 users.extraUsers = listToAttrs
16 (map (user: nameValuePair (user.name) (removeAttrs user ["hosts" "allHosts"])) (filter (user: elem host (user.hosts or []) || (user.allHosts or false)) users));
30} 17}