mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 09:13:55 -05:00
nixos/users: add defaultGroups option for users
This commit is contained in:
parent
080eb89a78
commit
1a99f1ecc2
|
@ -248,6 +248,21 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
|
defaultGroups = lib.mkOption {
|
||||||
|
description = "Default groups for desktop users.";
|
||||||
|
default = [
|
||||||
|
"dialout"
|
||||||
|
"docker"
|
||||||
|
"libvirtd"
|
||||||
|
"lp"
|
||||||
|
"networkmanager"
|
||||||
|
"scanner"
|
||||||
|
"transmission"
|
||||||
|
"video"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
aly = {
|
aly = {
|
||||||
enable = lib.mkEnableOption "Aly's user.";
|
enable = lib.mkEnableOption "Aly's user.";
|
||||||
|
|
||||||
|
|
|
@ -17,17 +17,16 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.aly =
|
home-manager.users.aly =
|
||||||
if config.ar.users.aly.manageHome
|
lib.attrsets.optionalAttrs
|
||||||
then import ../../../homes/aly
|
config.ar.users.aly.manageHome
|
||||||
else {};
|
(import ../../../homes/aly);
|
||||||
|
|
||||||
users.users.aly = {
|
users.users.aly = {
|
||||||
description = "Aly Raffauf";
|
description = "Aly Raffauf";
|
||||||
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"];
|
extraGroups = config.ar.users.defaultGroups;
|
||||||
hashedPassword = config.ar.users.aly.password;
|
hashedPassword = config.ar.users.aly.password;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
linger = true;
|
linger = true;
|
||||||
uid = 1000;
|
|
||||||
|
|
||||||
openssh.authorizedKeys = {
|
openssh.authorizedKeys = {
|
||||||
keys = [
|
keys = [
|
||||||
|
@ -42,6 +41,8 @@
|
||||||
../../../secrets/publicKeys/aly_rustboro.pub
|
../../../secrets/publicKeys/aly_rustboro.pub
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
uid = 1000;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,15 +6,14 @@
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf config.ar.users.dustin.enable {
|
config = lib.mkIf config.ar.users.dustin.enable {
|
||||||
home-manager.users.dustin =
|
home-manager.users.dustin =
|
||||||
if config.ar.users.dustin.manageHome
|
lib.attrsets.optionalAttrs
|
||||||
then import ../../../homes/dustin
|
config.ar.users.dustin.manageHome
|
||||||
else {};
|
(import ../../../homes/dustin);
|
||||||
|
|
||||||
users.users.dustin = {
|
users.users.dustin = {
|
||||||
description = "Dustin Raffauf";
|
description = "Dustin Raffauf";
|
||||||
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"];
|
extraGroups = config.ar.users.defaultGroups;
|
||||||
hashedPassword = config.ar.users.dustin.password;
|
hashedPassword = config.ar.users.dustin.password;
|
||||||
|
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
uid = 1001;
|
uid = 1001;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,15 +6,14 @@
|
||||||
}: {
|
}: {
|
||||||
config = lib.mkIf config.ar.users.morgan.enable {
|
config = lib.mkIf config.ar.users.morgan.enable {
|
||||||
home-manager.users.morgan =
|
home-manager.users.morgan =
|
||||||
if config.ar.users.morgan.manageHome
|
lib.attrsets.optionalAttrs
|
||||||
then import ../../../homes/morgan
|
config.ar.users.morgan.manageHome
|
||||||
else {};
|
(import ../../../homes/morgan);
|
||||||
|
|
||||||
users.users.morgan = {
|
users.users.morgan = {
|
||||||
description = "Morgan Tamayo";
|
description = "Morgan Tamayo";
|
||||||
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"];
|
extraGroups = config.ar.users.defaultGroups;
|
||||||
hashedPassword = config.ar.users.morgan.password;
|
hashedPassword = config.ar.users.morgan.password;
|
||||||
|
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
uid = 1002;
|
uid = 1002;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue