From 7205cdf2e4bd7c05ee31d98324732b430dbfc53d Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 25 Nov 2026 23:00:24 +0000 Subject: rigs: the guest's names, rig.* and rig-* The project is called rigs now, as it runs its VMs in Cloud Hypervisor, too, not only Firecracker. So the guest's options (rig.secrets, rig.home.required, rig.nix, ...), its kernel command line (rig.vmm, rig.home, rig.xchg, rig.registration, rig.9pPORT), its units (rig-secrets, rig-home, rig-xchg, rig-vmm-exit, rig-drop-caches, rig-rw-store-unshadow), the drives' labels (rig-layer-K, rig-store, rig-home; the run script relabels existing store and home images), and the images (rig-layer-K.img) lose the fc and firecracker. Firecracker itself, the VMM, keeps its name. --- layers/nix.nix | 32 +++++----- layers/switch.nix | 2 +- pkgs/run-firecracker-vm/default.nix | 116 ++++++++++++++++++------------------ tests/qemu/debug.nix | 4 +- 4 files changed, 77 insertions(+), 77 deletions(-) diff --git a/layers/nix.nix b/layers/nix.nix index 68ee2c5..dee6a4d 100644 --- a/layers/nix.nix +++ b/layers/nix.nix @@ -5,11 +5,11 @@ # its images, read-only. With it, the run script requires --store. { config, lib, pkgs, ... }: let - lowerdir = config.fc.storeLowerdirs; + lowerdir = config.rig.storeLowerdirs; in { nix.enable = true; - fc.nix = true; + rig.nix = true; # The store, on top of the guest's own closure from images (which reading # is much faster than reading the host's store): the host's store, @@ -27,7 +27,7 @@ in neededForBoot = true; }; fileSystems."/nix/.rw-store" = { - device = "/dev/disk/by-label/fc-store"; # see the run script + device = "/dev/disk/by-label/rig-store"; # see the run script fsType = "ext4"; options = [ "noatime" ]; noCheck = true; @@ -50,8 +50,8 @@ in }; # The images are an overlay already: this is one image more than the # base system, so there are at least two. - fc.storeLowerdirs = [ "/nix/.host-store" ]; - # The upper layer, which fc-rw-store-unshadow (below) creates. + rig.storeLowerdirs = [ "/nix/.host-store" ]; + # The upper layer, which rig-rw-store-unshadow (below) creates. fileSystems."/nix/store" = { depends = [ "/nix/.rw-store" ]; options = [ "upperdir=/sysroot/nix/.rw-store/store" "workdir=/sysroot/nix/.rw-store/work" ]; @@ -68,7 +68,7 @@ in # the guest's nix still has it registered (then nix-store --verify # fails): drop only whiteouts, which would hide the host's path, and # keep real copies. - boot.initrd.systemd.services.fc-rw-store-unshadow = { + boot.initrd.systemd.services.rig-rw-store-unshadow = { requiredBy = [ "sysroot-nix-store.mount" ]; before = [ "sysroot-nix-store.mount" ]; unitConfig.DefaultDependencies = false; @@ -93,12 +93,12 @@ in ''; }; # For the host's store, in the initrd. - boot.initrd.systemd.extraBin."mount.vsock9p" = config.fc.mountVsock9p; + boot.initrd.systemd.extraBin."mount.vsock9p" = config.rig.mountVsock9p; boot.initrd.systemd.storePaths = [ pkgs.socat pkgs.util-linux ]; # nix, with the host's nixpkgs for nix-shell -p and the like, at # /nixpkgs (see below). Root goes through the daemon too, so the - # paths of the guest's closure get registered (fc.registration, see + # paths of the guest's closure get registered (rig.registration, see # the run script) before anything uses the store, and only once # something does, not at boot. The rest of the host's store is # there, too, but not registered. @@ -116,7 +116,7 @@ in # needing one of them fails, and says why. script = '' for arg in $(cat /proc/cmdline); do - case $arg in fc.registration=*) + case $arg in rig.registration=*) ${config.nix.package.out}/bin/nix-store --load-db < "''${arg#*=}" esac done @@ -136,13 +136,13 @@ in # --nixpkgs-cache=loose) never asks the host again: a file changed on # the host keeps its old size and contents in the guest, and a name # looked up before the host had it stays missing, until the guest drops - # its cached dentries and inodes, which fc-drop-caches lets anyone do + # its cached dentries and inodes, which rig-drop-caches lets anyone do # (setuid; no input, it only ever writes 2 to drop_caches). - security.wrappers.fc-drop-caches = { + security.wrappers.rig-drop-caches = { setuid = true; owner = "root"; group = "root"; - source = lib.getExe (pkgs.writeCBin "fc-drop-caches" '' + source = lib.getExe (pkgs.writeCBin "rig-drop-caches" '' #include #include #include @@ -150,7 +150,7 @@ in sync(); int fd = open("/proc/sys/vm/drop_caches", O_WRONLY); if (fd < 0 || write(fd, "2\n", 2) != 2) { - perror("fc-drop-caches: /proc/sys/vm/drop_caches"); + perror("rig-drop-caches: /proc/sys/vm/drop_caches"); return 1; } return 0; @@ -159,7 +159,7 @@ in }; # And the run script has it done via vsock port 1235 when the host's # nixpkgs checkout changes its commit (with --nixpkgs-cache). - systemd.sockets.fc-drop-caches = { + systemd.sockets.rig-drop-caches = { wantedBy = [ "sockets.target" ]; socketConfig = { ListenStream = "vsock::1235"; @@ -167,8 +167,8 @@ in MaxConnections = 1; }; }; - systemd.services."fc-drop-caches@" = { + systemd.services."rig-drop-caches@" = { serviceConfig.StandardInput = "socket"; - script = "/run/wrappers/bin/fc-drop-caches"; + script = "/run/wrappers/bin/rig-drop-caches"; }; } diff --git a/layers/switch.nix b/layers/switch.nix index d46a187..c1c5155 100644 --- a/layers/switch.nix +++ b/layers/switch.nix @@ -19,7 +19,7 @@ { system.switch.enable = true; assertions = [{ - assertion = config.fc.nix; + assertion = config.rig.nix; message = "layers/switch.nix needs layers/nix.nix, for the host's store."; }]; } diff --git a/pkgs/run-firecracker-vm/default.nix b/pkgs/run-firecracker-vm/default.nix index 8cf8da4..7c0235b 100644 --- a/pkgs/run-firecracker-vm/default.nix +++ b/pkgs/run-firecracker-vm/default.nix @@ -21,7 +21,7 @@ let # stdin and stdout (nofork). Separate -o options, as socat would take # commas as its own option separators. In the initrd, too, for the # store. More options for PORT can come from the kernel command line, - # as fc.9pPORT=OPTIONS (see --nixpkgs-cache in the run script); they come + # as rig.9pPORT=OPTIONS (see --nixpkgs-cache in the run script); they come # last, so they win. mountVsock9p = pkgs.writeShellScript "mount.vsock9p" '' # usage: mount.vsock9p PORT DIR [-o OPTIONS] @@ -38,7 +38,7 @@ let fi read -r cmdline < /proc/cmdline for arg in $cmdline; do - case $arg in fc.9p$1=*) add "''${arg#*=}" + case $arg in rig.9p$1=*) add "''${arg#*=}" esac done exec ${pkgs.socat}/bin/socat VSOCK-CONNECT:2:"$1" EXEC:"${pkgs.util-linux}/bin/mount -t 9p -o trans=fd -o rfdno=0 -o wfdno=1 -o version=9p2000.L -o msize=1048576$opts vsock9p $2",nofork @@ -113,14 +113,14 @@ let (modulesPath + "/profiles/minimal.nix") (modulesPath + "/profiles/perlless.nix") { fileSystems = imageFileSystems (n + 1); } - { systemd.generators.fc-home = homeGenerator (label "fc-home"); } + { systemd.generators.rig-home = homeGenerator (label "rig-home"); } # /xchg: a directory of the host's, via 9P on vsock port 564, only - # with fc.xchg on the kernel command line (run-firecracker-vm + # with rig.xchg on the kernel command line (run-firecracker-vm # --xchg DIR), mounted when first used. A generator, so a guest # without it has no /xchg at all. - { systemd.generators.fc-xchg = pkgs.writeShellScript "fc-xchg-generator" '' + { systemd.generators.rig-xchg = pkgs.writeShellScript "rig-xchg-generator" '' read -r cmdline < /proc/cmdline - case " $cmdline " in *" fc.xchg "*) ;; *) exit 0 + case " $cmdline " in *" rig.xchg "*) ;; *) exit 0 esac printf '%s\n' '[Mount]' 'What=564' 'Where=/xchg' 'Type=vsock9p' > "$1"/xchg.mount printf '%s\n' '[Automount]' 'Where=/xchg' > "$1"/xchg.automount @@ -128,7 +128,7 @@ let ${pkgs.coreutils}/bin/ln -s ../xchg.automount "$1"/local-fs.target.wants/xchg.automount ''; } - # reboot and poweroff both end the VM, whichever the VMM (fc.vmm, + # reboot and poweroff both end the VM, whichever the VMM (rig.vmm, # from the run script): Firecracker ends on a reset (reboot=k), but # stays on poweroff, with the guest halted; Cloud Hypervisor ends on # poweroff, but restarts the guest on a reset. So the shutdown's @@ -137,21 +137,21 @@ let # Hypervisor, after the same clean shutdown. (Not a hook of # systemd-shutdown: it runs those after unmounting, i.e. without # /etc.) - { systemd.generators.fc-vmm-exit = pkgs.writeShellScript "fc-vmm-exit" '' + { systemd.generators.rig-vmm-exit = pkgs.writeShellScript "rig-vmm-exit" '' read -r cmdline < /proc/cmdline exit_by() { # ACTION UNIT... action=$1 shift for unit; do ${pkgs.coreutils}/bin/mkdir -p "$dir/$unit.d" - printf '[Unit]\nSuccessAction=%s\n' "$action" > "$dir/$unit.d/fc-vmm-exit.conf" + printf '[Unit]\nSuccessAction=%s\n' "$action" > "$dir/$unit.d/rig-vmm-exit.conf" done } dir=$1 case " $cmdline " in - *" fc.vmm=firecracker "*) + *" rig.vmm=firecracker "*) exit_by reboot-force systemd-poweroff.service systemd-halt.service ;; - *" fc.vmm=cloud-hypervisor "*) + *" rig.vmm=cloud-hypervisor "*) exit_by poweroff-force systemd-reboot.service systemd-halt.service ;; esac ''; @@ -159,14 +159,14 @@ let { # For a layer whose state is in /home: the run script then # refuses to start the guest without --home. - options.fc.home.required = lib.mkOption { + options.rig.home.required = lib.mkOption { type = lib.types.bool; default = false; description = "Whether the guest needs a /home drive (--home)."; }; # For layers/nix.nix, which sets it: the run script gives the # guest the drive for the rw-store, and so on. - options.fc.nix = lib.mkOption { + options.rig.nix = lib.mkOption { type = lib.types.bool; default = false; internal = true; @@ -174,12 +174,12 @@ let }; # The store's lower layers: the images (from the layers), and # what layers add, like layers/nix.nix the host's store. - options.fc.storeLowerdirs = lib.mkOption { + options.rig.storeLowerdirs = lib.mkOption { type = lib.types.listOf lib.types.str; internal = true; description = "The store's lower layers, as in the guest's /."; }; - options.fc.mountVsock9p = lib.mkOption { + options.rig.mountVsock9p = lib.mkOption { type = lib.types.package; default = mountVsock9p; readOnly = true; @@ -188,8 +188,8 @@ let }; # Secrets the guest needs, from the run script (--secret # NAME=FILE, which it requires for each of these), never in the - # store: fc-secrets puts them into place, below /run, at boot. - options.fc.secrets = lib.mkOption { + # store: rig-secrets puts them into place, below /run, at boot. + options.rig.secrets = lib.mkOption { type = lib.types.attrsOf (lib.types.submodule ({ name, ... }: { options = { path = lib.mkOption { @@ -212,13 +212,13 @@ let # about. nix.enable = lib.mkDefault false; assertions = [{ - assertion = config.nix.enable == config.fc.nix; + assertion = config.nix.enable == config.rig.nix; message = "nix.enable: use run-firecracker-vm's layers/nix.nix instead."; }] ++ lib.mapAttrsToList (name: s: { assertion = builtins.match "[A-Za-z0-9._-]+" name != null && builtins.match "/run/[^ ]+" s.path != null; - message = "fc.secrets.${name}: a name of letters, digits, '.', '_' and '-', with a path below /run"; - }) config.fc.secrets; + message = "rig.secrets.${name}: a name of letters, digits, '.', '_' and '-', with a path below /run"; + }) config.rig.secrets; # Activate and switch root from the initrd with a single program, # instead of bash running prepare-root and the activation script. @@ -250,13 +250,13 @@ let # that a single option (lowerdir=A:B:...), which the mount API caps # at 255 bytes, i.e. about 10 images; a lowerdir+= each has no such # limit. An upper layer (layers/nix.nix) adds its own options. - fc.storeLowerdirs = lib.mkBefore lowerdirs; # images first: 9P is slow + rig.storeLowerdirs = lib.mkBefore lowerdirs; # images first: 9P is slow fileSystems."/nix/store" = - if lib.length config.fc.storeLowerdirs > 1 then { + if lib.length config.rig.storeLowerdirs > 1 then { fsType = "overlay"; device = "overlay"; - depends = config.fc.storeLowerdirs; - options = map (d: "lowerdir+=/sysroot${d}") config.fc.storeLowerdirs; + depends = config.rig.storeLowerdirs; + options = map (d: "lowerdir+=/sysroot${d}") config.rig.storeLowerdirs; } else (imageFileSystems 1)."/nix/.image/0"; @@ -268,7 +268,7 @@ let environment.systemPackages = [ fc-egress ]; # sshd, started on demand (a layer may turn that off), with the host - # key a secret (--secret ssh_host_ed25519_key=FILE; see fc-secrets), + # key a secret (--secret ssh_host_ed25519_key=FILE; see rig-secrets), # in place before sshd (or its socket) starts, and never one # generated instead. Who may log in: # users.users..openssh.authorizedKeys, e.g. in a layer. @@ -278,19 +278,19 @@ let generateHostKeys = false; hostKeys = [{ path = "/run/ssh/ssh_host_ed25519_key"; type = "ed25519"; }]; }; - fc.secrets.ssh_host_ed25519_key = lib.mkIf config.services.openssh.enable { + rig.secrets.ssh_host_ed25519_key = lib.mkIf config.services.openssh.enable { path = "/run/ssh/ssh_host_ed25519_key"; mode = "0600"; }; - # The secrets (fc.secrets), which the run script serves via 9P on + # The secrets (rig.secrets), which the run script serves via 9P on # vsock port 567 (--secret NAME=FILE; never in the store), copied # into place, each with its owner and mode, before sysinit.target # (so before any service with the default dependencies), but after # the users get created, for the owners; any other secret the run # script was given goes to /run/secrets/NAME, root's. The share # gets unmounted again. - systemd.services.fc-secrets = { + systemd.services.rig-secrets = { wantedBy = [ "sysinit.target" ]; before = [ "sysinit.target" "shutdown.target" ]; after = [ "userborn.service" "systemd-sysusers.service" ]; @@ -305,11 +305,11 @@ let install -d -m 0755 /run/secrets ${lib.concatStrings (lib.mapAttrsToList (name: s: '' install -D -o ${lib.escapeShellArg s.owner} -g ${lib.escapeShellArg s.group} -m ${s.mode} "$share"/${name} ${lib.escapeShellArg s.path} - '') config.fc.secrets)} + '') config.rig.secrets)} for f in "$share"/*; do test -f "$f" || continue case ''${f##*/} in - ${lib.concatStringsSep " | " ([ "/" ] ++ lib.attrNames config.fc.secrets)}) ;; # / is no name + ${lib.concatStringsSep " | " ([ "/" ] ++ lib.attrNames config.rig.secrets)}) ;; # / is no name *) install -m 0400 "$f" /run/secrets/ esac done @@ -430,13 +430,13 @@ let }; }; - # /home: part of / (the tmpfs), or with fc.home on the kernel command - # line (--home, see the run script), the drive labelled fc-home (device). + # /home: part of / (the tmpfs), or with rig.home on the kernel command + # line (--home, see the run script), the drive labelled rig-home (device). # A generator rather than fileSystems, so a guest without it doesn't wait # for the drive. - homeGenerator = device: pkgs.writeShellScript "fc-home-generator" '' + homeGenerator = device: pkgs.writeShellScript "rig-home-generator" '' read -r cmdline < /proc/cmdline - case " $cmdline " in *" fc.home "*) ;; *) exit 0 + case " $cmdline " in *" rig.home "*) ;; *) exit 0 esac printf '%s\n' \ '[Unit]' 'Before=local-fs.target' \ @@ -454,10 +454,10 @@ let label = l: "/dev/disk/by-label/${l}"; # The images, read-only drives, image k (of layer k) labelled - # fc-layer-K. + # rig-layer-K. imageFileSystems = count: lib.listToAttrs (lib.genList (k: lib.nameValuePair "/nix/.image/${toString k}" { - device = label "fc-layer-${toString k}"; + device = label "rig-layer-${toString k}"; fsType = "erofs"; options = [ "ro" "nodev" "nosuid" ]; neededForBoot = true; @@ -467,7 +467,7 @@ let nixos = lib.last systems; toplevels = map (s: s.config.system.build.toplevel) systems; inherit (nixos.config.system.build) toplevel kernel initialRamdisk; - nix = nixos.config.fc.nix; # layers/nix.nix + nix = nixos.config.rig.nix; # layers/nix.nix # A layer's name, for its image's: its file's, if it's a file (for # .../NAME/default.nix, NAME). @@ -485,7 +485,7 @@ let # the guest never reads (for nix, the host's store still has them). initrds = map (s: "${s.config.system.build.initialRamdisk}") systems; images = lib.imap0 (k: top: let name = lib.elemAt layerNames k; in pkgs.runCommand - "firecracker-layer-${toString k}${lib.optionalString (name != null) "-${lib.strings.sanitizeDerivationName name}"}.img" { + "rig-layer-${toString k}${lib.optionalString (name != null) "-${lib.strings.sanitizeDerivationName name}"}.img" { nativeBuildInputs = [ pkgs.erofs-utils pkgs.gnutar ]; closure = pkgs.closureInfo { rootPaths = [ top ]; }; below = map (t: pkgs.closureInfo { rootPaths = [ t ]; }) (lib.take k toplevels); @@ -498,7 +498,7 @@ let tar -c -P --verbatim-files-from \ --transform 'flags=rSh;s|^/nix/store/||' \ --files-from - | - mkfs.erofs --quiet -L fc-layer-${toString k} --tar=f --force-uid=0 --force-gid=0 --hard-dereference -T 0 $out + mkfs.erofs --quiet -L rig-layer-${toString k} --tar=f --force-uid=0 --force-gid=0 --hard-dereference -T 0 $out '') toplevels; config = pkgs.writeText "firecracker.json" (builtins.toJSON { @@ -508,7 +508,7 @@ let boot_args = toString (nixos.config.boot.kernelParams ++ [ "init=${toplevel}/init" ] ++ lib.optional nix - "fc.registration=${pkgs.closureInfo { rootPaths = [ toplevel ]; }}/registration" + "rig.registration=${pkgs.closureInfo { rootPaths = [ toplevel ]; }}/registration" ++ [ "@ARGS@" ]); @@ -580,7 +580,7 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ '' # if it doesn't exist, of --store-size, default 16G; the file is sparse, # so that's only an upper limit). /home is part of the guest's root # file system, gone when it exits, or with --home, on FILE, likewise (of - # --home-size, default 16G). A guest with fc.home.required (set by a + # --home-size, default 16G). A guest with rig.home.required (set by a # layer) doesn't start without --home. # --mem-size sets the guest's memory, in MiB (default 1024). # The guest's egress goes by the user's whitelist LIST (default: the @@ -590,11 +590,11 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ '' # guest's number of CPUs (default 2; Firecracker takes 1 to 32). # --secret NAME=FILE: a secret for the guest, NAME letters, digits, '.', # '_' and '-', FILE read once (it may be a pipe, like <(...)), and handed - # to the guest only, never in the store (see fc-secrets); a guest - # doesn't start without the secrets it declares (fc.secrets). + # to the guest only, never in the store (see rig-secrets); a guest + # doesn't start without the secrets it declares (rig.secrets). # --vmm: the hypervisor, Firecracker (default) or Cloud Hypervisor, which # takes no commas in --store and --home. Either ends when the guest - # reboots or powers off (see fc-vmm-exit). + # reboots or powers off (see rig-vmm-exit). # --nested: hardware virtualization (SVM, VMX) for the guest, so it can # run VMs itself (base/kernel.nix has KVM); off by default, as it's more # of the host's KVM for the guest to reach. @@ -630,7 +630,7 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ '' --home-size) home_size=$2; shift 2 ;; --mem-size) mem_size=$2; shift 2 ;; --nixpkgs) nixpkgs=$2; nix_opt=$1; shift 2 ;; - --nixpkgs-cache) args="$args fc.9p566=cache=$2"; nixpkgs_cache=$2; nix_opt=$1; shift 2 ;; + --nixpkgs-cache) args="$args rig.9p566=cache=$2"; nixpkgs_cache=$2; nix_opt=$1; shift 2 ;; --egress) egress=$2; shift 2 ;; --name) name=$2; shift 2 ;; --vcpus) vcpus=$2; shift 2 ;; @@ -643,7 +643,7 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ '' esac done egress=''${egress:-''${name:-default}} - ${lib.optionalString nixos.config.fc.home.required '' + ${lib.optionalString nixos.config.rig.home.required '' if test -z "$home"; then echo "$0: the guest keeps its state in /home: --home FILE is required" >&2 exit 1 @@ -680,17 +680,17 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ '' echo "$0: bad --vmm: $vmm (firecracker or cloud-hypervisor)" >&2 exit 1 esac - args="$args fc.vmm=$vmm" # see fc-vmm-exit + args="$args rig.vmm=$vmm" # see rig-vmm-exit if test -n "$xchg"; then - args="$args fc.xchg" # see fc-xchg + args="$args rig.xchg" # see rig-xchg fi tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT # The secrets, copies, in a directory only the user can read, for the - # guest to copy (see fc-secrets), each FILE read once. The guest's own - # (fc.secrets) are required. + # guest to copy (see rig-secrets), each FILE read once. The guest's own + # (rig.secrets) are required. mkdir -m 700 "$tmp"/secrets for secret in ''${secrets[@]+"''${secrets[@]}"}; do s=''${secret%%=*} @@ -721,7 +721,7 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ '' exit 1 fi fi - for s in ${lib.escapeShellArgs (lib.attrNames nixos.config.fc.secrets)}; do + for s in ${lib.escapeShellArgs (lib.attrNames nixos.config.rig.secrets)}; do if ! test -e "$tmp/secrets/$s"; then echo "$0: the guest needs the secret $s: --secret $s=FILE is required" >&2 exit 1 @@ -729,8 +729,8 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ '' done for s in $(ls "$tmp"/secrets); do case $s in - ${lib.concatStringsSep " | " ([ "/" ] ++ lib.attrNames nixos.config.fc.secrets)}) ;; # / is no name - *) echo "$0: --secret $s: the guest doesn't ask for it (fc.secrets), it goes to /run/secrets/$s" >&2 + ${lib.concatStringsSep " | " ([ "/" ] ++ lib.attrNames nixos.config.rig.secrets)}) ;; # / is no name + *) echo "$0: --secret $s: the guest doesn't ask for it (rig.secrets), it goes to /run/secrets/$s" >&2 esac done @@ -757,11 +757,11 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ '' printf -v "$1" %s "$f" } if test -n "$rw_store"; then - disk rw_store "$rw_store" "$rw_store_size" fc-store + disk rw_store "$rw_store" "$rw_store_size" rig-store fi if test -n "$home"; then - disk home "$home" "$home_size" fc-home - args="$args fc.home" + disk home "$home" "$home_size" rig-home + args="$args rig.home" fi # Tell systemd the terminal's type and size, so it doesn't query them via @@ -906,11 +906,11 @@ pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ '' serve 565 /nix/store serve 566 "$nixpkgs" # With a cache mode for nixpkgs, the guest doesn't see changes to it - # (see fc-drop-caches in layers/nix.nix). When it's a Git checkout + # (see rig-drop-caches in layers/nix.nix). When it's a Git checkout # whose commit changes (checkout, pull, rebase), the guest gets told # to drop its caches: a connection to its vsock port 1235 (on the # socket uds_path, with CONNECT PORT). Changes without a commit - # need fc-drop-caches by hand. + # need rig-drop-caches by hand. if test -n "$nixpkgs_cache" && git -C "$nixpkgs" rev-parse HEAD > /dev/null 2>&1; then ( close_locks diff --git a/tests/qemu/debug.nix b/tests/qemu/debug.nix index a8790de..498266e 100644 --- a/tests/qemu/debug.nix +++ b/tests/qemu/debug.nix @@ -2,11 +2,11 @@ # at the end of boot, whose output goes to the console (the test's # stdout). (virtio_pci, which qemu needs, is in the base system.) script: { pkgs, config, lib, ... }: { - systemd.services.fc-test = { + systemd.services.rig-test = { wantedBy = [ "multi-user.target" ]; after = [ "multi-user.target" ]; path = [ pkgs.util-linux pkgs.coreutils "/run/current-system/sw" ]; - environment = lib.mkIf config.fc.nix { + environment = lib.mkIf config.rig.nix { NIX_REMOTE = "daemon"; NIX_PATH = "nixpkgs=/nixpkgs"; }; -- cgit v1.3.1