36 lines
546 B
Nix
36 lines
546 B
Nix
{
|
|
lib,
|
|
config,
|
|
namespace,
|
|
...
|
|
}:
|
|
|
|
# Define user for managing media files
|
|
let
|
|
cfg = config.${namespace}.users.media;
|
|
in
|
|
{
|
|
|
|
options = {
|
|
${namespace}.users.media = {
|
|
enable = lib.mkEnableOption "Enables media user account";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
users = {
|
|
users.media = {
|
|
isNormalUser = false;
|
|
isSystemUser = true;
|
|
description = "Media manager";
|
|
uid = 1001;
|
|
group = "media";
|
|
};
|
|
|
|
groups."media" = {
|
|
gid = 1001;
|
|
};
|
|
};
|
|
};
|
|
}
|