ma fileleech: retab, use torrent

This commit is contained in:
makefu 2017-12-28 16:03:05 +01:00
parent 161c810b74
commit 14634592a6
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -6,18 +6,18 @@ let
rootDisk = byid "ata-INTEL_SSDSA2M080G2GC_CVPO003402PB080BGN"; rootDisk = byid "ata-INTEL_SSDSA2M080G2GC_CVPO003402PB080BGN";
rootPartition = rootDisk + "-part3"; rootPartition = rootDisk + "-part3";
dataDisks = let dataDisks = let
idpart = dev: byid dev + "-part1"; idpart = dev: byid dev + "-part1";
in [ in [
{ name = "crypt0"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GDLJEF";} { name = "crypt0"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GDLJEF";}
{ name = "crypt1"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GGWG8F";} { name = "crypt1"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GGWG8F";}
{ name = "crypt2"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GH5NAF";} { name = "crypt2"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GH5NAF";}
{ name = "crypt3"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GJWGDF";} { name = "crypt3"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GJWGDF";}
{ name = "crypt4"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GKKXHF";} { name = "crypt4"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GKKXHF";}
{ name = "crypt5"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GKKXVF";} { name = "crypt5"; device = idpart "scsi-1ATA_HUA722020ALA330_B9GKKXVF";}
{ name = "crypt6"; device = idpart "scsi-1ATA_HUA722020ALA330_YAJJ8WRV";} { name = "crypt6"; device = idpart "scsi-1ATA_HUA722020ALA330_YAJJ8WRV";}
{ name = "crypt7"; device = idpart "scsi-1ATA_HUA722020ALA330_YBKTUS4F";} # parity { name = "crypt7"; device = idpart "scsi-1ATA_HUA722020ALA330_YBKTUS4F";} # parity
]; ];
disks = [ { name = "luksroot"; device = rootPartition; } ] ++ dataDisks; disks = [ { name = "luksroot"; device = rootPartition; } ] ++ dataDisks;
in { in {
@ -25,13 +25,13 @@ in {
<stockholm/makefu> <stockholm/makefu>
<stockholm/makefu/2configs/tinc/retiolum.nix> <stockholm/makefu/2configs/tinc/retiolum.nix>
<stockholm/makefu/2configs/disable_v6.nix> <stockholm/makefu/2configs/disable_v6.nix>
# <stockholm/makefu/2configs/torrent.nix> <stockholm/makefu/2configs/torrent.nix>
<stockholm/makefu/2configs/fs/sda-crypto-root.nix> <stockholm/makefu/2configs/fs/sda-crypto-root.nix>
#<stockholm/makefu/2configs/elchos/irc-token.nix> #<stockholm/makefu/2configs/elchos/irc-token.nix>
<stockholm/makefu/2configs/elchos/log.nix> # <stockholm/makefu/2configs/elchos/log.nix>
<stockholm/makefu/2configs/elchos/search.nix> # <stockholm/makefu/2configs/elchos/search.nix>
<stockholm/makefu/2configs/elchos/stats.nix> # <stockholm/makefu/2configs/elchos/stats.nix>
]; ];
systemd.services.grafana.serviceConfig.LimitNOFILE=10032; systemd.services.grafana.serviceConfig.LimitNOFILE=10032;
@ -42,8 +42,8 @@ in {
enable = true; enable = true;
build.host = config.krebs.hosts.fileleech; build.host = config.krebs.hosts.fileleech;
}; };
# git clone https://github.com/makefu/docker-pyload # git clone https://github.com/makefu/docker-pyload
# docker build . # docker build .
# docker run -d -v /var/lib/pyload:/opt/pyload/pyload-config -v /media/crypt0/pyload:/opt/pyload/Downloads --name pyload --restart=always -p 8112:8000 -P docker-pyload # docker run -d -v /var/lib/pyload:/opt/pyload/pyload-config -v /media/crypt0/pyload:/opt/pyload/Downloads --name pyload --restart=always -p 8112:8000 -P docker-pyload
virtualisation.docker.enable = true; # for pyload virtualisation.docker.enable = true; # for pyload
@ -60,7 +60,7 @@ in {
]; ];
services.nginx.virtualHosts._download = { services.nginx.virtualHosts._download = {
default = true; default = true;
root = "/media/cryptX"; root = config.makefu.dl-dir;
extraConfig = '' extraConfig = ''
autoindex on; autoindex on;
''; '';
@ -80,10 +80,11 @@ in {
services.sabnzbd.enable = true; services.sabnzbd.enable = true;
systemd.services.sabnzbd.environment.SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; systemd.services.sabnzbd.environment.SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
# TODO use users.motd and pam.services.sshd.showMotd
services.openssh.extraConfig = let banner = pkgs.writeText "openssh-banner" '' services.openssh.extraConfig = let banner = pkgs.writeText "openssh-banner" ''
Services: Services:
ssh://download@fileleech - ssh via filebitch.shack ssh://download@fileleech - ssh via filebitch
ftp://download@fileleech - access to /media/cryptX ftp://download@fileleech - access to ${config.makefu.dl-dir}
http://fileleech:8112 - rutorrent http://fileleech:8112 - rutorrent
http://fileleech:8113 - pyload http://fileleech:8113 - pyload
https://fileleech:9090 - sabnzb https://fileleech:9090 - sabnzb
@ -104,13 +105,13 @@ in {
cryptMount = name: cryptMount = name:
{ "/media/${name}" = { device = "/dev/mapper/${name}"; fsType = "xfs"; };}; { "/media/${name}" = { device = "/dev/mapper/${name}"; fsType = "xfs"; };};
in cryptMount "crypt0" in cryptMount "crypt0"
// cryptMount "crypt1" // cryptMount "crypt1"
// cryptMount "crypt2" // cryptMount "crypt2"
// cryptMount "crypt3" // cryptMount "crypt3"
// cryptMount "crypt4" // cryptMount "crypt4"
// cryptMount "crypt5" // cryptMount "crypt5"
// cryptMount "crypt6" // cryptMount "crypt6"
// cryptMount "crypt7" // cryptMount "crypt7"
# this entry sometimes creates issues # this entry sometimes creates issues
// { "/media/cryptX" = { // { "/media/cryptX" = {
@ -121,10 +122,10 @@ in {
} }
; ;
makefu.dl-dir = "/media/cryptX";
users.users.download = { users.users.download = {
useDefaultShell = true; useDefaultShell = true;
# name = "download"; # name = "download";
home = "/media/cryptX/";
# createHome = true; # createHome = true;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
config.krebs.users.makefu.pubkey config.krebs.users.makefu.pubkey
@ -132,7 +133,7 @@ in {
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7betFnMWVeBYRhJ+2f0B5WbDdbpteIVg/BlyimXbx79R7lZ7nUq5GyMLrp7B00frUuA0su8oFFN3ODPJDstgBslBIP7kWPR2zW8NOXorrbFo3J2fKvlO77k6/wD5/M11m5nS01/aVJgAgMGLg2W12G7EMf5Wq75YsQJC/S9p8kMca589djMPRuQETu7fWq0t/Gmwq+2ELLL0csRK87LvybA92JYkAIneRnGzIlCguOXq0Vcq6pGQ1J1PfVEP76Do33X29l2hZc/+vR9ExW6s2g7fs5/5LDX9Wnq7+AEsxiEf4IOeL0hCG4/CGGCN23J+6cDrNKOP94AHO1si0O2lxFsxgNU2vdVWPNgSLottiUFBPPNEZFD++sZyutzH6PIz6D90hB2Q52X6WN9ZUtlDfQ91rHd+S2BhR6f4dAqiRDXlI5MNNDdoTT4S5R0wU/UrNwjiV/xiu/hWZYGQK7YgY4grFRblr378r8FqjLvumPDFMDLVa9eJKq1ad1x/GV5tZpsttzWj4nbixaKlZOg+TN2GHboujLx3bANz1Jqfvfto8UOeKTtA8pkb8E1PJPpBMOZcA7oHaqJrp6Vuf/SkmglHnQvGbi60OK3s61nuRmIcBiTXd+4qeAJpq1QyEDj3X/+hV0Gwz8rCo6JGkF1ETW37ZYvqU9rxNXjS+/Pfktw== jules@kvasir-2015-02-13" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7betFnMWVeBYRhJ+2f0B5WbDdbpteIVg/BlyimXbx79R7lZ7nUq5GyMLrp7B00frUuA0su8oFFN3ODPJDstgBslBIP7kWPR2zW8NOXorrbFo3J2fKvlO77k6/wD5/M11m5nS01/aVJgAgMGLg2W12G7EMf5Wq75YsQJC/S9p8kMca589djMPRuQETu7fWq0t/Gmwq+2ELLL0csRK87LvybA92JYkAIneRnGzIlCguOXq0Vcq6pGQ1J1PfVEP76Do33X29l2hZc/+vR9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uSSXb1279Qt4953mfjs5xwhtc1B7vrxJ3qtTZUsBoAkUkLeulUEIjkfn60wvDGu/66GP5ZClXyk2gck/ZNmtFYrQoqx9EtF1KK02cC17A0nfRySQy5BnfWn root@filebitch"
]; ];
}; };
@ -142,15 +143,19 @@ in {
parity = toMapper 7; parity = toMapper 7;
}; };
networking.nameservers = [ "8.8.8.8" ]; networking.nameservers = [ "8.8.8.8" ];
#networking.interfaces.enp6s0f0.ip4 = [{ # SPF
# address = "151.217.173.20"; networking.defaultGateway = "151.217.176.1";
# prefixLength = 22; networking.interfaces.enp6s0f0.ip4 = [{
#}]; address = "151.217.178.63";
#networking.defaultGateway = "151.217.172.1"; prefixLength = 22;
}];
# Gigabit
networking.interfaces.enp8s0f1.ip4 = [{ networking.interfaces.enp8s0f1.ip4 = [{
address = "192.168.126.1"; address = "192.168.126.1";
prefixLength = 24; prefixLength = 24;
}]; }];
#interfaces.enp6s0f1.ip4 = [{ #interfaces.enp6s0f1.ip4 = [{
# address = external-ip; # address = external-ip;
# prefixLength = 22; # prefixLength = 22;