From e86d7a1020a8f38c0e81ecd62854c75124b54952 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Tue, 30 Jul 2024 13:48:38 +0800 Subject: [PATCH] fix: aqua - networking --- hosts/idols-aquamarine/default.nix | 19 +++++++++++++------ .../proxy.nix | 0 .../kubevirt-hardware-configuration.nix | 7 ++----- 3 files changed, 15 insertions(+), 11 deletions(-) rename hosts/{12kingdoms-rakushun => idols-aquamarine}/proxy.nix (100%) diff --git a/hosts/idols-aquamarine/default.nix b/hosts/idols-aquamarine/default.nix index 7b0d4a91..9c4ea991 100644 --- a/hosts/idols-aquamarine/default.nix +++ b/hosts/idols-aquamarine/default.nix @@ -1,4 +1,8 @@ -{myvars, ...}: +{ + mylib, + myvars, + ... +}: ############################################################# # # Aquamarine - A NixOS VM running on Proxmox/KubeVirt @@ -7,25 +11,28 @@ let hostName = "aquamarine"; # Define your hostname. in { - imports = [ - ]; + imports = mylib.scanPaths ./.; # supported file systems, so we can mount any removable disks with these filesystems boot.supportedFilesystems = [ "ext4" "btrfs" "xfs" + #"zfs" + "ntfs" "fat" "vfat" "exfat" ]; - # boot.kernelModules = ["kvm-amd"]; - # boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu + boot.kernelModules = ["kvm-amd"]; + boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu networking = { inherit hostName; - inherit (myvars.networking) nameservers; + inherit (myvars.networking) defaultGateway nameservers; + inherit (myvars.networking.hostsInterface.${hostName}) interfaces; + networkmanager.enable = false; }; # This value determines the NixOS release from which the default diff --git a/hosts/12kingdoms-rakushun/proxy.nix b/hosts/idols-aquamarine/proxy.nix similarity index 100% rename from hosts/12kingdoms-rakushun/proxy.nix rename to hosts/idols-aquamarine/proxy.nix diff --git a/modules/nixos/server/kubevirt-hardware-configuration.nix b/modules/nixos/server/kubevirt-hardware-configuration.nix index 2c05c672..e6f360bc 100644 --- a/modules/nixos/server/kubevirt-hardware-configuration.nix +++ b/modules/nixos/server/kubevirt-hardware-configuration.nix @@ -19,11 +19,8 @@ ]; config = { - # backup only once a week inside all virtual machines - services.btrbk.instances.btrbk = { - onCalendar = lib.mkForce "Wed *-*-* 5:25:20"; - settings.snapshot_preserve = lib.mkForce "7d"; - }; + # disable backups in the VM + services.btrbk.instances = lib.mkFOrce {}; fileSystems."/" = { device = "/dev/disk/by-label/nixos";