home: install direnv

This commit is contained in:
Dmitriy Pleshevskiy 2022-08-31 13:23:54 +03:00
parent e4ed36a7e6
commit 9fe637af17
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
5 changed files with 16 additions and 1 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use nix

2
.gitignore vendored
View file

@ -1,2 +1,4 @@
.direnv/
/wallpapers/*.jpg /wallpapers/*.jpg

View file

@ -93,6 +93,11 @@ in
zoxide.enable = true; zoxide.enable = true;
}; };
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
accounts = { accounts = {
email = { email = {
accounts = secrets.emailAccounts; accounts = secrets.emailAccounts;

View file

@ -120,6 +120,13 @@ in
options = "--delete-older-than 7d"; options = "--delete-older-than 7d";
}; };
# To protect nix-shell against garbage collection
# Source: https://github.com/nix-community/nix-direnv#installation
extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;

View file

@ -35,7 +35,7 @@ in
services.xserver = { services.xserver = {
# All monitors in the right order # All monitors in the right order
# See: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/xserver.nix#L83 # Source: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/xserver.nix#L83
xrandrHeads = [ xrandrHeads = [
{ {
output = "HDMI-A-0"; output = "HDMI-A-0";