bash wrapper
This commit is contained in:
@@ -27,8 +27,11 @@ in
|
|||||||
../../modules/base.nix
|
../../modules/base.nix
|
||||||
../../modules/zfs-root.nix
|
../../modules/zfs-root.nix
|
||||||
../../modules/desktop-hyprland.nix
|
../../modules/desktop-hyprland.nix
|
||||||
|
../../modules/bin-bash-wrapper.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
config.my.binBashWrapper.enable = true;
|
||||||
|
|
||||||
networking.hostName = hostName;
|
networking.hostName = hostName;
|
||||||
networking.hostId = "ff0b8826";
|
networking.hostId = "ff0b8826";
|
||||||
|
|
||||||
|
|||||||
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