diff options
author | Soispha <soispha@vhack.eu> | 2024-03-31 14:03:38 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2024-03-31 22:57:50 +0200 |
commit | 90e5e88c74f88dcf9cebf8d36924f64fe60d0cbc (patch) | |
tree | 283fcbbedd7ab654f8f0ac625e5eda7c3f051e4e /nixos/modules/services/misc | |
parent | 9bc8f11e8747a23d3333ed480a5078072827bab3 (diff) |
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.
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r-- | nixos/modules/services/misc/libreddit.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/libreddit.nix b/nixos/modules/services/misc/libreddit.nix index 02d71c198e783..e125d975d7e2a 100644 --- a/nixos/modules/services/misc/libreddit.nix +++ b/nixos/modules/services/misc/libreddit.nix @@ -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"; |