direnv: added nix-direnv

This commit is contained in:
Serĉanto de Scio 2021-09-30 14:03:23 +10:00
parent faa140a50a
commit a2f5e437e2
Signed by: sercanto
GPG key ID: 7DBA9F5689EFB6AA
3 changed files with 30 additions and 1 deletions

View file

@ -88,7 +88,6 @@
systemPackages = with pkgs; [
bat # cat clone with syntax highlighting & Git integration
byobu # text-based window manager and terminal multiplexer.
direnv # A shell extension that manages your environment
dnsutils # Bind DNS utilities
fd # A simple, fast and user-friendly alternative to find
(if config.services.xserver.enable then gitAndTools.gitFull else git) # Distributed version control system

View file

@ -6,6 +6,7 @@
imports = [
../profiles/terminal-recording.nix
../profiles/nix-direnv.nix
];
nix = {

29
profiles/nix-direnv.nix Normal file
View file

@ -0,0 +1,29 @@
# NixOps configuration nix-direnv
{ config, pkgs, lib, ... }:
{
nix = {
extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
};
# Set the environment
environment = {
systemPackages = with pkgs; [
direnv # A shell extension that manages your environment
nix-direnv # A fast, persistent use_nix implementation for direnv
];
pathsToLink = [
"/share/nix-direnv"
];
};
nixpkgs.overlays = [
(self: super: { nix-direnv = super.nix-direnv.override { enableFlakes = true; }; } )
];
}