1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/systems/makanek/configuration.nix

130 lines
3.1 KiB
Nix
Raw Normal View History

2020-10-31 20:51:25 +01:00
{
2022-03-10 21:52:12 +01:00
lib,
config,
pkgs,
...
}: let
inherit (import ../../lib) kieran retiolumAddresses restic;
2022-03-10 21:52:12 +01:00
in {
2020-10-31 20:51:25 +01:00
imports = [
./gitea.nix
2020-10-31 20:51:25 +01:00
./hardware-configuration.nix
./hedgedoc.nix
./menstruation.nix
2022-02-07 11:31:48 +01:00
./moinbot.nix
./monitoring
./names.nix
./nextcloud.nix
2022-02-22 20:34:53 +01:00
./radio-news.nix
./retiolum-map.nix
./tarot.nix
./tt-rss.nix
./weechat.nix
../../configs/monitoring.nix
../../configs/nix.nix
2023-03-20 12:25:43 +01:00
../../configs/tor.nix
../../configs/save-space.nix
../../configs/retiolum.nix
../../configs/spacetime.nix
../../configs/sshd.nix
../../configs/telegram-bots
2020-10-31 20:51:25 +01:00
];
services.restic.backups.niveum = {
initialize = true;
inherit (restic) repository;
2022-03-10 21:52:12 +01:00
timerConfig = {
OnCalendar = "daily";
RandomizedDelaySec = "1h";
};
passwordFile = config.age.secrets.restic.path;
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
"/var/lib/weechat"
2023-02-23 16:53:53 +01:00
"/var/lib/codimd"
];
};
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.";
}
];
};
networking = {
2022-03-10 21:52:12 +01:00
firewall.allowedTCPPorts = [80 443];
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
age.secrets = {
2023-02-28 16:45:20 +01:00
retiolum-rsa = {
file = ../../secrets/makanek-retiolum-privateKey-rsa.age;
mode = "400";
owner = "tinc.retiolum";
group = "tinc.retiolum";
};
retiolum-ed25519 = {
file = ../../secrets/makanek-retiolum-privateKey-ed25519.age;
mode = "400";
owner = "tinc.retiolum";
group = "tinc.retiolum";
};
restic.file = ../../secrets/restic.age;
2023-04-14 08:43:23 +02:00
specus.file = ../../secrets/makanek-specus-privateKey.age;
};
services.specus = {
privateKeyFile = config.age.secrets.specus.path;
server.enable = true;
};
2020-10-31 20:51:25 +01:00
system.stateVersion = "20.03";
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
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
};
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
}