mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/direnv: remove persistDerivations
This commit is contained in:
parent
8593999542
commit
59e48e33c4
1 changed files with 4 additions and 14 deletions
|
@ -32,15 +32,6 @@ in {
|
||||||
the hiding of direnv logging
|
the hiding of direnv logging
|
||||||
'');
|
'');
|
||||||
|
|
||||||
persistDerivations =
|
|
||||||
(lib.mkEnableOption (lib.mdDoc ''
|
|
||||||
setting keep-derivations and keep-outputs to true
|
|
||||||
to prevent shells from getting garbage collected
|
|
||||||
''))
|
|
||||||
// {
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
loadInNixShell =
|
loadInNixShell =
|
||||||
lib.mkEnableOption (lib.mdDoc ''
|
lib.mkEnableOption (lib.mdDoc ''
|
||||||
loading direnv in `nix-shell` `nix shell` or `nix develop`
|
loading direnv in `nix-shell` `nix shell` or `nix develop`
|
||||||
|
@ -62,6 +53,10 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
(lib.mkRemovedOptionModule ["programs" "direnv" "persistDerivations"] "persistDerivations was removed as it is on longer necessary")
|
||||||
|
];
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -87,11 +82,6 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings = lib.mkIf cfg.persistDerivations {
|
|
||||||
keep-outputs = true;
|
|
||||||
keep-derivations = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages =
|
systemPackages =
|
||||||
if cfg.loadInNixShell then [cfg.package]
|
if cfg.loadInNixShell then [cfg.package]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue