move the mk-network into the proxmox-vm

This commit is contained in:
Andreas Zweili 2022-03-16 16:11:28 +01:00
parent 8606bc412a
commit 89345cb548
2 changed files with 17 additions and 29 deletions

View File

@ -1,19 +0,0 @@
{ hostname, ip, ... }:
{
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;
}
];
};
}

View File

@ -1,8 +1,22 @@
{ inputs, hostname, ip, ... }:
{
imports = [
(import "${inputs.self}/modules/mk-network" { inherit hostname ip; })
];
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"
@ -27,12 +41,5 @@
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
# Inspired by
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/profiles/minimal.nix
environment.noXlibs = true;
documentation.enable = false;
documentation.nixos.enable = false;
programs.command-not-found.enable = false;
}