mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
nixos/nar-serve: add package option
This commit is contained in:
parent
ee96b8a3cf
commit
ed47bba9ad
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,8 @@ in
|
|||
services.nar-serve = {
|
||||
enable = mkEnableOption "serving NAR file contents via HTTP";
|
||||
|
||||
package = mkPackageOption pkgs "nar-serve" { };
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8383;
|
||||
|
@ -47,7 +49,7 @@ in
|
|||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = "5s";
|
||||
ExecStart = "${pkgs.nar-serve}/bin/nar-serve";
|
||||
ExecStart = lib.getExe cfg.package;
|
||||
DynamicUser = true;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue