From 0a4cc55e9bba39d84735db63eb2765898c325fa0 Mon Sep 17 00:00:00 2001 From: magic_rb Date: Wed, 1 Jan 2025 20:38:32 +0100 Subject: [PATCH] Add `nixos.users.users..name` Signed-off-by: magic_rb --- modules/nixos/users.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/nixos/users.nix b/modules/nixos/users.nix index 2447afe..bc0225c 100644 --- a/modules/nixos/users.nix +++ b/modules/nixos/users.nix @@ -3,7 +3,7 @@ options = { nixos.users.users = lib.mkOption { type = lib.types.attrsOf ( - lib.types.submodule { + lib.types.submodule ({name, ...}: { options = { description = lib.mkOption { type = lib.types.str; }; createHome = lib.mkOption { type = lib.types.bool; }; @@ -22,8 +22,13 @@ type = lib.types.bool; default = false; }; + name = lib.mkOption { + type = lib.types.str; + default = name; + readOnly = true; + }; }; - } + }) ); default = { }; };