nix-config/modules/nixos/wrtagweb.nix
Lander Van den Bulcke a50f96c1e5
feat: enable wrtag addons
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
2025-10-07 19:18:22 +02:00

47 lines
890 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.wrtagweb;
in
{
options = {
services.wrtagweb = {
enable = lib.mkEnableOption "wrtag web";
settingsFile = lib.mkOption {
type = lib.types.path;
description = ''
Configuration file for wrtagweb
'';
};
};
};
config = lib.mkIf cfg.enable {
users.users.wrtagweb = {
enable = true;
isSystemUser = true;
group = "wrtagweb";
};
users.groups.wrtagweb = { };
environment.systemPackages = with pkgs; [
rsgain
];
systemd.services.wrtagweb = {
description = "wrtagweb";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "wrtagweb";
ExecStart = "${pkgs.unstable.wrtag}/bin/wrtagweb -config-path ${cfg.settingsFile}";
};
};
};
}