OSShells, refactor shells to single option

This commit is contained in:
Julia Lange 2024-11-29 01:53:13 -08:00
parent 7919d19fe9
commit f53b6d0ded
7 changed files with 54 additions and 57 deletions

View file

@ -1,15 +0,0 @@
{ config, pkgs, lib, ... }:
{
options = {
xonsh.enable = lib.mkEnableOption "Enables xonsh";
xonsh.setDefault = lib.mkEnableOption
"Sets xonsh as the default user's shell";
};
config = lib.mkIf config.xonsh.enable {
programs.xonsh.enable = true;
users.defaultUserShell = lib.mkIf config.xonsh.setDefault pkgs.xonsh;
environment.shells = with pkgs; [ xonsh ];
};
}

View file

@ -0,0 +1,7 @@
{ config, lib, ... }:
{
config = lib.mkIf (config.shell.defaultShell == "xonsh") {
programs.xonsh.enable = true;
};
}