From e279e7d94036c04971acdc795fab018b29f69102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sun, 16 Mar 2025 08:22:07 +0100 Subject: [PATCH] Add ptp_kvm for vms --- hosts/template/hardware-configuration.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/hosts/template/hardware-configuration.nix b/hosts/template/hardware-configuration.nix index 92e312c..9432561 100644 --- a/hosts/template/hardware-configuration.nix +++ b/hosts/template/hardware-configuration.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ @@ -11,19 +17,18 @@ "virtio_scsi" "sd_mod" "sr_mod" + "ptp_kvm" ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-label/root"; - fsType = "xfs"; - }; + fileSystems."/" = { + device = "/dev/disk/by-label/root"; + fsType = "xfs"; + }; - swapDevices = - [{ device = "/dev/disk/by-label/swap"; }]; + swapDevices = [ { device = "/dev/disk/by-label/swap"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -34,4 +39,3 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } -