Update dependencies and enable cache on CSS

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2026-05-19 06:32:19 +00:00
parent 8875d5cbed
commit d413712135
2 changed files with 48 additions and 16 deletions

View File

@@ -8,6 +8,21 @@ let
drafts = true; drafts = true;
host = "drafts.danilafe.com"; host = "drafts.danilafe.com";
}; };
blogCachePolicy = {
locations."= /normalize/normalize.css".extraConfig = ''
add_header Cache-Control "public, max-age=3600";
'';
locations."= /katex/katex.min.css".extraConfig = ''
add_header Cache-Control "public, max-age=3600";
'';
locations."~* \\.css$".extraConfig = ''
add_header Cache-Control "public, max-age=31536000, immutable";
'';
};
virtualHostWithCache = site:
pkgs.lib.mapAttrs (_host: vhost:
pkgs.lib.mkMerge [vhost blogCachePolicy]
) (blog.virtualHostFor site);
webFiles = { webFiles = {
"static.danilafe.com" = { "static.danilafe.com" = {
root = web-files; root = web-files;
@@ -47,7 +62,7 @@ let
}; };
}; };
}; };
allVirtualHosts = [scylla gitea anki webFiles] ++ map blog.virtualHostFor [productionSite draftSite]; allVirtualHosts = [scylla gitea anki webFiles] ++ map virtualHostWithCache [productionSite draftSite];
in in
{ {
imports = [ imports = [

47
flake.lock generated
View File

@@ -75,15 +75,16 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-unstable": "nixpkgs-unstable",
"resume": "resume", "resume": "resume",
"web-files": "web-files" "web-files": "web-files"
}, },
"locked": { "locked": {
"lastModified": 1778119322, "lastModified": 1779168670,
"narHash": "sha256-8ZqGWsE7VS5F/QDbdydCbvVKQc7BL1MIwGo6t2OEbBU=", "narHash": "sha256-W4+y2gyx0U54LAfUuSENLULxvO3x8sIwaqPbLdrysJ0=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "ad014de7a439093554510b344c51cad58ef58a1d", "rev": "96c46ce537f513dd6c99b717fdc2a353f6d1392d",
"revCount": 233, "revCount": 237,
"type": "git", "type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/blog-static-flake.git" "url": "https://dev.danilafe.com/Nix-Configs/blog-static-flake.git"
}, },
@@ -95,11 +96,11 @@
"blog-source": { "blog-source": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1778119052, "lastModified": 1779167504,
"narHash": "sha256-6DBkJdrEJYazcpT/GwO6Y3MXhmJc8WSdFfYH6AriQlc=", "narHash": "sha256-OAb1QT+ERAlgq7iMLfkj4GXiF1+SB9KJ0YflS5o/x4o=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "e1efe0f4061ba325aa528d48a1fdd10e3b0295b9", "rev": "487681df16952799f357e73706a3868c8b7d97cd",
"revCount": 949, "revCount": 955,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git" "url": "https://dev.danilafe.com/Web-Projects/blog-static.git"
@@ -238,11 +239,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1766736597, "lastModified": 1778003029,
"narHash": "sha256-BASnpCLodmgiVn0M1MU2Pqyoz0aHwar/0qLkp7CjvSQ=", "narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f560ccec6b1116b22e6ed15f4c510997d99d5852", "rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -252,6 +253,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1777954456,
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"resume": { "resume": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
@@ -261,11 +278,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1766794825, "lastModified": 1778642986,
"narHash": "sha256-+Fabo0uQF9srEXdi9TB1wjB+PHaU9htXj/fjnvUFNAs=", "narHash": "sha256-+0DskouobfQ0eEaJRzWACvjHswnRtdXMw4wl1Y/TLNg=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "f22cb5b79580020079ba7223346e612b41eb7d42", "rev": "7f8d95c5e40ce63f7173d781d494ae44142a862c",
"revCount": 74, "revCount": 76,
"type": "git", "type": "git",
"url": "https://dev.danilafe.com/DanilaFe/resume" "url": "https://dev.danilafe.com/DanilaFe/resume"
}, },