From 695cd4c58fb146933ed02e61db8f553f7f9bf419 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Thu, 31 Oct 2024 16:35:37 +0100 Subject: Swap default.nix for shell.nix --- README.md | 2 +- default.nix | 25 ------------------------- shell.nix | 24 ++++++++++++++++++++++++ 3 files changed, 25 insertions(+), 26 deletions(-) delete mode 100644 default.nix create mode 100644 shell.nix diff --git a/README.md b/README.md index 96ebbfe..010bca1 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ A nix-based development environment is provided with the correct versions of all development dependencies. It can be activated by doing: ```bash -nix-shell -A shell +nix-shell ``` The `./cmd/mediocre-caddy` binary package can be used to run a Caddy instance diff --git a/default.nix b/default.nix deleted file mode 100644 index 7100b90..0000000 --- a/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - pkgsSrc ? builtins.fetchTarball { - name = "nixpkgs-24.05"; - url = "https://github.com/NixOS/nixpkgs/archive/5646423bfac84ec68dfc60f2a322e627ef0d6a95.tar.gz"; - sha256 = "sha256:1lr1h35prqkd1mkmzriwlpvxcb34kmhc9dnr48gkm8hh089hifmx"; - }, -}: let - pkgs = (import pkgsSrc) {}; -in { - shell = pkgs.mkShell { - name = "project-shell"; - buildInputs = [ - pkgs.go - pkgs.golangci-lint - pkgs.xcaddy - pkgs.caddy - ]; - shellHook = '' - mkdir -p .dev-home - echo '*' > .dev-home/.gitignore - export XDG_CONFIG_HOME=$(pwd)/.dev-home/config - export XDG_DATA_HOME=$(pwd)/.dev-home/data - ''; - }; -} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..9ef92c9 --- /dev/null +++ b/shell.nix @@ -0,0 +1,24 @@ +{ + pkgsSrc ? builtins.fetchTarball { + name = "nixpkgs-24.05"; + url = "https://github.com/NixOS/nixpkgs/archive/5646423bfac84ec68dfc60f2a322e627ef0d6a95.tar.gz"; + sha256 = "sha256:1lr1h35prqkd1mkmzriwlpvxcb34kmhc9dnr48gkm8hh089hifmx"; + }, +}: let + pkgs = (import pkgsSrc) {}; +in pkgs.mkShell { + name = "project-shell"; + buildInputs = [ + pkgs.go + pkgs.golangci-lint + pkgs.gopls + pkgs.xcaddy + pkgs.caddy + ]; + shellHook = '' + mkdir -p .dev-home + echo '*' > .dev-home/.gitignore + export XDG_CONFIG_HOME=$(pwd)/.dev-home/config + export XDG_DATA_HOME=$(pwd)/.dev-home/data + ''; +} -- cgit v1.2.3