about summary refs log tree commit diff
path: root/machines/aszlig
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2022-08-15 17:04:53 +0200
committeraszlig <aszlig@nix.build>2022-08-15 17:31:45 +0200
commit362b3ea25da7884152d76c6ffeb100625c31138b (patch)
tree44f899cc0dcfcff7da584f7c56a1f3dec8990689 /machines/aszlig
parent22c382665c24682f7e5433ff1f15d2004bf39338 (diff)
machines + modules: Fix Nix option definitions
Most of the options in nix.conf are now exposed as a submodule with a
freeform type and since that change[1] got introduced, we get a bunch of
warnings during machine evaluation:

  trace: warning: The option `nix.useSandbox' defined in `...' has been renamed to `nix.settings.sandbox'.
  trace: warning: The option `nix.maxJobs' defined in `...' has been renamed to `nix.settings.max-jobs'.
  trace: warning: The option `nix.buildCores' defined in `...' has been renamed to `nix.settings.cores'.

To shut them up, I went through all machines and modules and renamed the
remaining options that were not renamed back then when @devhell did some
renames in a0297bf921399c3243dcca99626d8697f0735abe.

This was done by looking through the output of:

  $ git grep -A 10 '\<nix\(\.\| *=\)' machines modules

After that I tested the contents of the nix.conf of all the machines
against the changes this commit introduced via the following command:

  $ nix-build --no-out-link -E '
      with import <nixpkgs/lib>;
      map (m: m.eval.config.environment.etc."nix/nix.conf".source)
          (collect (m: m ? eval) (import ./machines))
    '

I've sorted the resulting nix.conf files and diffed on that result and
the only difference that showed up was the following:

   allowed-users = *
  -auto-optimise-store = false
   auto-optimise-store = true
   builders-use-substitutes = true
   cores = 0

This is because the previous way to generate the config was by
concatenating strings whereas the new way works on an attribute set, so
we get deduplication by design.

[1]: https://github.com/NixOS/nixpkgs/pull/139075

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @devhell
Cc: @Profpatsch
Cc: @sternenseemann
Diffstat (limited to 'machines/aszlig')
-rw-r--r--machines/aszlig/dnyarri.nix2
-rw-r--r--machines/aszlig/managed/brawndo.nix2
-rw-r--r--machines/aszlig/managed/tyree.nix2
-rw-r--r--machines/aszlig/meshuggah.nix2
-rw-r--r--machines/aszlig/slylandro.nix2
5 files changed, 5 insertions, 5 deletions
diff --git a/machines/aszlig/dnyarri.nix b/machines/aszlig/dnyarri.nix
index 89f4434c..5651b73f 100644
--- a/machines/aszlig/dnyarri.nix
+++ b/machines/aszlig/dnyarri.nix
@@ -20,7 +20,7 @@ let
 in {
   vuizvui.user.aszlig.profiles.workstation.enable = true;
 
-  nix.maxJobs = 24;
+  nix.settings.max-jobs = 24;
 
   hardware.printers.ensureDefaultPrinter = "Bunti";
   hardware.printers.ensurePrinters = lib.singleton {
diff --git a/machines/aszlig/managed/brawndo.nix b/machines/aszlig/managed/brawndo.nix
index 8fb96ec8..6960a0b6 100644
--- a/machines/aszlig/managed/brawndo.nix
+++ b/machines/aszlig/managed/brawndo.nix
@@ -31,7 +31,7 @@ in {
 
   networking.hostName = "brawndo";
 
-  nix.maxJobs = 4;
+  nix.settings.max-jobs = 4;
 
   nixpkgs.config.allowUnfree = true; # XXX: More granularity!
 
diff --git a/machines/aszlig/managed/tyree.nix b/machines/aszlig/managed/tyree.nix
index c7190507..65ed91f7 100644
--- a/machines/aszlig/managed/tyree.nix
+++ b/machines/aszlig/managed/tyree.nix
@@ -53,7 +53,7 @@
 
   hardware.cpu.intel.updateMicrocode = true;
 
-  nix.maxJobs = 4;
+  nix.settings.max-jobs = 4;
 
   # English within the shell, German otherwise (like in KDE).
   programs.bash.interactiveShellInit = lib.mkBefore ''
diff --git a/machines/aszlig/meshuggah.nix b/machines/aszlig/meshuggah.nix
index deb6b122..e4bd2b76 100644
--- a/machines/aszlig/meshuggah.nix
+++ b/machines/aszlig/meshuggah.nix
@@ -14,7 +14,7 @@
 
   networking.hostName = "meshuggah";
 
-  nix.maxJobs = 2;
+  nix.settings.max-jobs = 2;
 
   fileSystems."/" = {
     device = "/dev/disk/by-uuid/9bddc8d3-88ee-4aac-b885-c9abca36b863";
diff --git a/machines/aszlig/slylandro.nix b/machines/aszlig/slylandro.nix
index de678cb7..4d185bda 100644
--- a/machines/aszlig/slylandro.nix
+++ b/machines/aszlig/slylandro.nix
@@ -73,5 +73,5 @@
   services.xserver.videoDrivers = [ "amdgpu" ];
   services.xserver.libinput.enable = true;
 
-  nix.maxJobs = 16;
+  nix.settings.max-jobs = 16;
 }