This commit is contained in:
2023-03-03 00:56:28 +00:00
parent 74794db1f3
commit c982805de4
6 changed files with 136 additions and 11 deletions

View File

@@ -1,10 +1,27 @@
# Shell for bootstrapping flake-enabled nix and home-manager
# You can enter it through 'nix develop' or (legacy) 'nix-shell'
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? (import ./nixpkgs.nix) { } }: {
default = pkgs.mkShell {
# Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes";
nativeBuildInputs = with pkgs; [ nix home-manager git ssh-to-age sops age ];
};
with pkgs;
let nixBin =
writeShellScriptBin "nix" ''
${nixFlakes}/bin/nix --option experimental-features "nix-command flakes" "$@"
'';
in mkShell {
buildInputs = [
nix home-manager git ssh-to-age sops age
];
shellHook = ''
export FLAKE="$(pwd)"
export PATH="$FLAKE/bin:${nixBin}/bin:$PATH"
'';
}
# { pkgs ? (import ./nixpkgs.nix) { } }: {
# default = pkgs.mkShell {
# # Enable experimental features without having to specify the argument
# NIX_CONFIG = "experimental-features = nix-command flakes";
# nativeBuildInputs = with pkgs; [ nix home-manager git ssh-to-age sops age ];
# };
# }