mio-ops/deployments/linode.nix

47 lines
1.1 KiB
Nix
Raw Normal View History

2019-07-02 03:04:55 +00:00
# NixOps configuration for the Linode VMs
2019-07-02 01:34:42 +00:00
{
network = {
2019-11-26 23:51:02 +00:00
description = "Linode nodes";
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 =
[
2019-11-26 23:51:02 +00:00
../hardware/linode_vm.nix
2019-11-12 23:34:30 +00:00
../roles/host_common.nix
2019-11-22 06:48:11 +00:00
../roles/server_common.nix
2019-07-03 12:59:30 +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
];
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
};
}