From e8797c6ad0545b4dd2a316741b62abafc213e590 Mon Sep 17 00:00:00 2001 From: clerie Date: Tue, 15 Dec 2020 12:59:27 +0100 Subject: [PATCH] Add host porter --- hosts/porter/configuration.nix | 24 ++++++++++++++++++++++++ hosts/porter/hardware-configuration.nix | 23 +++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 hosts/porter/configuration.nix create mode 100644 hosts/porter/hardware-configuration.nix diff --git a/hosts/porter/configuration.nix b/hosts/porter/configuration.nix new file mode 100644 index 0000000..bd96cd1 --- /dev/null +++ b/hosts/porter/configuration.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ../../configuration/common + ]; + + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/sda"; + + networking.hostName = "porter"; + + networking.useDHCP = false; + networking.interfaces.ens3.ipv4.addresses = [ { address = "188.34.158.206"; prefixLength = 32; } ]; + networking.interfaces.ens3.ipv6.addresses = [ { address = "2a01:4f8:c010:4c92::1"; prefixLength = 64; } ]; + networking.defaultGateway = { address = "172.31.1.1"; interface = "ens3"; }; + networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; }; + networking.nameservers = [ "213.133.98.98" "213.133.99.99" "213.133.100.100" ]; + + system.stateVersion = "21.03"; +} diff --git a/hosts/porter/hardware-configuration.nix b/hosts/porter/hardware-configuration.nix new file mode 100644 index 0000000..278b87c --- /dev/null +++ b/hosts/porter/hardware-configuration.nix @@ -0,0 +1,23 @@ +# 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" "xhci_pci" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/d3f901b2-9c2c-4956-938a-2057455107a0"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + +}