nixos/direnv: format with nixfmt

This commit is contained in:
Gerg-L 2024-07-27 15:32:31 -04:00
parent 9cb99744c3
commit b99fff4723
No known key found for this signature in database

View File

@ -3,9 +3,11 @@
config,
pkgs,
...
}: let
}:
let
cfg = config.programs.direnv;
in {
in
{
options.programs.direnv = {
enable = lib.mkEnableOption ''
@ -14,7 +16,7 @@ in {
integration. Note that you need to logout and login for this change to apply
'';
package = lib.mkPackageOption pkgs "direnv" {};
package = lib.mkPackageOption pkgs "direnv" { };
direnvrcExtra = lib.mkOption {
type = lib.types.lines;
@ -61,7 +63,11 @@ in {
};
imports = [
(lib.mkRemovedOptionModule ["programs" "direnv" "persistDerivations"] "persistDerivations was removed as it is no longer necessary")
(lib.mkRemovedOptionModule [
"programs"
"direnv"
"persistDerivations"
] "persistDerivations was removed as it is no longer necessary")
];
config = lib.mkIf cfg.enable {
@ -91,17 +97,19 @@ in {
environment = {
systemPackages =
if cfg.loadInNixShell then [cfg.package]
else [
#direnv has a fish library which sources direnv for some reason
(cfg.package.overrideAttrs (old: {
installPhase =
(old.installPhase or "")
+ ''
rm -rf $out/share/fish
'';
}))
];
if cfg.loadInNixShell then
[ cfg.package ]
else
[
#direnv has a fish library which sources direnv for some reason
(cfg.package.overrideAttrs (old: {
installPhase =
(old.installPhase or "")
+ ''
rm -rf $out/share/fish
'';
}))
];
variables = {
DIRENV_CONFIG = "/etc/direnv";