summaryrefslogtreecommitdiff
path: root/modules/system/general-settings
diff options
context:
space:
mode:
authoroutremonde <outremonde@vivaldi.net>2025-06-10 20:32:00 -0400
committeroutremonde <outremonde@vivaldi.net>2025-06-10 20:32:00 -0400
commit9786eb8672213344d8d1b7bdef12bc94510b20db (patch)
treeb7d79440800c92d32187ab32c636b0830c94a610 /modules/system/general-settings
initialized repository
Former-commit-id: 84647f22b951a957b2b83885b612115d473f6626
Diffstat (limited to 'modules/system/general-settings')
-rw-r--r--modules/system/general-settings/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/modules/system/general-settings/default.nix b/modules/system/general-settings/default.nix
new file mode 100644
index 0000000..0001f5f
--- /dev/null
+++ b/modules/system/general-settings/default.nix
@@ -0,0 +1,45 @@
+{ config, pkgs, lib, ... }: let
+ cfg = config.general-settings;
+in {
+ options.general-settings = {
+ hostname = lib.mkOption {
+ type = lib.types.str;
+ default = "nixos";
+ description = "system hostname";
+ };
+ locale = lib.mkOption {
+ type = lib.types.str;
+ default = "en_US.UTF-8";
+ description = "system locale";
+ };
+ timezone = lib.mkOption {
+ type = lib.types.str;
+ default = "America/New_York";
+ description = "system timezone";
+ };
+ stateVersion = lib.mkOption {
+ type = lib.types.str;
+ default = "24.11";
+ description = "nixos stateversion";
+ };
+ };
+ config = {
+ environment.systemPackages = [ pkgs.home-manager ];
+ system.stateVersion = cfg.stateVersion;
+ nixpkgs.config.allowUnfree = true;
+ networking.hostName = cfg.hostname;
+ time.timeZone = cfg.timezone;
+ i18n.defaultLocale = cfg.locale;
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = cfg.locale;
+ LC_IDENTIFICATION = cfg.locale;
+ LC_MEASUREMENT = cfg.locale;
+ LC_MONETARY = cfg.locale;
+ LC_NAME = cfg.locale;
+ LC_NUMERIC = cfg.locale;
+ LC_PAPER = cfg.locale;
+ LC_TELEPHONE = cfg.locale;
+ LC_TIME = cfg.locale;
+ };
+ };
+}