From 76090b81f6bee97d58e4da9d8316be15b44eca82 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 3 Jul 2015 18:37:07 +0200 Subject: Moved users to saner place --- users.nix | 4 ++++ users/gkleen.nix | 17 +++++++++++++++++ users/keys/skadhi.pub | 1 + vali.nix | 12 +----------- 4 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 users.nix create mode 100644 users/gkleen.nix create mode 100644 users/keys/skadhi.pub diff --git a/users.nix b/users.nix new file mode 100644 index 00000000..440a115c --- /dev/null +++ b/users.nix @@ -0,0 +1,4 @@ +{ + users.mutableUsers = false; + users.defaultUserShell = "/run/current-system/sw/bin/zsh"; +} // (import ./users/gkleen.nix {}) diff --git a/users/gkleen.nix b/users/gkleen.nix new file mode 100644 index 00000000..fb505426 --- /dev/null +++ b/users/gkleen.nix @@ -0,0 +1,17 @@ +{ + 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/skadhi.pub + ]; + hashedPassword = "$6$fJbC4zdY$fOdHMAfIZldfE1oYcLN0WflJpD1J4tXjCP21QfjP6R4nVcbYI.bb1AjZftcJtpHvBA/tC5pJXYoaxTRFvwxvA/"; + }; +} diff --git a/users/keys/skadhi.pub b/users/keys/skadhi.pub new file mode 100644 index 00000000..29dfee9e --- /dev/null +++ b/users/keys/skadhi.pub @@ -0,0 +1 @@ +ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBABVMu+0txXdxdTSY8POAYVXbuOEDW6VxJzaYwQljc9kzM63VUZuE606R0g2ZGr9A+Gk6qO6fpCiq4SM+1Yygz5yHgGlbO750TOGaTe6KSGw+u3miaeDviejmxTqetGmiJe7BTLRAbYHjRgD5SkK/Ovos0cDSyOfZ5aha/ehox+proQKGA== gkleen@cathy diff --git a/vali.nix b/vali.nix index 96095bd7..9478e4cf 100644 --- a/vali.nix +++ b/vali.nix @@ -8,6 +8,7 @@ imports = [ # Include the results of the hardware scan. ./vali-hw.nix + ./users.nix ]; # Use the GRUB 2 boot loader. @@ -59,15 +60,4 @@ # services.xserver.displayManager.kdm.enable = true; # services.xserver.desktopManager.kde4.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.extraUsers.gkleen = { - isNormalUser = true; - uid = 1000; - name = "gkleen"; - extraGroups = [ "wheel" ]; - createHome = true; - home = "/home/gkleen"; - shell = "/run/current-system/sw/bin/zsh"; - }; - } -- cgit v1.2.3