From 55b4aba216debd72ca81d56bfb94205895d00968 Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 29 Sep 2021 12:09:36 +0200 Subject: [PATCH] Replace lorri with nix-direnv --- configuration.nix | 1 + modules/development.nix | 2 +- modules/software.nix | 11 ++++------- overlays/nix-direnv.nix | 11 +++++++++++ 4 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 overlays/nix-direnv.nix diff --git a/configuration.nix b/configuration.nix index d6c9ae4..78d3eeb 100644 --- a/configuration.nix +++ b/configuration.nix @@ -112,6 +112,7 @@ ./modules/power.nix ./modules/cachix.nix ./overlays/emacs.nix + ./overlays/nix-direnv.nix ]; } diff --git a/modules/development.nix b/modules/development.nix index 76dee75..1307dd6 100644 --- a/modules/development.nix +++ b/modules/development.nix @@ -2,7 +2,7 @@ { # Improve nix-shell and direnv integration - services.lorri.enable = true; + environment.pathsToLink = [ "/share/nix-direnv" ]; # Enable virtualisation virtualisation.libvirtd = { diff --git a/modules/software.nix b/modules/software.nix index 6981ce0..4a40fac 100644 --- a/modules/software.nix +++ b/modules/software.nix @@ -3,13 +3,10 @@ with pkgs; let - emacs-vterm = ( - (emacsPackagesNgGen emacsPgtkGcc).emacsWithPackages - (epkgs: [ epkgs.vterm ]) - ); + emacs-vterm = ((emacsPackagesNgGen emacsPgtkGcc).emacsWithPackages + (epkgs: [ epkgs.vterm ])); -in -{ +in { environment.systemPackages = [ # Monitoring htop @@ -42,7 +39,7 @@ in # Development git direnv - lorri + nix-direnv podman-compose gnumake gitAndTools.pre-commit diff --git a/overlays/nix-direnv.nix b/overlays/nix-direnv.nix new file mode 100644 index 0000000..9bef688 --- /dev/null +++ b/overlays/nix-direnv.nix @@ -0,0 +1,11 @@ +{ config, lib, pkgs, ... }: + +with pkgs; + +{ + nixpkgs.overlays = [ + (self: super: { + nix-direnv = super.nix-direnv.override { enableFlakes = true; }; + }) + ]; +}