nixos/sonarr: add package option

This commit is contained in:
Rafal Proszowski 2022-10-27 13:49:23 +01:00 committed by GitHub
parent 21fa5a05ef
commit 2c9700acf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,6 +35,15 @@ in
default = "sonarr";
description = lib.mdDoc "Group under which Sonaar runs.";
};
package = mkOption {
type = types.package;
default = pkgs.sonarr;
defaultText = literalExpression "pkgs.sonarr";
description = lib.mdDoc ''
Sonarr package to use.
'';
};
};
};
@ -52,7 +61,7 @@ in
Type = "simple";
User = cfg.user;
Group = cfg.group;
ExecStart = "${pkgs.sonarr}/bin/NzbDrone -nobrowser -data='${cfg.dataDir}'";
ExecStart = "${cfg.package}/bin/NzbDrone -nobrowser -data='${cfg.dataDir}'";
Restart = "on-failure";
};
};