Added a flake

This commit is contained in:
Alexandre 2026-09-04 11:37:35 +02:00
parent 66f931dfc2
commit 6f075ed45b
3 changed files with 31 additions and 1 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

2
.gitignore vendored
View File

@ -44,4 +44,4 @@ hugo.linux
# Ignore build outputs from performing a nix-build or `nix build` command # Ignore build outputs from performing a nix-build or `nix build` command
result result
result-* result-*
.direnv

29
flake.nix Normal file
View File

@ -0,0 +1,29 @@
{
description = "Hugo dev flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem(system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
go
hugo
];
shellHook = ''
echo "Hugo loaded"
echo hugo --version
'';
};
});
}