mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixos/libreddit: Don't hard code binary name in ExecStart
Hard coding the name to `libreddit` makes it impossible to use this module to run `redlib` (a continued fork of `libreddit`). As `libreddit` has the `mainProgram` meta attribute set, changing this to `lib.getExe` should not change the module for `libreddit`, but allows it to work with the `redlib` package.
This commit is contained in:
parent
9bc8f11e87
commit
90e5e88c74
@ -47,7 +47,7 @@ in
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
ExecStart = "${cfg.package}/bin/libreddit ${args}";
|
||||
ExecStart = "${lib.getExe cfg.package} ${args}";
|
||||
AmbientCapabilities = lib.mkIf (cfg.port < 1024) [ "CAP_NET_BIND_SERVICE" ];
|
||||
Restart = "on-failure";
|
||||
RestartSec = "2s";
|
||||
|
Loading…
Reference in New Issue
Block a user