From db1b568d63bd73a0bbbf9897d5a814193fb3a5f7 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Fri, 19 Mar 2021 01:11:37 +0000 Subject: [PATCH] {lux,las,nyc}01-frantech: init --- ops/nixos/default.nix | 3 ++ ops/nixos/las01-frantech/README.md | 14 ++++++ ops/nixos/las01-frantech/default.nix | 68 ++++++++++++++++++++++++++++ ops/nixos/lux01-frantech/README.md | 14 ++++++ ops/nixos/lux01-frantech/default.nix | 68 ++++++++++++++++++++++++++++ ops/nixos/nyc01-frantech/README.md | 14 ++++++ ops/nixos/nyc01-frantech/default.nix | 68 ++++++++++++++++++++++++++++ 7 files changed, 249 insertions(+) create mode 100644 ops/nixos/las01-frantech/README.md create mode 100644 ops/nixos/las01-frantech/default.nix create mode 100644 ops/nixos/lux01-frantech/README.md create mode 100644 ops/nixos/lux01-frantech/default.nix create mode 100644 ops/nixos/nyc01-frantech/README.md create mode 100644 ops/nixos/nyc01-frantech/default.nix diff --git a/ops/nixos/default.nix b/ops/nixos/default.nix index 488a425eb1..82cc0af402 100644 --- a/ops/nixos/default.nix +++ b/ops/nixos/default.nix @@ -30,6 +30,9 @@ let "blade-torres" "blade-chakotay" "blade-kim" + "lux01-frantech" + "nyc01-frantech" + "las01-frantech" ]; rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; })); systemCfgs = lib.genAttrs systems diff --git a/ops/nixos/las01-frantech/README.md b/ops/nixos/las01-frantech/README.md new file mode 100644 index 0000000000..f01a2c4d4d --- /dev/null +++ b/ops/nixos/las01-frantech/README.md @@ -0,0 +1,14 @@ + + +# las01-frantech.as205479.net + +1GiB RAM VM from BuyVM. + +Internet: + +* 205.185.116.42/24 (gw 205.185.116.1) +* 2605:6400:20:179b::1/48 (gw 2605:6400:20::1) diff --git a/ops/nixos/las01-frantech/default.nix b/ops/nixos/las01-frantech/default.nix new file mode 100644 index 0000000000..40ebb92693 --- /dev/null +++ b/ops/nixos/las01-frantech/default.nix @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +{ depot, lib, pkgs, rebuilder, config, ... }: +let + inherit (depot.ops) secrets; +in { + imports = [ + ../../../third_party/nixpkgs/nixos/modules/profiles/qemu-guest.nix + ../lib/low-space.nix + ]; + + boot.initrd.availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "virtio_pci" + "virtio_scsi" + "sr_mod" + "virtio_blk" + ]; + boot.kernelModules = [ "kvm-amd" ]; + + # Use GRUB. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/vda"; + + powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; + + fileSystems = { + "/" = { + device = "/dev/vda1"; + fsType = "ext4"; + }; + }; + + nix.maxJobs = lib.mkDefault 1; + + # Networking! + networking = { + hostName = "las01-frantech"; + domain = "as205479.net"; + hostId = "2b6a8f37"; + + nameservers = [ + "2001:4860:4860::8888" + "2001:4860:4860::8844" + "8.8.8.8" + "8.8.4.4" + ]; + useDHCP = false; + defaultGateway = { + address = "205.185.116.1"; + interface = "ens3"; + }; + defaultGateway6 = { + address = "2605:6400:20::1"; + interface = "ens3"; + }; + interfaces.ens3 = { + ipv4.addresses = [{ address = "205.185.116.42"; prefixLength = 24; }]; + ipv6.addresses = [{ address = "2605:6400:20:179b::1"; prefixLength = 48; }]; + }; + }; + + system.stateVersion = "21.05"; +} diff --git a/ops/nixos/lux01-frantech/README.md b/ops/nixos/lux01-frantech/README.md new file mode 100644 index 0000000000..caaf73e679 --- /dev/null +++ b/ops/nixos/lux01-frantech/README.md @@ -0,0 +1,14 @@ + + +# lux01-frantech.as205479.net + +1GiB RAM VM from BuyVM. + +Internet: + +* 107.189.4.182/24 (gw 107.189.4.1) +* 2605:6400:30:f1d2::1/48 (gw 2605:6400:30::1) diff --git a/ops/nixos/lux01-frantech/default.nix b/ops/nixos/lux01-frantech/default.nix new file mode 100644 index 0000000000..8b4d187378 --- /dev/null +++ b/ops/nixos/lux01-frantech/default.nix @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +{ depot, lib, pkgs, rebuilder, config, ... }: +let + inherit (depot.ops) secrets; +in { + imports = [ + ../../../third_party/nixpkgs/nixos/modules/profiles/qemu-guest.nix + ../lib/low-space.nix + ]; + + boot.initrd.availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "virtio_pci" + "virtio_scsi" + "sr_mod" + "virtio_blk" + ]; + boot.kernelModules = [ "kvm-amd" ]; + + # Use GRUB. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/vda"; + + powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; + + fileSystems = { + "/" = { + device = "/dev/vda1"; + fsType = "ext4"; + }; + }; + + nix.maxJobs = lib.mkDefault 1; + + # Networking! + networking = { + hostName = "lux01-frantech"; + domain = "as205479.net"; + hostId = "92a60220"; + + nameservers = [ + "2001:4860:4860::8888" + "2001:4860:4860::8844" + "8.8.8.8" + "8.8.4.4" + ]; + useDHCP = false; + defaultGateway = { + address = "107.189.4.1"; + interface = "ens3"; + }; + defaultGateway6 = { + address = "2605:6400:30::1"; + interface = "ens3"; + }; + interfaces.ens3 = { + ipv4.addresses = [{ address = "107.189.4.182"; prefixLength = 24; }]; + ipv6.addresses = [{ address = "2605:6400:30:f1d2::1"; prefixLength = 48; }]; + }; + }; + + system.stateVersion = "21.05"; +} diff --git a/ops/nixos/nyc01-frantech/README.md b/ops/nixos/nyc01-frantech/README.md new file mode 100644 index 0000000000..361ac42159 --- /dev/null +++ b/ops/nixos/nyc01-frantech/README.md @@ -0,0 +1,14 @@ + + +# nyc01-frantech.as205479.net + +1GiB RAM VM from BuyVM. + +Internet: + +* 199.195.254.60/24 (gw 199.195.254.1) +* 2605:6400:10:c77::1/48 (gw 2605:6400:10::1) diff --git a/ops/nixos/nyc01-frantech/default.nix b/ops/nixos/nyc01-frantech/default.nix new file mode 100644 index 0000000000..6eb9e3105b --- /dev/null +++ b/ops/nixos/nyc01-frantech/default.nix @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +{ depot, lib, pkgs, rebuilder, config, ... }: +let + inherit (depot.ops) secrets; +in { + imports = [ + ../../../third_party/nixpkgs/nixos/modules/profiles/qemu-guest.nix + ../lib/low-space.nix + ]; + + boot.initrd.availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "virtio_pci" + "virtio_scsi" + "sr_mod" + "virtio_blk" + ]; + boot.kernelModules = [ "kvm-amd" ]; + + # Use GRUB. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/vda"; + + powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; + + fileSystems = { + "/" = { + device = "/dev/vda1"; + fsType = "ext4"; + }; + }; + + nix.maxJobs = lib.mkDefault 1; + + # Networking! + networking = { + hostName = "nyc01-frantech"; + domain = "as205479.net"; + hostId = "251837df"; + + nameservers = [ + "2001:4860:4860::8888" + "2001:4860:4860::8844" + "8.8.8.8" + "8.8.4.4" + ]; + useDHCP = false; + defaultGateway = { + address = "199.195.254.1"; + interface = "ens3"; + }; + defaultGateway6 = { + address = "2605:6400:10::1"; + interface = "ens3"; + }; + interfaces.ens3 = { + ipv4.addresses = [{ address = "199.195.254.60"; prefixLength = 24; }]; + ipv6.addresses = [{ address = "2605:6400:10:c77::1"; prefixLength = 48; }]; + }; + }; + + system.stateVersion = "21.05"; +}