Migrate exoplasim to flakes
This commit is contained in:
parent
c6add0f9f8
commit
948ab97bc3
2 changed files with 43 additions and 6 deletions
|
@ -5,12 +5,13 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ../../shared/base.nix ];
|
||||
imports = [
|
||||
../../shared/base.nix
|
||||
../../shared/hardware/vm.nix
|
||||
];
|
||||
|
||||
# Networking conf including WireGuard
|
||||
networking = {
|
||||
hostName = "exoplasim";
|
||||
|
||||
firewall.allowedUDPPorts = [ 51821 ];
|
||||
|
||||
wg-quick.interfaces = {
|
||||
|
@ -68,7 +69,4 @@
|
|||
memory.swap_pos = "beside";
|
||||
};
|
||||
};
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
services.qemuGuest.enable = true;
|
||||
}
|
||||
|
|
39
hosts/exoplasim/state.nix
Normal file
39
hosts/exoplasim/state.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ lib, modulesPath, ... }:
|
||||
{
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"uhci_hcd"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/17b26343-39c9-4598-97c0-b43aab7ed3a0";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/9F45-5FDF";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue