]> gitweb.ps.run Git - flake_thinkpad/blobdiff - config-user.nix
separate
[flake_thinkpad] / config-user.nix
diff --git a/config-user.nix b/config-user.nix
new file mode 100644 (file)
index 0000000..1b4aea7
--- /dev/null
@@ -0,0 +1,46 @@
+{ config, pkgs, inputs, lib, ... } @ args:
+let
+  wallpaper = pkgs.fetchurl {
+    url = "https://w.wallhaven.cc/full/ex/wallhaven-exrqrr.jpg";
+    sha256 = "sha256-RYN8KwJPDMfxrcosbpmjON0Y+I58IhB1Ke36LdohsxA=";
+  };
+in
+{
+  # Define a user account. Don't forget to set a password with ‘passwd’.
+  users.groups.ssh = {};
+  users.users = {
+    ps = {
+      isNormalUser = true;
+      description = "Patrick";
+      shell = pkgs.bash;
+      extraGroups = [ "networkmanager" "wheel" "dialout" "jackaudio" "lp" "incus-admin" ];
+    };
+    chirp = {
+      isSystemUser = true;
+      packages = [
+        pkgs.python3
+      ];
+      group = "ssh";
+      shell = pkgs.bash;
+      initialPassword = "chirp";
+    };
+  };
+  
+  security.polkit.enable = true;
+  security.sudo.wheelNeedsPassword = false;
+
+  home-manager = {
+    backupFileExtension = "backup";
+    extraSpecialArgs = {
+      inherit inputs;
+      inherit wallpaper;
+    };
+    users = {
+      "ps" = import ./home-ps.nix;
+      "root" = { home.stateVersion = "24.05"; };
+    };
+    sharedModules = [
+      (import ./home-common.nix)
+    ];
+  };
+}