bash wrapper
This commit is contained in:
25
modules/bin-bash-wrapper.nix
Normal file
25
modules/bin-bash-wrapper.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.my.binBashWrapper;
|
||||
|
||||
bashWrapper = pkgs.writeShellScriptBin "bash" ''
|
||||
exec /usr/bin/env bash "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
cfg = {
|
||||
enable = lib.mkEnableOption "create a /bin/bash wrapper";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /bin/bash - - - - ${bashWrapper}/bin/bash"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user