From 43c4e3da56fa380de028ae11fad944d1b9d5bcc0 Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Mon, 9 Dec 2019 14:53:30 +1000 Subject: [PATCH] Moved to clusters --- clusters/linode.nix | 37 +++++++++++++++++++++++++++++++++ deployments/linode.nix | 46 ------------------------------------------ 2 files changed, 37 insertions(+), 46 deletions(-) create mode 100644 clusters/linode.nix delete mode 100644 deployments/linode.nix diff --git a/clusters/linode.nix b/clusters/linode.nix new file mode 100644 index 0000000..2cc1918 --- /dev/null +++ b/clusters/linode.nix @@ -0,0 +1,37 @@ +# NixOps configuration for the Linode VMs + +{ config, pkgs, lib, ... }: + +{ + imports = + [ + ../hardware/linode_vm.nix + ../roles/host_common.nix + ../roles/server_common.nix + ]; + + # Ensure the right package architecture is used + nixpkgs.localSystem = { + system = "x86_64-linux"; + config = "x86_64-unknown-linux-gnu"; + }; + + # Tools that Linode support like to have install if you need them. + environment.systemPackages = with pkgs; [ + inetutils + mtr + sysstat + ]; + + # Configure firewall defaults: + networking = { + usePredictableInterfaceNames = false; # As per Linode's networking guidlines + domain = "mcwhirter.io"; + firewall = { + enable = true; + allowedTCPPorts = [ 80 443 ]; + trustedInterfaces = [ "lo" ]; + }; + }; + +} diff --git a/deployments/linode.nix b/deployments/linode.nix deleted file mode 100644 index 4fc2b2d..0000000 --- a/deployments/linode.nix +++ /dev/null @@ -1,46 +0,0 @@ -# NixOps configuration for the Linode VMs - -{ - network = { - description = "Linode nodes"; - enableRollback = true; - }; - - defaults = - { config, pkgs, lib, ... }: - - { - imports = - [ - ../hardware/linode_vm.nix - ../roles/host_common.nix - ../roles/server_common.nix - ]; - - # Ensure the right package architecture is used - nixpkgs.localSystem = { - system = "x86_64-linux"; - config = "x86_64-unknown-linux-gnu"; - }; - - # Tools that Linode support like to have install if you need them. - environment.systemPackages = with pkgs; [ - inetutils - mtr - sysstat - ]; - - # Configure firewall defaults: - networking = { - usePredictableInterfaceNames = false; # As per Linode's networking guidlines - domain = "mcwhirter.io"; - firewall = { - enable = true; - allowedTCPPorts = [ 80 443 ]; - trustedInterfaces = [ "lo" ]; - }; - }; - - system.autoUpgrade.enable = false; # Disabled as it conflicts with NixOps - }; -}