1
0
Fork 0
nix-configuration/modules/nixos/users/media/default.nix

36 lines
546 B
Nix
Raw Normal View History

2024-12-06 16:46:10 +00:00
{
lib,
config,
namespace,
...
}:
2024-02-29 14:53:34 +00:00
# Define user for managing media files
2024-02-29 14:53:34 +00:00
let
2024-12-06 16:46:10 +00:00
cfg = config.${namespace}.users.media;
2024-02-29 14:53:34 +00:00
in
{
options = {
2024-12-06 16:46:10 +00:00
${namespace}.users.media = {
2024-08-02 21:55:48 +00:00
enable = lib.mkEnableOption "Enables media user account";
};
};
2024-02-29 14:53:34 +00:00
2024-08-02 21:55:48 +00:00
config = lib.mkIf cfg.enable {
2024-09-08 15:58:56 +00:00
users = {
users.media = {
isNormalUser = false;
isSystemUser = true;
description = "Media manager";
uid = 1001;
group = "media";
};
2024-02-29 14:53:34 +00:00
2024-09-08 15:58:56 +00:00
groups."media" = {
gid = 1001;
};
};
};
}