hosts/dn42-ildix-service: init host
This commit is contained in:
parent
6e62975666
commit
1783a97ccb
@ -66,6 +66,7 @@
|
||||
schule = generateNixosSystem "schule";
|
||||
storage-2 = generateNixosSystem "storage-2";
|
||||
web-2 = generateNixosSystem "web-2";
|
||||
dn42-ildix-service = generateNixosSystem "dn42-ildix-service";
|
||||
_iso = generateNixosSystem "_iso";
|
||||
};
|
||||
|
||||
|
41
hosts/dn42-ildix-service/configuration.nix
Normal file
41
hosts/dn42-ildix-service/configuration.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
../../configuration/proxmox-vm
|
||||
];
|
||||
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.version = 2;
|
||||
# boot.loader.grub.efiSupport = true;
|
||||
# boot.loader.grub.efiInstallAsRemovable = true;
|
||||
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
# Define on which hard drive you want to install Grub.
|
||||
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
||||
|
||||
|
||||
networking.hostName = "dn42-ildix-service";
|
||||
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.lo.ipv6.addresses = [
|
||||
{ address = "fd81:edb3:71d8::1"; prefixLength = 128; }
|
||||
{ address = "fd81:edb3:71d8::53"; prefixLength = 128; }
|
||||
];
|
||||
# VM Nat Netz mercury
|
||||
networking.interfaces.ens18.ipv4.addresses = [ { address = "192.168.10.28"; prefixLength = 24; } ];
|
||||
# ildix peering lan
|
||||
networking.interfaces.ens19.ipv6.addresses = [ { address = "fd81:ed3:71d8:ffff:2953::1"; prefixLength = 64; } ];
|
||||
# IPv6 Uplink
|
||||
networking.interfaces.ens20.ipv6.addresses = [ { address = "2001:638:904:ffc9::c"; prefixLength = 64; } ];
|
||||
|
||||
networking.defaultGateway6 = { address = "2001:638:904:ffc9::1"; interface = "ens20"; };
|
||||
networking.defaultGateway = { address = "192.168.10.1"; interface = "ens18"; };
|
||||
networking.nameservers = [ "2001:638:904:ffcc::3" "2001:638:904:ffcc::4" "141.24.40.3" "141.24.40.4" ];
|
||||
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
|
34
hosts/dn42-ildix-service/hardware-configuration.nix
Normal file
34
hosts/dn42-ildix-service/hardware-configuration.nix
Normal file
@ -0,0 +1,34 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/5f2174f2-981a-468b-967e-1c1b6a32b8a3";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens19.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens20.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
Reference in New Issue
Block a user