mio-ops/clusters/linode-common.nix

38 lines
798 B
Nix
Raw Normal View History

2020-05-12 03:57:45 +00:00
# NixOps configuration common to Linode VMs
{ config, pkgs, lib, ... }:
{
imports =
[
2021-03-03 05:52:21 +00:00
../profiles/host_common.nix
../profiles/server_common.nix
2020-05-12 03:57:45 +00:00
];
# 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";
interfaces.eth0.useDHCP = true;
firewall = {
enable = true;
allowedTCPPorts = [ 80 443 ];
trustedInterfaces = [ "lo" ];
};
};
}