Finally switch to flakes.
This commit is contained in:
parent
a90e09db74
commit
5e0b713756
116 changed files with 5443 additions and 3 deletions
36
nixos/services/virtualisation.nix
Normal file
36
nixos/services/virtualisation.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Enable virtualization
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
onBoot = "ignore";
|
||||
onShutdown = "shutdown";
|
||||
qemu = {
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [pkgs.OVMFFull.fd];
|
||||
};
|
||||
swtpm.enable = true;
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
|
||||
# Install programs system-wide
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virtiofsd
|
||||
dnsmasq
|
||||
spice-vdagent
|
||||
looking-glass-client
|
||||
];
|
||||
|
||||
# Allow Looking-Glass permissions
|
||||
systemd.tmpfiles.rules = [
|
||||
"f /dev/shm/looking-glass 0660 jimbo libvirtd -"
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue