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

View File

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

View File

@ -120,6 +120,13 @@ in
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 = {
auto-optimise-store = true;

View File

@ -35,7 +35,7 @@ in
services.xserver = {
# 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 = [
{
output = "HDMI-A-0";