nixos-module: make package overridable

This commit is contained in:
Astro 2024-07-09 15:23:07 +02:00
parent 10948f745e
commit 7be441cb0f

View file

@ -2,6 +2,10 @@
{ config, lib, pkgs, ... }: {
options.services.buzzrelay = with lib; {
enable = mkEnableOption "Enable Fedi.buzz relay";
package = mkOption {
type = types.package;
default = self.packages.${pkgs.system}.buzzrelay;
};
streams = mkOption {
type = with types; listOf str;
default = [
@ -73,7 +77,7 @@
}
else null;
});
inherit (self.packages.${pkgs.system}) buzzrelay;
buzzrelay = cfg.package;
in
lib.mkIf cfg.enable {
users.users.${cfg.user} = {