mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 09:28:27 +02:00
fix: run other k3s clusters as kubevirt quests, use the interface provided by kubevirt
This commit is contained in:
33
lib/genKubeVirtGuestModule.nix
Normal file
33
lib/genKubeVirtGuestModule.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
pkgs,
|
||||
hostName,
|
||||
networking,
|
||||
...
|
||||
}: let
|
||||
inherit (networking.hostsAddr.${hostName}) iface;
|
||||
in {
|
||||
# supported file systems, so we can mount any removable disks with these filesystems
|
||||
boot.supportedFilesystems = [
|
||||
"ext4"
|
||||
"btrfs"
|
||||
"xfs"
|
||||
"fat"
|
||||
"vfat"
|
||||
"exfat"
|
||||
];
|
||||
|
||||
networking = {
|
||||
inherit hostName;
|
||||
inherit (networking) defaultGateway nameservers;
|
||||
inherit (networking.hostsInterface.${hostName}) interfaces;
|
||||
networkmanager.enable = false;
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
Reference in New Issue
Block a user