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