From ccefd04ee0d4df2091eca031bc998f4e1fb8480c Mon Sep 17 00:00:00 2001 From: Silas Schöffel Date: Thu, 28 Mar 2024 16:05:27 +0100 Subject: 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 --- system/services/libreddit/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'system/services') 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} = { -- cgit 1.4.1