rewrite all VMs to the unified module

This commit is contained in:
Andreas Zweili 2022-01-14 18:07:39 +01:00
parent 440e5726d8
commit daf2a75e19
3 changed files with 2 additions and 97 deletions

View File

@ -115,7 +115,8 @@
];
grav = mkComputer
./systems/grav
(mkVM
{ hostname = "grav"; ip = "10.7.89.102"; })
./home-manager/headless.nix
[
./modules/docker

View File

@ -1,48 +0,0 @@
{ ... }:
let
hostname = "grav";
ip = "10.7.89.102";
in
{
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "dm-snapshot" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
networking = {
hostName = hostname;
hosts = {
"127.0.0.1" = [ "${hostname}.2li.local" ];
ip = [ "${hostname}.2li.local" ];
};
defaultGateway = "10.7.89.1";
nameservers = [ "10.7.89.2" ];
interfaces.ens18.ipv4.addresses = [
{
address = ip;
prefixLength = 24;
}
];
};
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
}

View File

@ -1,48 +0,0 @@
{ ... }:
let
hostname = "heimdall";
ip = "10.7.89.121";
in
{
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "dm-snapshot" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
networking = {
hostName = hostname;
hosts = {
"127.0.0.1" = [ "${hostname}.2li.local" ];
ip = [ "${hostname}.2li.local" ];
};
defaultGateway = "10.7.89.1";
nameservers = [ "10.7.89.2" ];
interfaces.ens18.ipv4.addresses = [
{
address = ip;
prefixLength = 24;
}
];
};
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
}