summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-08-31 09:37:24 +0000
committerAlyssa Ross <hi@alyssa.is>2022-09-10 15:25:37 +0000
commitb508c467d0a54f1aa60c138acdc6677a8ba77abd (patch)
treea12a3f21cf7dcb88037850e84890b7f6337c6888
parent44d289986b1ef4d7a0c6655b97a487fb61b45534 (diff)
downloadspectrum-b508c467d0a54f1aa60c138acdc6677a8ba77abd.tar
spectrum-b508c467d0a54f1aa60c138acdc6677a8ba77abd.tar.gz
spectrum-b508c467d0a54f1aa60c138acdc6677a8ba77abd.tar.bz2
spectrum-b508c467d0a54f1aa60c138acdc6677a8ba77abd.tar.lz
spectrum-b508c467d0a54f1aa60c138acdc6677a8ba77abd.tar.xz
spectrum-b508c467d0a54f1aa60c138acdc6677a8ba77abd.tar.zst
spectrum-b508c467d0a54f1aa60c138acdc6677a8ba77abd.zip
Introduce a build configuration file
By default, a file called "config.nix" in the root of the Spectrum
repository will be read if it exists.  That file should contain an
attribute set.  Currently, only a "pkgs" key is supported, which
allows specifying a custom package set that will be used throughout
the Spectrum Nix files.  This will allow us to provide configuartion
options for people who want to build Spectrum in ways that are
probably not suitable for upstreaming.

For example, using the "pkgs" config option I'm introducing here, it
would be possible to use an overlay to patch individual components,
like so:

	{
	  pkgs = import <nixpkgs> {
	    overlays = [
	      (final: super: {
	        weston = super.weston.overrideAttrs ({ patches ? [], ... }: {
	          patches = patches ++ [
	            path/to/weston.patch
	          ];
	        });
	      })
	    ];
	  };
	}

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Message-Id: <20220831093727.282797-1-hi@alyssa.is>
Reviewed-by: Ville Ilvonen <ville.ilvonen@unikie.com>
Tested-by: José Pekkarinen <jose.pekkarinen@unikie.com>
-rw-r--r--.gitignore1
-rw-r--r--Documentation/default.nix4
-rw-r--r--Documentation/jekyll.nix2
-rw-r--r--host/initramfs/default.nix7
-rw-r--r--host/initramfs/extfs.nix8
-rw-r--r--host/initramfs/shell.nix9
-rw-r--r--host/rootfs/default.nix7
-rw-r--r--host/rootfs/shell.nix10
-rw-r--r--host/start-vm/default.nix2
-rw-r--r--host/start-vm/shell.nix6
-rw-r--r--img/combined/default.nix6
-rw-r--r--img/combined/eosimages.nix4
-rw-r--r--img/combined/run-vm.nix4
-rw-r--r--img/installer/default.nix3
-rw-r--r--img/installer/run-vm.nix7
-rw-r--r--img/live/default.nix11
-rw-r--r--img/live/shell.nix15
-rw-r--r--nix/eval-config.nix10
-rw-r--r--release.nix10
-rw-r--r--scripts/default.nix4
-rw-r--r--shell.nix2
-rw-r--r--vm/app/catgirl/default.nix6
-rw-r--r--vm/app/catgirl/shell.nix6
-rw-r--r--vm/app/lynx/default.nix6
-rw-r--r--vm/app/lynx/shell.nix6
-rw-r--r--vm/sys/net/default.nix6
-rw-r--r--vm/sys/net/shell.nix6
27 files changed, 96 insertions, 72 deletions
diff --git a/.gitignore b/.gitignore
index 8b965e2..a97f309 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: CC0-1.0
 # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
 
+/config.nix
 build/
 result
 result-*
