diff --git a/hosts/kronos/default.nix b/hosts/kronos/default.nix index 1ca5c15..0b674af 100644 --- a/hosts/kronos/default.nix +++ b/hosts/kronos/default.nix @@ -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"; diff --git a/modules/bin-bash-wrapper.nix b/modules/bin-bash-wrapper.nix new file mode 100644 index 0000000..99ea2b8 --- /dev/null +++ b/modules/bin-bash-wrapper.nix @@ -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" + ]; + }; +}