flake
cuz it had to happen someday
This commit is contained in:
parent
b5ed79c3e5
commit
df74bbef2d
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -8,3 +8,5 @@ theme/*.min.*
|
|||
theme/favicon.*
|
||||
theme/favicon-ex.png
|
||||
!theme/favicon.svg
|
||||
|
||||
result
|
||||
|
|
28
default.nix
Normal file
28
default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
deps,
|
||||
}:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "tilde";
|
||||
version = "1.0.3";
|
||||
|
||||
src = pkgs.fetchFromGitea {
|
||||
domain = "gitea.com";
|
||||
owner = "tasiaiso";
|
||||
repo = "tilde";
|
||||
rev = "c77da9adf1b863ddcf0080c8d88e4d29064eead0";
|
||||
hash = "sha256-VxFRK6BofVifa5JeWUUNI8j92IVXO5yAnUOMF5bMkVA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = deps;
|
||||
|
||||
buildPhase = ''
|
||||
make
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/
|
||||
cp -r site/ $out/
|
||||
'';
|
||||
}
|
61
flake.lock
Normal file
61
flake.lock
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1718208800,
|
||||
"narHash": "sha256-US1tAChvPxT52RV8GksWZS415tTS7PV42KTc2PNDBmc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "cc54fb41d13736e92229c21627ea4f22199fee6b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
46
flake.nix
Normal file
46
flake.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
description = "My website.";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
|
||||
deps = with pkgs; [
|
||||
nodejs_22 # EOL: 2027-04-30
|
||||
python312 # EOL: 2028-10-31
|
||||
python312Packages.mkdocs
|
||||
python312Packages.mkdocs-minify
|
||||
python312Packages.csscompressor
|
||||
python312Packages.htmlmin # htmlmin --keep-optional-attribute-quotes theme/favicon.svg theme/favicon.min.svg
|
||||
rubyPackages_3_3.haml # Ruby EOL: 2027-03-31
|
||||
rubyPackages_3_3.redcarpet
|
||||
inkscape
|
||||
imagemagick
|
||||
];
|
||||
in rec
|
||||
{
|
||||
# Nix formatter, run using `$ nix fmt`
|
||||
formatter = pkgs.alejandra;
|
||||
|
||||
# Exports the tildefriends package
|
||||
# Build with `$ nix build`
|
||||
packages.default = pkgs.callPackage ./default.nix {inherit deps;};
|
||||
|
||||
# Creates a shell with the necessary dependencies
|
||||
# Enter using `$ nix develop`
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = deps;
|
||||
};
|
||||
});
|
||||
}
|
15
shell.nix
15
shell.nix
|
@ -1,15 +0,0 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.mkShell{
|
||||
nativeBuildInputs = with pkgs; [
|
||||
nodejs_20 # EOL: 2026-04
|
||||
python310 # EOL: 2026
|
||||
python310Packages.mkdocs
|
||||
python310Packages.mkdocs-minify
|
||||
python310Packages.csscompressor
|
||||
python310Packages.htmlmin # htmlmin --keep-optional-attribute-quotes theme/favicon.svg theme/favicon.min.svg
|
||||
rubyPackages.haml
|
||||
rubyPackages.redcarpet
|
||||
inkscape
|
||||
imagemagick
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue