Moved to clusters

This commit is contained in:
Serĉanto de Scio 2019-12-09 14:53:30 +10:00
parent 3243e49aab
commit 43c4e3da56
Signed by: sercanto
GPG key ID: A4122FF3971B6865
2 changed files with 37 additions and 46 deletions

37
clusters/linode.nix Normal file
View file

@ -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" ];
};
};
}

View file

@ -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
};
}