nixpkgs: move to unstable

This commit is contained in:
Motiejus Jakštys 2024-10-09 21:37:58 -04:00
parent 999ea58008
commit 14d3f73f27
4 changed files with 13 additions and 28 deletions

View File

@ -22,7 +22,8 @@ outputs:
- HTML - HTML
- RSS - RSS
disableKinds: [taxonomy, term] disableKinds: [taxonomy, term]
paginate: 99 pagination:
pagerSize: 99
outputFormats: outputFormats:
RSS: RSS:
mediatype: "application/rss" mediatype: "application/rss"

8
flake.lock generated
View File

@ -20,16 +20,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1728328465, "lastModified": 1728241625,
"narHash": "sha256-a0a0M1TmXMK34y3M0cugsmpJ4FJPT/xsblhpiiX1CXo=", "narHash": "sha256-yumd4fBc/hi8a9QgA9IT8vlQuLZ2oqhkJXHPKxH/tRw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1bfbbbe5bbf888d675397c66bfdb275d0b99361c", "rev": "c31898adf5a8ed202ce5bea9f347b1c6871f32d1",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View File

@ -5,7 +5,7 @@
extra-experimental-features = "nix-command flakes"; extra-experimental-features = "nix-command flakes";
}; };
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # TODO 24.11
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = { outputs = {
@ -23,31 +23,15 @@
packages = devDeps; packages = devDeps;
}; };
defaultPackage = pkgs.stdenv.mkDerivation { defaultPackage = pkgs.compressDrvWeb (pkgs.stdenv.mkDerivation {
pname = "jakstys.lt"; pname = "jakstys.lt";
version = "1.0.0"; version = "1.0.0";
src = pkgs.lib.cleanSource self; src = pkgs.lib.cleanSource self;
buildInputs = devDeps;
buildInputs = [pkgs.hugo]; buildPhase = "hugo --cleanDestinationDir --printPathWarnings --panicOnWarning";
installPhase = "mv public $out";
buildPhase = '' }) {};
${pkgs.hugo}/bin/hugo --cleanDestinationDir --printPathWarnings --panicOnWarning --log
find public \
-name '*.html' -or \
-name '*.xml' -or \
-name '*.txt' -or \
-name '*.css' -or \
-name '*.map' -or \
-name '*.pdf' | \
${pkgs.parallel}/bin/parallel --eta \
"${pkgs.zopfli}/bin/zopfli {} && ${pkgs.brotli}/bin/brotli {}"
'';
installPhase = ''
mv public $out
'';
};
formatter = pkgs.alejandra; formatter = pkgs.alejandra;
}); });

View File

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
{{ partial "html-meta.html" . -}} {{ partial "html-meta.html" . -}}
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title> <title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
{{ $css := resources.Get "_/styles.scss" | resources.ToCSS (dict "enableSourceMap" false "transpiler" "dartsass") | resources.Fingerprint }} {{ $css := resources.Get "_/styles.scss" | css.Sass (dict "enableSourceMap" false "transpiler" "dartsass") | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}"> <link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{ with .Site.Params.favicon -}} {{ with .Site.Params.favicon -}}
<link rel="shortcut icon" href="{{ . }}" type="image/x-icon"> <link rel="shortcut icon" href="{{ . }}" type="image/x-icon">