2021-11-22 13:00:07 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
2021-11-22 14:12:43 +00:00
|
|
|
imports =
|
|
|
|
[
|
|
|
|
./hardware-configuration.nix
|
|
|
|
../../common/services/ssh.nix
|
|
|
|
../../common/services/acme.nix
|
|
|
|
./services/nginx.nix
|
|
|
|
./services/mail.nix
|
2021-11-26 13:45:04 +00:00
|
|
|
./services/tor.nix
|
2022-02-14 20:30:24 +00:00
|
|
|
./services/vaultwarden.nix
|
|
|
|
./services/duplicity.nix
|
2021-11-22 14:12:43 +00:00
|
|
|
./data/secrets/secrets.nix
|
2021-11-22 13:00:07 +00:00
|
|
|
];
|
|
|
|
|
2021-11-22 14:12:43 +00:00
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
boot.loader.grub.version = 2;
|
|
|
|
boot.loader.grub.device = "/dev/sda";
|
|
|
|
boot.supportedFilesystems = ["zfs"];
|
|
|
|
services.zfs.autoSnapshot.enable = true;
|
|
|
|
services.zfs.autoScrub.enable = true;
|
2021-11-22 13:00:07 +00:00
|
|
|
|
2021-11-22 14:12:43 +00:00
|
|
|
networking.hostName = "capetillo"; # Define your hostname.
|
|
|
|
networking.hostId = "17a9ec46";
|
|
|
|
time.timeZone = "Europe/Copenhagen";
|
|
|
|
networking.useDHCP = false;
|
|
|
|
networking.interfaces.ens3.useDHCP = true;
|
|
|
|
networking.interfaces.ens3.ipv6.addresses = [ { address = "2a01:4f9:c011:50e2::1"; prefixLength = 64; } ];
|
|
|
|
networking.defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
|
2021-11-22 13:00:07 +00:00
|
|
|
|
2021-11-22 14:12:43 +00:00
|
|
|
users.users.emelie = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICO4LyBsW1YuUA6i3EL/IZhchSvk7reO4qgRmR/tdQPU emelie@flap"
|
|
|
|
];
|
|
|
|
};
|
2021-11-22 13:00:07 +00:00
|
|
|
|
2021-11-23 10:40:34 +00:00
|
|
|
users.users.deploy-nix = {
|
2021-11-22 14:12:43 +00:00
|
|
|
isNormalUser = true;
|
2021-11-22 13:00:07 +00:00
|
|
|
extraGroups = [ "wheel" ];
|
2021-11-22 14:12:43 +00:00
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICO4LyBsW1YuUA6i3EL/IZhchSvk7reO4qgRmR/tdQPU emelie@flap"
|
|
|
|
];
|
|
|
|
};
|
2021-11-22 13:00:07 +00:00
|
|
|
|
2021-11-23 10:40:34 +00:00
|
|
|
users.users.deploy-web = {
|
|
|
|
isNormalUser = true;
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILk4m1uJzxd7pDmMZgnZxqD6lEIfVPf+I4tKPo0jJJrK deploy@drone.data.coop"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-02-14 20:30:24 +00:00
|
|
|
users.groups.backup.members = [ "virtualMail" "vaultwarden" ];
|
2021-11-23 10:40:34 +00:00
|
|
|
users.groups.nginx.members = [ "deploy-web" ];
|
2021-11-22 13:00:07 +00:00
|
|
|
|
2021-11-22 14:12:43 +00:00
|
|
|
security.sudo.wheelNeedsPassword = false;
|
2021-11-22 13:00:07 +00:00
|
|
|
|
2021-11-22 14:12:43 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
vim
|
|
|
|
htop
|
2021-11-22 13:00:07 +00:00
|
|
|
iotop
|
|
|
|
dig
|
2021-11-22 14:12:43 +00:00
|
|
|
];
|
2021-11-22 13:00:07 +00:00
|
|
|
|
2021-11-22 14:12:43 +00:00
|
|
|
nix.trustedUsers = [
|
|
|
|
"root"
|
|
|
|
"@wheel"
|
|
|
|
];
|
2021-11-22 13:00:07 +00:00
|
|
|
|
2021-11-22 14:12:43 +00:00
|
|
|
services.openssh.enable = true;
|
2021-11-22 13:00:07 +00:00
|
|
|
|
2021-11-22 14:12:43 +00:00
|
|
|
networking.firewall.allowedTCPPorts = [ 22 80 193 443 465 587 993 ];
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
2021-11-22 13:00:07 +00:00
|
|
|
|
|
|
|
|
2021-11-22 14:12:43 +00:00
|
|
|
system.stateVersion = "21.05";
|
2021-11-22 13:00:07 +00:00
|
|
|
|
|
|
|
}
|