From a0b7802372dc59317d06c474ea4de00e7f04c09f Mon Sep 17 00:00:00 2001 From: Markus Cisler Date: Mon, 15 May 2023 14:48:46 -0700 Subject: [PATCH] nixos/thelounge: add package option Adds a package option to the thelounge NixOS module. --- nixos/modules/services/networking/thelounge.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/thelounge.nix b/nixos/modules/services/networking/thelounge.nix index a188ffe866b5..2c4c32bc7cf3 100644 --- a/nixos/modules/services/networking/thelounge.nix +++ b/nixos/modules/services/networking/thelounge.nix @@ -25,6 +25,8 @@ in options.services.thelounge = { enable = mkEnableOption (lib.mdDoc "The Lounge web IRC client"); + package = mkPackageOptionMD pkgs "thelounge" { }; + public = mkOption { type = types.bool; default = false; @@ -93,11 +95,11 @@ in serviceConfig = { User = "thelounge"; StateDirectory = baseNameOf dataDir; - ExecStart = "${pkgs.thelounge}/bin/thelounge start"; + ExecStart = "${getExe cfg.package} start"; }; }; - environment.systemPackages = [ pkgs.thelounge ]; + environment.systemPackages = [ cfg.package ]; }; meta = {