home: terminal: rename 'default'

It doesn't make the *most* sense as an option name to use `program`.
This commit is contained in:
Bruno BELANYI 2025-08-22 15:00:54 +01:00
parent d4668416af
commit 8b028ce19f
8 changed files with 13 additions and 13 deletions

View file

@ -25,7 +25,7 @@
# Network-Manager applet # Network-Manager applet
nm-applet.enable = true; nm-applet.enable = true;
# Terminal # Terminal
terminal.program = "alacritty"; terminal.default = "alacritty";
# Transmission remote # Transmission remote
trgui.enable = true; trgui.enable = true;
# Zathura document viewer # Zathura document viewer

View file

@ -2,7 +2,7 @@
let let
cfg = config.my.home.firefox.tridactyl; cfg = config.my.home.firefox.tridactyl;
term = config.my.home.terminal.program; term = config.my.home.terminal.default;
vimCommandLine = { vimCommandLine = {
alacritty = ''-e "vim" "%f" "+normal!%lGzv%c|"''; alacritty = ''-e "vim" "%f" "+normal!%lGzv%c|"'';

View file

@ -4,7 +4,7 @@ let
inherit (config.my.home.terminal) colors; inherit (config.my.home.terminal) colors;
in in
{ {
config = lib.mkIf (cfg.program == "alacritty") { config = lib.mkIf (cfg.default == "alacritty") {
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;

View file

@ -16,11 +16,11 @@ in
options.my.home = with lib; { options.my.home = with lib; {
terminal = { terminal = {
program = mkOption { default = mkOption {
type = with types; nullOr (enum [ "alacritty" "termite" ]); type = with types; nullOr (enum [ "alacritty" "termite" ]);
default = null; default = null;
example = "termite"; example = "termite";
description = "Which terminal to use for home session"; description = "Which default terminal to use for home session";
}; };
colors = { colors = {
@ -56,7 +56,7 @@ in
}; };
}; };
config.home.sessionVariables = lib.mkIf (cfg.program != null) { config.home.sessionVariables = lib.mkIf (cfg.default != null) {
TERMINAL = cfg.program; TERMINAL = cfg.default;
}; };
} }

View file

@ -4,7 +4,7 @@ let
inherit (config.my.home.terminal) colors; inherit (config.my.home.terminal) colors;
in in
{ {
config = lib.mkIf (cfg.program == "termite") { config = lib.mkIf (cfg.default == "termite") {
programs.termite = { programs.termite = {
enable = true; enable = true;

View file

@ -31,9 +31,9 @@ in
}; };
}); });
default = { ${config.my.home.terminal.program} = { }; }; default = { ${config.my.home.terminal.default} = { }; };
defaultText = literalExpression '' defaultText = literalExpression ''
{ ''${config.my.home.terminal.program} = { }; }; { ''${config.my.home.terminal.default} = { }; };
''; '';
example = { xterm-256color = { }; }; example = { xterm-256color = { }; };
description = '' description = ''

View file

@ -3,8 +3,8 @@ let
isEnabled = config.my.home.wm.windowManager == "i3"; isEnabled = config.my.home.wm.windowManager == "i3";
terminal = terminal =
if config.my.home.terminal.program != null if config.my.home.terminal.default != null
then config.my.home.terminal.program then config.my.home.terminal.default
else "i3-sensible-terminal"; else "i3-sensible-terminal";
alt = "Mod1"; # `Alt` key alt = "Mod1"; # `Alt` key

View file

@ -7,7 +7,7 @@ in
programs.rofi = { programs.rofi = {
enable = true; enable = true;
terminal = config.my.home.terminal.program; # null by default terminal = config.my.home.terminal.default; # null by default
package = pkgs.rofi.override { package = pkgs.rofi.override {
plugins = with pkgs; [ plugins = with pkgs; [