28 lines
526 B
Nix
28 lines
526 B
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
cfg = config.pepe.core.media;
|
|
in
|
|
{
|
|
options.pepe.core.media = with lib; {
|
|
enable = mkEnableOption "Enable media library";
|
|
group = mkOption {
|
|
type = types.str;
|
|
default = "media";
|
|
};
|
|
path = mkOption {
|
|
type = types.str;
|
|
default = null;
|
|
};
|
|
groupMembers = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [];
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
users.groups.${cfg.group}.members = [ cfg.group ] ++ cfg.groupMembers;
|
|
};
|
|
}
|
|
|