add flake template with hugo binary in dev shell

This commit is contained in:
Vinzenz Schroeter 2025-03-09 13:53:18 +01:00
parent df7d0cff6d
commit 77cc995c03
4 changed files with 71 additions and 3 deletions

40
flake.nix Normal file
View file

@ -0,0 +1,40 @@
{
description = "A flake containing a development environment for the CCCB website.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
};
outputs =
{ self, nixpkgs }:
let
forAllSystems =
f:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (
system:
f rec {
pkgs = nixpkgs.legacyPackages.${system};
inherit system;
}
);
in
{
devShells = forAllSystems (
{ pkgs, ... }:
{
default = pkgs.mkShell rec {
packages = with pkgs; [
hugo
go
(pkgs.python3.withPackages (python-pkgs: [
python-pkgs.icalendar
python-pkgs.pytz
]))
];
};
}
);
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
};
}