Files
nixos/modules/features/gotify-desktop/default.nix
2026-09-25 21:00:34 +01:00

36 lines
796 B
Nix

{
inputs,
moduleWithSystem,
...
}: {
flake.nixosModules.gotify-desktop = moduleWithSystem ({self', ...}: {
environment.systemPackages = with self'.packages; [
gotify-desktop
];
});
perSystem = {
pkgs,
inputs',
...
}: {
packages = {
gotify-desktop = let
config-file = pkgs.writeText "config.toml" ''
[gotify]
url = "wss://ntfy.voidarc.co.uk:443"
token = { command = "cat /run/secrets/gotify-desktop-key"}
[notification]
min_priority = 1
'';
in
inputs.wrappers.lib.wrapPackage ({...}: {
inherit pkgs;
package = inputs'.gotify-desktop.packages.default;
flags = {
"-c" = config-file;
};
});
};
};
}