Add givenName & surname

This commit is contained in:
niten 2023-09-06 17:37:55 -07:00
parent cea913f1fe
commit dbf6cd6337
1 changed files with 85 additions and 74 deletions

View File

@ -1,7 +1,6 @@
{ lib, ... }: { lib, ... }:
with lib; with lib; rec {
rec {
systemUserOpts = { name, ... }: { systemUserOpts = { name, ... }: {
options = with lib.types; { options = with lib.types; {
username = mkOption { username = mkOption {
@ -23,8 +22,8 @@ rec {
}; };
}; };
userOpts = { name, ... }: let userOpts = { name, ... }:
username = name; let username = name;
in { in {
options = with lib.types; { options = with lib.types; {
username = mkOption { username = mkOption {
@ -94,7 +93,7 @@ rec {
ssh-keys = mkOption { ssh-keys = mkOption {
type = listOf (submodule sshKeyOpts); type = listOf (submodule sshKeyOpts);
description = "Path to the user's public and private key files."; description = "Path to the user's public and private key files.";
default = []; default = [ ];
}; };
email = mkOption { email = mkOption {
@ -106,7 +105,19 @@ rec {
email-aliases = mkOption { email-aliases = mkOption {
type = listOf str; type = listOf str;
description = "Email aliases that should map to this user."; description = "Email aliases that should map to this user.";
default = []; default = [ ];
};
given-name = mkOption {
type = nullOr str;
description = "User's given name.";
default = null;
};
surname = mkOption {
type = nullOr str;
description = "User's surname.";
default = null;
}; };
}; };
}; };