diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 7087772..eec3360 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,4 @@ hugo.linux # Ignore build outputs from performing a nix-build or `nix build` command result result-* - +.direnv diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e55be39 --- /dev/null +++ b/flake.nix @@ -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 + ''; + }; + }); +}