mio-ops/networks/linode-common.nix

37 lines
889 B
Nix
Raw Normal View History

2020-05-12 03:57:45 +00:00
# NixOps configuration common to Linode VMs
{
2022-03-07 14:26:15 +00:00
config,
pkgs,
lib,
...
}: {
imports = [../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.
2022-03-07 14:26:15 +00:00
environment.systemPackages = with pkgs; [inetutils mtr sysstat];
2020-05-12 03:57:45 +00:00
# Configure firewall defaults:
networking = {
usePredictableInterfaceNames = false; # As per Linode's networking guidlines
domain = "mcwhirter.io";
interfaces.eth0.useDHCP = true;
firewall = {
enable = true;
2022-03-07 14:26:15 +00:00
allowedTCPPorts = [80 443];
trustedInterfaces = ["lo"];
2020-05-12 03:57:45 +00:00
};
};
2022-03-07 14:26:15 +00:00
systemd.network.networks.eth0.ipv6SendRAConfig = {
EmitDNS = true;
Managed = true;
OtherInformation = true;
};
2020-05-12 03:57:45 +00:00
}