mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
got virtual machines working besides audio
This commit is contained in:
parent
50fae0b2eb
commit
e06def29b8
4 changed files with 19 additions and 15 deletions
|
|
@ -10,6 +10,11 @@
|
||||||
"xsetroot -cursor_name left_ptr"
|
"xsetroot -cursor_name left_ptr"
|
||||||
"xsetroot -solid \"#000000\""
|
"xsetroot -solid \"#000000\""
|
||||||
"flashfocus"
|
"flashfocus"
|
||||||
|
"bspc monitor -a I"
|
||||||
|
"bspc monitor -a II"
|
||||||
|
"bspc monitor -a III"
|
||||||
|
"bspc monitor -a IV"
|
||||||
|
"bspc monitor -a X"
|
||||||
];
|
];
|
||||||
settings = {
|
settings = {
|
||||||
border_width = 0;
|
border_width = 0;
|
||||||
|
|
@ -22,8 +27,5 @@
|
||||||
borderless_monocle = true;
|
borderless_monocle = true;
|
||||||
gapless_monocle = true;
|
gapless_monocle = true;
|
||||||
};
|
};
|
||||||
monitors = {
|
|
||||||
eDP-1 = [ "I" "II" "III" "IV" "V" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
</cputune>
|
</cputune>
|
||||||
<os>
|
<os>
|
||||||
<type arch="x86_64" machine="pc-q35-6.2">hvm</type>
|
<type arch="x86_64" machine="pc-q35-6.2">hvm</type>
|
||||||
<loader readonly="yes" type="pflash">/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
|
<loader readonly="yes" type="pflash">/run/libvirt/nix-ovmf/OVMF_CODE.fd</loader>
|
||||||
<nvram>/var/lib/libvirt/qemu/nvram/Main_VM_VARS.fd</nvram>
|
<nvram>/var/lib/libvirt/qemu/nvram/Main_VM_VARS.fd</nvram>
|
||||||
<boot dev="hd"/>
|
<boot dev="hd"/>
|
||||||
<bootmenu enable="yes"/>
|
<bootmenu enable="yes"/>
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
<on_reboot>restart</on_reboot>
|
<on_reboot>restart</on_reboot>
|
||||||
<on_crash>destroy</on_crash>
|
<on_crash>destroy</on_crash>
|
||||||
<devices>
|
<devices>
|
||||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
<emulator>/run/libvirt/nix-emulators/qemu-system-x86_64</emulator>
|
||||||
<disk type="block" device="disk">
|
<disk type="block" device="disk">
|
||||||
<driver name="qemu" type="raw" cache="none" io="native" discard="unmap"/>
|
<driver name="qemu" type="raw" cache="none" io="native" discard="unmap"/>
|
||||||
<source dev="/dev/disk/by-id/ata-Samsung_SSD_870_EVO_500GB_S6PXNM0T402828A"/>
|
<source dev="/dev/disk/by-id/ata-Samsung_SSD_870_EVO_500GB_S6PXNM0T402828A"/>
|
||||||
|
|
@ -164,7 +164,7 @@
|
||||||
</controller>
|
</controller>
|
||||||
<interface type="bridge">
|
<interface type="bridge">
|
||||||
<mac address="52:54:00:05:03:2d"/>
|
<mac address="52:54:00:05:03:2d"/>
|
||||||
<source bridge="bridge0"/>
|
<source bridge="virbr0"/>
|
||||||
<model type="virtio"/>
|
<model type="virtio"/>
|
||||||
<link state="up"/>
|
<link state="up"/>
|
||||||
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
|
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
boot = {
|
boot = {
|
||||||
kernelParams = [ "amd_iommu=on" ];
|
kernelParams = [ "amd_iommu=on" ];
|
||||||
boot.kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
|
kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
|
||||||
initrd.kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
|
initrd.kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
|
||||||
extraModprobeConfig = "options vfio-pci ids=10de:228e,10de:2504";
|
extraModprobeConfig = "options vfio-pci ids=10de:228e,10de:2504";
|
||||||
};
|
};
|
||||||
|
|
@ -9,11 +10,12 @@
|
||||||
libvirtd = {
|
libvirtd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
qemu = {
|
qemu = {
|
||||||
runAsRoot = false;
|
runAsRoot = true;
|
||||||
ovmf = {
|
ovmf.enable = true;
|
||||||
enable = true;
|
# verbatimConfig = ''
|
||||||
package = pkgs.OVMFFull;
|
# user = gerg
|
||||||
};
|
# namespaces = []
|
||||||
|
# '';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -47,4 +49,4 @@
|
||||||
# Copy hook files
|
# Copy hook files
|
||||||
ln -sf ${qemuHook} /var/lib/libvirt/hooks/qemu
|
ln -sf ${qemuHook} /var/lib/libvirt/hooks/qemu
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
../modules/scripts.nix
|
../modules/scripts.nix
|
||||||
../modules/misc.nix
|
../modules/misc.nix
|
||||||
../modules/vfio.nix
|
../modules/vfio.nix
|
||||||
|
../modules/xserver.nix
|
||||||
];
|
];
|
||||||
networking.hostName = "gerg-desktop";
|
networking.hostName = "gerg-desktop";
|
||||||
nix = {
|
nix = {
|
||||||
|
|
@ -19,7 +20,6 @@
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.xserver = import ../modules/xserver.nix;
|
|
||||||
system.stateVersion = "22.11";
|
system.stateVersion = "22.11";
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
# end important stuff
|
# end important stuff
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
defaultUserShell = pkgs.zsh;
|
defaultUserShell = pkgs.zsh;
|
||||||
users.gerg = {
|
users.gerg = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" "audio" "networkmanager" "libvirt" ];
|
extraGroups = [ "wheel" "audio" "networkmanager" "kvm" "libvirtd" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue