some formatting

This commit is contained in:
Danilo Reyes 2025-01-22 16:38:15 -06:00
parent e1be43a0a5
commit cdd9dac355
25 changed files with 29 additions and 57 deletions

View File

@ -1,4 +1,4 @@
{ inputs, pkgs, ... }:
{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix

View File

@ -13,7 +13,7 @@
};
config =
let
download = inputs.jawz-scripts.packages.x86_64-linux.download;
inherit (inputs.jawz-scripts.packages.x86_64-linux) download;
in
{
home-manager.users.jawz = {

View File

@ -10,7 +10,7 @@
options.my.units.stream-dl.enable = lib.mkEnableOption "enable";
config =
let
stream-dl = inputs.jawz-scripts.packages.x86_64-linux.stream-dl;
inherit (inputs.jawz-scripts.packages.x86_64-linux) stream-dl;
in
{
systemd.user = lib.mkIf config.my.units.stream-dl.enable {

View File

@ -36,7 +36,7 @@
description = "Updates the IP of all my domains";
package =
let
update-dns = inputs.jawz-scripts.packages.x86_64-linux.update-dns;
inherit (inputs.jawz-scripts.packages.x86_64-linux) update-dns;
in
pkgs.writeScriptBin "update-dns" ''
#!/usr/bin/env nix-shell

View File

@ -30,9 +30,7 @@ in
};
};
};
nginx.virtualHosts."cache.rotehaare.art" = lib.mkIf cfg.enableProxy (
setup.proxyReverseFix cfg // { }
);
nginx.virtualHosts."cache.rotehaare.art" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
};
};
}

View File

@ -6,7 +6,6 @@ in
{
options.my.servers.audiobookshelf = setup.mkOptions "audiobookshelf" "audiobooks" 5687;
config = {
my.servers.audiobookshelf.ip = "127.0.0.3";
services = {
audiobookshelf = lib.mkIf cfg.enable {
inherit (cfg) port;
@ -14,22 +13,7 @@ in
host = cfg.ip;
group = "piracy";
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
setup.proxy {
"/" = {
proxyPass = cfg.local;
extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_redirect http:// https://;
'';
};
}
);
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
};
};
}

View File

@ -12,7 +12,7 @@ in
enable = true;
group = "piracy";
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
};
}

View File

@ -47,8 +47,8 @@ in
};
services.nginx = {
virtualHosts = lib.mkIf (cfg.enableProxy || cfgS.enableProxy) {
"${cfg.host}" = setup.proxyReverse cfg // { };
"${cfgS.host}" = setup.proxyReverse cfgS // { };
"${cfg.host}" = setup.proxyReverse cfg;
"${cfgS.host}" = setup.proxyReverse cfgS;
};
};
};

View File

@ -22,7 +22,7 @@ in
|> builtins.filter (file: builtins.match ".*\\.nix" file != null)
|> map (file: import ./homepage/bookmarks/${file});
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
};
}

View File

@ -7,7 +7,7 @@
}:
let
cfg = config.my.servers.jellyfin;
sub-sync = inputs.jawz-scripts.packages.x86_64-linux.sub-sync;
inherit (inputs.jawz-scripts.packages.x86_64-linux) sub-sync;
sub-sync-path = [
pkgs.nix
pkgs.bash

View File

@ -24,7 +24,7 @@ in
enable = true;
tokenKeyFile = config.sops.secrets.kavita-token.path;
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
};
}

View File

@ -29,8 +29,6 @@ in
"--network=host"
];
};
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
setup.proxyReverseFix cfg // { }
);
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
};
}

View File

@ -22,8 +22,6 @@ in
};
volumes = [ "${config.my.containerData}/maloja:/mljdata" ];
};
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
setup.proxyReverse cfg // { }
);
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
}

View File

@ -27,7 +27,7 @@ in
};
credentialsFile = config.sops.secrets.mealie.path;
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
};
}

View File

@ -21,8 +21,6 @@ in
PGID = toString config.users.groups.piracy.gid;
};
};
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
setup.proxyReverse cfg // { }
);
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
}

View File

@ -20,7 +20,7 @@ in
MICROBIN_ENCRYPTION_SERVER_SIDE = true;
};
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
};
}

View File

@ -23,8 +23,6 @@ in
};
volumes = [ "${config.my.containerData}/multi-scrobbler:/config" ];
};
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
setup.proxyReverse cfg // { }
);
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
}

View File

@ -20,7 +20,7 @@ in
inherit (cfg) port;
secretKeyFile = config.sops.secrets."private_cache_keys/miniserver".path;
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
};
}

View File

@ -9,10 +9,10 @@ in
services = {
ombi = lib.mkIf cfg.enable {
enable = true;
port = cfg.port;
openFirewall = (!cfg.isLocal);
inherit (cfg) port;
openFirewall = !cfg.isLocal;
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
};
};
}

View File

@ -23,7 +23,7 @@ in
package = pkgs.nur.repos.xddxdd.flaresolverr-21hsmw;
openFirewall = true;
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
};
};
}

View File

@ -12,7 +12,7 @@ in
enable = true;
group = "piracy";
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
};
};
}

View File

@ -19,8 +19,6 @@ in
};
volumes = [ "${config.my.postgresSocket}:${config.my.postgresSocket}" ];
};
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
setup.proxyReverse cfg // { }
);
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
}

View File

@ -15,7 +15,7 @@ in
environmentFile = config.sops.secrets.shiori.path;
databaseUrl = "postgres:///shiori?host=${config.my.postgresSocket}";
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
};
}

View File

@ -10,9 +10,9 @@ in
sonarr = lib.mkIf cfg.enable {
enable = true;
group = "piracy";
openFirewall = (!cfg.isLocal);
openFirewall = !cfg.isLocal;
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverseFix cfg);
};
};
}

View File

@ -31,7 +31,7 @@ in
LOG_LEVEL = "warn";
};
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg // { });
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);
};
};
}