2020-10-31 20:51:25 +01:00
|
|
|
|
{
|
2022-03-10 21:52:12 +01:00
|
|
|
|
lib,
|
|
|
|
|
|
config,
|
|
|
|
|
|
pkgs,
|
|
|
|
|
|
...
|
|
|
|
|
|
}: let
|
|
|
|
|
|
inherit (import <niveum/lib>) kieran retiolumAddresses restic;
|
|
|
|
|
|
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
|
|
|
|
|
|
./matterbridge.nix
|
|
|
|
|
|
./menstruation.nix
|
2022-02-07 11:31:48 +01:00
|
|
|
|
./moinbot.nix
|
2022-02-25 07:08:50 +01:00
|
|
|
|
# ./horoscopy.nix
|
2021-12-29 18:49:51 +01:00
|
|
|
|
./monitoring
|
|
|
|
|
|
./moodle-dl-borsfaye.nix
|
|
|
|
|
|
./names.nix
|
|
|
|
|
|
./nextcloud.nix
|
2022-02-22 20:34:53 +01:00
|
|
|
|
./radio-news.nix
|
2022-02-08 19:21:03 +01:00
|
|
|
|
./radio.nix
|
2021-12-29 18:49:51 +01:00
|
|
|
|
./retiolum-map.nix
|
|
|
|
|
|
./tarot.nix
|
|
|
|
|
|
./urlwatch.nix
|
|
|
|
|
|
./weechat.nix
|
|
|
|
|
|
<niveum/configs/monitoring.nix>
|
|
|
|
|
|
<niveum/configs/nix.nix>
|
|
|
|
|
|
<niveum/configs/save-space.nix>
|
2020-10-31 20:51:25 +01:00
|
|
|
|
<niveum/configs/spacetime.nix>
|
|
|
|
|
|
<niveum/configs/sshd.nix>
|
2021-02-06 11:54:06 +01:00
|
|
|
|
<niveum/configs/telegram-bots>
|
2020-10-31 20:51:25 +01:00
|
|
|
|
<niveum/modules/retiolum.nix>
|
2022-05-22 11:47:59 +02:00
|
|
|
|
<niveum/modules/passport.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";
|
|
|
|
|
|
};
|
2022-01-18 23:28:53 +01:00
|
|
|
|
passwordFile = toString <secrets/restic/password>;
|
|
|
|
|
|
paths = [
|
|
|
|
|
|
"/var/lib/codimd"
|
|
|
|
|
|
"/var/lib/postgresql"
|
|
|
|
|
|
"/var/lib/weechat"
|
|
|
|
|
|
"/var/lib/nextcloud"
|
|
|
|
|
|
"/var/lib/grafana"
|
|
|
|
|
|
"/var/lib/gitea"
|
2022-01-19 08:32:44 +01:00
|
|
|
|
"/var/lib/redis"
|
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.";
|
|
|
|
|
|
}
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2022-03-10 21:52:12 +01:00
|
|
|
|
nix.nixPath = ["/var/src"];
|
2022-02-15 22:16:50 +01:00
|
|
|
|
|
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
|
|
|
|
|
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;
|
|
|
|
|
|
email = kieran.email;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2022-03-10 21:52:12 +01:00
|
|
|
|
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
|
2020-10-31 20:51:25 +01:00
|
|
|
|
}
|