From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id D9D5851B18; Tue, 6 Sep 2022 05:53:12 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id 0134C51AF3; Tue, 6 Sep 2022 05:53:11 +0000 (UTC) X-Remote-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Remote-Spam-Level: X-Remote-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by atuin.qyliss.net (Postfix) with ESMTPS id E9A0B51AF1 for ; Tue, 6 Sep 2022 05:53:07 +0000 (UTC) Received: by mail-lf1-x12c.google.com with SMTP id f11so1747600lfa.6 for ; Mon, 05 Sep 2022 22:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unikie.com; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=wWZbV8K/oHcsJhUUlJCn8eRGgosnUgdF7XbrE7lA5WI=; b=OicU4daT+j3mj5UL51PoH4B6gLn8a82/8ae2mYN85OBCav10BKKWWo/vBlufz0Bzhg in7Hkbc72f015i56Q9t/am74+2CQhcANpNa6SJqUUHHlHNTcoaks3tPRnyYDPEPVKoH3 H2gUlTO6a2HJCAE+FicH0n/uo7Y1Irlt0e+v0vg9mcVK8iVet2Mq03Y6zqUPq18Unj4W Lv35wkgJAyGJpkX+mDEUB1qXVkQEhIFKdQq8qFS8Vdw04V/0dwFcV/jYyl8tJl//SuMu qSX5myZMaO+99Uq6kpFV0gUlirCRA/kXfxlpR+7lb68qX9aPRrBHSTK3Jw8WIV3+gg2T 64OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=wWZbV8K/oHcsJhUUlJCn8eRGgosnUgdF7XbrE7lA5WI=; b=MmFKGsTCGyC/lRxWZhiX4pz+fPmXsM7sZkq5RsfslFP7kVplY50Md3E1WgG8Q0AbDC r99yh89hKH2i5Rje2x0mSU2x0zfpjiG3nwShkcnhhJyTi9Tr9B6e55lP/HiVP7qMERBx L0qKCVL+tqJKNjskXx8sIhzp1KGWqjnx9XPTynnvpPuvbM4lNoEJS3VZ0VC0tixvPrAg Tc5sBZmBwAaPao41gSxxLhoIode5d9IRn9oKp2+32UibmDsY9Uo/Gennz9uFlVe6pj8K 8/AeIGfX8JKSzj3UOMprf9yiwVHCymTmmFTtbnSx8JUPZ8tu52A2cpBrHZH1IsmTj7EJ wAoQ== X-Gm-Message-State: ACgBeo3giY5LoacvM4RaqKbzwoMfqioYOKFR6z997W/Kx0wz6gPc3hYN aG4CwdDwIjH0RsWGKBAHJHNIrQ== X-Google-Smtp-Source: AA6agR4l93KXDUW+v6MZGTJJu8oAn37ziSlxd7ZTmdMyrkBU/kFn7Pq04BDr4uxP1lmHIxveU0SP/Q== X-Received: by 2002:a05:6512:22ce:b0:497:499e:c966 with SMTP id g14-20020a05651222ce00b00497499ec966mr464300lfu.402.1662443584815; Mon, 05 Sep 2022 22:53:04 -0700 (PDT) Received: from [172.18.8.245] ([109.204.204.138]) by smtp.gmail.com with ESMTPSA id p7-20020a05651211e700b0049487818dd9sm1506040lfs.60.2022.09.05.22.53.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Sep 2022 22:53:04 -0700 (PDT) Message-ID: <2ff7084f-a7e3-b6da-21cd-cf65392ce834@unikie.com> Date: Tue, 6 Sep 2022 08:53:03 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH 1/4] Introduce a build configuration file Content-Language: en-US To: Alyssa Ross , devel@spectrum-os.org References: <20220831093727.282797-1-hi@alyssa.is> From: Ville Ilvonen In-Reply-To: <20220831093727.282797-1-hi@alyssa.is> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID-Hash: KZL244OXEG7ERPHMVK2JB57ZQPFZFBID X-Message-ID-Hash: KZL244OXEG7ERPHMVK2JB57ZQPFZFBID X-MailFrom: ville.ilvonen@unikie.com X-Mailman-Rule-Hits: header-match-devel.spectrum-os.org-0 X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1 CC: =?UTF-8?Q?Jos=c3=a9_Pekkarinen?= , Ivan Nikolaenko X-Mailman-Version: 3.3.5 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-TUID: CdOPcZNNgldh On 8/31/22 12:37, Alyssa Ross wrote: > 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 { > overlays = [ > (final: super: { > weston = super.weston.overrideAttrs ({ patches ? [], ... }: { > patches = patches ++ [ > path/to/weston.patch > ]; > }); > }) > ]; > }; > } > > Signed-off-by: Alyssa Ross > --- Appreciate it as this makes it more clean to implement device specifics. Would you like to see the device specific configs in tree or out of tree? One option would be to set the default config and support in tree configs of devices people could choose from. Even if not fully supported by upstream, they could be useful as examples. If both are possible, criteria for guiding in-tree and out-of-tree configs could be also useful. Thanks, -Ville Reviewed-by: Ville Ilvonen > José, Ivan, if you'd like to review these patches, there's some > documentation on how to do so here: :) > > https://spectrum-os.org/doc/reviewing-patches.html > > .gitignore | 1 + > Documentation/default.nix | 4 ++-- > Documentation/jekyll.nix | 2 +- > host/initramfs/default.nix | 7 +++---- > host/initramfs/extfs.nix | 8 ++++---- > host/initramfs/shell.nix | 9 +++++---- > host/rootfs/default.nix | 7 +++++-- > host/rootfs/shell.nix | 8 ++++---- > host/start-vm/default.nix | 2 +- > host/start-vm/shell.nix | 6 +++--- > img/combined/default.nix | 6 +++--- > img/combined/eosimages.nix | 4 ++-- > img/combined/run-vm.nix | 4 ++-- > img/installer/default.nix | 3 ++- > img/installer/run-vm.nix | 7 ++++--- > img/live/default.nix | 11 ++++++----- > img/live/shell.nix | 15 +++++++++------ > nix/eval-config.nix | 10 ++++++++++ > release.nix | 10 +++++++--- > scripts/default.nix | 4 ++-- > shell.nix | 2 +- > vm/app/catgirl/default.nix | 6 +++--- > vm/app/catgirl/shell.nix | 6 +++--- > vm/app/lynx/default.nix | 6 +++--- > vm/app/lynx/shell.nix | 6 +++--- > vm/sys/net/default.nix | 6 +++--- > vm/sys/net/shell.nix | 6 +++--- > 27 files changed, 95 insertions(+), 71 deletions(-) > create mode 100644 nix/eval-config.nix > > 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 > > +/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 {} }: 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 > # SPDX-License-Identifier: MIT > > -{ pkgs ? import {} }: 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 a4f7330..68deb5e 100644 > --- a/host/initramfs/default.nix > +++ b/host/initramfs/default.nix > @@ -1,11 +1,10 @@ > # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross > # SPDX-License-Identifier: MIT > > -{ pkgs ? import {} > -, 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, cryptsetup, lvm2, 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 > # 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 > > -{ pkgs ? import {} }: > +{ 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 e5f316f..44e910b 100644 > --- a/host/rootfs/default.nix > +++ b/host/rootfs/default.nix > @@ -2,7 +2,8 @@ > # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross > # SPDX-FileCopyrightText: 2022 Unikie > > -{ pkgs ? import {} }: 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 3b2310f..8c30f68 100644 > --- a/host/rootfs/shell.nix > +++ b/host/rootfs/shell.nix > @@ -1,11 +1,11 @@ > # SPDX-License-Identifier: MIT > # SPDX-FileCopyrightText: 2021 Alyssa Ross > > -{ pkgs ? import {} }: > +{ config ? import ../../nix/eval-config.nix {} }: > > -with pkgs; > +with config.pkgs; > > -(import ./. { inherit pkgs; }).overrideAttrs ( > +(import ./. { inherit config; }).overrideAttrs ( > { passthru ? {}, nativeBuildInputs ? [], ... }: > > { > @@ -13,6 +13,6 @@ with pkgs; > jq netcat qemu_kvm reuse util-linux > ]; > > - EXT_FS = pkgsStatic.callPackage ../initramfs/extfs.nix { inherit pkgs; }; > + EXT_FS = pkgsStatic.callPackage ../initramfs/extfs.nix { inherit config; }; > 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 > > -{ pkgs ? import {} }: 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 > > -{ pkgs ? import {} }: > +{ 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 > # SPDX-FileCopyrightText: 2021 Yureka > > -{ pkgs ? import {} }: 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 > > -{ pkgs ? import {} }: 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 > > -{ pkgs ? import {} }: 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 > > -{ pkgs ? import {}, 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 > > -{ pkgs ? import {} }: > +{ 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 > > -{ pkgs ? import {} }: > +{ 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 > > -{ pkgs ? import {} }: > +{ 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 {} }: { > + 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 {} }: > +# 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 > > -{ pkgs ? import {} }: > +{ 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 > # SPDX-License-Identifier: MIT > > -{ pkgs ? import {} }: 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 > > -{ pkgs ? import {} > -, 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 > > -{ pkgs ? import {} }: > +{ 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 > > -{ pkgs ? import {} > -, 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 > > -{ pkgs ? import {} }: > +{ 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 > > -{ pkgs ? import {} > -, 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 > > -{ pkgs ? import {} }: > +{ config ? import ../../../nix/eval-config.nix {} }: > > -with pkgs; > +with config.pkgs; > > -(import ./. { inherit pkgs; }).overrideAttrs ( > +(import ./. { inherit config; }).overrideAttrs ( > { passthru ? {}, nativeBuildInputs ? [], ... }: > > {