nixos-modules: add dash shell and enable by default
This commit is contained in:
parent
fa20ec732e
commit
325a9aa0cf
2 changed files with 32 additions and 7 deletions
17
modules/nixos/programs/dash.nix
Normal file
17
modules/nixos/programs/dash.nix
Normal 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";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue