add paramaters to proxmox-vm

This commit is contained in:
Andreas Zweili 2022-01-14 18:02:07 +01:00
parent 6f73ee68af
commit a3427825c3
2 changed files with 18 additions and 4 deletions

View File

@ -24,6 +24,7 @@
let let
system = "x86_64-linux"; system = "x86_64-linux";
username = import ./username.nix; username = import ./username.nix;
network = import ./modules/network;
overlay-unstable = final: prev: { overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable { unstable = import nixpkgs-unstable {
system = "x86_64-linux"; system = "x86_64-linux";
@ -59,6 +60,7 @@
] ++ extraModules ] ++ extraModules
); );
}; };
mkVM = import ./systems/proxmox-vm;
in in
{ {
nixosConfigurations = { nixosConfigurations = {
@ -106,7 +108,8 @@
./modules/docker ./modules/docker
]; ];
heimdall = mkComputer heimdall = mkComputer
./systems/heimdall (mkVM
{ hostname = "heimdall"; ip = "10.7.89.121"; })
./home-manager/headless.nix ./home-manager/headless.nix
[ [
./modules/docker ./modules/docker

View File

@ -1,4 +1,4 @@
{ ... }: { hostname, ip, ... }:
{ {
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"ata_piix" "ata_piix"
@ -22,8 +22,19 @@
}; };
networking = { networking = {
hostName = "nixos-test-vm"; hostName = hostname;
interfaces.ens18.useDHCP = true; 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 = [ swapDevices = [