diff --git a/ops/nixos/lib/home-manager/common.nix b/ops/nixos/lib/home-manager/common.nix index 7a6390995b..756ad9e689 100644 --- a/ops/nixos/lib/home-manager/common.nix +++ b/ops/nixos/lib/home-manager/common.nix @@ -7,6 +7,12 @@ in programs.ntfy = { enable = true; + package = if isDarwin then pkgs.ntfy.overrideAttrs (oldAttrs: { + postPatch = '' + substituteInPlace setup.py \ + --replace '"darwin"' '"darwin-disabled"' + ''; + }) else pkgs.ntfy; settings = { backends = [ "pushover" ]; pushover = { diff --git a/ops/nixos/lib/home-manager/ntfy.nix b/ops/nixos/lib/home-manager/ntfy.nix index a6eeb89c79..e365c7791a 100644 --- a/ops/nixos/lib/home-manager/ntfy.nix +++ b/ops/nixos/lib/home-manager/ntfy.nix @@ -9,6 +9,12 @@ in options.programs.ntfy = { enable = mkEnableOption "ntfy"; + package = mkOption { + default = pkgs.ntfy; + defaultText = "pkgs.ntfy"; + type = types.package; + }; + settings = mkOption { default = {}; type = types.submodule { @@ -18,7 +24,7 @@ in }; config = mkIf cfg.enable { - home.packages = [ pkgs.ntfy ]; + home.packages = [ cfg.package ]; xdg.configFile."ntfy/ntfy.yml" = mkIf (cfg.settings != { }) { source = configFile; }; };