summary refs log tree commit diff
path: root/host/rootfs/shell.nix
blob: ea8410a071592d0265b68ce7d6e0625829dad4e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
# SPDX-FileCopyrightText: 2022 Unikie

{ config ? import ../../nix/eval-config.nix {} }:

let
  rootfs = import ./. { inherit config; };
in

with config.pkgs;

rootfs.overrideAttrs (
{ passthru ? {}, nativeBuildInputs ? [], ... }:

{
  nativeBuildInputs = nativeBuildInputs ++ [
    cryptsetup jq netcat qemu_kvm reuse util-linux
  ];

  EXT_FS = pkgsStatic.callPackage ../initramfs/extfs.nix { inherit config; };
  INITRAMFS = import ../initramfs { inherit config rootfs; };
  KERNEL = "${passthru.kernel}/${stdenv.hostPlatform.linux-kernel.target}";
})