2020-10-31 20:51:25 +01:00
|
|
|
|
{
|
2023-07-04 16:28:26 +02:00
|
|
|
|
lib,
|
2022-03-10 21:52:12 +01:00
|
|
|
|
config,
|
|
|
|
|
|
pkgs,
|
|
|
|
|
|
...
|
|
|
|
|
|
}: let
|
2023-02-22 10:02:55 +01:00
|
|
|
|
inherit (import ../../lib) kieran retiolumAddresses restic;
|
2022-03-10 21:52:12 +01:00
|
|
|
|
in {
|
2020-10-31 20:51:25 +01:00
|
|
|
|
imports = [
|
2021-12-29 18:49:51 +01:00
|
|
|
|
./gitea.nix
|
2020-10-31 20:51:25 +01:00
|
|
|
|
./hardware-configuration.nix
|
2021-12-29 18:49:51 +01:00
|
|
|
|
./hedgedoc.nix
|
|
|
|
|
|
./menstruation.nix
|
2022-02-07 11:31:48 +01:00
|
|
|
|
./moinbot.nix
|
2021-12-29 18:49:51 +01:00
|
|
|
|
./monitoring
|
|
|
|
|
|
./names.nix
|
|
|
|
|
|
./nextcloud.nix
|
2022-02-22 20:34:53 +01:00
|
|
|
|
./radio-news.nix
|
2024-09-08 19:14:30 +02:00
|
|
|
|
./scrabble.nix
|
2024-09-11 10:17:46 +02:00
|
|
|
|
./onlyoffice.nix
|
2021-12-29 18:49:51 +01:00
|
|
|
|
./retiolum-map.nix
|
|
|
|
|
|
./tarot.nix
|
2022-11-29 13:55:56 +01:00
|
|
|
|
./tt-rss.nix
|
2021-12-29 18:49:51 +01:00
|
|
|
|
./weechat.nix
|
2023-02-22 10:02:55 +01:00
|
|
|
|
../../configs/monitoring.nix
|
|
|
|
|
|
../../configs/nix.nix
|
2023-03-20 12:25:43 +01:00
|
|
|
|
../../configs/tor.nix
|
2023-02-22 10:02:55 +01:00
|
|
|
|
../../configs/save-space.nix
|
|
|
|
|
|
../../configs/retiolum.nix
|
|
|
|
|
|
../../configs/spacetime.nix
|
|
|
|
|
|
../../configs/sshd.nix
|
2024-10-08 18:51:43 +02:00
|
|
|
|
../../configs/bots
|
2024-01-09 08:00:33 +01:00
|
|
|
|
../../configs/admin-essentials.nix
|
2020-10-31 20:51:25 +01:00
|
|
|
|
];
|
|
|
|
|
|
|
2022-01-18 23:28:53 +01:00
|
|
|
|
services.restic.backups.niveum = {
|
|
|
|
|
|
initialize = true;
|
|
|
|
|
|
inherit (restic) repository;
|
2022-03-10 21:52:12 +01:00
|
|
|
|
timerConfig = {
|
|
|
|
|
|
OnCalendar = "daily";
|
|
|
|
|
|
RandomizedDelaySec = "1h";
|
|
|
|
|
|
};
|
2023-02-22 10:02:55 +01:00
|
|
|
|
passwordFile = config.age.secrets.restic.path;
|
2022-01-18 23:28:53 +01:00
|
|
|
|
paths = [
|
2022-12-03 08:25:47 +01:00
|
|
|
|
config.services.postgresqlBackup.location
|
2023-02-23 16:53:53 +01:00
|
|
|
|
config.services.nextcloud.home
|
|
|
|
|
|
config.services.grafana.dataDir
|
|
|
|
|
|
config.services.gitea.stateDir
|
|
|
|
|
|
config.services.weechat.root
|
2023-07-20 20:46:40 +02:00
|
|
|
|
config.services.nginx.virtualHosts."www.kmein.de".root
|
2022-01-18 23:28:53 +01:00
|
|
|
|
"/var/lib/weechat"
|
2023-02-23 16:53:53 +01:00
|
|
|
|
"/var/lib/codimd"
|
2022-01-18 23:28:53 +01:00
|
|
|
|
];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2022-05-22 11:47:59 +02:00
|
|
|
|
niveum.passport = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
introductionHTML = ''
|
|
|
|
|
|
<p>
|
|
|
|
|
|
The machine <tt>makanek</tt> is named after a Levantine type of <a href="https://en.wikipedia.org/wiki/Makanek">sausage</a> (مقانق <i>maqāniq</i>).
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<p>
|
|
|
|
|
|
It runs on <a href="https://www.hetzner.com/cloud">Hetzner cloud</a>.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<figure>
|
|
|
|
|
|
<img width="200" src="https://www.albawaba.com/sites/default/files/2019-08/makanek-BeFunky-project.jpg" alt="Makanek sausages"/>
|
|
|
|
|
|
<figcaption>Makanek</figcaption>
|
|
|
|
|
|
</figure>
|
|
|
|
|
|
'';
|
|
|
|
|
|
virtualHost = "makanek.r";
|
|
|
|
|
|
|
|
|
|
|
|
services = [
|
|
|
|
|
|
{
|
|
|
|
|
|
title = "restic backup";
|
|
|
|
|
|
description = "This machine backups its state via restic backup.";
|
|
|
|
|
|
}
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2021-12-29 18:49:51 +01:00
|
|
|
|
networking = {
|
2022-03-10 21:52:12 +01:00
|
|
|
|
firewall.allowedTCPPorts = [80 443];
|
2021-12-29 18:49:51 +01:00
|
|
|
|
hostName = "makanek";
|
|
|
|
|
|
interfaces.ens3.useDHCP = true;
|
|
|
|
|
|
retiolum = retiolumAddresses.makanek;
|
|
|
|
|
|
useDHCP = false;
|
2021-05-30 12:57:37 +02:00
|
|
|
|
};
|
2021-01-31 10:08:09 +01:00
|
|
|
|
|
2023-02-22 10:02:55 +01:00
|
|
|
|
age.secrets = {
|
2023-02-28 16:45:20 +01:00
|
|
|
|
retiolum-rsa = {
|
2023-07-04 16:28:26 +02:00
|
|
|
|
file = ../../secrets/makanek-retiolum-privateKey-rsa.age;
|
2023-02-28 16:45:20 +01:00
|
|
|
|
mode = "400";
|
2024-06-03 07:27:01 +02:00
|
|
|
|
owner = "tinc-retiolum";
|
|
|
|
|
|
group = "tinc-retiolum";
|
2023-02-28 16:45:20 +01:00
|
|
|
|
};
|
|
|
|
|
|
retiolum-ed25519 = {
|
2023-07-04 16:28:26 +02:00
|
|
|
|
file = ../../secrets/makanek-retiolum-privateKey-ed25519.age;
|
2023-02-28 16:45:20 +01:00
|
|
|
|
mode = "400";
|
2024-06-03 07:27:01 +02:00
|
|
|
|
owner = "tinc-retiolum";
|
|
|
|
|
|
group = "tinc-retiolum";
|
2023-02-28 16:45:20 +01:00
|
|
|
|
};
|
2023-07-04 16:28:26 +02:00
|
|
|
|
restic.file = ../../secrets/restic.age;
|
2023-02-22 10:02:55 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
2020-10-31 20:51:25 +01:00
|
|
|
|
system.stateVersion = "20.03";
|
|
|
|
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
|
|
recommendedTlsSettings = true;
|
2021-12-29 18:49:51 +01:00
|
|
|
|
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
2020-10-31 20:51:25 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
security.acme = {
|
|
|
|
|
|
acceptTerms = true;
|
2022-07-19 21:33:45 +02:00
|
|
|
|
defaults.email = kieran.email;
|
2020-10-31 20:51:25 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
2023-07-20 19:32:26 +02:00
|
|
|
|
services.nginx.virtualHosts."www.kmein.de" = {
|
|
|
|
|
|
addSSL = true;
|
|
|
|
|
|
enableACME = true;
|
|
|
|
|
|
root = "/var/www/kmein.de";
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2022-08-23 19:02:28 +02:00
|
|
|
|
environment.systemPackages = [
|
|
|
|
|
|
pkgs.vim
|
|
|
|
|
|
pkgs.git
|
|
|
|
|
|
pkgs.tmux
|
|
|
|
|
|
pkgs.python3
|
|
|
|
|
|
pkgs.nix-output-monitor
|
|
|
|
|
|
];
|
2020-10-31 20:51:25 +01:00
|
|
|
|
}
|