move the network config into a module
This commit is contained in:
parent
65fca83f81
commit
2bf232598d
|
@ -99,7 +99,8 @@
|
|||
./modules/desktop
|
||||
];
|
||||
nixos-test-vm = mkComputer
|
||||
./systems/proxmox-vm
|
||||
(mkVM
|
||||
{ hostname = "nixos-test-vm"; ip = "10.7.89.235"; })
|
||||
./home-manager/headless.nix
|
||||
[
|
||||
./modules/code-server
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{ hostname, ip, ... }:
|
||||
{
|
||||
imports = [
|
||||
(import ../../modules/mk-network { inherit hostname ip; })
|
||||
];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
|
@ -21,22 +24,6 @@
|
|||
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"; }
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue