From becb65b0cd99ed8d338160fa5f5d3b79a458f42a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 3 Jul 2015 20:36:51 +0200 Subject: cleanup --- users.nix | 3 ++- users/gkleen.nix | 28 +++++++++++++--------------- vali.nix | 11 +++++------ 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/users.nix b/users.nix index a7960588..648460d6 100644 --- a/users.nix +++ b/users.nix @@ -1,4 +1,5 @@ { users.mutableUsers = false; users.defaultUserShell = "/run/current-system/sw/bin/zsh"; -} // (import ./users/gkleen.nix) + users.extraUsers.gkleen = import ./users/gkleen.nix; +} diff --git a/users/gkleen.nix b/users/gkleen.nix index 1e8b62c9..f39b4ff3 100644 --- a/users/gkleen.nix +++ b/users/gkleen.nix @@ -1,17 +1,15 @@ { - users.extraUsers.gkleen = { - name = "gkleen"; - description = "Gregor Kleen"; - extraGroups = [ "wheel" "wlan" "lp" "dialout" ]; - group = "users"; - uid = 1000; - createHome = true; - home = "/home/gkleen"; - shell = "/run/current-system/sw/bin/zsh"; - isNormalUser = true; - openssh.authorizedKeys.keyFiles = [ - keys/gkleen-skadhi.pub - ]; - hashedPassword = "$6$fJbC4zdY$fOdHMAfIZldfE1oYcLN0WflJpD1J4tXjCP21QfjP6R4nVcbYI.bb1AjZftcJtpHvBA/tC5pJXYoaxTRFvwxvA/"; - }; + name = "gkleen"; + description = "Gregor Kleen"; + extraGroups = [ "wheel" "wlan" "lp" "dialout" ]; + group = "users"; + uid = 1000; + createHome = true; + home = "/home/gkleen"; + shell = "/run/current-system/sw/bin/zsh"; + isNormalUser = true; + openssh.authorizedKeys.keyFiles = [ + keys/gkleen-skadhi.pub + ]; + hashedPassword = "$6$fJbC4zdY$fOdHMAfIZldfE1oYcLN0WflJpD1J4tXjCP21QfjP6R4nVcbYI.bb1AjZftcJtpHvBA/tC5pJXYoaxTRFvwxvA/"; } diff --git a/vali.nix b/vali.nix index 624edaa9..5811f778 100644 --- a/vali.nix +++ b/vali.nix @@ -4,11 +4,11 @@ { config, pkgs, ... }: -{ +(import ./users.nix) { imports = [ # Include the results of the hardware scan. ./vali-hw.nix - ./users.nix + ./custom/zsh.nix ]; # Use the GRUB 2 boot loader. @@ -66,10 +66,9 @@ # services.xserver.desktopManager.kde4.enable = true; users.extraUsers.root = let - template = (import users/gkleen.nix).users.extraUsers.gkleen; + template = (import users/gkleen.nix) in - { - shell = template.shell; - openssh.authorizedKeys.keyFiles = template.openssh.authorizedKeys.keyFiles; + with template; { + inherit shell openssh.authorizedKeys.keyFiles; }; } -- cgit v1.2.3