From b79e59b6a89b5053460a2c72fdf05fe475a50f37 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 12 May 2016 23:04:51 +0200 Subject: Hel --- users.nix | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'users.nix') diff --git a/users.nix b/users.nix index 1e5af593..8b849e8e 100644 --- a/users.nix +++ b/users.nix @@ -1,20 +1,23 @@ {config, ...}: let - ymirUsers = { - "mherold" = import ./users/mherold.nix; - "llovisa" = import ./users/llovisa.nix; - "vkleen" = import ./users/vkleen.nix; - "tkleen" = import ./users/tkleen.nix; - "mkleen" = import ./users/mkleen.nix; - "lkellers" = import ./users/lkellers.nix; - "mwgnr" = import ./users/mwagner.nix; - "ineumann" = import ./users/ineumann.nix; + baseUsers = { + "gkleen" = import ./users/gkleen.nix; + }; + extraUsers = { + ymir = { + "mherold" = import ./users/mherold.nix; + "llovisa" = import ./users/llovisa.nix; + "vkleen" = import ./users/vkleen.nix; + "tkleen" = import ./users/tkleen.nix; + "mkleen" = import ./users/mkleen.nix; + "lkellers" = import ./users/lkellers.nix; + "mwgnr" = import ./users/mwagner.nix; + "ineumann" = import ./users/ineumann.nix; + }; }; + host = config.networking.hostName; in { users.mutableUsers = false; - users.defaultUserShell = "/run/current-system/sw/bin/zsh"; - users.extraUsers = { - "gkleen" = import ./users/gkleen.nix; - } // (if config.networking.hostName == "ymir" then ymirUsers else {}); + users.extraUsers = baseUsers // (if extraUsers ? host then extraUsers."${host}" else {}); } -- cgit v1.2.3