Compare commits

...

2 Commits

Author SHA1 Message Date
d413712135 Update dependencies and enable cache on CSS
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2026-05-19 06:32:19 +00:00
8875d5cbed Update blog
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2026-05-07 02:02:41 +00:00
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": 1776584395, "lastModified": 1779168670,
"narHash": "sha256-32A+cz4ymXOSMbNfKRpXNwB1BRe2jhUDG5Cv+fRgkyw=", "narHash": "sha256-W4+y2gyx0U54LAfUuSENLULxvO3x8sIwaqPbLdrysJ0=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "0d8ba02851f3f1217e28b44e9ee8e6f10a328cd3", "rev": "96c46ce537f513dd6c99b717fdc2a353f6d1392d",
"revCount": 232, "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": 1776584239, "lastModified": 1779167504,
"narHash": "sha256-5b2wKU0mPG7Dr7u9JPAWajvv3dvv+rG7aWRuYKURCfw=", "narHash": "sha256-OAb1QT+ERAlgq7iMLfkj4GXiF1+SB9KJ0YflS5o/x4o=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "98c91dd643ba539733e0ba2138133d7ffa578345", "rev": "487681df16952799f357e73706a3868c8b7d97cd",
"revCount": 947, "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"
}, },