Nixos-shell: Difference between revisions
→Graphical session: Enable auto screen resize |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 58: | Line 58: | ||
}; | }; | ||
}; | }; | ||
</nowiki>|name=|lang=nix}}If you want clipboard-sharing | </nowiki>|name=|lang=nix}}If you want auto screen resize support and clipboard-sharing between host and guest to work, append the following lines to your guest config.{{file|3=<nowiki> | ||
{ ... }: { | { ... }: { | ||
[...] | [...] | ||
nixpkgs.overlays = [ | |||
(final: prev: { | |||
qemu = prev.qemu.overrideAttrs (old: { | |||
configureFlags = old.configureFlags ++ ["--enable-gtk-clipboard"]; | |||
}); | |||
qemu_kvm = prev.qemu_kvm.overrideAttrs (old: { | |||
configureFlags = old.configureFlags ++ ["--enable-gtk-clipboard"]; | |||
}); | |||
}) | |||
]; | |||
virtualisation.qemu.options = [ | virtualisation.qemu.options = [ | ||
"- | "-device virtio-vga-gl" | ||
"- | "-display gtk,gl=on" | ||
"-chardev | "-chardev qemu-vdagent,id=vdagent,name=vdagent,clipboard=on" | ||
"-device" "virtserialport,chardev=vdagent,name=com.redhat.spice.0" | "-device virtio-serial" | ||
"-device virtserialport,chardev=vdagent,name=com.redhat.spice.0" | |||
]; | ]; | ||
| Line 85: | Line 97: | ||
}; | }; | ||
</nowiki>|name=|lang=nix}} | </nowiki>|name=|lang=nix}} | ||
=== Mounting host directories === | === Mounting host directories === | ||