diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/initramfs/default.nix | 7 | ||||
-rw-r--r-- | host/initramfs/extfs.nix | 8 | ||||
-rw-r--r-- | host/initramfs/shell.nix | 9 | ||||
-rw-r--r-- | host/rootfs/default.nix | 7 | ||||
-rw-r--r-- | host/rootfs/shell.nix | 10 | ||||
-rw-r--r-- | host/start-vm/default.nix | 2 | ||||
-rw-r--r-- | host/start-vm/shell.nix | 6 |
7 files changed, 26 insertions, 23 deletions
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 ? [], ... }: { |