Small refactor to make locale a global setting
This commit is contained in:
parent
d76d21a39b
commit
808ab9fea5
|
@ -8,6 +8,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
imports = [
|
||||||
|
../shared/locale/configuration.nix
|
||||||
|
];
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
# You can add overlays here
|
# You can add overlays here
|
||||||
overlays = [
|
overlays = [
|
||||||
|
@ -101,21 +104,6 @@
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "nl_NL.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
|
||||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
|
||||||
LC_MONETARY = "nl_NL.UTF-8";
|
|
||||||
LC_NAME = "nl_NL.UTF-8";
|
|
||||||
LC_NUMERIC = "nl_NL.UTF-8";
|
|
||||||
LC_PAPER = "nl_NL.UTF-8";
|
|
||||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
|
||||||
LC_TIME = "en_DK.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,10 @@
|
||||||
# You can also split up your configuration and import pieces of it here:
|
# You can also split up your configuration and import pieces of it here:
|
||||||
# ./nvim.nix
|
# ./nvim.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
# Import locale settings
|
||||||
|
../../shared/locale/configuration.nix
|
||||||
|
|
||||||
#../../server/package-configs/akkoma/configuration.nix
|
#../../server/package-configs/akkoma/configuration.nix
|
||||||
../../server/package-configs/forgejo/configuration.nix
|
../../server/package-configs/forgejo/configuration.nix
|
||||||
../../server/package-configs/gotosocial/configuration.nix
|
../../server/package-configs/gotosocial/configuration.nix
|
||||||
|
@ -134,21 +138,6 @@
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "nl_NL.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
|
||||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
|
||||||
LC_MONETARY = "nl_NL.UTF-8";
|
|
||||||
LC_NAME = "nl_NL.UTF-8";
|
|
||||||
LC_NUMERIC = "nl_NL.UTF-8";
|
|
||||||
LC_PAPER = "nl_NL.UTF-8";
|
|
||||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
|
||||||
LC_TIME = "en_DK.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,6 +26,9 @@
|
||||||
# Or modules exported from other flakes (such as nix-colors):
|
# Or modules exported from other flakes (such as nix-colors):
|
||||||
# inputs.nix-colors.homeManagerModules.default
|
# inputs.nix-colors.homeManagerModules.default
|
||||||
|
|
||||||
|
# Import the locale settings
|
||||||
|
../../shared/locale/configuration.nix
|
||||||
|
|
||||||
# You can also split up your configuration and import pieces of it here:
|
# You can also split up your configuration and import pieces of it here:
|
||||||
# ./nvim.nix
|
# ./nvim.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -175,21 +178,6 @@
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "nl_NL.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
|
||||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
|
||||||
LC_MONETARY = "nl_NL.UTF-8";
|
|
||||||
LC_NAME = "nl_NL.UTF-8";
|
|
||||||
LC_NUMERIC = "nl_NL.UTF-8";
|
|
||||||
LC_PAPER = "nl_NL.UTF-8";
|
|
||||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
|
||||||
LC_TIME = "en_DK.UTF8";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
|
|
||||||
# nixos-generate-config should normally set up file systems correctly
|
# nixos-generate-config should normally set up file systems correctly
|
||||||
imports = [
|
imports = [
|
||||||
#inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
# Import locale settings
|
||||||
|
../../shared/locale/configuration.nix
|
||||||
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
@ -149,21 +151,6 @@
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "nl_NL.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
|
||||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
|
||||||
LC_MONETARY = "nl_NL.UTF-8";
|
|
||||||
LC_NAME = "nl_NL.UTF-8";
|
|
||||||
LC_NUMERIC = "nl_NL.UTF-8";
|
|
||||||
LC_PAPER = "nl_NL.UTF-8";
|
|
||||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
|
||||||
LC_TIME = "en_DK.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
23
nixos/shared/locale/configuration.nix
Normal file
23
nixos/shared/locale/configuration.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "nl_NL.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||||
|
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||||
|
LC_MONETARY = "nl_NL.UTF-8";
|
||||||
|
LC_NAME = "nl_NL.UTF-8";
|
||||||
|
LC_NUMERIC = "nl_NL.UTF-8";
|
||||||
|
LC_PAPER = "nl_NL.UTF-8";
|
||||||
|
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||||
|
LC_TIME = "en_DK.UTF8";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue