From c5755e33cd23036392f9dc7d2587fa2623f656e3 Mon Sep 17 00:00:00 2001 From: Soispha Date: Tue, 18 Apr 2023 16:06:27 +0200 Subject: Build(flake): Enable direnv integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Direnv](https://github.com/direnv/direnv) in combination with [Nix integration](https://github.com/direnv/direnv/wiki/Nix) — in this case [Nix-direnv](https://github.com/nix-community/nix-direnv) — allows for reliable build environments (and some uncluttering of the PATH). Setting it up is rather easy, just see [Nix-direnv's install instructions](https://github.com/nix-community/nix-direnv#installation). --- flake.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index f2f6379..9504c04 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,10 @@ nixpkgs, simple-nixos-mailserver, ... - } @ attrs: { + } @ attrs: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { nixosConfigurations."server1" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; @@ -29,5 +32,10 @@ } ]; }; + devShells."${system}" = { + default = pkgs.mkShell { + packages = with pkgs; [nil alejandra statix shellcheck ltex-ls]; + }; + }; }; } -- cgit 1.4.1