- my.disks generates disko: NVMe btrfs (@root/@home/@nix/@log/@swap) + SATA SSD btrfs with one subvolume per ~/Games, Downloads, Documents, Music, Pictures, Videos, Storage (nofail) - lanzaboote Secure Boot, systemd initrd, latest kernel - AMD CPU/GPU: amdgpu initrd, OpenCL, LACT, optional ROCm - agenix with host-key identity, optional password and SSH key secrets - Hyprland (UWSM, XWayland) + greetd/tuigreet, Noctalia services, PipeWire, fonts - Steam + Proton-GE, gamescope, gamemode - overlays: compose Hyprland's hyprland-packages + hyprland-extras (upstream default lacks the hyprwm dependency overlays) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J1cugeLkfFLZMpiztQ8TyN
58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
# Time zone, locale and keyboard layout (also used by the console and by the
|
|
# home-manager Hyprland module through osConfig).
|
|
{ config, lib, ... }:
|
|
let
|
|
cfg = config.my.locale;
|
|
inherit (lib) mkOption types;
|
|
in
|
|
{
|
|
options.my.locale = {
|
|
timeZone = mkOption {
|
|
type = types.str;
|
|
example = "Europe/Moscow";
|
|
description = "IANA time zone name.";
|
|
};
|
|
|
|
defaultLocale = mkOption {
|
|
type = types.str;
|
|
default = "en_US.UTF-8";
|
|
description = "Default system locale (LANG).";
|
|
};
|
|
|
|
keyboardLayouts = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [ "us" ];
|
|
example = [
|
|
"us"
|
|
"ru"
|
|
];
|
|
description = "XKB layouts, in switching order.";
|
|
};
|
|
|
|
keyboardOptions = mkOption {
|
|
type = types.listOf types.str;
|
|
default = [ ];
|
|
example = [ "grp:alt_shift_toggle" ];
|
|
description = "XKB options such as the layout toggle shortcut.";
|
|
};
|
|
};
|
|
|
|
config = {
|
|
time.timeZone = cfg.timeZone;
|
|
|
|
i18n = {
|
|
inherit (cfg) defaultLocale;
|
|
# Russian stays available for apps and games even with an English UI.
|
|
extraLocales = [ "ru_RU.UTF-8/UTF-8" ];
|
|
};
|
|
|
|
services.xserver.xkb = {
|
|
layout = lib.concatStringsSep "," cfg.keyboardLayouts;
|
|
options = lib.concatStringsSep "," cfg.keyboardOptions;
|
|
};
|
|
|
|
# TTY and initrd keymap follow the XKB layout above.
|
|
console.useXkbConfig = true;
|
|
};
|
|
}
|