ctrlz.es/flake.nix
2024-01-06 01:01:01 +01:00

48 lines
1 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter.${system} = pkgs.alejandra;
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [
gnumake
go
hugo
];
shellHook = ''
echo '
'
'';
};
packages.${system}.default = pkgs.stdenv.mkDerivation {
name = "ctrlz.es";
src = ./.;
buildInputs = with pkgs; [hugo];
unpackPhase = false;
buildPhase = "hugo";
installPhase = ''
mkdir -p $out/var/lib/ctrlz.es
cp -r public/* $out/var/lib/ctrlz.es/
'';
};
overlays.default = final: prev: {ctrlz = self.packages.${system}.default;};
};
}