Compare commits
2 commits
78207fdbe7
...
d49478741f
Author | SHA1 | Date | |
---|---|---|---|
Tigor Hutasuhut | d49478741f | ||
Tigor Hutasuhut | 42125834a4 |
|
@ -14,6 +14,9 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.variables = [ "all" ];
|
systemd.variables = [ "all" ];
|
||||||
settings = {
|
settings = {
|
||||||
|
env = [
|
||||||
|
"DBUS_SESSION_BUS_ADDRESS,unix:path=/run/user/${toString config.profile.user.uid}/bus"
|
||||||
|
];
|
||||||
exec-once = lib.mkOrder 5 [
|
exec-once = lib.mkOrder 5 [
|
||||||
''${pkgs.dbus}/bin/dbus-update-activation-environment --all''
|
''${pkgs.dbus}/bin/dbus-update-activation-environment --all''
|
||||||
];
|
];
|
||||||
|
|
|
@ -10,8 +10,8 @@ in
|
||||||
ntfy-sh
|
ntfy-sh
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once = [
|
# wayland.windowManager.hyprland.settings.exec-once = [
|
||||||
"ntfy subscribe --config /etc/ntfy/client.yml --from-config"
|
# "ntfy subscribe --config /etc/ntfy/client.yml --from-config"
|
||||||
];
|
# ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,25 @@ lib.mkMerge [
|
||||||
NTFY_CONFIG = configPath;
|
NTFY_CONFIG = configPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.ntfy-client = {
|
||||||
|
enable = true;
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
environment = {
|
||||||
|
DISPLAY = ":0";
|
||||||
|
DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/user/${toString config.profile.user.uid}/bus";
|
||||||
|
};
|
||||||
|
restartTriggers = [ (builtins.toJSON cfg.client.settings) ];
|
||||||
|
path = with pkgs; [ bash libnotify ];
|
||||||
|
description = "ntfy-sh client";
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.ntfy-sh}/bin/ntfy --debug subscribe --config /etc/ntfy/client.yml --from-config";
|
||||||
|
Restart = "on-failure";
|
||||||
|
User = config.profile.user.uid;
|
||||||
|
Group = config.profile.user.gid;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
secrets =
|
secrets =
|
||||||
let
|
let
|
||||||
|
|
Loading…
Reference in a new issue