nixos/systems/proxmox-vm/default.nix

51 lines
983 B
Nix

{ inputs, hostname, ip, ... }:
{
imports = [
"${inputs.self}/modules/ntp"
"${inputs.self}/modules/syslog"
];
networking = {
useDHCP = false;
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;
}
];
};
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";
};
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
}