2024-05-07 22:02:59 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-07-11 16:50:48 +00:00
|
|
|
# Define user for managing media files
|
2024-02-29 14:53:34 +00:00
|
|
|
let
|
2024-06-24 15:38:28 +00:00
|
|
|
cfg = config.aux.system.users.media;
|
2024-02-29 14:53:34 +00:00
|
|
|
in
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
options = {
|
2024-06-24 15:38:28 +00:00
|
|
|
aux.system.users.media = {
|
2024-05-07 22:02:59 +00:00
|
|
|
enable = mkEnableOption (mdDoc "Enables media user account");
|
|
|
|
};
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
users.groups."media" = {
|
|
|
|
gid = 1001;
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
users.users.media = {
|
|
|
|
isNormalUser = false;
|
|
|
|
isSystemUser = true;
|
|
|
|
description = "Media manager";
|
|
|
|
uid = 1001;
|
|
|
|
group = "media";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|