mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Make /dev/kvm optional
The daemon now creates /dev deterministically (thanks!). However, it expects /dev/kvm to be present. The patch below restricts that requirement (1) to Linux-based systems, and (2) to systems where /dev/kvm already exists. I’m not sure about the way to handle (2). We could special-case /dev/kvm and create it (instead of bind-mounting it) in the chroot, so it’s always available; however, it wouldn’t help much since most likely, if /dev/kvm missing, then KVM support is missing.
This commit is contained in:
parent
3fc056927c
commit
24cb65efc3
1 changed files with 4 additions and 1 deletions
|
@ -2020,7 +2020,10 @@ void DerivationGoal::initChild()
|
|||
createDirs(chrootRootDir + "/dev/pts");
|
||||
Strings ss;
|
||||
ss.push_back("/dev/full");
|
||||
ss.push_back("/dev/kvm");
|
||||
#ifdef __linux__
|
||||
if (pathExists("/dev/kvm"))
|
||||
ss.push_back("/dev/kvm");
|
||||
#endif
|
||||
ss.push_back("/dev/null");
|
||||
ss.push_back("/dev/random");
|
||||
ss.push_back("/dev/tty");
|
||||
|
|
Loading…
Reference in a new issue