summary refs log tree commit diff
path: root/host/rootfs/shell.nix
blob: 94e84be4bbeed1718b476c6f6ab7a2c9acb8ccad (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

import ../../nix/eval-config.nix ({ config, ... } @ args:

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}";
}))