From 2d808e6162c6a3662de13e1b09eab3e01e99eb53 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 22 Jun 2023 10:10:53 -0400 Subject: [PATCH] nix: Begin migration to options No need to import a variables file since all modules have access to the options defined in all other modules. --- default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index 05f7b4d..755f67f 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,4 @@ -{ home-manager, stylix, ... }: +{ home-manager, stylix, lib, ... }: let VARIABLES = import ./src/variables.nix; in { imports = [ @@ -12,4 +12,15 @@ let VARIABLES = import ./src/variables.nix; in { ./specializations ./src/main.nix ]; + + options.variables = { + hostname = lib.mkOption { default = "nixos"; }; + timezone = lib.mkOption { default = "America/New_York"; }; + hostHardwareConfiguration = lib.mkOption { default = ./hardware/laptop.nix; }; + 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"; }; + defaultBrowser = lib.mkOption { default = "librewolf"; }; + }; }