diff options
author | Silas Schöffel <sils@sils.li> | 2024-03-28 16:05:27 +0100 |
---|---|---|
committer | Silas Schöffel <sils@sils.li> | 2024-03-28 16:16:29 +0100 |
commit | ccefd04ee0d4df2091eca031bc998f4e1fb8480c (patch) | |
tree | 2315dbc23fde7d5894e503e1cc0c9e6dea318409 /system | |
parent | feat(system/servics/libreddit): Use the continued redlib package (diff) | |
download | nixos-server-ccefd04ee0d4df2091eca031bc998f4e1fb8480c.tar.gz nixos-server-ccefd04ee0d4df2091eca031bc998f4e1fb8480c.zip |
fix(system/services/libreddit): correct binary location in systemd service
This is a manual fix until we get this merged into nixpkgs Co-authored-by: Benedikt Peetz <benedikt.peetz@b-peetz.de>
Diffstat (limited to 'system')
-rw-r--r-- | system/services/libreddit/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/system/services/libreddit/default.nix b/system/services/libreddit/default.nix index 9a7c459..e527ec2 100644 --- a/system/services/libreddit/default.nix +++ b/system/services/libreddit/default.nix @@ -5,14 +5,25 @@ ... }: let domain = "libreddit.vhack.eu"; + cfg = config.services.libreddit; + + # Taken from nixpkgs module + args = lib.concatStringsSep " " [ + "--port ${toString cfg.port}" + "--address ${cfg.address}" + ]; in { services.libreddit = { enable = true; package = pkgs-unstable.redlib; + port = 8080; address = "127.0.0.1"; openFirewall = false; }; + # Force systemd service to use correct binary + systemd.services.libreddit.serviceConfig.ExecStart = lib.mkForce "${lib.getExe cfg.package} ${args}"; + services.nginx = { enable = true; virtualHosts.${domain} = { |