feat: add change wallpaper shortcut to yazi
This commit is contained in:
parent
d1f25b377f
commit
c45ba82b90
18 changed files with 188 additions and 21 deletions
|
|
@ -1,3 +1,4 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./actual-budget.nix
|
||||
|
|
@ -7,5 +8,10 @@
|
|||
./nextcloud.nix
|
||||
./paperless-ngx.nix
|
||||
./metrics.nix
|
||||
# (import ../../../modules/opencloud.nix {
|
||||
# fqdn = "opencloud.net.dn";
|
||||
# envFile = config.sops.secrets."opencloud".path;
|
||||
# })
|
||||
(import ./ntfy.nix { fqdn = "ntfy.net.dn"; })
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,4 +154,39 @@ in
|
|||
};
|
||||
})
|
||||
];
|
||||
|
||||
services.prometheus.alertmanager-ntfy = {
|
||||
settings = {
|
||||
http = {
|
||||
addr = ":31006";
|
||||
};
|
||||
ntfy = {
|
||||
baseurl = config.services.ntfy-sh.settings.base-url;
|
||||
notification = {
|
||||
topic = "alertmgr";
|
||||
priority = ''
|
||||
status == "firing" ? "urgent" : "default"
|
||||
'';
|
||||
tags = [
|
||||
{
|
||||
tag = "+1";
|
||||
condition = ''status == "resolved"'';
|
||||
}
|
||||
];
|
||||
templates = {
|
||||
title = ''
|
||||
{{ if eq .Status "resolved" }}Resolved: {{ end }}{{ index .Annotations "summary" }}
|
||||
'';
|
||||
description = ''
|
||||
{{ index .Annotations "description" }}
|
||||
'';
|
||||
headers.X-Click = ''
|
||||
{{ .GeneratorURL }}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
35
system/dev/dn-server/services/ntfy.nix
Normal file
35
system/dev/dn-server/services/ntfy.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
fqdn ? null,
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
port = 31004;
|
||||
finalFqdn = if fqdn == null then config.networking.fqdn else fqdn;
|
||||
in
|
||||
{
|
||||
systemConf.security.allowedDomains = [
|
||||
"ntfy.sh"
|
||||
];
|
||||
|
||||
services.ntfy-sh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
listen-http = ":${toString port}";
|
||||
base-url = "https://${finalFqdn}";
|
||||
upstream-base-url = "https://ntfy.sh";
|
||||
behind-proxy = true;
|
||||
proxy-trusted-hosts = "127.0.0.1";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"${finalFqdn}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "http://127.0.0.1:${toString port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue