From f74b7bdf17ebf4d52ce55acc4c069d3856f394fb Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Thu, 12 Mar 2026 23:14:21 +0100 Subject: [PATCH 1/5] ntfy-client: Init module --- modules/home/services/ntfy-client.nix | 73 +++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 modules/home/services/ntfy-client.nix diff --git a/modules/home/services/ntfy-client.nix b/modules/home/services/ntfy-client.nix new file mode 100644 index 0000000..7d52ee7 --- /dev/null +++ b/modules/home/services/ntfy-client.nix @@ -0,0 +1,73 @@ +{ + config, + pkgs, + lib, + ... +}: +let + cfg = config.custom.services.ntfy-client; + + notifyScript = pkgs.writeShellApplication { + name = "ntfy-notify"; + runtimeInputs = [ pkgs.libnotify ]; + text = '' + case "$NTFY_PRIORITY" in + 1|2) + urgency=low + ;; + 3) + urgency=normal + ;; + 4|5) + urgency=critical + ;; + esac + + notify-send \ + --app-name="ntfy - $NTFY_TOPIC" \ + --urgency="$urgency" \ + "$NTFY_TITLE" \ + "$NTFY_MESSAGE" + ''; + }; +in +{ + options.custom.services.ntfy-client = { + enable = lib.mkEnableOption ""; + topic = lib.mkOption { + type = lib.types.nonEmptyStr; + default = "splitleaf"; + }; + server = lib.mkOption { + type = lib.types.nonEmptyStr; + default = "https://ntfy.sh"; + }; + }; + + config = lib.mkIf cfg.enable { + xdg.configFile."ntfy/client.yml".source = + { + default-host = cfg.server; + subscribe = lib.singleton { + topic = cfg.topic; + command = lib.getExe notifyScript; + }; + } + |> (pkgs.formats.yaml { }).generate "ntfy-client.yml"; + + systemd.user.services.ntfy-client = { + Install.WantedBy = [ "graphical-session.target" ]; + Unit = { + Description = "ntfy client subscriber"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + X-Restart-Triggers = [ config.xdg.configFile."ntfy/client.yml".source ]; + }; + Service = { + ExecStart = "${lib.getExe pkgs.ntfy-sh} subscribe --from-config"; + Restart = "on-failure"; + RestartSec = 10; + }; + }; + }; +} From 795b001059045d2c12ed3f75d80b35c045be1c5a Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Thu, 12 Mar 2026 23:14:39 +0100 Subject: [PATCH 2/5] home: Enable ntfy-client --- users/seb/home.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/users/seb/home.nix b/users/seb/home.nix index b0ae7aa..6754862 100644 --- a/users/seb/home.nix +++ b/users/seb/home.nix @@ -21,6 +21,8 @@ desktop.hyprland.noctalia.enable = true; + services.ntfy-client.enable = true; + programs = { shell = { zsh.enable = true; From bc6a392b2eef4a74e3a52865d27db80c370b74c1 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Thu, 12 Mar 2026 23:15:20 +0100 Subject: [PATCH 3/5] searxng: Add `github.com` as a high priority domain --- modules/nixos/web-services/searxng.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nixos/web-services/searxng.nix b/modules/nixos/web-services/searxng.nix index 47429b7..ff83745 100644 --- a/modules/nixos/web-services/searxng.nix +++ b/modules/nixos/web-services/searxng.nix @@ -37,9 +37,10 @@ in hostnames = { remove = [ "(.*\.)?nixos.wiki$" ]; high_priority = [ - "(.*\.)?reddit.com$" + "(.*\.)?github.com$" "(.*\.)?nixos.org$" "(.*\.)archlinux.org$" + "(.*\.)?reddit.com$" ]; }; }; From e2d3813380c04139678f5dcc3915b6ea596713aa Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Thu, 12 Mar 2026 23:19:48 +0100 Subject: [PATCH 4/5] ntfy-client: Fix syntax --- modules/home/services/ntfy-client.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/services/ntfy-client.nix b/modules/home/services/ntfy-client.nix index 7d52ee7..e7e08e5 100644 --- a/modules/home/services/ntfy-client.nix +++ b/modules/home/services/ntfy-client.nix @@ -49,7 +49,7 @@ in { default-host = cfg.server; subscribe = lib.singleton { - topic = cfg.topic; + inherit (cfg) topic; command = lib.getExe notifyScript; }; } From e2173bd8bc72fd41636e7a56f7ee789250049594 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Thu, 12 Mar 2026 23:23:46 +0100 Subject: [PATCH 5/5] firefox: Never show bookmarks toolbar --- modules/home/programs/firefox.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/programs/firefox.nix b/modules/home/programs/firefox.nix index e27450a..2f54cc4 100644 --- a/modules/home/programs/firefox.nix +++ b/modules/home/programs/firefox.nix @@ -117,6 +117,7 @@ in "browser.uiCustomization.state" = uiState; "browser.startup.homepage" = lib.mkIf (cfg.homepage != null) cfg.homepage; "sidebar.position_start" = false; + "browser.toolbars.bookmarks.visibility" = "never"; "browser.bookmarks.restore_default_bookmarks" = false; "browser.bookmarks.file" = ""; "media.videocontrols.picture-in-picture.video-toggle.enabled" = false;