stockholm/makefu/1systems/gum/config.nix

226 lines
7.8 KiB
Nix
Raw Normal View History

2015-10-28 14:06:41 +00:00
{ config, lib, pkgs, ... }:
2016-10-20 18:54:38 +00:00
with import <stockholm/lib>;
2015-10-28 14:06:41 +00:00
let
external-ip = config.krebs.build.host.nets.internet.ip4.addr;
2018-06-17 20:54:59 +00:00
ext-if = config.makefu.server.primary-itf;
allDisks = [ "/dev/sda" "/dev/sdb" ];
2015-10-28 14:06:41 +00:00
in {
imports = [
<stockholm/makefu>
2018-06-17 20:54:59 +00:00
./hardware-config.nix
2018-11-05 15:22:39 +00:00
{
users.users.lass = {
uid = 19002;
2018-11-05 15:22:39 +00:00
isNormalUser = true;
createHome = true;
useDefaultShell = true;
openssh.authorizedKeys.keys = with config.krebs.users; [
lass.pubkey
makefu.pubkey
];
};
}
2020-03-13 09:47:21 +00:00
<stockholm/makefu/2configs/nur.nix>
2018-12-17 11:33:57 +00:00
<stockholm/makefu/2configs/support-nixos.nix>
2019-01-03 22:56:59 +00:00
<stockholm/makefu/2configs/home-manager>
<stockholm/makefu/2configs/home-manager/cli.nix>
2018-12-12 17:41:51 +00:00
# <stockholm/makefu/2configs/stats/client.nix>
2020-03-13 09:47:21 +00:00
# <stockholm/makefu/2configs/stats/netdata-server.nix>
2018-12-12 17:41:51 +00:00
<stockholm/makefu/2configs/headless.nix>
<stockholm/makefu/2configs/smart-monitor.nix>
2018-12-12 17:41:51 +00:00
{ services.smartd.devices = builtins.map (x: { device = x; }) allDisks; }
2017-11-02 13:27:55 +00:00
2017-06-30 21:49:05 +00:00
# Security
<stockholm/makefu/2configs/sshd-totp.nix>
2017-06-30 21:49:05 +00:00
2017-05-02 12:03:25 +00:00
# Tools
<stockholm/makefu/2configs/tools/core.nix>
<stockholm/makefu/2configs/tools/dev.nix>
<stockholm/makefu/2configs/tools/sec.nix>
2018-12-12 17:41:51 +00:00
<stockholm/makefu/2configs/tools/desktop.nix>
2017-07-21 08:48:29 +00:00
<stockholm/makefu/2configs/zsh-user.nix>
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/mosh.nix>
<stockholm/makefu/2configs/storj/forward-port.nix>
2018-11-05 15:22:39 +00:00
# <stockholm/makefu/2configs/gui/xpra.nix>
# networking
<stockholm/makefu/2configs/vpn/openvpn-server.nix>
# <stockholm/makefu/2configs/vpn/vpnws/server.nix>
#<stockholm/makefu/2configs/dnscrypt/server.nix>
<stockholm/makefu/2configs/iodined.nix>
# <stockholm/makefu/2configs/backup.nix>
<stockholm/makefu/2configs/tinc/retiolum.nix>
2018-12-12 17:41:51 +00:00
{ # bonus retiolum config for connecting more hosts
krebs.tinc.retiolum = {
extraConfig = ''
ListenAddress = ${external-ip} 53
ListenAddress = ${external-ip} 655
ListenAddress = ${external-ip} 21031
'';
connectTo = [
"prism" "ni" "enklave" "eve" "archprism"
];
};
networking.firewall = {
allowedTCPPorts =
2021-01-27 22:00:02 +00:00
[
2018-12-12 17:41:51 +00:00
53
655
21031
];
allowedUDPPorts =
[
53
655
21031
];
};
}
2018-11-05 15:22:39 +00:00
# ci
# <stockholm/makefu/2configs/exim-retiolum.nix>
<stockholm/makefu/2configs/git/cgit-retiolum.nix>
2020-11-17 19:07:20 +00:00
2021-01-27 22:00:02 +00:00
### systemdUltras ###
<stockholm/makefu/2configs/systemdultras/ircbot.nix>
2020-11-17 19:07:20 +00:00
###### Shack #####
# <stockholm/makefu/2configs/shack/events-publisher>
2020-11-17 19:07:20 +00:00
# <stockholm/makefu/2configs/shack/gitlab-runner>
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/remote-build/slave.nix>
2019-02-05 21:32:53 +00:00
<stockholm/makefu/2configs/remote-build/aarch64-community.nix>
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/taskd.nix>
2017-05-02 12:03:25 +00:00
2017-02-04 13:35:29 +00:00
# services
2018-12-12 17:41:51 +00:00
# <stockholm/makefu/2configs/sabnzbd.nix>
2020-03-13 09:47:21 +00:00
# <stockholm/makefu/2configs/mail/mail.euer.nix>
{ krebs.exim.enable = mkDefault true; }
2018-11-05 15:22:39 +00:00
# sharing
2021-01-27 22:00:02 +00:00
<stockholm/makefu/2configs/share/gum.nix> # samba sahre
<stockholm/makefu/2configs/torrent.nix>
2021-04-04 06:43:55 +00:00
# <stockholm/makefu/2configs/sickbeard>
<stockholm/makefu/2configs/bitwarden.nix>
2019-09-24 16:39:03 +00:00
2019-06-17 05:55:30 +00:00
{ nixpkgs.config.allowUnfree = true; }
2018-11-05 15:22:39 +00:00
#<stockholm/makefu/2configs/retroshare.nix>
## <stockholm/makefu/2configs/ipfs.nix>
#<stockholm/makefu/2configs/syncthing.nix>
# <stockholm/makefu/2configs/opentracker.nix>
2017-12-28 15:03:38 +00:00
2019-09-24 16:39:03 +00:00
2018-11-05 15:22:39 +00:00
## network
2017-08-16 10:09:18 +00:00
<stockholm/makefu/2configs/vpn/openvpn-server.nix>
2018-03-28 09:06:40 +00:00
# <stockholm/makefu/2configs/vpn/vpnws/server.nix>
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/binary-cache/server.nix>
2021-04-04 06:43:55 +00:00
{ makefu.backup.server.repo = "/var/backup/borg"; }
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/backup/server.nix>
2021-04-04 06:43:55 +00:00
<stockholm/makefu/2configs/backup/state.nix>
2017-12-28 15:03:38 +00:00
<stockholm/makefu/2configs/iodined.nix>
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/bitlbee.nix>
<stockholm/makefu/2configs/wireguard/server.nix>
2019-06-17 05:55:30 +00:00
<stockholm/makefu/2configs/wireguard/wiregrill.nix>
2017-12-28 15:03:38 +00:00
2021-06-05 12:58:56 +00:00
{ # recent changes mediawiki bot
networking.firewall.allowedUDPPorts = [ 5005 5006 ];
}
2018-11-05 15:22:39 +00:00
# Removed until move: no extra mails
2020-07-02 06:30:05 +00:00
# <stockholm/makefu/2configs/urlwatch>
2018-11-05 15:22:39 +00:00
# Removed until move: avoid letsencrypt ban
### Web
2020-03-13 09:47:21 +00:00
<stockholm/makefu/2configs/nginx/dl.euer.krebsco.de.nix>
2018-10-21 21:33:33 +00:00
#<stockholm/makefu/2configs/nginx/euer.test.nix>
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/nginx/euer.mon.nix>
<stockholm/makefu/2configs/nginx/euer.wiki.nix>
<stockholm/makefu/2configs/nginx/euer.blog.nix>
2018-10-21 21:33:33 +00:00
## <stockholm/makefu/2configs/nginx/gum.krebsco.de.nix>
#<stockholm/makefu/2configs/nginx/public_html.nix>
#<stockholm/makefu/2configs/nginx/update.connector.one.nix>
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/nginx/misa-felix-hochzeit.ml.nix>
2018-12-12 17:41:51 +00:00
# <stockholm/makefu/2configs/nginx/gold.krebsco.de.nix>
2019-01-11 13:28:38 +00:00
# <stockholm/makefu/2configs/nginx/iso.euer.nix>
2017-02-04 13:35:29 +00:00
2020-03-13 09:47:21 +00:00
# <stockholm/makefu/2configs/deployment/photostore.krebsco.de.nix>
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/deployment/graphs.nix>
<stockholm/makefu/2configs/deployment/owncloud.nix>
2020-03-13 09:47:21 +00:00
<stockholm/makefu/2configs/deployment/board.euer.krebsco.de.nix>
<stockholm/makefu/2configs/deployment/rss.euer.krebsco.de.nix>
2020-07-02 06:31:19 +00:00
#<stockholm/makefu/2configs/deployment/feed.euer.krebsco.de>
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/deployment/boot-euer.nix>
2020-03-13 09:47:21 +00:00
<stockholm/makefu/2configs/deployment/gecloudpad>
<stockholm/makefu/2configs/deployment/docker/archiveteam-warrior.nix>
2021-03-12 19:26:27 +00:00
<stockholm/makefu/2configs/bgt/etherpad.euer.krebsco.de.nix>
2021-01-27 22:00:02 +00:00
# <stockholm/makefu/2configs/deployment/systemdultras-rss.nix>
<stockholm/makefu/2configs/shiori.nix>
2021-01-27 22:00:02 +00:00
<stockholm/makefu/2configs/workadventure>
<stockholm/makefu/2configs/bgt/download.binaergewitter.de.nix>
<stockholm/makefu/2configs/bgt/hidden_service.nix>
2018-12-18 22:24:00 +00:00
<stockholm/makefu/2configs/bgt/backup.nix>
# <stockholm/makefu/2configs/bgt/social-to-irc.nix>
2018-06-17 20:54:59 +00:00
# <stockholm/makefu/2configs/logging/client.nix>
2015-12-29 20:20:36 +00:00
2018-11-05 15:22:39 +00:00
# sharing
<stockholm/makefu/2configs/dcpp/airdcpp.nix>
{ krebs.airdcpp.dcpp.shares = {
download.path = config.makefu.dl-dir + "/finished";
sorted.path = config.makefu.dl-dir + "/sorted";
};
}
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/dcpp/hub.nix>
## Temporary:
2017-11-14 09:17:16 +00:00
# <stockholm/makefu/2configs/temp/rst-issue.nix>
<stockholm/makefu/2configs/virtualisation/docker.nix>
2018-11-05 15:22:39 +00:00
<stockholm/makefu/2configs/virtualisation/libvirt.nix>
2018-11-05 15:22:39 +00:00
# krebs infrastructure services
<stockholm/makefu/2configs/stats/server.nix>
2018-12-12 17:41:51 +00:00
];
2017-02-04 13:35:29 +00:00
makefu.dl-dir = "/var/download";
2019-06-17 05:55:30 +00:00
services.openssh.hostKeys = lib.mkForce [
{ bits = 4096; path = (toString <secrets/ssh_host_rsa_key>); type = "rsa"; }
{ path = (toString <secrets/ssh_host_ed25519_key>); type = "ed25519"; } ];
###### stable
2021-01-27 22:00:02 +00:00
security.acme.certs."cgit.euer.krebsco.de" = {
email = "letsencrypt@syntax-fehler.de";
webroot = "/var/lib/acme/acme-challenge";
group = "nginx";
};
services.nginx.virtualHosts."cgit" = {
serverAliases = [ "cgit.euer.krebsco.de" ];
addSSL = true;
sslCertificate = "/var/lib/acme/cgit.euer.krebsco.de/fullchain.pem";
sslCertificateKey = "/var/lib/acme/cgit.euer.krebsco.de/key.pem";
locations."/.well-known/acme-challenge".extraConfig = ''
root /var/lib/acme/acme-challenge;
'';
2019-06-17 05:55:30 +00:00
};
2015-11-10 17:53:31 +00:00
krebs.build.host = config.krebs.hosts.gum;
2017-02-04 13:35:29 +00:00
2015-11-10 17:53:31 +00:00
# Network
2015-10-28 14:06:41 +00:00
networking = {
2015-11-13 11:24:29 +00:00
firewall = {
allowedTCPPorts = [
80 443
28967 # storj
];
2018-11-05 15:22:39 +00:00
allowPing = true;
logRefusedConnections = false;
2015-11-10 17:53:31 +00:00
};
2018-11-05 15:22:39 +00:00
nameservers = [ "8.8.8.8" ];
};
2018-06-17 20:54:59 +00:00
users.users.makefu.extraGroups = [ "download" "nginx" ];
2018-11-05 15:22:39 +00:00
state = [ "/home/makefu/.weechat" ];
2015-10-28 14:06:41 +00:00
}