.
This commit is contained in:
parent
0e1b0a36d1
commit
2ec7c74542
4 changed files with 211 additions and 21 deletions
30
modules/desktop/terminal/default.nix
Normal file
30
modules/desktop/terminal/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkDefault mkIf mkMerge;
|
||||
|
||||
cfg = config.modules.desktop.terminal;
|
||||
in {
|
||||
options.modules.desktop.terminal = let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) str;
|
||||
in {
|
||||
default = mkOption {
|
||||
type = str;
|
||||
default = "alacrity";
|
||||
description = "Default terminal";
|
||||
example = "alacrity";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
{
|
||||
home.sessionVariables.TERMINAL = cfg.default;
|
||||
services.xserver.desktopManager.xterm.enable = mkDefault (cfg.default == "xterm");
|
||||
}
|
||||
|
||||
(mkIf (config.modules.desktop.type == "x11") {
|
||||
services.xserver.excludePackages =
|
||||
mkIf (cfg.default != "xterm") [pkgs.xterm];
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue