38 lines
792 B
Nix
38 lines
792 B
Nix
|
# NixOps configuration common to Linode VMs
|
||
|
|
||
|
{ config, pkgs, lib, ... }:
|
||
|
|
||
|
{
|
||
|
imports =
|
||
|
[
|
||
|
../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";
|
||
|
interfaces.eth0.useDHCP = true;
|
||
|
firewall = {
|
||
|
enable = true;
|
||
|
allowedTCPPorts = [ 80 443 ];
|
||
|
trustedInterfaces = [ "lo" ];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
}
|