mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 11:43:55 -05:00
72 lines
1.6 KiB
Nix
72 lines
1.6 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
options.ar.users = let
|
|
mkUser = user: {
|
|
enable = lib.mkEnableOption "${user}.";
|
|
|
|
manageHome = lib.mkOption {
|
|
description = "Whether to manage ${user}'s home directory.";
|
|
type = lib.types.bool;
|
|
default = true;
|
|
};
|
|
|
|
password = lib.mkOption {
|
|
description = "Hashed password for ${user}.";
|
|
type = lib.types.str;
|
|
};
|
|
};
|
|
in {
|
|
defaultGroups = lib.mkOption {
|
|
description = "Default groups for desktop users.";
|
|
default = [
|
|
"dialout"
|
|
"docker"
|
|
"libvirtd"
|
|
"lp"
|
|
"networkmanager"
|
|
"scanner"
|
|
"transmission"
|
|
"video"
|
|
"wheel"
|
|
];
|
|
};
|
|
|
|
aly =
|
|
mkUser "aly"
|
|
// {
|
|
syncthing = {
|
|
enable = lib.mkEnableOption "Syncthing sync service.";
|
|
|
|
certFile = lib.mkOption {
|
|
description = "Syncthing cert file.";
|
|
type = lib.types.nonEmptyStr;
|
|
};
|
|
|
|
keyFile = lib.mkOption {
|
|
description = "Syncthing key file.";
|
|
type = lib.types.nonEmptyStr;
|
|
};
|
|
|
|
musicPath = lib.mkOption {
|
|
description = "Whether to sync music folder.";
|
|
default = "/home/aly/music";
|
|
type = lib.types.str;
|
|
};
|
|
|
|
syncMusic = lib.mkOption {
|
|
description = "Whether to sync music folder.";
|
|
default = config.ar.users.aly.syncthing.enable;
|
|
type = lib.types.bool;
|
|
};
|
|
};
|
|
};
|
|
|
|
dustin = mkUser "dustin";
|
|
morgan = mkUser "morgan";
|
|
};
|
|
}
|