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

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
static/all.ics
.envrc
# Created by https://www.toptal.com/developers/gitignore/api/windows,linux,macos,hugo
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,linux,macos,hugo

View file

@ -2,7 +2,8 @@
- DSGVO-compliant Datenschutzerklärung reinbasteln
- Entscheiden, welche Seiten sonst noch konvertiert werden sollen und welche in die ewigen Datengründe gehen können
- add nix config to repo
# Done
@ -17,4 +18,3 @@
- Bestehende Datengarten-Termine konvertieren
- ggf. template mit frontmatter
- Theme forken, alle assets sollten lokal gehosted sein und nicht von irgendwelchen CDNs bezogen werden (HTTP/2 ftw!)

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1741332913,
"narHash": "sha256-ri1e8ZliWS3Jnp9yqpKApHaOo7KBN33W8ECAKA4teAQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "20755fa05115c84be00b04690630cb38f0a203ad",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

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);
};
}