summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-01-07 12:00:08 -0500
committerJon Santmyer <jon@jonsantmyer.com>2024-01-07 12:00:08 -0500
commit7b79203f54853733d4fae88943829d0e24e6e49f (patch)
treea352d199fad7453332b9308a6295164157729f27 /default.nix
parent184bd30bcb303104a4981ac742d8f8961c5477e7 (diff)
downloadnix-config-7b79203f54853733d4fae88943829d0e24e6e49f.tar.gz
nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.tar.bz2
nix-config-7b79203f54853733d4fae88943829d0e24e6e49f.zip
massive overhaul
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix70
1 files changed, 70 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..f223141
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,70 @@
+{
+ config,
+ inputs,
+ lib,
+ pkgs,
+ ...
+}: {
+ imports =
+ [inputs.home-manager.nixosModules.home-manager]
+ ++ (lib.custom.mapModulesRec' ./modules import);
+
+ environment.variables.NIXOSCONFIG = config.nixosConfig.dir;
+ environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
+
+ #Timezone
+ time.timeZone = "America/New_York";
+
+ #Locale
+ i18n.defaultLocale = "en_US.UTF-8";
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "en_US.UTF-8";
+ LC_IDENTIFICATION = "en_US.UTF-8";
+ LC_MEASUREMENT = "en_US.UTF-8";
+ LC_MONETARY = "en_US.UTF-8";
+ LC_NAME = "en_US.UTF-8";
+ LC_NUMERIC = "en_US.UTF-8";
+ LC_PAPER = "en_US.UTF-8";
+ LC_TELEPHONE = "en_US.UTF-8";
+ LC_TIME = "en_US.UTF-8";
+ };
+
+ #Nix package manager configs.
+ nix = {
+ registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
+ nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
+
+ settings = {
+ experimental-features = "nix-command flakes";
+ auto-optimise-store = true;
+ };
+
+ gc = {
+ automatic = true;
+ dates = "weekly";
+ options = "--delete-older-than 7d";
+ };
+ };
+
+ boot = {
+ kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
+ loader = {
+ systemd-boot.enable = lib.mkDefault true;
+ systemd-boot.configurationLimit = lib.mkDefault 5;
+ efi.canTouchEfiVariables = true;
+ };
+ initrd = {
+ verbose = false;
+ availableKernelModules = [
+ "xhci_pci"
+ "ahci"
+ "usb_storage"
+ "usbhid"
+ "sd_mod"
+ "dm_mod"
+ ];
+ };
+ };
+
+ system.stateVersion = "23.11";
+}