clan-homepage/flake.nix

34 lines
940 B
Nix
Raw Normal View History

2023-07-05 11:22:58 +00:00
{
description = "Website of the clan project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
2023-07-31 18:05:04 +00:00
clan-core.url = "git+https://git.clan.lol/clan/clan-core";
clan-core.inputs.flake-parts.follows = "flake-parts";
clan-core.inputs.nixpkgs.follows = "nixpkgs";
2023-07-05 11:22:58 +00:00
};
outputs = inputs@{ self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
2023-07-31 18:06:16 +00:00
systems = [ "x86_64-linux" ];
2023-07-17 21:21:54 +00:00
imports = [
./flake-parts/deploy.nix
2023-09-21 10:51:19 +00:00
./flake-parts/new-post.nix
2023-07-31 18:05:04 +00:00
./flake-parts/devShells
2023-07-17 21:21:54 +00:00
];
2023-07-05 11:22:58 +00:00
perSystem = { pkgs, ... }: {
packages.default = pkgs.runCommand "website" {
buildInputs = [ pkgs.zola ];
} ''
mkdir -p $out
2023-07-05 11:24:32 +00:00
cp -r ${self}/* .
2023-07-05 11:22:58 +00:00
chmod -R u+w .
zola build
2023-07-13 17:07:46 +00:00
cp -r public/* public/.* $out
2023-07-05 11:22:58 +00:00
'';
};
});
}