mio-ops/Networks/Linode.nix

57 lines
1.4 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 = {
description = "Linode servers";
};
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;
allowedTCPPorts = [ ];
trustedInterfaces = [ "lo" ];
};
2019-07-03 11:30:23 +00:00
};
2019-07-02 01:34:42 +00:00
};
cuallaidh =
{ config, pkgs, lib, ... }:
{
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "19.03"; # Did you read the comment?
system.autoUpgrade.enable = false;
2019-07-02 01:34:42 +00:00
system.autoUpgrade.channel = https://nixos.org/channels/nixos-19.03;
};
}