2019-11-26 23:05:21 +00:00
|
|
|
{ config, pkgs, ... }:
|
2019-11-23 23:55:26 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
|
|
|
./linode.nix
|
2020-02-02 08:03:54 +00:00
|
|
|
<nixpkgs/nixos/modules/profiles/headless.nix>
|
2020-02-08 09:38:20 +00:00
|
|
|
|
|
|
|
./modules/networked-docker-containers.nix
|
2020-02-08 12:27:41 +00:00
|
|
|
|
|
|
|
# FIXME: It'd be much nicer if these were imported further down,
|
|
|
|
# and set inside the docker-containers set, instead of setting the
|
|
|
|
# docker-containers set here.
|
|
|
|
./services/nginx.nix
|
2020-07-12 18:32:19 +01:00
|
|
|
./services/gitea.nix
|
2020-02-08 12:30:01 +00:00
|
|
|
./services/nextcloud.nix
|
2020-07-12 00:01:10 +01:00
|
|
|
./services/tlaternet.nix
|
2019-11-23 23:55:26 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
networking = {
|
2020-07-08 18:58:23 +01:00
|
|
|
hostName = "tlaternet";
|
2019-11-23 23:55:26 +00:00
|
|
|
|
|
|
|
# useDHCP is deprecated
|
|
|
|
useDHCP = false;
|
2019-11-26 23:05:44 +00:00
|
|
|
interfaces.eth0.useDHCP = true;
|
2019-11-26 23:06:50 +00:00
|
|
|
|
|
|
|
firewall = {
|
|
|
|
enable = true;
|
|
|
|
allowedTCPPorts = [
|
|
|
|
80
|
|
|
|
443
|
|
|
|
2222
|
2020-07-12 18:32:19 +01:00
|
|
|
2221
|
2019-11-26 23:06:50 +00:00
|
|
|
];
|
|
|
|
};
|
2019-11-23 23:55:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
time.timeZone = "Europe/London";
|
|
|
|
|
|
|
|
users.users = {
|
|
|
|
tlater = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" "docker" ];
|
2020-02-02 07:46:57 +00:00
|
|
|
openssh.authorizedKeys.keyFiles = [ ./keys/tlater.pub ];
|
2019-11-23 23:55:26 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
openssh = {
|
|
|
|
enable = true;
|
|
|
|
allowSFTP = false;
|
|
|
|
passwordAuthentication = false;
|
|
|
|
permitRootLogin = "no";
|
|
|
|
ports = [ 2222 ];
|
|
|
|
startWhenNeeded = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-11-26 23:06:50 +00:00
|
|
|
virtualisation.docker = {
|
|
|
|
enable = true;
|
|
|
|
autoPrune.enable = true;
|
|
|
|
};
|
|
|
|
|
2019-11-23 23:55:26 +00:00
|
|
|
system.stateVersion = "19.09";
|
|
|
|
}
|