nixos-config/1systems/gum/config.nix

199 lines
6.6 KiB
Nix
Raw Normal View History

2015-10-28 15:06:41 +01:00
{ config, lib, pkgs, ... }:
2016-10-20 20:54:38 +02:00
with import <stockholm/lib>;
2015-10-28 15:06:41 +01:00
let
external-ip = config.krebs.build.host.nets.internet.ip4.addr;
2018-06-17 22:54:59 +02:00
ext-if = config.makefu.server.primary-itf;
allDisks = [ "/dev/sda" "/dev/sdb" ];
2015-10-28 15:06:41 +01:00
in {
imports = [
<stockholm/makefu>
2018-06-17 22:54:59 +02:00
./hardware-config.nix
2018-11-05 16:22:39 +01:00
{
users.users.lass = {
uid = 19002;
2018-11-05 16:22:39 +01:00
isNormalUser = true;
createHome = true;
useDefaultShell = true;
openssh.authorizedKeys.keys = with config.krebs.users; [
lass.pubkey
makefu.pubkey
];
};
}
2018-12-17 12:33:57 +01:00
<stockholm/makefu/2configs/support-nixos.nix>
2019-01-03 23:56:59 +01:00
<stockholm/makefu/2configs/home-manager>
<stockholm/makefu/2configs/home-manager/cli.nix>
2018-12-12 18:41:51 +01:00
# <stockholm/makefu/2configs/stats/client.nix>
<stockholm/makefu/2configs/stats/netdata-server.nix>
<stockholm/makefu/2configs/headless.nix>
<stockholm/makefu/2configs/smart-monitor.nix>
2018-12-12 18:41:51 +01:00
{ services.smartd.devices = builtins.map (x: { device = x; }) allDisks; }
2017-11-02 14:27:55 +01:00
2017-06-30 23:49:05 +02:00
# Security
<stockholm/makefu/2configs/sshd-totp.nix>
2017-06-30 23:49:05 +02:00
2017-05-02 14:03:25 +02:00
# Tools
<stockholm/makefu/2configs/tools/core.nix>
<stockholm/makefu/2configs/tools/dev.nix>
<stockholm/makefu/2configs/tools/sec.nix>
2018-12-12 18:41:51 +01:00
<stockholm/makefu/2configs/tools/desktop.nix>
2017-07-21 10:48:29 +02:00
<stockholm/makefu/2configs/zsh-user.nix>
2018-11-05 16:22:39 +01: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 18:41:51 +01: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 16:22:39 +01:00
# ci
# <stockholm/makefu/2configs/exim-retiolum.nix>
<stockholm/makefu/2configs/git/cgit-retiolum.nix>
2018-12-12 18:41:51 +01:00
<stockholm/makefu/2configs/shack/events-publisher>
2018-11-05 16:22:39 +01:00
<stockholm/makefu/2configs/shack/gitlab-runner>
<stockholm/makefu/2configs/remote-build/slave.nix>
2019-02-05 22:32:53 +01:00
<stockholm/makefu/2configs/remote-build/aarch64-community.nix>
2018-11-05 16:22:39 +01:00
<stockholm/makefu/2configs/taskd.nix>
2017-05-02 14:03:25 +02:00
2017-02-04 14:35:29 +01:00
# services
2018-12-12 18:41:51 +01:00
# <stockholm/makefu/2configs/sabnzbd.nix>
2018-11-05 16:22:39 +01:00
<stockholm/makefu/2configs/mail/mail.euer.nix>
2018-12-12 18:41:51 +01:00
{
krebs.exim.enable = mkForce false;
}
2018-11-05 16:22:39 +01:00
# sharing
<stockholm/makefu/2configs/share/gum.nix>
<stockholm/makefu/2configs/torrent.nix>
2019-06-17 07:55:30 +02:00
{ services.sickbeard = {
enable = true;
package = pkgs.sickgear;
user = "sickbeard";
group = "download";
port = 8280;
};
services.nginx.virtualHosts."sick.makefu.r" = {
locations."/".proxyPass = http://localhost:8280;
extraConfig = ''
if ( $server_addr = "${external-ip}" ) {
return 403;
}
'';
};
users.users.sickbeard.extraGroups = [ "nginx" ];
}
{ nixpkgs.config.allowUnfree = true; }
2018-11-05 16:22:39 +01:00
#<stockholm/makefu/2configs/retroshare.nix>
## <stockholm/makefu/2configs/ipfs.nix>
#<stockholm/makefu/2configs/syncthing.nix>
# <stockholm/makefu/2configs/opentracker.nix>
2017-12-28 16:03:38 +01:00
2018-11-05 16:22:39 +01:00
## network
2017-08-16 12:09:18 +02:00
<stockholm/makefu/2configs/vpn/openvpn-server.nix>
2018-03-28 11:06:40 +02:00
# <stockholm/makefu/2configs/vpn/vpnws/server.nix>
2017-09-04 10:11:32 +02:00
<stockholm/makefu/2configs/dnscrypt/server.nix>
2018-11-05 16:22:39 +01:00
<stockholm/makefu/2configs/binary-cache/server.nix>
<stockholm/makefu/2configs/backup/server.nix>
2017-12-28 16:03:38 +01:00
<stockholm/makefu/2configs/iodined.nix>
2018-11-05 16:22:39 +01:00
<stockholm/makefu/2configs/bitlbee.nix>
<stockholm/makefu/2configs/wireguard/server.nix>
2019-06-17 07:55:30 +02:00
<stockholm/makefu/2configs/wireguard/wiregrill.nix>
2017-12-28 16:03:38 +01:00
2018-11-05 16:22:39 +01:00
# Removed until move: no extra mails
<stockholm/makefu/2configs/urlwatch>
# Removed until move: avoid letsencrypt ban
### Web
2018-10-21 23:33:33 +02:00
#<stockholm/makefu/2configs/nginx/share-download.nix>
#<stockholm/makefu/2configs/nginx/euer.test.nix>
2018-11-05 16:22:39 +01: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 23:33:33 +02: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 16:22:39 +01:00
<stockholm/makefu/2configs/nginx/misa-felix-hochzeit.ml.nix>
2018-12-12 18:41:51 +01:00
# <stockholm/makefu/2configs/nginx/gold.krebsco.de.nix>
2019-01-11 14:28:38 +01:00
# <stockholm/makefu/2configs/nginx/iso.euer.nix>
2017-02-04 14:35:29 +01:00
2018-11-05 16:22:39 +01: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>
<stockholm/makefu/2configs/bgt/download.binaergewitter.de.nix>
<stockholm/makefu/2configs/bgt/hidden_service.nix>
2018-12-18 23:24:00 +01:00
<stockholm/makefu/2configs/bgt/backup.nix>
2018-06-17 22:54:59 +02:00
# <stockholm/makefu/2configs/logging/client.nix>
2015-12-29 21:20:36 +01:00
2018-11-05 16:22:39 +01:00
# sharing
<stockholm/makefu/2configs/dcpp/airdcpp.nix>
<stockholm/makefu/2configs/dcpp/hub.nix>
## Temporary:
2017-11-14 10:17:16 +01:00
# <stockholm/makefu/2configs/temp/rst-issue.nix>
<stockholm/makefu/2configs/virtualisation/docker.nix>
2018-11-05 16:22:39 +01:00
<stockholm/makefu/2configs/virtualisation/libvirt.nix>
2018-11-05 16:22:39 +01:00
# krebs infrastructure services
<stockholm/makefu/2configs/stats/server.nix>
2018-12-12 18:41:51 +01:00
];
2017-02-04 14:35:29 +01:00
makefu.dl-dir = "/var/download";
2019-06-17 07:55:30 +02: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
2019-06-17 07:55:30 +02:00
services.nginx.virtualHosts."cgit.euer.krebsco.de" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://cgit.gum.r";
};
2015-11-10 18:53:31 +01:00
krebs.build.host = config.krebs.hosts.gum;
2017-02-04 14:35:29 +01:00
2015-11-10 18:53:31 +01:00
# Network
2015-10-28 15:06:41 +01:00
networking = {
2015-11-13 12:24:29 +01:00
firewall = {
2018-11-05 16:22:39 +01:00
allowPing = true;
logRefusedConnections = false;
2015-11-10 18:53:31 +01:00
};
2018-11-05 16:22:39 +01:00
nameservers = [ "8.8.8.8" ];
};
2018-06-17 22:54:59 +02:00
users.users.makefu.extraGroups = [ "download" "nginx" ];
2018-11-05 16:22:39 +01:00
state = [ "/home/makefu/.weechat" ];
2015-10-28 15:06:41 +01:00
}