2023-05-09 13:54:45 +00:00
|
|
|
# NixOS configuration common to Linode VMs
|
2021-10-07 02:13:48 +00:00
|
|
|
{
|
2022-08-15 07:32:25 +00:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
../profiles/host_common.nix
|
|
|
|
../profiles/server_common.nix
|
|
|
|
];
|
2021-10-07 02:13:48 +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
|
|
|
|
];
|
|
|
|
|
|
|
|
# Configure firewall defaults:
|
|
|
|
networking = {
|
|
|
|
usePredictableInterfaceNames = false; # As per Linode's networking guidlines
|
2023-05-09 13:54:45 +00:00
|
|
|
domain = "reciproka.co";
|
2021-10-07 02:13:48 +00:00
|
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
firewall = {
|
|
|
|
enable = true;
|
2022-08-15 07:32:25 +00:00
|
|
|
allowedTCPPorts = [80 443];
|
|
|
|
trustedInterfaces = ["lo"];
|
2021-10-07 02:13:48 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|