home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit af8a52616fae84e340016463ae66ca70d6a0d031
parent 42c1dbb911d4d1bb8c392049bc50d0a5c6a67b2d
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Tue, 26 May 2020 14:19:13 +0200

nix: remove lorri and use nix-direnv

nix-direnv: https://github.com/nix-community/nix-direnv

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mmachines/base.nix | 8+++++++-
Mmodules/profiles/base.nixos.nix | 3+++
Mmodules/profiles/dev.nix | 1-
Mmodules/profiles/nix-config.nixos.nix | 2++
4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/machines/base.nix b/machines/base.nix @@ -8,7 +8,6 @@ }; home.file.".nix-channels".source = ../assets/nix-channels; home.packages = with pkgs; [ - direnv enchive entr exa @@ -19,6 +18,13 @@ scripts tree ]; + programs.direnv.enable = true; + programs.direnv.stdlib = '' + mkdir -p $HOME/.cache/direnv/layouts + pwd_hash=$(echo -n $PWD | shasum | cut -d ' ' -f 1) + direnv_layout_dir=$HOME/.cache/direnv/layouts/$pwd_hash + source ${pkgs.nix-direnv}/share/nix-direnv/direnvrc + ''; xdg.configFile."nr/default" = { text = builtins.toJSON [ { cmd = "ncdu"; } diff --git a/modules/profiles/base.nixos.nix b/modules/profiles/base.nixos.nix @@ -16,6 +16,9 @@ in }; config = mkIf cfg.enable { boot.loader.systemd-boot.enable = true; + environment.pathsToLink = [ + "/share/nix-direnv" + ]; environment = { variables = { EDITOR = pkgs.lib.mkOverride 0 "vim"; diff --git a/modules/profiles/dev.nix b/modules/profiles/dev.nix @@ -51,7 +51,6 @@ in ]; onChange = "${pkgs.my.nr}/bin/nr dev"; }; - services.lorri.enable = true; } ]); } diff --git a/modules/profiles/nix-config.nixos.nix b/modules/profiles/nix-config.nixos.nix @@ -56,6 +56,8 @@ in extraOptions = '' connect-timeout = 20 build-cores = 0 + keep-outputs = true + keep-derivations = true ''; binaryCaches = cfg.localCaches ++ [ "https://cache.nixos.org/"