vm: move proxmox specific configuration into hosts/vm/proxmox.nix

This commit is contained in:
Yuri Tatishchev 2025-01-13 16:12:57 -08:00
parent d880a8d159
commit c8f9d65f2d
Signed by: CaZzzer
GPG Key ID: E0EBF441EA424369
3 changed files with 15 additions and 19 deletions

View File

@ -37,6 +37,7 @@
modules = [ modules = [
./modules ./modules
./hosts/common.nix ./hosts/common.nix
./hosts/vm/proxmox.nix
./hosts/vm ./hosts/vm
]; ];
format = "proxmox"; format = "proxmox";

View File

@ -9,15 +9,7 @@
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
# ./hardware-configuration-vm.nix # ./hardware-configuration-vm.nix
]; ];
mods.kb-input.enable = true; mods.kb-input.enable = false;
# boot.kernelParams = [ "console=tty0" ];
proxmox.qemuConf.bios = "ovmf";
proxmox.qemuExtraConf = {
machine = "q35";
# efidisk0 = "local-lvm:vm-9999-disk-1";
cpu = "host";
};
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
@ -28,7 +20,6 @@
"sysrq_always_enabled=1" "sysrq_always_enabled=1"
]; ];
# boot.loader.timeout = lib.mkForce 3;
boot.loader.systemd-boot.configurationLimit = 5; boot.loader.systemd-boot.configurationLimit = 5;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12; boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_12;
boot.extraModulePackages = with config.boot.kernelPackages; [ zfs ]; boot.extraModulePackages = with config.boot.kernelPackages; [ zfs ];
@ -58,7 +49,7 @@
# VM services # VM services
services.cloud-init.enable = true; services.cloud-init.enable = true;
services.cloud-init.network.enable = false; # services.cloud-init.network.enable = false;
services.qemuGuest.enable = true; services.qemuGuest.enable = true;
services.spice-vdagentd.enable = true; services.spice-vdagentd.enable = true;
services.openssh.enable = true; services.openssh.enable = true;
@ -89,7 +80,6 @@
programs.firefox.enable = true; programs.firefox.enable = true;
programs.fish.enable = true; programs.fish.enable = true;
programs.git.enable = true; programs.git.enable = true;
programs.lazygit.enable = true;
programs.neovim.enable = true; programs.neovim.enable = true;
programs.bat.enable = true; programs.bat.enable = true;
@ -112,9 +102,7 @@
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
darkman
dust dust
efibootmgr
eza eza
fastfetch fastfetch
fd fd
@ -123,18 +111,14 @@
kdePackages.filelight kdePackages.filelight
kdePackages.kate kdePackages.kate
kdePackages.yakuake kdePackages.yakuake
gnumake ldns
helix
mediainfo
micro micro
mpv mpv
ripgrep ripgrep
starship starship
tealdeer tealdeer
tela-circle-icon-theme
waypipe waypipe
whois whois
yt-dlp
zfs zfs
]; ];

11
hosts/vm/proxmox.nix Normal file
View File

@ -0,0 +1,11 @@
{ ... }:
{
# boot.kernelParams = [ "console=tty0" ];
proxmox.qemuConf.bios = "ovmf";
proxmox.qemuExtraConf = {
machine = "q35";
# efidisk0 = "local-lvm:vm-9999-disk-1";
cpu = "host";
};
}