1
Fork 0

Periodically clean up direnv permissions

This commit is contained in:
Matei Adriel 2023-12-14 00:54:51 +01:00
parent 15d06fd26a
commit c16961d55e
No known key found for this signature in database
2 changed files with 8 additions and 4 deletions

View file

@ -1,4 +1,7 @@
{ config, ... }: { { config, ... }:
let statePath = "${config.xdg.dataHome}/direnv/allow";
in
{
programs.direnv.enable = true; programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true; programs.direnv.nix-direnv.enable = true;
@ -9,7 +12,7 @@
DIRENV_LOG_FORMAT = ""; DIRENV_LOG_FORMAT = "";
}; };
satellite.persistence.at.state.apps.direnv.directories = [ # Only save allowed paths for 30d
"${config.xdg.dataHome}/direnv/allow" systemd.user.tmpfiles.rules = [ "d ${statePath} - - - 30d" ];
]; satellite.persistence.at.state.apps.direnv.directories = [ statePath ];
} }

View file

@ -290,6 +290,7 @@ in
event = "BufReadPost"; event = "BufReadPost";
opts.enabled = true; opts.enabled = true;
# TODO: blacklist harpoon, NeogitStatus
}; };
# }}} # }}}
# {{{ harpoon # {{{ harpoon