This commit is contained in:
Jörg Thalheim 2023-07-05 13:22:58 +02:00
parent d369ca2985
commit 91ed5cce26
3 changed files with 94 additions and 7 deletions

View File

@ -1,7 +0,0 @@
with import <nixpkgs> {};
mkShell {
packages = [
bashInteractive
zola
];
}

64
flake.lock Normal file
View File

@ -0,0 +1,64 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1688466019,
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1688500189,
"narHash": "sha256-djYYiY4lzJOlXOnTHytH6BUugrxHDZjuGxTSrU4gt4M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "78419edadf0fabbe5618643bd850b2f2198ed060",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1688049487,
"narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

30
flake.nix Normal file
View File

@ -0,0 +1,30 @@
{
description = "Website of the clan project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs@{ self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
systems = lib.systems.flakeExposed;
perSystem = { pkgs, ... }: {
packages.default = pkgs.runCommand "website" {
buildInputs = [ pkgs.zola ];
} ''
mkdir -p $out
cp -r ${self} .
chmod -R u+w .
zola build
cp -r public $out
'';
devShells.default = pkgs.mkShell {
packages = [
pkgs.bashInteractive
pkgs.zola
];
};
};
});
}