ntfy-sh: client activation moved to hyprland module
This commit is contained in:
parent
26ff543629
commit
05b77f5b34
|
@ -21,6 +21,7 @@ in
|
|||
./alacritty.nix
|
||||
./swayosd.nix
|
||||
./sway-notification-center.nix
|
||||
./ntfy-sh.nix
|
||||
];
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
|
|
13
home/modules/hyprland/ntfy-sh.nix
Normal file
13
home/modules/hyprland/ntfy-sh.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
hyprland = config.profile.hyprland;
|
||||
cfg = config.profile.services.ntfy-sh.client;
|
||||
inherit (lib) mkIf;
|
||||
in
|
||||
{
|
||||
config = mkIf (hyprland.enable && cfg.enable) {
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"${pkgs.ntfy-sh}/bin/ntfy subscribe --config /etc/ntfy/client.yml --from-config"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -50,25 +50,6 @@ lib.mkMerge [
|
|||
NTFY_CONFIG = configPath;
|
||||
};
|
||||
|
||||
systemd.services.ntfy-client = {
|
||||
enable = true;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "ntfy client";
|
||||
after = [ "network-online.target" ];
|
||||
restartTriggers = [ (builtins.toJSON cfg.client.settings) ];
|
||||
environment = {
|
||||
DISPLAY = ":0";
|
||||
DBUS_SESSION_BUS_ADDRESS = "unix:path=/run/user/${toString config.profile.user.uid}/bus";
|
||||
};
|
||||
path = [ pkgs.bash ];
|
||||
serviceConfig = {
|
||||
User = toString config.profile.user.uid;
|
||||
Group = toString config.profile.user.gid;
|
||||
ExecStart = "${pkgs.ntfy-sh}/bin/ntfy subscribe --config ${configPath} --from-config";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
sops = {
|
||||
secrets =
|
||||
let
|
||||
|
|
Loading…
Reference in a new issue