added git-secret and gotify-desktop feature
This commit is contained in:
46
modules/features/gotify-desktop/default.nix
Normal file
46
modules/features/gotify-desktop/default.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
flake.nixosModules.gotify-desktop = {
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
self.packages.${pkgs.stdenv.hostPlatform.system}.gotify-desktop
|
||||
];
|
||||
};
|
||||
perSystem = {
|
||||
pkgs,
|
||||
lib,
|
||||
self',
|
||||
...
|
||||
}: {
|
||||
packages = {
|
||||
gotify-desktop = let
|
||||
# Requires gpg keyring cert in order to get api key
|
||||
config-file = pkgs.writeText "config.toml" ''
|
||||
[gotify]
|
||||
url = "wss://ntfy.voidarc.co.uk:443"
|
||||
token = { command = "${pkgs.gnupg}/bin/gpg --quiet --batch --decrypt ${./gotify-key.secret}" }
|
||||
[notification]
|
||||
min_priority = 1
|
||||
'';
|
||||
in
|
||||
inputs.wrappers.lib.wrapPackage ({
|
||||
config,
|
||||
wlib,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
inherit pkgs;
|
||||
package = inputs.gotify-desktop.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
flags = {
|
||||
"-c" = config-file;
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
BIN
modules/features/gotify-desktop/gotify-key.secret
Normal file
BIN
modules/features/gotify-desktop/gotify-key.secret
Normal file
Binary file not shown.
Reference in New Issue
Block a user