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

@@ -27,8 +27,11 @@ in
../../modules/base.nix
../../modules/zfs-root.nix
../../modules/desktop-hyprland.nix
../../modules/bin-bash-wrapper.nix
];
config.my.binBashWrapper.enable = true;
networking.hostName = hostName;
networking.hostId = "ff0b8826";

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