add more options for user in mydesktop module
This commit is contained in:
+27
-14
@@ -116,6 +116,31 @@ in {
|
|||||||
description = "SSH key used for git commit signing on this host.";
|
description = "SSH key used for git commit signing on this host.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
user = {
|
||||||
|
id = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 2000;
|
||||||
|
description = "User UID to set, default 2000";
|
||||||
|
};
|
||||||
|
groups = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [
|
||||||
|
"wheel"
|
||||||
|
"video"
|
||||||
|
"audio"
|
||||||
|
"camera"
|
||||||
|
"networkmanager"
|
||||||
|
"lp"
|
||||||
|
"kvm"
|
||||||
|
"libvirtd"
|
||||||
|
"adb"
|
||||||
|
"dialout"
|
||||||
|
"tss"
|
||||||
|
];
|
||||||
|
description = "Groups the user is in";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
extraSystemPackages = mkOption {
|
extraSystemPackages = mkOption {
|
||||||
type = types.listOf types.package;
|
type = types.listOf types.package;
|
||||||
default = [];
|
default = [];
|
||||||
@@ -130,20 +155,8 @@ in {
|
|||||||
{
|
{
|
||||||
users.users.${user} = {
|
users.users.${user} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
uid = 2000;
|
uid = cfg.user.id;
|
||||||
extraGroups = [
|
extraGroups = cfg.user.groups;
|
||||||
"wheel"
|
|
||||||
"video"
|
|
||||||
"audio"
|
|
||||||
"camera"
|
|
||||||
"networkmanager"
|
|
||||||
"lp"
|
|
||||||
"kvm"
|
|
||||||
"libvirtd"
|
|
||||||
"adb"
|
|
||||||
"dialout"
|
|
||||||
"tss"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
|
|||||||
Reference in New Issue
Block a user