From d43f19c20ac987b682e0045ef004071bac9b50c5 Mon Sep 17 00:00:00 2001 From: moons Date: Wed, 26 Aug 2026 17:28:09 +0900 Subject: [PATCH] nix builder --- hosts/nix-builder/nixos.nix | 23 +++++++++++++++++++++++ modules/systems/nix/common.nix | 2 ++ 2 files changed, 25 insertions(+) diff --git a/hosts/nix-builder/nixos.nix b/hosts/nix-builder/nixos.nix index 20b1fd9..aa5ea08 100644 --- a/hosts/nix-builder/nixos.nix +++ b/hosts/nix-builder/nixos.nix @@ -1,4 +1,27 @@ { imports = [ ./hardware-configuration.nix ]; + fileSystems."/nix/store" = { + device = "/dev/disk/by-label/nix-store"; + fsType = "ext4"; + + options = [ + "noatime" + ]; + + neededForBoot = true; + }; + + fileSystems."/var/lib/nix-build" = { + device = "/dev/disk/by-label/nix-build"; + fsType = "ext4"; + + options = [ + "noatime" + ]; + }; + + nix.settings.build-dir = "/var/lib/nix-build"; + + services.fstrim.enable = true; } diff --git a/modules/systems/nix/common.nix b/modules/systems/nix/common.nix index 0a656ff..e030c26 100644 --- a/modules/systems/nix/common.nix +++ b/modules/systems/nix/common.nix @@ -7,6 +7,8 @@ "flakes" ]; + connect-timeout = 10; + extra-substituters = [ "https://cache.nixos.org" "https://nix-community.cachix.org"