dont store socket files in the nix store

Using the nix store to store the state files causes problems when
restarting the guest because socket file types not supported by nix
This commit is contained in:
Badi Abdul-Wahid 2020-05-04 11:11:52 -05:00
parent cb2259cb28
commit 083e65f592
No known key found for this signature in database
GPG Key ID: CDE1937CA22F3D1F

View File

@ -180,16 +180,19 @@ let
paths = [ paths = [
(writeRunitForegroundService "acpid" '' (writeRunitForegroundService "acpid" ''
#!/bin/sh #!/bin/sh
mkdir -p /var/lib/acpid && cd /var/lib/acpid
exec ${pkgsForLinux.busybox}/bin/acpid -f exec ${pkgsForLinux.busybox}/bin/acpid -f
'') '')
(writeRunitForegroundService "sshd" '' (writeRunitForegroundService "sshd" ''
#!/bin/sh #!/bin/sh
mkdir -p /var/lib/sshd && cd /var/lib/sshd
exec ${pkgsForLinux.openssh}/bin/sshd -D -e -f ${sshdConfig} exec ${pkgsForLinux.openssh}/bin/sshd -D -e -f ${sshdConfig}
'') '')
(writeRunitForegroundService "vpnkit-expose-port" '' (writeRunitForegroundService "vpnkit-expose-port" ''
#!/bin/sh #!/bin/sh
mkdir -p /var/lib/vpnkit-expose-port && cd /var/lib/vpnkit-expose-port
${pkgsForLinux.go-vpnkit}/bin/vpnkit-expose-port \ ${pkgsForLinux.go-vpnkit}/bin/vpnkit-expose-port \
-i \ -i \
@ -203,6 +206,7 @@ let
(writeRunitForegroundService "vpnkit-forwarder" '' (writeRunitForegroundService "vpnkit-forwarder" ''
#!/bin/sh #!/bin/sh
mkdir -p /var/lib/vpnkit-forwarder && cd /var/lib/vpnkit-forwarder
exec ${pkgsForLinux.go-vpnkit}/bin/vpnkit-forwarder exec ${pkgsForLinux.go-vpnkit}/bin/vpnkit-forwarder
'') '')
]; ];