nix: Modularize locale and timezone

This commit is contained in:
Donovan Glover 2023-06-21 02:34:31 -04:00
parent 7760a7028b
commit 5694bbc450
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
4 changed files with 9 additions and 6 deletions

View File

@ -8,6 +8,7 @@
./greetd.nix ./greetd.nix
./home-manager.nix ./home-manager.nix
./hyprland.nix ./hyprland.nix
./locale.nix
./logind.nix ./logind.nix
./mullvad.nix ./mullvad.nix
./neovim.nix ./neovim.nix
@ -20,6 +21,7 @@
./stylix.nix ./stylix.nix
./systemd.nix ./systemd.nix
./thunar.nix ./thunar.nix
./timezone.nix
./user.nix ./user.nix
./virtualization.nix ./virtualization.nix
./vmware.nix ./vmware.nix

4
modules/locale.nix Normal file
View File

@ -0,0 +1,4 @@
let VARIABLES = import ./variables.nix; in {
i18n.defaultLocale = VARIABLES.defaultLocale;
i18n.supportedLocales = VARIABLES.supportedLocales;
}

3
modules/timezone.nix Normal file
View File

@ -0,0 +1,3 @@
let VARIABLES = import ../src/variables.nix; in {
time.timeZone = "${VARIABLES.timezone}";
}

View File

@ -14,10 +14,6 @@ let VARIABLES = import ./variables.nix; in {
../containers ../containers
]; ];
# locale
i18n.defaultLocale = VARIABLES.defaultLocale;
i18n.supportedLocales = VARIABLES.supportedLocales;
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -119,7 +115,5 @@ let VARIABLES = import ./variables.nix; in {
environment.defaultPackages = [ ]; environment.defaultPackages = [ ];
system.stateVersion = VARIABLES.stateVersion; system.stateVersion = VARIABLES.stateVersion;
time.timeZone = "${VARIABLES.timezone}"; # Timezone
networking.firewall.allowedTCPPorts = [ 11918 ]; networking.firewall.allowedTCPPorts = [ 11918 ];
} }