OSShells, refactor shells to single option
This commit is contained in:
parent
db7f132f6e
commit
55bfb8a4fb
7 changed files with 54 additions and 57 deletions
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
7
nixosModules/apps/shells/xonsh/shell.nix
Normal file
7
nixosModules/apps/shells/xonsh/shell.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf (config.shell.defaultShell == "xonsh") {
|
||||
programs.xonsh.enable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue