Added support for encrypted linodes
This commit is contained in:
parent
995e5c0735
commit
a2addd2997
37
clusters/linode-common.nix
Normal file
37
clusters/linode-common.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# 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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
11
clusters/linode-encrypted.nix
Normal file
11
clusters/linode-encrypted.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# NixOps configuration for the Linode VMs
|
||||||
|
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
../hardware/linode_vm-encrypted.nix
|
||||||
|
./linode-common.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -6,32 +6,6 @@
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
../hardware/linode_vm.nix
|
../hardware/linode_vm.nix
|
||||||
../roles/host_common.nix
|
./linode-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";
|
|
||||||
firewall = {
|
|
||||||
enable = true;
|
|
||||||
allowedTCPPorts = [ 80 443 ];
|
|
||||||
trustedInterfaces = [ "lo" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue