forked from jan-leila/nix-config
moved local to modules
This commit is contained in:
parent
bc53ae6ee2
commit
4d191a27cc
12 changed files with 90 additions and 18 deletions
|
@ -5,6 +5,7 @@
|
|||
./users.nix
|
||||
./desktop.nix
|
||||
./nix-development.nix
|
||||
./i18n.nix
|
||||
./home-manager
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./flipperzero.nix
|
||||
./i18n.nix
|
||||
];
|
||||
}
|
||||
|
|
26
host-modules/home-manager/i18n.nix
Normal file
26
host-modules/home-manager/i18n.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
home-users = lib.attrsets.mapAttrsToList (_: user: user) config.home-manager.users;
|
||||
in {
|
||||
config = {
|
||||
i18n.supportedLocales =
|
||||
lib.unique
|
||||
(builtins.map (l: (lib.replaceStrings ["utf8" "utf-8" "UTF8"] ["UTF-8" "UTF-8" "UTF-8"] l) + "/UTF-8") (
|
||||
[
|
||||
"C.UTF-8"
|
||||
"en_US.UTF-8"
|
||||
config.i18n.defaultLocale
|
||||
]
|
||||
++ (lib.attrValues (lib.filterAttrs (n: v: n != "LANGUAGE") config.i18n.extraLocaleSettings))
|
||||
++ (
|
||||
map (user-config: user-config.i18n.defaultLocale) home-users
|
||||
)
|
||||
++ (lib.lists.flatten (
|
||||
map (user-config: lib.attrValues (lib.filterAttrs (n: v: n != "LANGUAGE") user-config.i18n.extraLocaleSettings)) home-users
|
||||
))
|
||||
));
|
||||
};
|
||||
}
|
3
host-modules/i18n.nix
Normal file
3
host-modules/i18n.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{...}: {
|
||||
i18n.defaultLocale = "en_IE.UTF-8";
|
||||
}
|
|
@ -53,7 +53,7 @@ in {
|
|||
}: {
|
||||
options = {
|
||||
name = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
type = lib.types.str;
|
||||
default = name;
|
||||
description = ''
|
||||
What should this users name on the system be
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue