From b47c85fdaa1fd8b0d1ffd54dd8d3f7310946df6f Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Fri, 11 Jul 2025 16:32:16 +0200 Subject: [PATCH] Modules/users: add isNormalUser true NormalUsers get: - Home directory - Can login This is expected for users created through this module. We can make it configurable if the use arises --- clanServices/users/default.nix | 9 ++++++++- templates/clan/default/modules/shared.nix | 1 - templates/clan/flake-parts/flake.nix | 1 - 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/clanServices/users/default.nix b/clanServices/users/default.nix index f92ac0003..d7da26587 100644 --- a/clanServices/users/default.nix +++ b/clanServices/users/default.nix @@ -73,8 +73,8 @@ ... }: { - users.mutableUsers = false; users.users.${settings.user} = { + isNormalUser = true; extraGroups = settings.groups; hashedPasswordFile = @@ -122,4 +122,11 @@ }; }; }; + + perMachine = { + nixosModule = { + # Immutable users to ensure that this module has exclusive control over the users. + users.mutableUsers = false; + }; + }; } diff --git a/templates/clan/default/modules/shared.nix b/templates/clan/default/modules/shared.nix index 4f25bb63b..672e4e23b 100644 --- a/templates/clan/default/modules/shared.nix +++ b/templates/clan/default/modules/shared.nix @@ -23,6 +23,5 @@ "video" "input" ]; - uid = 1000; }; } diff --git a/templates/clan/flake-parts/flake.nix b/templates/clan/flake-parts/flake.nix index d87eafb62..722e5dc3c 100644 --- a/templates/clan/flake-parts/flake.nix +++ b/templates/clan/flake-parts/flake.nix @@ -6,7 +6,6 @@ outputs = inputs@{ - self, flake-parts, ... }: