diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/initramfs/extfs.nix | 19 | ||||
-rw-r--r-- | host/rootfs/default.nix | 11 |
2 files changed, 16 insertions, 14 deletions
diff --git a/host/initramfs/extfs.nix b/host/initramfs/extfs.nix index 63f436a..dec4017 100644 --- a/host/initramfs/extfs.nix +++ b/host/initramfs/extfs.nix @@ -9,27 +9,20 @@ let # inherit (foot) terminfo; }; - appvm-catgirl = import ../../vm/app/catgirl { - inherit config; - # inherit (foot) terminfo; - }; - - appvm-lynx = import ../../vm/app/lynx { - inherit config; - # inherit (foot) terminfo; - }; + appvm-catgirl = import ../../vm/app/catgirl.nix { inherit config; }; + appvm-lynx = import ../../vm/app/lynx.nix { inherit config; }; in runCommand "ext.ext4" { nativeBuildInputs = [ tar2ext4 ]; } '' - mkdir svc + mkdir -p svc/data/appvm-{catgirl,lynx} tar -C ${netvm} -c data | tar -C svc -x chmod +w svc/data - tar -C ${appvm-catgirl} -c data | tar -C svc -x - chmod +w svc/data - tar -C ${appvm-lynx} -c data | tar -C svc -x + + tar -C ${appvm-catgirl} -c . | tar -C svc/data/appvm-catgirl -x + tar -C ${appvm-lynx} -c . | tar -C svc/data/appvm-lynx -x tar -cf ext.tar svc tar2ext4 -i ext.tar -o $out diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix index 56d6ec0..4788628 100644 --- a/host/rootfs/default.nix +++ b/host/rootfs/default.nix @@ -75,13 +75,22 @@ let kernel = pkgs.linux_latest; + appvm = import ../../img/app { + inherit config; + inherit (foot) terminfo; + }; + + # Packages that should be fully linked into /usr, + # (not just their bin/* files). + usrPackages = [ appvm pkgsGui.mesa.drivers pkgsGui.dejavu_fonts ]; + packagesSysroot = runCommand "packages-sysroot" { nativeBuildInputs = [ xorg.lndir ]; } '' mkdir -p $out/lib $out/usr/bin ln -s ${concatMapStringsSep " " (p: "${p}/bin/*") packages} $out/usr/bin - for pkg in ${lib.escapeShellArgs [ pkgsGui.mesa.drivers pkgsGui.dejavu_fonts ]}; do + for pkg in ${lib.escapeShellArgs usrPackages}; do lndir -silent "$pkg" "$out/usr" done |