2024-07-07 17:12:00 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
options.ar.users = let
|
|
|
|
mkUser = user: {
|
|
|
|
enable = lib.mkEnableOption "${user}.";
|
|
|
|
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-07-08 00:58:52 -04:00
|
|
|
aly =
|
|
|
|
mkUser "aly"
|
|
|
|
// {
|
|
|
|
syncthing = {
|
|
|
|
enable = lib.mkEnableOption "Syncthing sync service.";
|
|
|
|
|
2024-07-08 01:29:09 -04:00
|
|
|
certFile = lib.mkOption {
|
|
|
|
description = "Syncthing cert file.";
|
|
|
|
type = lib.types.nonEmptyStr;
|
|
|
|
};
|
|
|
|
|
|
|
|
keyFile = lib.mkOption {
|
|
|
|
description = "Syncthing key file.";
|
|
|
|
type = lib.types.nonEmptyStr;
|
2024-07-08 00:58:52 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
musicPath = lib.mkOption {
|
|
|
|
description = "Whether to sync music folder.";
|
|
|
|
default = "/home/aly/music";
|
|
|
|
type = lib.types.str;
|
|
|
|
};
|
2024-07-08 01:29:09 -04:00
|
|
|
|
|
|
|
syncMusic = lib.mkOption {
|
|
|
|
description = "Whether to sync music folder.";
|
|
|
|
default = config.ar.users.aly.syncthing.enable;
|
|
|
|
type = lib.types.bool;
|
|
|
|
};
|
2024-07-08 00:58:52 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-07-07 17:12:00 -04:00
|
|
|
dustin = mkUser "dustin";
|
|
|
|
};
|
|
|
|
}
|