i18n: add color scheme option (close #9626)

rnhmjoj 2a0f9d40 779d3a2e

Changed files
+20 -1
nixos
modules
config
tasks
+17
nixos/modules/config/i18n.nix
···
'';
};
+
consoleColors = mkOption {
+
type = types.listOf types.str;
+
default = [];
+
example = [
+
"002b36" "dc322f" "859900" "b58900"
+
"268bd2" "d33682" "2aa198" "eee8d5"
+
"002b36" "cb4b16" "586e75" "657b83"
+
"839496" "6c71c4" "93a1a1" "fdf6e3"
+
];
+
description = ''
+
The 16 colors palette used by the virtual consoles.
+
Leave empty to use the default colors.
+
Colors must be in hexadecimal format and listed in
+
order from color 0 to color 15.
+
'';
+
};
+
};
};
+3 -1
nixos/modules/tasks/kbd.nix
···
let
+
makeColor = n: value: "COLOR_${toString n}=${value}";
+
vconsoleConf = pkgs.writeText "vconsole.conf"
''
KEYMAP=${config.i18n.consoleKeyMap}
FONT=${config.i18n.consoleFont}
-
'';
+
'' + concatImapStringsSep "\n" makeColor config.i18n.consoleColors;
in