mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-23 01:49:08 +01:00
Compare commits
No commits in common. "e2173bd8bc72fd41636e7a56f7ee789250049594" and "1bb4b6db32cf7ce40df73155e28365426623190d" have entirely different histories.
e2173bd8bc
...
1bb4b6db32
4 changed files with 1 additions and 78 deletions
|
|
@ -117,7 +117,6 @@ in
|
||||||
"browser.uiCustomization.state" = uiState;
|
"browser.uiCustomization.state" = uiState;
|
||||||
"browser.startup.homepage" = lib.mkIf (cfg.homepage != null) cfg.homepage;
|
"browser.startup.homepage" = lib.mkIf (cfg.homepage != null) cfg.homepage;
|
||||||
"sidebar.position_start" = false;
|
"sidebar.position_start" = false;
|
||||||
"browser.toolbars.bookmarks.visibility" = "never";
|
|
||||||
"browser.bookmarks.restore_default_bookmarks" = false;
|
"browser.bookmarks.restore_default_bookmarks" = false;
|
||||||
"browser.bookmarks.file" = "";
|
"browser.bookmarks.file" = "";
|
||||||
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
|
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
|
||||||
|
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
{
|
|
||||||
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 {
|
|
||||||
inherit (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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -37,10 +37,9 @@ in
|
||||||
hostnames = {
|
hostnames = {
|
||||||
remove = [ "(.*\.)?nixos.wiki$" ];
|
remove = [ "(.*\.)?nixos.wiki$" ];
|
||||||
high_priority = [
|
high_priority = [
|
||||||
"(.*\.)?github.com$"
|
"(.*\.)?reddit.com$"
|
||||||
"(.*\.)?nixos.org$"
|
"(.*\.)?nixos.org$"
|
||||||
"(.*\.)archlinux.org$"
|
"(.*\.)archlinux.org$"
|
||||||
"(.*\.)?reddit.com$"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
desktop.hyprland.noctalia.enable = true;
|
desktop.hyprland.noctalia.enable = true;
|
||||||
|
|
||||||
services.ntfy-client.enable = true;
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
shell = {
|
shell = {
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue