mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
Merge pull request #213601 from SuperSandro2000/envfs-wsl
nixos/envfs: use configured environment.usrbinenv and environment.binsh, add extraFallbackPath options
This commit is contained in:
commit
10d5d6196a
|
@ -7,11 +7,11 @@ let
|
||||||
device = "none";
|
device = "none";
|
||||||
fsType = "envfs";
|
fsType = "envfs";
|
||||||
options = [
|
options = [
|
||||||
"fallback-path=${pkgs.runCommand "fallback-path" {} ''
|
"fallback-path=${pkgs.runCommand "fallback-path" {} (''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
ln -s ${pkgs.coreutils}/bin/env $out/env
|
ln -s ${config.environment.usrbinenv} $out/env
|
||||||
ln -s ${config.system.build.binsh}/bin/sh $out/sh
|
ln -s ${config.environment.binsh} $out/sh
|
||||||
''}"
|
'' + cfg.extraFallbackPathCommands)}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"/bin" = {
|
"/bin" = {
|
||||||
|
@ -31,11 +31,19 @@ in {
|
||||||
etc.
|
etc.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
package = lib.mkOption {
|
package = lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
description = lib.mdDoc "Which package to use for the envfs.";
|
|
||||||
default = pkgs.envfs;
|
default = pkgs.envfs;
|
||||||
defaultText = lib.literalExpression "pkgs.envfs";
|
defaultText = lib.literalExpression "pkgs.envfs";
|
||||||
|
description = lib.mdDoc "Which package to use for the envfs.";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraFallbackPathCommands = lib.mkOption {
|
||||||
|
type = lib.types.lines;
|
||||||
|
default = "";
|
||||||
|
example = "ln -s $''{pkgs.bash}/bin/bash $out/bash";
|
||||||
|
description = lib.mdDoc "Extra commands to run in the package that contains fallback executables in case not other executable is found";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue