-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathntfy.nix
40 lines (38 loc) · 876 Bytes
/
ntfy.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
conf,
config,
pkgs,
...
}:
{
systemd.user.services.ntfy-sub = {
Install.WantedBy = [ "default.target" ];
Unit.After = [
"sops-nix.service"
"dunst.service"
];
Service = {
ExecStart = "${pkgs.bash}/bin/bash ${./scripts/ntfy-sub.sh} ${config.sops.secrets.ntfy.path}";
Environment =
let
runtimeDependencies = builtins.attrValues {
inherit (pkgs)
coreutils
jq
dunst
xdg-utils
ntfy-sh
;
};
in
"PATH=${pkgs.lib.makeBinPath runtimeDependencies}";
};
};
home.packages = [ pkgs.ntfy-sh ];
programs.zsh.shellAliases.ny = "ntfy pub defelo";
sops.secrets.ntfy = {
sopsFile = ../secrets/ntfy;
format = "binary";
path = "/home/${conf.user}/.config/ntfy/client.yml";
};
}