2019-07-02 03:04:55 +00:00
|
|
|
# NixOps configuration for the Linode VMs
|
2019-07-02 01:34:42 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
network = {
|
|
|
|
description = "Linode servers";
|
2019-08-09 00:17:15 +00:00
|
|
|
enableRollback = true;
|
2019-07-02 01:34:42 +00:00
|
|
|
};
|
|
|
|
|
2019-07-03 12:59:30 +00:00
|
|
|
defaults =
|
|
|
|
{ config, pkgs, lib, ... }:
|
2019-07-02 01:34:42 +00:00
|
|
|
|
2019-07-03 12:59:30 +00:00
|
|
|
{
|
|
|
|
imports =
|
|
|
|
[
|
|
|
|
../Hardware/linode_vm.nix
|
|
|
|
../Deployments/host_common.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
# Ensure the right package architecture is used
|
|
|
|
nixpkgs.localSystem = {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
config = "x86_64-unknown-linux-gnu";
|
2019-08-08 03:59:19 +00:00
|
|
|
allowUnfree = false;
|
2019-07-03 12:59:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Tools that Linode support like to have install if you need them.
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
inetutils
|
|
|
|
mtr
|
|
|
|
sysstat
|
|
|
|
];
|
2019-07-02 03:04:55 +00:00
|
|
|
|
2019-07-03 12:59:30 +00:00
|
|
|
# Configure firewall defaults:
|
|
|
|
networking = {
|
|
|
|
usePredictableInterfaceNames = false; # As per Linode's networking guidlines
|
|
|
|
domain = "mcwhirter.io";
|
|
|
|
firewall = {
|
|
|
|
enable = true;
|
2019-08-20 11:02:58 +00:00
|
|
|
allowedTCPPorts = [ 80 443 ];
|
2019-07-03 12:59:30 +00:00
|
|
|
trustedInterfaces = [ "lo" ];
|
|
|
|
};
|
2019-07-03 11:30:23 +00:00
|
|
|
};
|
2019-07-02 01:34:42 +00:00
|
|
|
|
2019-08-20 11:02:58 +00:00
|
|
|
system.autoUpgrade.enable = false; # Disabled as it conflicts with NixOps
|
2019-07-02 01:34:42 +00:00
|
|
|
};
|
|
|
|
}
|