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
|
2016-04-08 01:53:34 +00:00
|
|
|
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;
|
2018-12-03 08:20:48 +00:00
|
|
|
allDisks = [ "/dev/sda" "/dev/sdb" ];
|
2015-10-28 14:06:41 +00:00
|
|
|
in {
|
|
|
|
imports = [
|
2017-07-15 17:01:02 +00:00
|
|
|
<stockholm/makefu>
|
2018-06-17 20:54:59 +00:00
|
|
|
./hardware-config.nix
|
2018-11-05 15:22:39 +00:00
|
|
|
{
|
|
|
|
users.users.lass = {
|
2018-12-03 08:20:48 +00:00
|
|
|
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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
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>
|
|
|
|
<stockholm/makefu/2configs/stats/netdata-server.nix>
|
|
|
|
|
2017-07-15 17:01:02 +00:00
|
|
|
<stockholm/makefu/2configs/headless.nix>
|
2018-12-03 08:20:48 +00:00
|
|
|
<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
|
2017-07-15 17:01:02 +00:00
|
|
|
<stockholm/makefu/2configs/sshd-totp.nix>
|
2017-06-30 21:49:05 +00:00
|
|
|
|
2017-05-02 12:03:25 +00:00
|
|
|
# Tools
|
2017-07-15 17:01:02 +00:00
|
|
|
<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/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 =
|
|
|
|
[
|
|
|
|
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>
|
2019-09-25 13:11:14 +00:00
|
|
|
# <stockholm/makefu/2configs/shack/events-publisher>
|
2018-11-05 15:22:39 +00:00
|
|
|
<stockholm/makefu/2configs/shack/gitlab-runner>
|
|
|
|
<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>
|
2018-11-05 15:22:39 +00:00
|
|
|
<stockholm/makefu/2configs/mail/mail.euer.nix>
|
2019-09-25 13:11:14 +00:00
|
|
|
{ krebs.exim.enable = mkForce false; }
|
2018-11-05 15:22:39 +00:00
|
|
|
|
|
|
|
# sharing
|
2017-07-15 17:01:02 +00:00
|
|
|
<stockholm/makefu/2configs/share/gum.nix>
|
2017-09-29 19:37:24 +00:00
|
|
|
<stockholm/makefu/2configs/torrent.nix>
|
2019-09-25 13:11:14 +00:00
|
|
|
<stockholm/makefu/2configs/sickbeard>
|
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>
|
2017-09-04 08:11:32 +00:00
|
|
|
<stockholm/makefu/2configs/dnscrypt/server.nix>
|
2018-11-05 15:22:39 +00:00
|
|
|
<stockholm/makefu/2configs/binary-cache/server.nix>
|
|
|
|
<stockholm/makefu/2configs/backup/server.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
|
|
|
|
2018-11-05 15:22:39 +00:00
|
|
|
# Removed until move: no extra mails
|
|
|
|
<stockholm/makefu/2configs/urlwatch>
|
|
|
|
# Removed until move: avoid letsencrypt ban
|
|
|
|
### Web
|
2018-10-21 21:33:33 +00:00
|
|
|
#<stockholm/makefu/2configs/nginx/share-download.nix>
|
|
|
|
#<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
|
|
|
|
2018-11-05 15:22:39 +00:00
|
|
|
<stockholm/makefu/2configs/deployment/photostore.krebsco.de.nix>
|
|
|
|
<stockholm/makefu/2configs/deployment/graphs.nix>
|
|
|
|
<stockholm/makefu/2configs/deployment/owncloud.nix>
|
|
|
|
<stockholm/makefu/2configs/deployment/boot-euer.nix>
|
2019-09-25 13:11:14 +00:00
|
|
|
<stockholm/makefu/2configs/shiori.nix>
|
|
|
|
|
2018-12-03 08:20:48 +00:00
|
|
|
<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>
|
2018-06-17 20:54:59 +00:00
|
|
|
|
2017-07-15 17:01:02 +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>
|
2019-09-25 13:11:14 +00:00
|
|
|
{ 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>
|
2017-12-08 12:38:57 +00:00
|
|
|
<stockholm/makefu/2configs/virtualisation/docker.nix>
|
2018-11-05 15:22:39 +00:00
|
|
|
<stockholm/makefu/2configs/virtualisation/libvirt.nix>
|
2017-12-08 12:38:57 +00:00
|
|
|
|
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";
|
2015-11-27 22:10:44 +00:00
|
|
|
|
2019-06-17 05:55:30 +00:00
|
|
|
services.openssh.hostKeys = lib.mkForce [
|
2017-12-08 12:38:57 +00:00
|
|
|
{ bits = 4096; path = (toString <secrets/ssh_host_rsa_key>); type = "rsa"; }
|
|
|
|
{ path = (toString <secrets/ssh_host_ed25519_key>); type = "ed25519"; } ];
|
2015-11-27 22:10:44 +00:00
|
|
|
###### stable
|
2019-06-17 05:55:30 +00:00
|
|
|
|
|
|
|
services.nginx.virtualHosts."cgit.euer.krebsco.de" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations."/".proxyPass = "http://cgit.gum.r";
|
|
|
|
};
|
|
|
|
|
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 = {
|
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
|
|
|
}
|