nixos/envfs: add extraFallbackPathCommands options
this is mainly useful for restricted platforms like wsl which require some extra entries in /bin/
This commit is contained in:
parent
d9f07dcee5
commit
1c664befd4
|
@ -7,11 +7,11 @@ let
|
|||
device = "none";
|
||||
fsType = "envfs";
|
||||
options = [
|
||||
"fallback-path=${pkgs.runCommand "fallback-path" {} ''
|
||||
"fallback-path=${pkgs.runCommand "fallback-path" {} (''
|
||||
mkdir -p $out
|
||||
ln -s ${config.environment.usrbinenv} $out/env
|
||||
ln -s ${config.environment.binsh} $out/sh
|
||||
''}"
|
||||
'' + cfg.extraFallbackPathCommands)}"
|
||||
];
|
||||
};
|
||||
"/bin" = {
|
||||
|
@ -31,11 +31,19 @@ in {
|
|||
etc.
|
||||
'';
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
description = lib.mdDoc "Which package to use for the envfs.";
|
||||
default = 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