nixos/systems/proxmox-vm/default.nix

52 lines
1023 B
Nix
Raw Normal View History

2022-02-28 20:50:25 +01:00
{ inputs, hostname, ip, ... }:
2022-01-01 15:21:51 +01:00
{
2022-05-05 22:55:27 +02:00
imports = [
2022-08-17 21:39:57 +02:00
"${inputs.self}/modules/log-to-ram"
2022-05-05 22:55:27 +02:00
"${inputs.self}/modules/ntp"
2022-05-06 15:29:24 +02:00
"${inputs.self}/modules/syslog"
2022-05-05 22:55:27 +02:00
];
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;
}
];
};
2022-01-01 15:21:51 +01:00
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";
};
2022-01-01 15:21:51 +01:00
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
}