1
0
forked from extern/nix-config

nix: Remove one-off variables

Don't use variables for things that only get defined in one place.
This commit is contained in:
Donovan Glover 2023-06-22 10:17:42 -04:00
parent 4d8ce87fb1
commit 99d2913b41
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
4 changed files with 5 additions and 11 deletions

View File

@ -15,11 +15,8 @@
options.variables = { options.variables = {
hostname = lib.mkOption { default = "nixos"; }; hostname = lib.mkOption { default = "nixos"; };
timezone = lib.mkOption { default = "America/New_York"; };
hostHardwareConfiguration = lib.mkOption { default = ./hardware/laptop.nix; }; hostHardwareConfiguration = lib.mkOption { default = ./hardware/laptop.nix; };
stateVersion = lib.mkOption { default = "22.11"; }; stateVersion = lib.mkOption { default = "22.11"; };
defaultLocale = lib.mkOption { default = "ja_JP.UTF-8"; };
supportedLocales = lib.mkOption { default = [ "ja_JP.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8" ]; };
username = lib.mkOption { default = "user"; }; username = lib.mkOption { default = "user"; };
defaultBrowser = lib.mkOption { default = "librewolf"; }; defaultBrowser = lib.mkOption { default = "librewolf"; };
}; };

View File

@ -1,4 +1,4 @@
let VARIABLES = import ../src/variables.nix; in { {
i18n.defaultLocale = VARIABLES.defaultLocale; i18n.defaultLocale = "ja_JP.UTF-8";
i18n.supportedLocales = VARIABLES.supportedLocales; i18n.supportedLocales = [ "ja_JP.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8" ];
} }

View File

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

View File

@ -1,11 +1,8 @@
{ {
hostname = "nixos"; hostname = "nixos";
system = "x86_64-linux"; system = "x86_64-linux";
timezone = "America/New_York";
hostHardwareConfiguration = ../hardware/laptop.nix; hostHardwareConfiguration = ../hardware/laptop.nix;
stateVersion = "22.11"; stateVersion = "22.11";
defaultLocale = "ja_JP.UTF-8";
supportedLocales = [ "ja_JP.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8" ];
username = "user"; username = "user";
defaultBrowser = "librewolf"; defaultBrowser = "librewolf";
} }