Commit 8bcf91b

HPCesia <me@hpcesia.com>
2025-11-12 16:48:17
feat: podman/docker group for main user
1 parent aed066c
Changed files (1)
modules
users
modules/users/hpcesia/default.nix
@@ -1,17 +1,20 @@
-{
+{lib, ...}: {
   flake.modules.nixos.user-hpcesia = {config, ...}: {
     users.users.hpcesia = {
       description = "HPCesia";
       home = "/home/hpcesia";
       hashedPasswordFile = config.vaultix.secrets.user-hpcesia-hashed-password.path;
       isNormalUser = true;
-      extraGroups = [
-        "hpcesia"
-        "users"
-        "networkmanager"
-        "wheel"
-        "nix-secrets-ssh-hosts"
-      ];
+      extraGroups =
+        [
+          "hpcesia"
+          "users"
+          "networkmanager"
+          "wheel"
+          "nix-secrets-ssh-hosts"
+        ]
+        ++ (lib.optionals config.virtualisation.podman.enable ["podman"])
+        ++ (lib.optionals config.virtualisation.docker.enable ["docker"]);
       openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIyxd+nyK9cnULmzXIMhE1/rIB3VMsJ6SuWV4Ha8oE0F hpcesia@kevin"];
     };