Update from update-inputs-2024-10-03-04-20

This commit is contained in:
Update Bot 2024-10-03 04:20:52 +02:00
commit 87aa15a8a9
No known key found for this signature in database
3 changed files with 33 additions and 53 deletions

View file

@ -155,11 +155,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1727809780, "lastModified": 1727872461,
"narHash": "sha256-7W5HE2IRiZglMBKcn9JtC6bveE6/F7IzQyV2XDanGFA=", "narHash": "sha256-4Pw3fVhN6xey5+2gUBm9nQJAjBqivffr+a5ZsXYjzJ8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "6c5ba9ec9d470c1ca29e7735762c9c366e28f7f5", "rev": "568727a884ae7cd9f266bd19aea655def8cafd78",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -326,11 +326,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726153070, "lastModified": 1727826117,
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -462,11 +462,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1727514110, "lastModified": 1727805723,
"narHash": "sha256-0YRcOxJG12VGDFH8iS8pJ0aYQQUAgo/r3ZAL+cSh9nk=", "narHash": "sha256-b8flytpuc4Ey/g3mcvpS/ICORcD4h56QDZeP5LogevY=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "85f7a7177c678de68224af3402ab8ee1bcee25c8", "rev": "2f5ae3fc91db865eff2c5a418da85a0fbe6238a3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -521,11 +521,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1727383923, "lastModified": 1727817100,
"narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=", "narHash": "sha256-dlyV9/eiWkm/Y/t2+k4CFZ29tBvCANmJogEYaHeAOTw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ffe2d07e771580a005e675108212597e5b367d2d", "rev": "437ec62009fa8ceb684eb447d455ffba25911cf9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -662,11 +662,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1727507295, "lastModified": 1727707210,
"narHash": "sha256-I/FrX1peu4URoj5T5odfuKR2rm4GjYJJpCGF9c0/lDA=", "narHash": "sha256-8XZp5XO2FC6INZEZ2WlwErtvFVpl45ACn8CJ2hfTA0Y=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "f2e1c4aa29fc211947c3a7113cba1dd707433b70", "rev": "f61d5f2051a387a15817007220e9fb3bbead57b3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -874,11 +874,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1727634051, "lastModified": 1727802920,
"narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", "narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9", "rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -905,11 +905,11 @@
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1727645871, "lastModified": 1727871072,
"narHash": "sha256-Os3PAThU5XliKkKa+SHsFyV/EsCHogHcYONmpzb6500=", "narHash": "sha256-t+YLQwBB1soQnVjT6d7nQq4Tidaw7tpB8i6Zvpc+Zbs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "5f4a4b47597d3b9ac26c41ff4e8da28fa662f200", "rev": "0ca98d02104f7f0a703787a7a080a570b7f1bedd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -927,11 +927,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1727452028, "lastModified": 1727599661,
"narHash": "sha256-ehl/A4HQFRyqj1Fk7cl+dgSf/2Fb1jLwWJtZaMU6RfU=", "narHash": "sha256-0R+1ih0Rfqrz/lcduvpNSnUw3uthUHiaGh0aWPyIqeQ=",
"owner": "NuschtOS", "owner": "NuschtOS",
"repo": "search", "repo": "search",
"rev": "9f7426e532ef8dfc839c4a3fcc567b13a20a70d3", "rev": "c3c3928b8de7d300c34e9d90fdc19febd1a32062",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -187,7 +187,6 @@
enable = true; enable = true;
sources.diagnostics = { sources.diagnostics = {
pylint.enable = true; pylint.enable = true;
statix.enable = true;
}; };
sources.formatting = { sources.formatting = {
nixfmt.enable = true; nixfmt.enable = true;

View file

@ -238,33 +238,14 @@ in
services.nginx.virtualHosts = lib.mkIf (cfg.frontend.enable && cfg.frontend.useNginx) { services.nginx.virtualHosts = lib.mkIf (cfg.frontend.enable && cfg.frontend.useNginx) {
${cfg.domain} = { ${cfg.domain} = {
locations."/".root = librespeedAssets; locations."/".root = librespeedAssets;
locations."/backend/" = { locations."= /servers.json".return = "200 '${builtins.toJSON cfg.frontend.servers}'";
proxyPass = "http://${cfg.settings.bind_address}:${toString cfg.settings.listen_port}/backend/"; locations."/backend/".return = "301 https://$host:${toString cfg.settings.listen_port}$request_uri";
extraConfig = ''
# add_header Cache-Control 'no-store, no-cache, max-age=0, no-transform';
# add_header Last-Modified $date_gmt;
if_modified_since off;
expires off;
etag off;
access_log off;
gzip off;
log_not_found off;
server_tokens off;
tcp_nodelay on;
tcp_nopush on;
sendfile on;
client_max_body_size 50M;
proxy_read_timeout 999;
proxy_buffers 16 128k;
'';
};
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
}; };
}; };
security.acme.certs = lib.mkIf (cfg.domain != null) { security.acme.certs = lib.mkIf (cfg.domain != null) {
${cfg.domain} = lib.mkIf (!cfg.frontend.useNginx) { ${cfg.domain} = {
reloadServices = [ "librespeed.service" ]; reloadServices = [ "librespeed.service" ];
webroot = "/var/lib/acme/acme-challenge"; webroot = "/var/lib/acme/acme-challenge";
}; };
@ -273,7 +254,7 @@ in
services.librespeed.frontend.servers = lib.mkIf (cfg.frontend.enable && (cfg.domain != null)) [ services.librespeed.frontend.servers = lib.mkIf (cfg.frontend.enable && (cfg.domain != null)) [
{ {
name = cfg.domain; name = cfg.domain;
server = "//${cfg.domain}${lib.optionalString (!cfg.frontend.useNginx) ":${toString cfg.settings.listen_port}"}"; server = "//${cfg.domain}:${toString cfg.settings.listen_port}";
} }
]; ];
@ -288,7 +269,7 @@ in
else else
pkgs.writeTextDir "index.html" ""; pkgs.writeTextDir "index.html" "";
bind_address = mkDefault "127.0.0.1"; bind_address = mkDefault "::";
listen_port = mkDefault 8989; listen_port = mkDefault 8989;
base_url = mkDefault "backend"; base_url = mkDefault "backend";
worker_threads = mkDefault "auto"; worker_threads = mkDefault "auto";
@ -300,17 +281,17 @@ in
ipinfo_api_key = mkIf (!cfg.secrets ? "ipinfo_api_key") ""; ipinfo_api_key = mkIf (!cfg.secrets ? "ipinfo_api_key") "";
stats_password = mkIf (!cfg.secrets ? "stats_password") ""; stats_password = mkIf (!cfg.secrets ? "stats_password") "";
tls_cert_file = tls_cert_file =
if (cfg.domain != null && !cfg.frontend.useNginx) then if (cfg.domain != null) then
(mkDefault "/run/credentials/librespeed.service/cert.pem") (mkDefault "/run/credentials/librespeed.service/cert.pem")
else else
(mkDefault ""); (mkDefault "");
tls_key_file = tls_key_file =
if (cfg.domain != null && !cfg.frontend.useNginx) then if (cfg.domain != null) then
(mkDefault "/run/credentials/librespeed.service/key.pem") (mkDefault "/run/credentials/librespeed.service/key.pem")
else else
(mkDefault ""); (mkDefault "");
enable_tls = mkDefault (cfg.domain != null && !cfg.frontend.useNginx); enable_tls = mkDefault (cfg.domain != null);
}; };
systemd.services = systemd.services =
@ -381,7 +362,7 @@ in
DynamicUser = true; DynamicUser = true;
LoadCredential = lib.mkIf (cfg.domain != null && !cfg.frontend.useNginx) [ LoadCredential = lib.mkIf (cfg.domain != null) [
"cert.pem:${config.security.acme.certs.${cfg.domain}.directory}/cert.pem" "cert.pem:${config.security.acme.certs.${cfg.domain}.directory}/cert.pem"
"key.pem:${config.security.acme.certs.${cfg.domain}.directory}/key.pem" "key.pem:${config.security.acme.certs.${cfg.domain}.directory}/key.pem"
]; ];