diff --git a/Documentation/default.nix b/Documentation/default.nix
index d94a8cd..9edfbe8 100644
--- a/Documentation/default.nix
+++ b/Documentation/default.nix
@@ -2,7 +2,7 @@
 # SPDX-FileCopyrightText: 2022 Unikie
 # SPDX-License-Identifier: MIT
 
-{ pkgs ? import <nixpkgs> {} }: pkgs.callPackage (
+{ config ? import ../nix/eval-config.nix {} }: config.pkgs.callPackage (
 
 { lib, stdenvNoCC, jekyll, drawio-headless }:
 
@@ -31,5 +31,5 @@ stdenvNoCC.mkDerivation {
   passthru = { inherit jekyll; };
 }
 ) {
-  jekyll = import ./jekyll.nix { inherit pkgs; };
+  jekyll = import ./jekyll.nix { inherit config; };
 }
diff --git a/Documentation/jekyll.nix b/Documentation/jekyll.nix
index bc804b1..6f2866f 100644
--- a/Documentation/jekyll.nix
+++ b/Documentation/jekyll.nix
@@ -1,7 +1,7 @@
 # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
 # SPDX-License-Identifier: MIT
 
-{ pkgs ? import <nixpkgs> {} }: pkgs.callPackage (
+{ config ? import ../nix/eval-config.nix {} }: config.pkgs.callPackage (
 
 { bundlerApp }:
 
diff --git a/host/initramfs/default.nix b/host/initramfs/default.nix
index 44932ad..e5ddeb9 100644
--- a/host/initramfs/default.nix
+++ b/host/initramfs/default.nix
@@ -1,11 +1,10 @@
 # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
 # SPDX-License-Identifier: MIT
 
-{ pkgs ? import <nixpkgs> {}
-, rootfs ? import ../rootfs { inherit pkgs; }
+{ config ? import ../../nix/eval-config.nix {}
+, rootfs ? import ../rootfs { inherit config; }
 }:
-
-pkgs.callPackage (
+let inherit (config) pkgs; in pkgs.callPackage (
 { lib, stdenvNoCC, makeModulesClosure, runCommand, writeReferencesToFile
 , pkgsStatic, busybox, cpio, microcodeAmd, microcodeIntel
 }:
diff --git a/host/initramfs/extfs.nix b/host/initramfs/extfs.nix
index 9fdbd9a..63f436a 100644
--- a/host/initramfs/extfs.nix
+++ b/host/initramfs/extfs.nix
@@ -1,21 +1,21 @@
 # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
 # SPDX-License-Identifier: MIT
 
-{ pkgs, runCommand, tar2ext4 }:
+{ config, runCommand, tar2ext4 }:
 
 let
   netvm = import ../../vm/sys/net {
-    inherit pkgs;
+    inherit config;
     # inherit (foot) terminfo;
   };
 
   appvm-catgirl = import ../../vm/app/catgirl {
-    inherit pkgs;
+    inherit config;
     # inherit (foot) terminfo;
   };
 
   appvm-lynx = import ../../vm/app/lynx {
-    inherit pkgs;
+    inherit config;
     # inherit (foot) terminfo;
   };
 in
diff --git a/host/initramfs/shell.nix b/host/initramfs/shell.nix
index 42da6a4..cbd2c60 100644
--- a/host/initramfs/shell.nix
+++ b/host/initramfs/shell.nix
@@ -1,16 +1,17 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }:
+{ config ? import ../../nix/eval-config.nix {} }:
 
 let
+  inherit (config) pkgs;
   inherit (pkgs.lib) cleanSource cleanSourceWith;
 
   extfs = pkgs.pkgsStatic.callPackage ./extfs.nix {
-    inherit pkgs;
+    inherit config;
   };
-  rootfs = import ../rootfs { inherit pkgs; };
-  initramfs = import ./. { inherit pkgs rootfs; };
+  rootfs = import ../rootfs { inherit config; };
+  initramfs = import ./. { inherit config rootfs; };
 in
 
 with pkgs;
diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix
index a651a20..874de78 100644
--- a/host/rootfs/default.nix
+++ b/host/rootfs/default.nix
@@ -2,7 +2,8 @@
 # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
 # SPDX-FileCopyrightText: 2022 Unikie
 
-{ pkgs ? import <nixpkgs> {} }: pkgs.pkgsStatic.callPackage (
+{ config ? import ../../nix/eval-config.nix {} }: let inherit (config) pkgs; in
+pkgs.pkgsStatic.callPackage (
 
 { lib, stdenvNoCC, nixos, runCommand, writeReferencesToFile, s6-rc, tar2ext4
 , busybox, cloud-hypervisor, cryptsetup, execline, jq, kmod
@@ -13,7 +14,9 @@ let
   inherit (lib) cleanSource cleanSourceWith concatMapStringsSep hasSuffix;
   inherit (nixosAllHardware.config.hardware) firmware;
 
-  start-vm = import ../start-vm { pkgs = pkgs.pkgsStatic; };
+  start-vm = import ../start-vm {
+    config = config // { pkgs = pkgs.pkgsStatic; };
+  };
 
   pkgsGui = pkgs.pkgsMusl.extend (final: super: {
     systemd = final.libudev-zero;
diff --git a/host/rootfs/shell.nix b/host/rootfs/shell.nix
index fe9df1b..ea8410a 100644
--- a/host/rootfs/shell.nix
+++ b/host/rootfs/shell.nix
@@ -2,13 +2,13 @@
 # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
 # SPDX-FileCopyrightText: 2022 Unikie
 
-{ pkgs ? import <nixpkgs> {} }:
+{ config ? import ../../nix/eval-config.nix {} }:
 
 let
-  rootfs = import ./. { inherit pkgs; };
+  rootfs = import ./. { inherit config; };
 in
 
-with pkgs;
+with config.pkgs;
 
 rootfs.overrideAttrs (
 { passthru ? {}, nativeBuildInputs ? [], ... }:
@@ -18,7 +18,7 @@ rootfs.overrideAttrs (
     cryptsetup jq netcat qemu_kvm reuse util-linux
   ];
 
-  EXT_FS = pkgsStatic.callPackage ../initramfs/extfs.nix { inherit pkgs; };
-  INITRAMFS = import ../initramfs { inherit pkgs rootfs; };
+  EXT_FS = pkgsStatic.callPackage ../initramfs/extfs.nix { inherit config; };
+  INITRAMFS = import ../initramfs { inherit config rootfs; };
   KERNEL = "${passthru.kernel}/${stdenv.hostPlatform.linux-kernel.target}";
 })
diff --git a/host/start-vm/default.nix b/host/start-vm/default.nix
index 56be882..fcce495 100644
--- a/host/start-vm/default.nix
+++ b/host/start-vm/default.nix
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }: pkgs.callPackage (
+{ config ? import ../../nix/eval-config.nix {} }: config.pkgs.callPackage (
 { lib, stdenv, fetchpatch, meson, ninja, rustc }:
 
 let
diff --git a/host/start-vm/shell.nix b/host/start-vm/shell.nix
index c7f6365..5192b76 100644
--- a/host/start-vm/shell.nix
+++ b/host/start-vm/shell.nix
@@ -1,11 +1,11 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }:
+{ config ? import ../../nix/eval-config.nix {} }:
 
-with pkgs;
+with config.pkgs;
 
-(import ./. { inherit pkgs; }).overrideAttrs (
+(import ./. { inherit config; }).overrideAttrs (
 { nativeBuildInputs ? [], ... }:
 
 {
diff --git a/img/combined/default.nix b/img/combined/default.nix
index 16cd506..3989d55 100644
--- a/img/combined/default.nix
+++ b/img/combined/default.nix
@@ -2,17 +2,17 @@
 # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
 # SPDX-FileCopyrightText: 2021 Yureka <yuka@yuka.dev>
 
-{ pkgs ? import <nixpkgs> {} }: with pkgs;
+{ config ? import ../../nix/eval-config.nix {} }: with config.pkgs;
 
 let
   inherit (builtins) storeDir;
   inherit (pkgs.lib) removePrefix;
 
-  eosimages = import ./eosimages.nix { inherit pkgs; };
+  eosimages = import ./eosimages.nix { inherit config; };
 
   installerPartUuid = "6e23b026-9f1e-479d-8a58-a0cda382e1ce";
   installer = import ../installer {
-    inherit pkgs;
+    inherit config;
 
     extraConfig = {
       boot.initrd.availableKernelModules = [ "squashfs" ];
diff --git a/img/combined/eosimages.nix b/img/combined/eosimages.nix
index 4ec28e5..9f2ab10 100644
--- a/img/combined/eosimages.nix
+++ b/img/combined/eosimages.nix
@@ -1,12 +1,12 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }: with pkgs;
+{ config ? import ../../nix/eval-config.nix {} }: with config.pkgs;
 
 runCommand "eosimages.img" {
   nativeBuildInputs = [ e2fsprogs tar2ext4 ];
   imageName = "Spectrum-0.0-x86_64-generic.0.Live.img";
-  image = import ../live { inherit pkgs; };
+  image = import ../live { inherit config; };
 } ''
   mkdir dir
   cd dir
diff --git a/img/combined/run-vm.nix b/img/combined/run-vm.nix
index 893bc7d..40eacc4 100644
--- a/img/combined/run-vm.nix
+++ b/img/combined/run-vm.nix
@@ -1,10 +1,10 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }: with pkgs;
+{ config ? import ../../nix/eval-config.nix {} }: with config.pkgs;
 
 let
-  image = import ./. { inherit pkgs; };
+  image = import ./. { inherit config; };
 in
 
 writeShellScript "run-spectrum-installer-vm.sh" ''
diff --git a/img/installer/default.nix b/img/installer/default.nix
index ba97a53..0c57704 100644
--- a/img/installer/default.nix
+++ b/img/installer/default.nix
@@ -1,7 +1,8 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {}, extraConfig ? {} }: with pkgs;
+{ config ? import ../../nix/eval-config.nix {}, extraConfig ? {} }:
+with config.pkgs;
 
 let
   inherit (builtins) head match storeDir;
diff --git a/img/installer/run-vm.nix b/img/installer/run-vm.nix
index 4a6c849..4efbf1a 100644
--- a/img/installer/run-vm.nix
+++ b/img/installer/run-vm.nix
@@ -1,17 +1,18 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }:
+{ config ? import ../../nix/eval-config.nix {} }:
 
 let
   inherit (builtins) storeDir;
+  inherit (config) pkgs;
   inherit (pkgs) coreutils qemu_kvm stdenv writeShellScript;
   inherit (pkgs.lib) makeBinPath escapeShellArg;
 
-  eosimages = import ../combined/eosimages.nix { inherit pkgs; };
+  eosimages = import ../combined/eosimages.nix { inherit config; };
 
   installer = import ./. {
-    inherit pkgs;
+    inherit config;
 
     extraConfig = {
       boot.initrd.availableKernelModules = [ "9p" "9pnet_virtio" ];
diff --git a/img/live/default.nix b/img/live/default.nix
index 88f0ee4..65ad058 100644
--- a/img/live/default.nix
+++ b/img/live/default.nix
@@ -1,17 +1,18 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }:
+{ config ? import ../../nix/eval-config.nix {} }:
 
 let
+  inherit (config) pkgs;
   inherit (pkgs.lib) cleanSource cleanSourceWith hasSuffix;
 
   extfs = pkgs.pkgsStatic.callPackage ../../host/initramfs/extfs.nix {
-    inherit pkgs;
+    inherit config;
   };
-  rootfs = import ../../host/rootfs { inherit pkgs; };
-  scripts = import ../../scripts { inherit pkgs; };
-  initramfs = import ../../host/initramfs { inherit pkgs rootfs; };
+  rootfs = import ../../host/rootfs { inherit config; };
+  scripts = import ../../scripts { inherit config; };
+  initramfs = import ../../host/initramfs { inherit config rootfs; };
 in
 
 with pkgs;
diff --git a/img/live/shell.nix b/img/live/shell.nix
index b9f0246..dcf2059 100644
--- a/img/live/shell.nix
+++ b/img/live/shell.nix
@@ -1,12 +1,15 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }:
+{ config ? import ../../nix/eval-config.nix {} }:
 
-with pkgs;
+with config.pkgs;
 
-(import ./. { inherit pkgs; }).overrideAttrs ({ nativeBuildInputs ? [], ... }: {
-  nativeBuildInputs = nativeBuildInputs ++ [ qemu_kvm ];
+(import ./. { inherit config; }).overrideAttrs (
+  { nativeBuildInputs ? [], ... }:
+  {
+    nativeBuildInputs = nativeBuildInputs ++ [ qemu_kvm ];
 
-  OVMF_CODE = "${qemu_kvm}/share/qemu/edk2-${stdenv.hostPlatform.qemuArch}-code.fd";
-})
+    OVMF_CODE = "${qemu_kvm}/share/qemu/edk2-${stdenv.hostPlatform.qemuArch}-code.fd";
+  }
+)
diff --git a/nix/eval-config.nix b/nix/eval-config.nix
new file mode 100644
index 0000000..9265df7
--- /dev/null
+++ b/nix/eval-config.nix
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: MIT
+# SPDX-FileCopyrightText: 2022 Unikie
+
+{ config ?
+  if builtins.pathExists ../config.nix then import ../config.nix else {}
+}:
+
+({ pkgs ? import <nixpkgs> {} }: {
+  inherit pkgs;
+}) config
diff --git a/release.nix b/release.nix
index da7123f..91a843b 100644
--- a/release.nix
+++ b/release.nix
@@ -3,10 +3,14 @@
 
 # This file is built to populate the binary cache.
 
-{ pkgs ? import <nixpkgs> {} }:
+# Set config = {} to disable implicitly reading config.nix, since
+# we'll want the result to be the same as on the binary cache.  If it
+# turns out there is a compelling reason to read the default config
+# here, we can reconsider this.
+{ config ? import nix/eval-config.nix { config = {}; } }:
 
 {
-  doc = import ./Documentation { inherit pkgs; };
+  doc = import ./Documentation { inherit config; };
 
-  combined = import img/combined/run-vm.nix { inherit pkgs; };
+  combined = import img/combined/run-vm.nix { inherit config; };
 }
diff --git a/scripts/default.nix b/scripts/default.nix
index 7995723..2237cb5 100644
--- a/scripts/default.nix
+++ b/scripts/default.nix
@@ -1,10 +1,10 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }:
+{ config ? import ../nix/eval-config.nix {} }:
 
 let
-  inherit (pkgs.lib) cleanSource cleanSourceWith hasSuffix;
+  inherit (config.pkgs.lib) cleanSource cleanSourceWith hasSuffix;
 in
 
 cleanSourceWith {
diff --git a/shell.nix b/shell.nix
index 41d0865..4dc8558 100644
--- a/shell.nix
+++ b/shell.nix
@@ -1,7 +1,7 @@
 # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
 # SPDX-License-Identifier: MIT
 
-{ pkgs ? import <nixpkgs> {} }: with pkgs;
+{ config ? import nix/eval-config.nix {} }: with config.pkgs;
 
 mkShell {
   nativeBuildInputs = [ reuse rustfmt ];
diff --git a/vm/app/catgirl/default.nix b/vm/app/catgirl/default.nix
index 738a603..61f1462 100644
--- a/vm/app/catgirl/default.nix
+++ b/vm/app/catgirl/default.nix
@@ -1,11 +1,11 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {}
-, terminfo ? pkgs.foot.terminfo
+{ config ? import ../../../nix/eval-config.nix {}
+, terminfo ? config.pkgs.foot.terminfo
 }:
 
-pkgs.pkgsStatic.callPackage (
+config.pkgs.pkgsStatic.callPackage (
 
 { lib, stdenvNoCC, runCommand, writeReferencesToFile, buildPackages
 , s6-rc, tar2ext4
diff --git a/vm/app/catgirl/shell.nix b/vm/app/catgirl/shell.nix
index 87c4f6e..852b246 100644
--- a/vm/app/catgirl/shell.nix
+++ b/vm/app/catgirl/shell.nix
@@ -1,11 +1,11 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }:
+{ config ? import ../../../nix/eval-config.nix {} }:
 
-with pkgs;
+with config.pkgs;
 
-(import ./. { inherit pkgs; }).overrideAttrs (
+(import ./. { inherit config; }).overrideAttrs (
 { passthru ? {}, nativeBuildInputs ? [], ... }:
 
 {
diff --git a/vm/app/lynx/default.nix b/vm/app/lynx/default.nix
index 50fd760..ba715ec 100644
--- a/vm/app/lynx/default.nix
+++ b/vm/app/lynx/default.nix
@@ -1,11 +1,11 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {}
-, terminfo ? pkgs.foot.terminfo
+{ config ? import ../../../nix/eval-config.nix {}
+, terminfo ? config.pkgs.foot.terminfo
 }:
 
-pkgs.pkgsStatic.callPackage (
+config.pkgs.pkgsStatic.callPackage (
 
 { lib, stdenvNoCC, runCommand, writeReferencesToFile, buildPackages
 , s6-rc, tar2ext4
diff --git a/vm/app/lynx/shell.nix b/vm/app/lynx/shell.nix
index 87c4f6e..852b246 100644
--- a/vm/app/lynx/shell.nix
+++ b/vm/app/lynx/shell.nix
@@ -1,11 +1,11 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }:
+{ config ? import ../../../nix/eval-config.nix {} }:
 
-with pkgs;
+with config.pkgs;
 
-(import ./. { inherit pkgs; }).overrideAttrs (
+(import ./. { inherit config; }).overrideAttrs (
 { passthru ? {}, nativeBuildInputs ? [], ... }:
 
 {
diff --git a/vm/sys/net/default.nix b/vm/sys/net/default.nix
index 0ce72fc..dfc7c35 100644
--- a/vm/sys/net/default.nix
+++ b/vm/sys/net/default.nix
@@ -1,11 +1,11 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {}
-, terminfo ? pkgs.foot.terminfo
+{ config ? import ../../../nix/eval-config.nix {}
+, terminfo ? config.pkgs.foot.terminfo
 }:
 
-pkgs.pkgsStatic.callPackage (
+config.pkgs.pkgsStatic.callPackage (
 
 { lib, stdenvNoCC, runCommand, writeReferencesToFile, buildPackages
 , s6-rc, tar2ext4, xorg
diff --git a/vm/sys/net/shell.nix b/vm/sys/net/shell.nix
index bc4de67..849920d 100644
--- a/vm/sys/net/shell.nix
+++ b/vm/sys/net/shell.nix
@@ -1,11 +1,11 @@
 # SPDX-License-Identifier: MIT
 # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
 
-{ pkgs ? import <nixpkgs> {} }:
+{ config ? import ../../../nix/eval-config.nix {} }:
 
-with pkgs;
+with config.pkgs;
 
-(import ./. { inherit pkgs; }).overrideAttrs (
+(import ./. { inherit config; }).overrideAttrs (
 { passthru ? {}, nativeBuildInputs ? [], ... }:
 
 {