75 lines
1.4 KiB
Nix
75 lines
1.4 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
./linode.nix
|
|
<nixpkgs/nixos/modules/profiles/headless.nix>
|
|
|
|
./modules/networked-docker-containers.nix
|
|
|
|
# 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
|
|
];
|
|
|
|
networking = {
|
|
hostName = "tlater.net";
|
|
|
|
# useDHCP is deprecated
|
|
useDHCP = false;
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
firewall = {
|
|
enable = true;
|
|
allowedTCPPorts = [
|
|
80
|
|
443
|
|
2222
|
|
3022
|
|
];
|
|
};
|
|
};
|
|
|
|
time.timeZone = "Europe/London";
|
|
|
|
users.users = {
|
|
tlater = {
|
|
isNormalUser = true;
|
|
extraGroups = [ "wheel" "docker" ];
|
|
openssh.authorizedKeys.keyFiles = [ ./keys/tlater.pub ];
|
|
};
|
|
|
|
lauren = {
|
|
isNormalUser = true;
|
|
openssh.authorizedKeys.keyFiles = [ ./keys/lauren.pub ];
|
|
};
|
|
};
|
|
|
|
services = {
|
|
openssh = {
|
|
enable = true;
|
|
allowSFTP = false;
|
|
passwordAuthentication = false;
|
|
permitRootLogin = "no";
|
|
ports = [ 2222 ];
|
|
startWhenNeeded = true;
|
|
};
|
|
};
|
|
|
|
virtualisation.docker = {
|
|
enable = true;
|
|
autoPrune.enable = true;
|
|
};
|
|
|
|
docker-containers = {
|
|
## Actual service definitions
|
|
gitlab = import ./services/gitlab.nix;
|
|
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "19.09";
|
|
}
|