summary refs log tree commit diff stats
path: root/flake.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-04-18 16:06:27 +0200
committerSoispha <soispha@vhack.eu>2023-04-18 16:25:25 +0200
commitc5755e33cd23036392f9dc7d2587fa2623f656e3 (patch)
tree23d1c66c4382b50bf56ccb5fdaacbedabbbe0ffe /flake.nix
parentChore(flake): Update and add follows for inputs (diff)
downloadnixos-server-c5755e33cd23036392f9dc7d2587fa2623f656e3.tar.gz
nixos-server-c5755e33cd23036392f9dc7d2587fa2623f656e3.zip
Build(flake): Enable direnv integration
[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).
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix10
1 files changed, 9 insertions, 1 deletions
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];
+      };
+    };
   };
 }