From 93f4e0377caa800cb6514083f13eec51a2822846 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 18 Feb 2020 11:43:59 +0100 Subject: Replace lorri with custom persistent-nix-shell Lorri has shown itself to be rather unstable for my particular use case: * It is unclear when derivations are actually rebuilt * Polling did not seem consistent, i.e. I had to issue manual `ping_` calls * I do not want to issue manual `lorri watch` calls to fix this * It sporadically started building GC roots without any clear reason for doing so In the end all I really want is a way to prevent nix-shells from being garbage-collected. In this scenario using lorri is overkill. `persistent-nix-shell` is a simple wrapper around `nix-shell` that adds GC roots prior to entering the environment. --- home.nix | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/home.nix b/home.nix index 19ac0e8..2ec9dfb 100644 --- a/home.nix +++ b/home.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - custom.pkgs = import ~/projects/dev/pkgs/default.nix { }; + custom.pkgs = import { }; custom.nixpkgs-unstable = import { }; imports = [ @@ -17,8 +17,9 @@ home = { keyboard.layout = "de"; - packages = with pkgs; [ - pass + packages = [ + pkgs.pass + config.custom.pkgs.persistent-nix-shell ]; }; @@ -61,18 +62,7 @@ }; programs.fish.shellAliases = { - ns = "nix-shell --command fish"; - cat = "bat"; + ns = "persistent-nix-shell --command fish"; + cat = "bat --plain"; }; - - services.lorri.enable = true; - - programs.direnv = { - enable = true; - enableFishIntegration = true; - }; - - programs.fish.interactiveShellInit = '' - set -x DIRENV_LOG_FORMAT "" - ''; } -- cgit v1.2.3