summary refs log tree commit diff stats
path: root/system/users.nix
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-02-04 21:37:52 +0100
committerene <ene@sils.li>2023-02-04 21:44:35 +0100
commitcdbd9f7f83099a48bfa59a886b6e51790d898a24 (patch)
treecffd2aede95072613ba407734995321387ade392 /system/users.nix
parentFeat: Imported the headless profile (diff)
downloadnixos-server-cdbd9f7f83099a48bfa59a886b6e51790d898a24.tar.gz
nixos-server-cdbd9f7f83099a48bfa59a886b6e51790d898a24.zip
Flake: Changed the configuration to a flake
Nix flakes make a lot of things very easy.
Diffstat (limited to 'system/users.nix')
-rw-r--r--system/users.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/system/users.nix b/system/users.nix
new file mode 100644
index 0000000..34e1648
--- /dev/null
+++ b/system/users.nix
@@ -0,0 +1,59 @@
+{pkgs, ...}: {
+  users.mutableUsers = false;
+  users.defaultUserShell = pkgs.zsh;
+
+  users.users = {
+    root = {
+      #uid = 0;
+      #initialHashedPassword = null; # to lock root
+      # Backup, if something happens. TODO remove this later
+      openssh.authorizedKeys.keys = [
+        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG63gxw8JePmrC8Fni0pLV4TnPBhCPmSV9FYEdva+6s7 sils"
+        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGBFuTNNn71Rhfnop2cdz3r/RhWWlCePnSBOhTBbu2ME soispha"
+      ];
+    };
+
+    sils = {
+      name = "sils";
+      isNormalUser = true;
+      home = "/srv/home/sils";
+      initialHashedPassword = "$y$jFT$KpFnahVCE9JbE.5P3us8o.$ZzSxCusWqe3sL7b6DLgOXNNUf114tiiptM6T8lDxtKC"; # TODO CHANGE
+      uid = 1000;
+      extraGroups = [
+        "wheel"
+      ];
+      openssh.authorizedKeys.keys = [
+        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG63gxw8JePmrC8Fni0pLV4TnPBhCPmSV9FYEdva+6s7 sils"
+      ];
+    };
+
+    soispha = {
+      name = "soispha";
+      isNormalUser = true;
+      home = "/srv/home/soispha";
+      initialHashedPassword = "$y$jFT$3.8XmUyukZvpExMUxDZkI.$IVrJgm8ysNDF/0vDD2kF6w73ozXgr1LMVRNN4Bq7pv1";
+      uid = 1001;
+      extraGroups = [
+        "wheel"
+      ];
+      openssh.authorizedKeys.keys = [
+        "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGBFuTNNn71Rhfnop2cdz3r/RhWWlCePnSBOhTBbu2ME soispha"
+      ];
+    };
+
+    nightingale = {
+      name = "nightingale";
+      isNormalUser = true;
+      home = "/srv/home/nightingale";
+      initialHashedPassword = null; # TODO CHANGE
+      uid = 1002;
+      extraGroups = [
+        "wheel"
+      ];
+      openssh.authorizedKeys.keys = [
+      ];
+    };
+  };
+}
+# vim: ts=2
+