diff --git a/system/modules/openssh.nix b/system/modules/openssh.nix index 68a066c..006a083 100644 --- a/system/modules/openssh.nix +++ b/system/modules/openssh.nix @@ -3,8 +3,8 @@ let cfg = config.profile.openssh; inherit (lib.meta) getExe; in -{ - config = lib.mkIf cfg.enable { +lib.mkMerge [ + (lib.mkIf cfg.enable { networking.firewall = { allowedTCPPorts = lib.mkAfter [ 22 ]; }; @@ -56,5 +56,12 @@ in security.pam.services.sshd.text = lib.mkDefault (lib.mkAfter '' session optional pam_exec.so ${getExe pkgs.bash} ${config.sops.templates."ntfy-ssh-login.sh".path} ''); - }; -} + }) + { + profile.services.ntfy-sh.client.settings.subscribe = [ + { + topic = "ssh"; + } + ]; + } +] diff --git a/system/podman/valheim.nix b/system/podman/valheim.nix index 440fa5c..30103f7 100644 --- a/system/podman/valheim.nix +++ b/system/podman/valheim.nix @@ -83,7 +83,6 @@ lib.mkMerge [ profile.services.ntfy-sh.client.settings.subscribe = [ { topic = "valheim"; - command = ''${pkgs.libnotify}/bin/notify-send --category=im.received --urgency=normal "$title" "$message"''; } ]; } diff --git a/system/podman/ytptube.nix b/system/podman/ytptube.nix index af3e792..7f6a634 100644 --- a/system/podman/ytptube.nix +++ b/system/podman/ytptube.nix @@ -169,7 +169,6 @@ lib.mkMerge [ profile.services.ntfy-sh.client.settings.subscribe = [ { topic = "ytptube"; - command = ''${pkgs.libnotify}/bin/notify-send --category=im.received --urgency=normal "$title" "$message"''; } ]; } diff --git a/system/services/ntfy-sh.nix b/system/services/ntfy-sh.nix index 009595e..52962d1 100644 --- a/system/services/ntfy-sh.nix +++ b/system/services/ntfy-sh.nix @@ -85,7 +85,8 @@ lib.mkMerge [ content = builtins.readFile ((pkgs.formats.yaml { }).generate filename ( { default-host = "https://${domain}"; - detault-token = config.sops.placeholder."ntfy/tokens/tigor"; + default-token = config.sops.placeholder."ntfy/tokens/tigor"; + default-command = ''${pkgs.libnotify}/bin/notify-send --category=im.received --urgency=normal "$title" "$message"''; } // cfg.client.settings )); path = configPath;