From 94d9a45a38961e26385c1f63bd4934128acd1f20 Mon Sep 17 00:00:00 2001 From: Joakim Repomaa Date: Sun, 2 Feb 2025 15:34:28 +0200 Subject: [PATCH] fix locale and font troubles --- home/common/default.nix | 4 +++- home/gnome/default.nix | 9 ++++++++- radish/host.nix | 4 +++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/home/common/default.nix b/home/common/default.nix index 928cd29..d30bf1b 100644 --- a/home/common/default.nix +++ b/home/common/default.nix @@ -23,7 +23,7 @@ noto-fonts noto-fonts-cjk-sans noto-fonts-color-emoji - google-fonts + source-sans-pro mosh docker-compose signal-desktop @@ -64,6 +64,7 @@ tutanota-desktop imapsync nixfmt-rfc-style + tree ]; programs = { @@ -344,6 +345,7 @@ defaultFonts = { emoji = [ "Noto Color Emoji" ]; monospace = [ "IosevkaTerm NFM" ]; + sansSerif = [ "Source Sans Pro" ]; }; }; diff --git a/home/gnome/default.nix b/home/gnome/default.nix index f2c59f6..1337e1b 100644 --- a/home/gnome/default.nix +++ b/home/gnome/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, osConfig, ... }: let cfg = config.gnome; in @@ -68,6 +68,10 @@ in showWeekNumbers = lib.mkEnableOption { }; }; automaticTimeZone = lib.mkEnableOption { }; + region = lib.mkOption { + type = str; + default = osConfig.i18n.defaultLocale; + }; }; config = { @@ -108,6 +112,9 @@ in "org/gnome/desktop/datetime" = { automatic-timezone = cfg.automaticTimeZone; }; + "system/locale" = { + region = cfg.region; + }; } // ( builtins.listToAttrs ( lib.lists.imap0 diff --git a/radish/host.nix b/radish/host.nix index 29f2b74..cf33ed9 100644 --- a/radish/host.nix +++ b/radish/host.nix @@ -2,7 +2,9 @@ { networking.hostName = "radish"; time.timeZone = lib.mkForce null; # allow TZ to be set by desktop user - i18n.defaultLocale = "en_US.UTF-8"; + i18n.defaultLocale = "de_DE.UTF-8"; + i18n.supportedLocales = map (locale: "${locale}.UTF-8/UTF-8") [ "C" "en_US" "de_DE" "fi_FI" ]; + i18n.extraLocaleSettings.LANG = "en_US.UTF-8"; console = { font = "Lat2-Terminus16"; keyMap = "us";