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
|
|
@ -13,6 +13,7 @@ in
|
|||
inherit hostname username;
|
||||
domain = "net.dn";
|
||||
enableHomeManager = true;
|
||||
nvidia.enable = true;
|
||||
hyprland = {
|
||||
enable = true;
|
||||
monitors = [
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ in
|
|||
"test.local." = "127.0.0.1:5359";
|
||||
};
|
||||
forwardZonesRecurse = {
|
||||
"." = "8.8.8.8";
|
||||
"." = "168.95.1.1";
|
||||
};
|
||||
dnssecValidation = "off";
|
||||
dns.allowFrom = [
|
||||
|
|
@ -443,13 +443,19 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
systemConf.security = {
|
||||
allowedDomains = [
|
||||
"registry-1.docker.io"
|
||||
];
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
oci-containers = {
|
||||
backend = "docker";
|
||||
containers = {
|
||||
uptime-kuma = {
|
||||
extraOptions = [ "--network=host" ];
|
||||
image = "louislam/uptime-kuma:1";
|
||||
image = "louislam/uptime-kuma:2";
|
||||
volumes = [
|
||||
"/var/lib/uptime-kuma:/app/data"
|
||||
"${config.security.pki.caBundle}:/etc/ca.crt:ro"
|
||||
|
|
|
|||
|
|
@ -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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -87,5 +87,10 @@ in
|
|||
owner = "crowdsec";
|
||||
mode = "0600";
|
||||
};
|
||||
"opencloud" = mkIf config.services.opencloud.enable {
|
||||
owner = config.services.opencloud.user;
|
||||
group = config.services.opencloud.group;
|
||||
mode = "0600";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
}:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
system,
|
||||
|
|
|
|||
|
|
@ -69,6 +69,11 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
systemd.services."phpfpm-nextcloud".postStart = ''
|
||||
${config.services.nextcloud.occ}/bin/nextcloud-occ config:app:set recognize node_binary --value '${lib.getExe pkgs.nodejs_22}'
|
||||
${config.services.nextcloud.occ}/bin/nextcloud-occ config:app:set recognize tensorflow.purejs --value 'true'
|
||||
'';
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = nextcloudPkg;
|
||||
|
|
@ -88,9 +93,10 @@ in
|
|||
whiteboard
|
||||
user_oidc
|
||||
memories
|
||||
recognize # May break
|
||||
;
|
||||
|
||||
inherit recognize;
|
||||
# inherit recognize;
|
||||
|
||||
camerarawpreviews = pkgs.fetchNextcloudApp {
|
||||
url = "https://github.com/ariselseng/camerarawpreviews/releases/download/v0.8.8/camerarawpreviews_nextcloud.tar.gz";
|
||||
|
|
|
|||
23
system/modules/opencloud.nix
Normal file
23
system/modules/opencloud.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
fqdn ? null,
|
||||
https ? false,
|
||||
envFile ? null,
|
||||
}:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib) optionalString mkIf;
|
||||
finalFqdn = if fqdn == null then config.networking.fqdn else fqdn;
|
||||
in
|
||||
{
|
||||
services.opencloud = {
|
||||
enable = true;
|
||||
url = "http${optionalString https "s"}://${finalFqdn}";
|
||||
environmentFile = envFile;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${finalFqdn}" = mkIf https {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.opencloud.port}";
|
||||
};
|
||||
}
|
||||
|
|
@ -84,6 +84,11 @@ in
|
|||
tls.implicit = true;
|
||||
proxy_protocol = true;
|
||||
};
|
||||
jmap = {
|
||||
bind = [ "10.0.0.130:31004" ];
|
||||
protocol = "http";
|
||||
proxy_protocol = true;
|
||||
};
|
||||
management = {
|
||||
protocol = "http";
|
||||
bind = [
|
||||
|
|
@ -135,6 +140,7 @@ in
|
|||
virtualHosts = {
|
||||
"mail.${domain}" = {
|
||||
locations."/".proxyPass = "http://127.0.0.1:8080";
|
||||
locations."/jmap".proxyPass = "http://127.0.0.1:31004";
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue