summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-01-02 21:22:45 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2021-01-03 16:21:34 +0100
commiteb2cb6f263dffb82da86372b14d6fcd7077fe9fe (patch)
treeccf6380e3a9bd4ad841d33ca965efc9ca363f5e8 /users
parentf6e600c20d6a97ebeda23fa2bb5621646222b2b0 (diff)
downloadnixos-eb2cb6f263dffb82da86372b14d6fcd7077fe9fe.tar
nixos-eb2cb6f263dffb82da86372b14d6fcd7077fe9fe.tar.gz
nixos-eb2cb6f263dffb82da86372b14d6fcd7077fe9fe.tar.bz2
nixos-eb2cb6f263dffb82da86372b14d6fcd7077fe9fe.tar.xz
nixos-eb2cb6f263dffb82da86372b14d6fcd7077fe9fe.zip
gkleen: setup
Diffstat (limited to 'users')
-rw-r--r--users/gkleen/authorized-keys/gkleen-sif.pub1
-rw-r--r--users/gkleen/default.nix12
-rw-r--r--users/root.nix8
3 files changed, 18 insertions, 3 deletions
diff --git a/users/gkleen/authorized-keys/gkleen-sif.pub b/users/gkleen/authorized-keys/gkleen-sif.pub
new file mode 100644
index 00000000..e9aaf215
--- /dev/null
+++ b/users/gkleen/authorized-keys/gkleen-sif.pub
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKrHPERae+OUTNOzNf9d2767ljFCm5hgmQw48Dj4RrlU gkleen@sif.midgard.yggdrasil
diff --git a/users/gkleen/default.nix b/users/gkleen/default.nix
index 03e4a64b..f74701a5 100644
--- a/users/gkleen/default.nix
+++ b/users/gkleen/default.nix
@@ -1,7 +1,15 @@
1{ userName, pkgs, ... }: 1{ userName, pkgs, customUtils, lib, ... }:
2{ 2{
3 users.users.${userName} = { 3 users.users.${userName} = {
4 description = "Gregor Kleen";
5 extraGroups = [ "wheel" "networkmanager" "lp" "dialout" "audio" "video" "xmpp" "mail" "ssh" "vboxusers" "libvirtd" "wireshark" "games"];
6 group = "users";
7 uid = 1000;
8 createHome = true;
9 home = "/home/${userName}";
10 shell = "${pkgs.zsh}/bin/zsh";
11 isNormalUser = true;
12 openssh.authorizedKeys.keyFiles = lib.attrValues (customUtils.recImport rec { dir = ./authorized-keys; _import = name: _base: dir + "/${name}"; });
4 hashedPassword = "$6$rounds=500000$dOMgCU7DAk$yQFYGOURTEt12387LIYBnFKSWmtwXMUk1LJWnV0m7OFt.y2TnxQn2abdGA5dhwG9EmMB5wZGXf4J5F71c746C/"; 13 hashedPassword = "$6$rounds=500000$dOMgCU7DAk$yQFYGOURTEt12387LIYBnFKSWmtwXMUk1LJWnV0m7OFt.y2TnxQn2abdGA5dhwG9EmMB5wZGXf4J5F71c746C/";
5 extraGroups = ["wheel" "networkmanager"];
6 }; 14 };
7} 15}
diff --git a/users/root.nix b/users/root.nix
index 88cc6b26..95fe37c4 100644
--- a/users/root.nix
+++ b/users/root.nix
@@ -1 +1,7 @@
1import ./gkleen 1{ flake, lib, config, hostName, ... }:
2{
3 users.users.root = lib.mkIf (flake.nixosModules.accounts ? "gkleen@${hostName}") {
4 inherit (config.users.users."gkleen") hashedPassword shell;
5 openssh.authorizedKeys.keyFiles = config.users.users."gkleen".openssh.authorizedKeys.keyFiles;
6 };
7}