add (host options): add basic host options

This commit is contained in:
Kirill Samoylenkov 2025-09-27 15:20:18 +05:00
parent 83abf471a4
commit 0d99d55ef5
7 changed files with 242 additions and 0 deletions

43
options/host/locale.nix Normal file
View file

@ -0,0 +1,43 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.host.locale;
in
{
options = {
host.locale = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Basic locale settings.";
};
timeZone = lib.mkOption {
type = lib.types.str;
default = "America/New_York";
description = "Time Zone Locale.";
};
};
};
config = lib.mkIf cfg.enable {
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
time.timeZone = cfg.timeZone;
};
}