summary refs log tree commit diff stats
path: root/shell.nix
diff options
context:
space:
mode:
authorAlan Pearce2024-04-29 00:23:51 +0200
committerAlan Pearce2024-05-18 12:17:12 +0200
commit6b4469a98d7b2d88a3442b1051174000538199f0 (patch)
tree1acb823060a8f60a3f2ee8a6d014c108a201c04c /shell.nix
parent9fdde0d36aa52e10b0d587aea37b65bc14adfc85 (diff)
downloadnixfiles-6b4469a98d7b2d88a3442b1051174000538199f0.tar.lz
nixfiles-6b4469a98d7b2d88a3442b1051174000538199f0.tar.zst
nixfiles-6b4469a98d7b2d88a3442b1051174000538199f0.zip
de-flake local systems
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix28
1 files changed, 26 insertions, 2 deletions
diff --git a/shell.nix b/shell.nix
index d2c4c458..a0eb33c8 100644
--- a/shell.nix
+++ b/shell.nix
@@ -1,3 +1,27 @@
-{ system ? builtins.currentSystem }:
+let
 
-(builtins.getFlake (toString ./.)).devShells.${system}.default
+  sources = import ./nix/sources.nix;
+
+  nixpkgs = sources.nixpkgs;
+
+  pkgs = import nixpkgs { };
+
+in
+pkgs.mkShell rec {
+
+  name = "nixfiles-shell";
+
+  buildInputs = with pkgs; [
+    niv
+    deploy-rs
+    (pkgs.callPackage "${sources.agenix}/pkgs/agenix.nix" { })
+    (import sources.home-manager { inherit pkgs; }).home-manager
+  ];
+
+  shellHook = ''
+    export HOST=$(hostname)
+    export NIX_PATH="nixpkgs=${nixpkgs}:home-manager=${sources."home-manager"}:darwin=${sources.nix-darwin}:darwin-config=$PWD/system/$HOST.nix:private=$PWD/private:nixpkgs-overlays=$PWD/overlays:nix-index-database=${sources.nix-index-database}";
+    export HOME_MANAGER_CONFIG="./user/$HOST.nix"
+  '';
+
+}