Clean up the users.nix file

This commit is contained in:
Manuel Thalmann 2024-08-23 18:51:54 +02:00
parent 6ae1a4a688
commit c2b83d666a

View file

@ -7,11 +7,8 @@
cfg = config.valhalla;
capitalize = (import ../text.nix { inherit lib; }).capitalize;
in {
options = {
valhalla = {
users = mkOption {
type = types.attrsOf (types.submodule (
userType = types.submodule (
{ ... } : {
options = {
displayName = mkOption {
@ -32,13 +29,10 @@
default = [];
};
};
}));
description = "The users to create on the machine.";
default = {};
};
});
linux.users = mkOption {
type = types.attrsOf (types.submodule {
linuxUserType = types.submodule (
{ ... }: {
options = {
defaultShell = mkOption {
type = types.nullOr types.str;
@ -47,10 +41,9 @@
};
};
});
};
windows.users = mkOption {
type = types.attrsOf (types.submodule {
winUserType = types.submodule (
{ ... }: {
options = {
microsoftAccount = mkOption {
type = types.bool;
@ -59,6 +52,21 @@
};
};
});
in {
options = {
valhalla = {
users = mkOption {
type = types.attrsOf userType;
description = "The users to create on the machine.";
default = {};
};
linux.users = mkOption {
type = types.attrsOf linuxUserType;
};
windows.users = mkOption {
type = types.attrsOf winUserType;
};
};
};