main
1{den, ...}: {
2 den.aspects.desktop.includes = [den.aspects.desktop.locale];
3 den.aspects.desktop.locale = {
4 nixos = {
5 lib,
6 config,
7 ...
8 }: {
9 i18n.supportedLocales = lib.unique [
10 "C.UTF-8/UTF-8"
11 "en_US.UTF-8/UTF-8"
12 "${config.i18n.defaultLocale}/UTF-8"
13 "zh_CN.UTF-8/UTF-8"
14 ];
15 };
16
17 provides.to-users.hjem = let
18 locale = "zh_CN.UTF-8";
19 in {
20 xdg.config.files."environment.d/60-graphical-locale.conf".text = ''
21 LANG=${locale}
22 LANGUAGE=${locale}
23 LC_ADDRESS=${locale}
24 LC_IDENTIFICATION=${locale}
25 LC_MEASUREMENT=${locale}
26 LC_MONETARY=${locale}
27 LC_NAME=${locale}
28 LC_NUMERIC=${locale}
29 LC_PAPER=${locale}
30 LC_TELEPHONE=${locale}
31 LC_TIME=${locale}
32 '';
33 };
34 };
35}