mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 08:53:56 -05:00
virtual machine and neovim changes
This commit is contained in:
parent
113fdfac68
commit
fc39de700a
7 changed files with 238 additions and 230 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixkpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
spicetify-nix.url = "github:the-argus/spicetify-nix";
|
spicetify-nix.url = "github:the-argus/spicetify-nix";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,6 @@ local function map(mode, lhs, rhs, opts)
|
||||||
end
|
end
|
||||||
-- show tree
|
-- show tree
|
||||||
map("n", "<Leader>t", ":NvimTreeToggle<CR>")
|
map("n", "<Leader>t", ":NvimTreeToggle<CR>")
|
||||||
-- coc completion
|
|
||||||
map("i", "<cr>", 'pumvisible() ? coc#_select_confirm() : \"\\<C-g>u\\<CR>\"', {silent = true, expr = true})
|
|
||||||
|
|
||||||
-- plugin setups
|
-- plugin setups
|
||||||
require("nvim-tree").setup {
|
require("nvim-tree").setup {
|
||||||
open_on_setup = true,
|
open_on_setup = true,
|
||||||
|
|
@ -41,12 +38,21 @@ require("nvim-tree").setup {
|
||||||
}
|
}
|
||||||
require("nvim-web-devicons").setup()
|
require("nvim-web-devicons").setup()
|
||||||
require("nvim-treesitter.configs").setup {
|
require("nvim-treesitter.configs").setup {
|
||||||
ensure_installed = "all",
|
ensure_installed = "",
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
auto_install = true,
|
auto_install = false,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
additional_vim_regex_highlighting = false
|
additional_vim_regex_highlighting = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
vim.g.coq_settings = {
|
||||||
|
auto_start = "shut-up",
|
||||||
|
xdg = true,
|
||||||
|
keymap = {
|
||||||
|
pre_select = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
-- shapes and colors
|
||||||
|
vim.cmd[[colorscheme tokyonight]]
|
||||||
|
vim.cmd[[hi Normal guibg=#000000]]
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,6 @@
|
||||||
withNodeJs = true;
|
withNodeJs = true;
|
||||||
withPython3 = true;
|
withPython3 = true;
|
||||||
withRuby = true;
|
withRuby = true;
|
||||||
coc = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.vimPlugins.coc-nvim;
|
|
||||||
};
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
vim-smoothie #smooth scrolling
|
vim-smoothie #smooth scrolling
|
||||||
tokyonight-nvim #color scheme
|
tokyonight-nvim #color scheme
|
||||||
|
|
@ -20,8 +16,10 @@
|
||||||
nvim-web-devicons # for tree-lua
|
nvim-web-devicons # for tree-lua
|
||||||
# telescope-nvim # file finder
|
# telescope-nvim # file finder
|
||||||
indentLine # indentlines
|
indentLine # indentlines
|
||||||
nvim-treesitter #syntax highlighting
|
(nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars)) #syntax highlighting
|
||||||
|
coq_nvim # autocompletions
|
||||||
];
|
];
|
||||||
extraConfig = "lua << EOF\n" + builtins.readFile ./init.lua + "\nEOF";
|
extraConfig = "lua << EOF\n" + builtins.readFile ./init.lua + "\nEOF";
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
215
misc/Main_VM.xml
215
misc/Main_VM.xml
|
|
@ -1,215 +0,0 @@
|
||||||
<domain type="kvm">
|
|
||||||
<name>Main_VM</name>
|
|
||||||
<uuid>dc54280f-8a72-4e0b-9771-e3fa6871c58b</uuid>
|
|
||||||
<metadata>
|
|
||||||
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
|
|
||||||
<libosinfo:os id="http://microsoft.com/win/10"/>
|
|
||||||
</libosinfo:libosinfo>
|
|
||||||
</metadata>
|
|
||||||
<memory unit="KiB">16384000</memory>
|
|
||||||
<currentMemory unit="KiB">16384000</currentMemory>
|
|
||||||
<memoryBacking>
|
|
||||||
<source type="memfd"/>
|
|
||||||
<access mode="shared"/>
|
|
||||||
</memoryBacking>
|
|
||||||
<vcpu placement="static" cpuset="3-5,9-11">6</vcpu>
|
|
||||||
<iothreads>2</iothreads>
|
|
||||||
<cputune>
|
|
||||||
<vcpupin vcpu="0" cpuset="3"/>
|
|
||||||
<vcpupin vcpu="1" cpuset="4"/>
|
|
||||||
<vcpupin vcpu="2" cpuset="5"/>
|
|
||||||
<vcpupin vcpu="3" cpuset="9"/>
|
|
||||||
<vcpupin vcpu="4" cpuset="10"/>
|
|
||||||
<vcpupin vcpu="5" cpuset="11"/>
|
|
||||||
<emulatorpin cpuset="3-5,9-11"/>
|
|
||||||
<iothreadpin iothread="1" cpuset="3-5"/>
|
|
||||||
<iothreadpin iothread="2" cpuset="9-11"/>
|
|
||||||
</cputune>
|
|
||||||
<os>
|
|
||||||
<type arch="x86_64" machine="pc-q35-7.0">hvm</type>
|
|
||||||
<loader readonly="yes" type="pflash">/run/libvirt/nix-ovmf/OVMF_CODE.fd</loader>
|
|
||||||
<nvram>/var/lib/libvirt/qemu/nvram/Main_VM_VARS.fd</nvram>
|
|
||||||
<boot dev="hd"/>
|
|
||||||
<bootmenu enable="no"/>
|
|
||||||
</os>
|
|
||||||
<features>
|
|
||||||
<acpi/>
|
|
||||||
<apic/>
|
|
||||||
<hyperv mode="custom">
|
|
||||||
<relaxed state="on"/>
|
|
||||||
<vapic state="on"/>
|
|
||||||
<spinlocks state="on" retries="8191"/>
|
|
||||||
<vpindex state="on"/>
|
|
||||||
<synic state="on"/>
|
|
||||||
<stimer state="on"/>
|
|
||||||
<reset state="on"/>
|
|
||||||
<vendor_id state="on" value="AuthenticAMD"/>
|
|
||||||
<frequencies state="on"/>
|
|
||||||
</hyperv>
|
|
||||||
<kvm>
|
|
||||||
<hidden state="on"/>
|
|
||||||
</kvm>
|
|
||||||
<vmport state="off"/>
|
|
||||||
<ioapic driver="kvm"/>
|
|
||||||
</features>
|
|
||||||
<cpu mode="host-passthrough" check="none" migratable="on">
|
|
||||||
<topology sockets="1" dies="1" cores="3" threads="2"/>
|
|
||||||
<cache mode="passthrough"/>
|
|
||||||
<feature policy="require" name="svm"/>
|
|
||||||
<feature policy="require" name="apic"/>
|
|
||||||
<feature policy="require" name="invtsc"/>
|
|
||||||
<feature policy="require" name="hypervisor"/>
|
|
||||||
<feature policy="require" name="topoext"/>
|
|
||||||
<feature policy="require" name="ibpb"/>
|
|
||||||
<feature policy="require" name="ssbd"/>
|
|
||||||
<feature policy="require" name="virt-ssbd"/>
|
|
||||||
</cpu>
|
|
||||||
<clock offset="localtime">
|
|
||||||
<timer name="rtc" present="no" tickpolicy="catchup"/>
|
|
||||||
<timer name="pit" present="no" tickpolicy="delay"/>
|
|
||||||
<timer name="hpet" present="no"/>
|
|
||||||
<timer name="kvmclock" present="no"/>
|
|
||||||
<timer name="hypervclock" present="yes"/>
|
|
||||||
<timer name="tsc" present="yes" mode="native"/>
|
|
||||||
</clock>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>destroy</on_crash>
|
|
||||||
<pm>
|
|
||||||
<suspend-to-mem enabled="no"/>
|
|
||||||
<suspend-to-disk enabled="no"/>
|
|
||||||
</pm>
|
|
||||||
<devices>
|
|
||||||
<emulator>/run/libvirt/nix-emulators/qemu-system-x86_64</emulator>
|
|
||||||
<disk type="block" device="disk">
|
|
||||||
<driver name="qemu" type="raw" cache="none" io="native" discard="unmap"/>
|
|
||||||
<source dev="/dev/disk/by-id/ata-Samsung_SSD_870_EVO_500GB_S6PXNM0T402828A"/>
|
|
||||||
<target dev="sda" bus="sata"/>
|
|
||||||
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
|
|
||||||
</disk>
|
|
||||||
<disk type="block" device="disk">
|
|
||||||
<driver name="qemu" type="raw" cache="none" io="native" discard="unmap"/>
|
|
||||||
<source dev="/dev/disk/by-id/ata-WDC_WD10EZEX-75WN4A0_WD-WCC6Y7FCSH2U"/>
|
|
||||||
<target dev="sdb" bus="sata"/>
|
|
||||||
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
|
|
||||||
</disk>
|
|
||||||
<controller type="usb" index="0" model="qemu-xhci" ports="15">
|
|
||||||
<address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="0" model="pcie-root"/>
|
|
||||||
<controller type="pci" index="1" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="1" port="0x8"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0" multifunction="on"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="2" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="2" port="0x9"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="3" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="3" port="0xa"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x2"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="4" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="4" port="0xb"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x3"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="5" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="5" port="0xc"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x4"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="6" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="6" port="0xd"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x5"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="7" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="7" port="0xe"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x6"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="8" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="8" port="0xf"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x7"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="9" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="9" port="0x10"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="10" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="10" port="0x11"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="11" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="11" port="0x12"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="12" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="12" port="0x13"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="13" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="13" port="0x14"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="pci" index="14" model="pcie-root-port">
|
|
||||||
<model name="pcie-root-port"/>
|
|
||||||
<target chassis="14" port="0x15"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
|
|
||||||
</controller>
|
|
||||||
<controller type="sata" index="0">
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
|
|
||||||
</controller>
|
|
||||||
<interface type="bridge">
|
|
||||||
<mac address="52:54:00:05:03:2d"/>
|
|
||||||
<source bridge="virbr0"/>
|
|
||||||
<model type="virtio"/>
|
|
||||||
<link state="up"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
|
|
||||||
</interface>
|
|
||||||
<input type="evdev">
|
|
||||||
<source dev="/dev/input/by-id/usb-Logitech_G502_HERO_Gaming_Mouse_1974396F3638-event-mouse"/>
|
|
||||||
</input>
|
|
||||||
<input type="evdev">
|
|
||||||
<source dev="/dev/input/by-id/usb-Logitech_Gaming_Keyboard_G610_067A397A3637-event-kbd" grab="all" repeat="on"/>
|
|
||||||
</input>
|
|
||||||
<input type="evdev">
|
|
||||||
<source dev="/dev/input/by-id/usb-Logitech_G502_HERO_Gaming_Mouse_1974396F3638-if01-event-kbd"/>
|
|
||||||
</input>
|
|
||||||
<input type="mouse" bus="ps2"/>
|
|
||||||
<input type="keyboard" bus="ps2"/>
|
|
||||||
<sound model="ich9">
|
|
||||||
<codec type="micro"/>
|
|
||||||
<audio id="1"/>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
|
|
||||||
</sound>
|
|
||||||
<audio id="1" type="pulseaudio" serverName="/run/user/1000/pulse/native">
|
|
||||||
<input mixingEngine="no"/>
|
|
||||||
<output mixingEngine="no"/>
|
|
||||||
</audio>
|
|
||||||
<hostdev mode="subsystem" type="pci" managed="yes">
|
|
||||||
<source>
|
|
||||||
<address domain="0x0000" bus="0x10" slot="0x00" function="0x0"/>
|
|
||||||
</source>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
|
|
||||||
</hostdev>
|
|
||||||
<hostdev mode="subsystem" type="pci" managed="yes">
|
|
||||||
<source>
|
|
||||||
<address domain="0x0000" bus="0x10" slot="0x00" function="0x1"/>
|
|
||||||
</source>
|
|
||||||
<address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
|
|
||||||
</hostdev>
|
|
||||||
<memballoon model="none"/>
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
|
|
||||||
219
misc/Windows.xml
Normal file
219
misc/Windows.xml
Normal file
|
|
@ -0,0 +1,219 @@
|
||||||
|
<domain type='kvm'>
|
||||||
|
<name>Windows</name>
|
||||||
|
<uuid>60d8329e-8670-f8bb-4a7d-04d9f51eff76</uuid>
|
||||||
|
<metadata>
|
||||||
|
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
|
||||||
|
<libosinfo:os id="http://microsoft.com/win/10"/>
|
||||||
|
</libosinfo:libosinfo>
|
||||||
|
</metadata>
|
||||||
|
<memory unit='KiB'>16384000</memory>
|
||||||
|
<currentMemory unit='KiB'>16384000</currentMemory>
|
||||||
|
<memoryBacking>
|
||||||
|
<source type='memfd'/>
|
||||||
|
<access mode='shared'/>
|
||||||
|
</memoryBacking>
|
||||||
|
<vcpu placement='static' cpuset='3-5,9-11'>6</vcpu>
|
||||||
|
<cputune>
|
||||||
|
<vcpupin vcpu='0' cpuset='3'/>
|
||||||
|
<vcpupin vcpu='1' cpuset='4'/>
|
||||||
|
<vcpupin vcpu='2' cpuset='5'/>
|
||||||
|
<vcpupin vcpu='3' cpuset='9'/>
|
||||||
|
<vcpupin vcpu='4' cpuset='10'/>
|
||||||
|
<vcpupin vcpu='5' cpuset='11'/>
|
||||||
|
<emulatorpin cpuset='3-5,9-11'/>
|
||||||
|
</cputune>
|
||||||
|
<os>
|
||||||
|
<type arch='x86_64' machine='pc-q35-7.0'>hvm</type>
|
||||||
|
<loader readonly='yes' type='pflash'>/run/libvirt/nix-ovmf/OVMF_CODE.fd</loader>
|
||||||
|
<nvram>/var/lib/libvirt/qemu/nvram/Windows_VARS.fd</nvram>
|
||||||
|
<boot dev='hd'/>
|
||||||
|
<bootmenu enable='no'/>
|
||||||
|
</os>
|
||||||
|
<features>
|
||||||
|
<acpi/>
|
||||||
|
<apic/>
|
||||||
|
<hyperv mode='custom'>
|
||||||
|
<relaxed state='on'/>
|
||||||
|
<vapic state='on'/>
|
||||||
|
<spinlocks state='on' retries='8191'/>
|
||||||
|
<vpindex state='on'/>
|
||||||
|
<runtime state='on'/>
|
||||||
|
<synic state='on'/>
|
||||||
|
<stimer state='on'/>
|
||||||
|
<reset state='off'/>
|
||||||
|
<vendor_id state='on' value='abcdefghijkl'/>
|
||||||
|
<frequencies state='on'/>
|
||||||
|
<reenlightenment state='off'/>
|
||||||
|
<tlbflush state='on'/>
|
||||||
|
<ipi state='on'/>
|
||||||
|
<evmcs state='off'/>
|
||||||
|
</hyperv>
|
||||||
|
<kvm>
|
||||||
|
<hidden state='on'/>
|
||||||
|
</kvm>
|
||||||
|
<vmport state='off'/>
|
||||||
|
<ioapic driver='kvm'/>
|
||||||
|
</features>
|
||||||
|
<cpu mode='host-passthrough' check='none' migratable='on'>
|
||||||
|
<topology sockets='1' dies='1' cores='3' threads='2'/>
|
||||||
|
<cache mode='passthrough'/>
|
||||||
|
<feature policy='require' name='apic'/>
|
||||||
|
<feature policy='require' name='topoext'/>
|
||||||
|
<feature policy='disable' name='svm'/>
|
||||||
|
<feature policy='require' name='hypervisor'/>
|
||||||
|
<feature policy='require' name='invtsc'/>
|
||||||
|
</cpu>
|
||||||
|
<clock offset='localtime'>
|
||||||
|
<timer name='rtc' present='no' tickpolicy='catchup'/>
|
||||||
|
<timer name='pit' present='no' tickpolicy='delay'/>
|
||||||
|
<timer name='hpet' present='no'/>
|
||||||
|
<timer name='hypervclock' present='yes'/>
|
||||||
|
<timer name='tsc' present='yes' mode='native'/>
|
||||||
|
</clock>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<pm>
|
||||||
|
<suspend-to-mem enabled='no'/>
|
||||||
|
<suspend-to-disk enabled='no'/>
|
||||||
|
</pm>
|
||||||
|
<devices>
|
||||||
|
<emulator>/run/libvirt/nix-emulators/qemu-system-x86_64</emulator>
|
||||||
|
<disk type='block' device='disk'>
|
||||||
|
<driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
|
||||||
|
<source dev='/dev/disk/by-id/ata-Samsung_SSD_870_EVO_500GB_S6PXNM0T402828A'/>
|
||||||
|
<target dev='sda' bus='sata'/>
|
||||||
|
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||||
|
</disk>
|
||||||
|
<disk type='block' device='disk'>
|
||||||
|
<driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
|
||||||
|
<source dev='/dev/disk/by-id/ata-WDC_WD10EZEX-75WN4A0_WD-WCC6Y7FCSH2U'/>
|
||||||
|
<target dev='sdb' bus='sata'/>
|
||||||
|
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
|
||||||
|
</disk>
|
||||||
|
<controller type='pci' index='0' model='pcie-root'/>
|
||||||
|
<controller type='pci' index='1' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='1' port='0x8'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='2' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='2' port='0x9'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='3' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='3' port='0xa'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='4' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='4' port='0xb'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='5' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='5' port='0xc'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='6' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='6' port='0xd'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='7' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='7' port='0xe'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='8' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='8' port='0xf'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='9' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='9' port='0x10'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='10' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='10' port='0x11'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='11' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='11' port='0x12'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='12' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='12' port='0x13'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='13' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='13' port='0x14'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='pci' index='14' model='pcie-root-port'>
|
||||||
|
<model name='pcie-root-port'/>
|
||||||
|
<target chassis='14' port='0x15'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='sata' index='0'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
|
||||||
|
</controller>
|
||||||
|
<controller type='usb' index='0' model='qemu-xhci'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
|
||||||
|
</controller>
|
||||||
|
<interface type='bridge'>
|
||||||
|
<mac address='52:54:00:05:03:2d'/>
|
||||||
|
<source bridge='virbr0'/>
|
||||||
|
<model type='virtio'/>
|
||||||
|
<link state='up'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
||||||
|
</interface>
|
||||||
|
<input type='keyboard' bus='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
|
||||||
|
</input>
|
||||||
|
<input type='mouse' bus='virtio'>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
|
||||||
|
</input>
|
||||||
|
<input type='evdev'>
|
||||||
|
<source dev='/dev/input/by-id/usb-Logitech_G502_HERO_Gaming_Mouse_1974396F3638-event-mouse'/>
|
||||||
|
</input>
|
||||||
|
<input type='evdev'>
|
||||||
|
<source dev='/dev/input/by-id/usb-Logitech_Gaming_Keyboard_G610_067A397A3637-event-kbd' grab='all' repeat='on'/>
|
||||||
|
</input>
|
||||||
|
<input type='evdev'>
|
||||||
|
<source dev='/dev/input/by-id/usb-Logitech_G502_HERO_Gaming_Mouse_1974396F3638-if01-event-kbd'/>
|
||||||
|
</input>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<sound model='ich9'>
|
||||||
|
<codec type='micro'/>
|
||||||
|
<audio id='1'/>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
|
||||||
|
</sound>
|
||||||
|
<audio id='1' type='pulseaudio' serverName='/run/user/1000/pulse/native'>
|
||||||
|
<input mixingEngine='no'/>
|
||||||
|
<output mixingEngine='no'/>
|
||||||
|
</audio>
|
||||||
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||||
|
<source>
|
||||||
|
<address domain='0x0000' bus='0x10' slot='0x00' function='0x0'/>
|
||||||
|
</source>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
|
||||||
|
</hostdev>
|
||||||
|
<hostdev mode='subsystem' type='pci' managed='yes'>
|
||||||
|
<source>
|
||||||
|
<address domain='0x0000' bus='0x10' slot='0x00' function='0x1'/>
|
||||||
|
</source>
|
||||||
|
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
|
||||||
|
</hostdev>
|
||||||
|
<memballoon model='none'/>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
boot = {
|
boot = {
|
||||||
kernelParams = [ "amd_iommu=on" "kvm.ignore_msrs=1" ];
|
kernelParams = [ "amd_iommu=on" "iommu=pt" "vfio_iommu_type1.allow_unsafe_interrupts=1" "kvm.ignore_msrs=1" ];
|
||||||
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 = ''
|
extraModprobeConfig = ''
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
OPERATION="$2"
|
OPERATION="$2"
|
||||||
SUB_OPERATION="$3"
|
SUB_OPERATION="$3"
|
||||||
|
|
||||||
if [ "$GUEST_NAME" == "Main_VM" ]; then
|
if [ "$GUEST_NAME" == "Windows" ]; then
|
||||||
if [ "$OPERATION" == "start" ]; then
|
if [ "$OPERATION" == "start" ]; then
|
||||||
systemctl set-property --runtime -- user.slice AllowedCPUs=0,1,2,6,7,8
|
systemctl set-property --runtime -- user.slice AllowedCPUs=0,1,2,6,7,8
|
||||||
systemctl set-property --runtime -- system.slice AllowedCPUs=0,1,2,6,7,8
|
systemctl set-property --runtime -- system.slice AllowedCPUs=0,1,2,6,7,8
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
../modules/zsh.nix
|
../modules/zsh.nix
|
||||||
];
|
];
|
||||||
networking.hostName = "gerg-laptop";
|
networking.hostName = "gerg-laptop";
|
||||||
boot.kernelPackages = pkgs.linuxPackages_5_18;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
# end important stuff
|
# end important stuff
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue