Use cachix

This commit is contained in:
Henrik Lissner 2020-07-31 18:54:48 -04:00
parent fbff066eb2
commit b8c45bf82d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -17,7 +17,9 @@ device: username:
imports = [
./modules
"${./hosts}/${device}"
];
] ++ (if builtins.pathExists(/etc/nixos/cachix.nix) then [
/etc/nixos/cachix.nix
] else []);
### NixOS
nix.autoOptimiseStore = true;
@ -44,10 +46,14 @@ device: username:
gnumake # for our own makefile
my.cached-nix-shell # for instant nix-shell scripts
cachix # less time buildin' mo time nixin'
(writeScriptBin "nix-shell" ''
#!${stdenv.shell}
NIX_PATH="nixpkgs-overlays=/etc/dotfiles/packages/default.nix:$NIX_PATH" ${nix}/bin/nix-shell "$@"
'')
];
environment.shellAliases = {
nix-env = "NIXPKGS_ALLOW_UNFREE=1 nix-env";
nix-shell = ''NIX_PATH="nixpkgs-overlays=/etc/dotfiles/packages/default.nix:$NIX_PATH" nix-shell'';
nsh = "nix-shell";
nen = "nix-env";
dots = "make -C ~/.dotfiles";