nixos-modules: add dash shell and enable by default

This commit is contained in:
Veneficium 2024-12-30 22:56:54 +01:00
parent fa20ec732e
commit 325a9aa0cf
2 changed files with 32 additions and 7 deletions

View file

@ -0,0 +1,17 @@
{
config,
lib,
pkgs,
...
}:
{
options.programs.dash = {
enable = lib.mkEnableOption "Enable the dash shell";
symlink_sh = lib.mkEnableOption "Symlink dash to /bin/sh";
};
config = lib.mkIf config.programs.dash.enable {
environment.systemPackages = [ pkgs.dash ];
environment.binsh = lib.mkIf config.programs.dash.symlink_sh "${pkgs.dash}/bin/dash";
};
}