bash wrapper

This commit is contained in:
2026-03-26 22:58:45 +01:00
parent 0dd59cb0ec
commit acd6498875
2 changed files with 28 additions and 0 deletions

View 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"
];
};
}