2022-05-20 23:04:15 +02:00
|
|
|
{
|
|
|
|
|
lib,
|
|
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}: let
|
2023-02-22 10:02:55 +01:00
|
|
|
inherit (import ../../lib) kieran retiolumAddresses restic;
|
2022-05-20 23:04:15 +02:00
|
|
|
in {
|
|
|
|
|
imports = [
|
|
|
|
|
./hardware-configuration.nix
|
2023-02-16 08:46:18 +01:00
|
|
|
./matomo.nix
|
2023-03-20 13:14:02 +01:00
|
|
|
./radio.nix
|
2023-03-24 17:00:44 +01:00
|
|
|
./panoptikon.nix
|
2023-02-22 10:02:55 +01:00
|
|
|
../../configs/monitoring.nix
|
2023-03-22 07:47:57 +01:00
|
|
|
../../configs/tor.nix
|
2023-02-22 10:02:55 +01:00
|
|
|
../../configs/save-space.nix
|
|
|
|
|
../../configs/spacetime.nix
|
|
|
|
|
../../configs/retiolum.nix
|
|
|
|
|
../../configs/sshd.nix
|
|
|
|
|
../../configs/nix.nix
|
2022-05-20 23:04:15 +02:00
|
|
|
];
|
|
|
|
|
|
2023-03-20 13:14:02 +01:00
|
|
|
niveum.passport = {
|
|
|
|
|
enable = true;
|
|
|
|
|
introductionHTML = ''
|
|
|
|
|
'';
|
|
|
|
|
virtualHost = "ful.r";
|
|
|
|
|
|
|
|
|
|
services = [
|
|
|
|
|
{
|
|
|
|
|
title = "restic backup";
|
|
|
|
|
description = "This machine backups its state via restic backup.";
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2023-02-22 10:02:55 +01:00
|
|
|
age.secrets = {
|
2023-02-28 16:45:20 +01:00
|
|
|
retiolum-rsa = {
|
|
|
|
|
file = ../../secrets/ful-retiolum-privateKey-rsa.age;
|
|
|
|
|
mode = "400";
|
|
|
|
|
owner = "tinc.retiolum";
|
|
|
|
|
group = "tinc.retiolum";
|
|
|
|
|
};
|
|
|
|
|
retiolum-ed25519 = {
|
|
|
|
|
file = ../../secrets/ful-retiolum-privateKey-ed25519.age;
|
|
|
|
|
mode = "400";
|
|
|
|
|
owner = "tinc.retiolum";
|
|
|
|
|
group = "tinc.retiolum";
|
|
|
|
|
};
|
2023-02-22 10:02:55 +01:00
|
|
|
root.file = ../../secrets/ful-root.age;
|
|
|
|
|
restic.file = ../../secrets/restic.age;
|
2023-04-14 08:43:23 +02:00
|
|
|
specus.file = ../../secrets/ful-specus-privateKey.age;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.specus = {
|
|
|
|
|
privateKeyFile = config.age.secrets.specus.path;
|
|
|
|
|
server.enable = true;
|
2023-02-22 10:02:55 +01:00
|
|
|
};
|
|
|
|
|
|
2023-02-16 08:46:18 +01:00
|
|
|
services.restic.backups.niveum = {
|
|
|
|
|
initialize = true;
|
|
|
|
|
inherit (restic) repository;
|
|
|
|
|
timerConfig = {
|
|
|
|
|
OnCalendar = "daily";
|
|
|
|
|
RandomizedDelaySec = "1h";
|
|
|
|
|
};
|
2023-02-22 10:02:55 +01:00
|
|
|
passwordFile = config.age.secrets.restic.path;
|
2023-02-16 08:46:18 +01:00
|
|
|
paths = [
|
|
|
|
|
config.services.mysqlBackup.location
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2022-05-20 23:04:15 +02:00
|
|
|
networking = {
|
|
|
|
|
firewall.allowedTCPPorts = [80 443];
|
|
|
|
|
hostName = "ful";
|
|
|
|
|
interfaces.enp0s3.useDHCP = true;
|
|
|
|
|
retiolum = retiolumAddresses.ful;
|
|
|
|
|
useDHCP = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
system.stateVersion = "21.11";
|
|
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
|
enable = true;
|
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
|
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
security.acme = {
|
|
|
|
|
acceptTerms = true;
|
2022-07-19 21:33:45 +02:00
|
|
|
defaults.email = kieran.email;
|
2022-05-20 23:04:15 +02:00
|
|
|
};
|
|
|
|
|
|
2023-02-22 10:02:55 +01:00
|
|
|
users.users.root.passwordFile = config.age.secrets.root.path;
|
2022-05-21 23:06:49 +02:00
|
|
|
|
2022-05-20 23:04:15 +02:00
|
|
|
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
|
2022-10-06 07:16:45 +02:00
|
|
|
|
|
|
|
|
# since 22.05 timeout fails?
|
|
|
|
|
systemd.services.systemd-networkd-wait-online.enable = false;
|
2022-05-20 23:04:15 +02:00
|
|
|
}
|