diff options
-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} = { |