1
0

host/mail-2: add host

This commit is contained in:
clerie 2023-05-20 17:13:45 +02:00
parent b03421ec96
commit 919e054d6f
4 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,8 @@
{ ... }:
{
networking.useDHCP = false;
networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
networking.defaultGateway = { address = "172.31.1.1"; interface = "ens3"; };
networking.nameservers = [ "2a01:4ff:ff00::add:2" "2a01:4ff:ff00::add:1" "185.12.64.2" "185.12.64.1" ];
}

View File

@ -41,6 +41,7 @@
gatekeeper = { name = "gatekeeper"; }; gatekeeper = { name = "gatekeeper"; };
hydra-1 = { name = "hydra-1"; }; hydra-1 = { name = "hydra-1"; };
hydra-2 = { name = "hydra-2"; }; hydra-2 = { name = "hydra-2"; };
mail-2 = { name = "mail-2"; };
minecraft-2 = { name = "minecraft-2"; }; minecraft-2 = { name = "minecraft-2"; };
monitoring-3 = { name = "monitoring-3"; }; monitoring-3 = { name = "monitoring-3"; };
nonat = { name = "nonat"; }; nonat = { name = "nonat"; };

View File

@ -0,0 +1,21 @@
{ ... }:
{
imports =
[
./hardware-configuration.nix
../../configuration/hetzner-cloud
];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
boot.loader.grub.device = "/dev/sda";
networking.hostName = "mail-2";
networking.interfaces.ens3.ipv6.addresses = [ { address = "2a01:4f8:1c1c:9577::1"; prefixLength = 64; } ];
networking.interfaces.ens3.ipv4.addresses = [ { address = "5.75.187.112"; prefixLength = 32; } ];
system.stateVersion = "22.11";
}

View File

@ -0,0 +1,32 @@
# 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" "virtio_pci" "virtio_scsi" "xhci_pci" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/df649bac-4232-44bb-a5f5-87cddaeb1f99";
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.ens3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}