From c57efa7063eedf3f2f6a92678c94713ba7b2fc17 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Mon, 8 Jul 2024 00:21:51 -0400 Subject: [PATCH] move host-specific config from baseModules -> hosts/common.nix --- baseModules/default.nix | 35 ----------------------------------- hosts/common.nix | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/baseModules/default.nix b/baseModules/default.nix index 76ded136..2a05d623 100644 --- a/baseModules/default.nix +++ b/baseModules/default.nix @@ -6,26 +6,6 @@ inputs: { }: { console.useXkbConfig = true; - environment.systemPackages = with pkgs; [ - inputs.agenix.packages.${pkgs.system}.default - inxi - ]; - - i18n = { - defaultLocale = lib.mkDefault "en_US.UTF-8"; - extraLocaleSettings = { - LC_ADDRESS = config.i18n.defaultLocale; - LC_IDENTIFICATION = config.i18n.defaultLocale; - LC_MEASUREMENT = config.i18n.defaultLocale; - LC_MONETARY = config.i18n.defaultLocale; - LC_NAME = config.i18n.defaultLocale; - LC_NUMERIC = config.i18n.defaultLocale; - LC_PAPER = config.i18n.defaultLocale; - LC_TELEPHONE = config.i18n.defaultLocale; - LC_TIME = config.i18n.defaultLocale; - }; - }; - hardware.keyboard.qmk.enable = true; programs = { @@ -97,21 +77,6 @@ inputs: { sound.enable = true; - system.autoUpgrade = { - allowReboot = true; - dates = "04:00"; - randomizedDelaySec = "20min"; - enable = true; - flake = "github:alyraffauf/nixcfg"; - operation = "boot"; - rebootWindow = { - lower = "02:00"; - upper = "05:00"; - }; - }; - - time.timeZone = "America/New_York"; - zramSwap = { enable = lib.mkDefault true; memoryPercent = lib.mkDefault 50; diff --git a/hosts/common.nix b/hosts/common.nix index cf89a2e8..b62b49e7 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -10,7 +10,29 @@ wifi.file = ../secrets/wifi.age; }; - environment.variables.FLAKE = "github:alyraffauf/nixcfg"; + environment = { + systemPackages = with pkgs; [ + inputs.agenix.packages.${pkgs.system}.default + inxi + ]; + + variables.FLAKE = "github:alyraffauf/nixcfg"; + }; + + i18n = { + defaultLocale = lib.mkDefault "en_US.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = config.i18n.defaultLocale; + LC_IDENTIFICATION = config.i18n.defaultLocale; + LC_MEASUREMENT = config.i18n.defaultLocale; + LC_MONETARY = config.i18n.defaultLocale; + LC_NAME = config.i18n.defaultLocale; + LC_NUMERIC = config.i18n.defaultLocale; + LC_PAPER = config.i18n.defaultLocale; + LC_TELEPHONE = config.i18n.defaultLocale; + LC_TIME = config.i18n.defaultLocale; + }; + }; fileSystems = lib.attrsets.optionalAttrs (config.networking.hostName != "mauville") { "/mnt/Archive" = { @@ -140,4 +162,19 @@ openFirewall = true; authKeyFile = config.age.secrets.tailscaleAuthKey.path; }; + + system.autoUpgrade = { + allowReboot = true; + dates = "04:00"; + randomizedDelaySec = "20min"; + enable = true; + flake = "github:alyraffauf/nixcfg"; + operation = "boot"; + rebootWindow = { + lower = "02:00"; + upper = "05:00"; + }; + }; + + time.timeZone = "America/New_York"; }