Skip to content

Commit

Permalink
nixos-module: make package overridable
Browse files Browse the repository at this point in the history
  • Loading branch information
astro committed Jul 9, 2024
1 parent 10948f7 commit 7be441c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nixos-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -73,7 +77,7 @@
}
else null;
});
inherit (self.packages.${pkgs.system}) buzzrelay;
buzzrelay = cfg.package;
in
lib.mkIf cfg.enable {
users.users.${cfg.user} = {
Expand Down

0 comments on commit 7be441c

Please sign in to comment.