update: added kde-connect module
This commit is contained in:
parent
0a7aef69d1
commit
d5a74bd768
3 changed files with 1 additions and 0 deletions
51
modules/features/connectivity/virtualisation.nix
Normal file
51
modules/features/connectivity/virtualisation.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ self, inputs, ... }:
|
||||
|
||||
{
|
||||
|
||||
# virtualisation module declaration
|
||||
flake.nixosModules.virtualisation =
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
# for home manager functionality
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
|
||||
# adding user to required groups
|
||||
users.users.serenity = {
|
||||
extraGroups = [
|
||||
"libvirtd"
|
||||
"kvm"
|
||||
];
|
||||
};
|
||||
|
||||
# network bridge to vm
|
||||
networking.firewall.trustedInterfaces = [ "virbr0" ];
|
||||
|
||||
#virtualisation program
|
||||
programs.virt-manager = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# for vm networking
|
||||
environment.systemPackages = with pkgs; [ dnsmasq ];
|
||||
|
||||
# virtualisation settings
|
||||
virtualisation = {
|
||||
# usb passthrough
|
||||
spiceUSBRedirection.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
# host fileshare with vm
|
||||
vhostUserPackages = with pkgs; [ virtiofsd ];
|
||||
# tpm emulation for win11
|
||||
swtpm.enable = true;
|
||||
# passthrough security on fileshare
|
||||
runAsRoot = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue