diff --git a/nix/configuration/configuration.nix b/nix/configuration/configuration.nix index cb576a9..b48cb45 100644 --- a/nix/configuration/configuration.nix +++ b/nix/configuration/configuration.nix @@ -14,6 +14,7 @@ ./roles/base ./roles/bluetooth ./roles/boot + ./roles/build_in_ram ./roles/chromecast ./roles/chromium ./roles/d2 @@ -177,7 +178,6 @@ (final: prev: { grub2 = (final.callPackage ./package/grub { }); }) - (disableTests "git") ]; # This option defines the first version of NixOS you have installed on this particular machine, diff --git a/nix/configuration/formats/iso.nix b/nix/configuration/formats/iso.nix index 8956470..1c1dd41 100644 --- a/nix/configuration/formats/iso.nix +++ b/nix/configuration/formats/iso.nix @@ -16,8 +16,8 @@ me.buildingPortable = true; me.mountPersistence = lib.mkForce false; me.optimizations.enable = lib.mkForce false; - me.image_based_appliance.enable = true; - # TODO: image based appliance? + # Not doing image_based_appliance because this might be an install ISO, in which case we'd need nix to do the install. + # me.image_based_appliance.enable = true; }; } diff --git a/nix/configuration/hosts/odo/default.nix b/nix/configuration/hosts/odo/default.nix index bb796ab..7d5cf24 100644 --- a/nix/configuration/hosts/odo/default.nix +++ b/nix/configuration/hosts/odo/default.nix @@ -68,6 +68,7 @@ me.base.enable = true; me.bluetooth.enable = true; me.boot.enable = true; + me.build_in_ram.enable = true; me.chromecast.enable = true; me.chromium.enable = true; me.d2.enable = true; diff --git a/nix/configuration/hosts/quark/default.nix b/nix/configuration/hosts/quark/default.nix index 1159abb..6b3977f 100644 --- a/nix/configuration/hosts/quark/default.nix +++ b/nix/configuration/hosts/quark/default.nix @@ -62,6 +62,7 @@ me.base.enable = true; me.bluetooth.enable = true; me.boot.enable = true; + me.build_in_ram.enable = true; me.chromecast.enable = true; me.chromium.enable = true; me.d2.enable = true; diff --git a/nix/configuration/hosts/recovery/default.nix b/nix/configuration/hosts/recovery/default.nix index cac7293..7611360 100644 --- a/nix/configuration/hosts/recovery/default.nix +++ b/nix/configuration/hosts/recovery/default.nix @@ -47,11 +47,16 @@ # Enable TRIM # services.fstrim.enable = lib.mkDefault true; + me.build_in_ram.enable = true; + me.doas.enable = true; + me.network.enable = true; + me.nvme.enable = true; me.recovery.enable = true; me.ssh.enable = true; me.sshd.enable = true; me.user.enable = true; me.zfs.enable = true; me.zrepl.enable = true; + me.zsh.enable = true; }; } diff --git a/nix/configuration/roles/build_in_ram/default.nix b/nix/configuration/roles/build_in_ram/default.nix new file mode 100644 index 0000000..eea5714 --- /dev/null +++ b/nix/configuration/roles/build_in_ram/default.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + imports = [ ]; + + options.me = { + build_in_ram.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install build_in_ram."; + }; + }; + + config = lib.mkIf config.me.build_in_ram.enable ( + lib.mkMerge [ + { + # Nix 2.30.0 (2025-07-07) changed the build directory from /tmp to /nix/var/nix/builds which broke a number of builds because my ZFS datasets were utf8only. + fileSystems."/nix/var/nix/builds" = { + device = "tmpfs"; + fsType = "tmpfs"; + options = [ + "size=40G" # adjust for your situation and needs + "mode=700" + ]; + }; + } + ] + ); +}