summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--krebs/1systems/puyak/net.nix6
-rw-r--r--krebs/3modules/makefu/default.nix19
-rw-r--r--makefu/0tests/data/secrets/photoprism.nix4
-rw-r--r--makefu/0tests/data/secrets/zigbee2mqtt.nix6
-rw-r--r--makefu/1systems/filepimp/config.nix77
-rw-r--r--makefu/1systems/filepimp/hw.nix83
-rw-r--r--makefu/1systems/filepimp/source.nix1
-rw-r--r--makefu/1systems/gum/config.nix9
-rw-r--r--makefu/1systems/omo/config.nix28
-rw-r--r--makefu/1systems/omo/hw/omo.nix4
-rw-r--r--makefu/1systems/tsp/config.nix11
-rw-r--r--makefu/1systems/tsp/hardware.nix9
-rw-r--r--makefu/1systems/wbob/config.nix70
-rw-r--r--makefu/1systems/wbob/nuc/default.nix23
-rw-r--r--makefu/1systems/wbob/source.nix1
-rw-r--r--makefu/1systems/x/config.nix3
-rw-r--r--makefu/1systems/x/x13/default.nix22
-rw-r--r--makefu/1systems/x/x13/input.nix33
-rw-r--r--makefu/2configs/backup/server.nix20
-rw-r--r--makefu/2configs/bgt/etherpad.euer.krebsco.de.nix (renamed from makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix)4
-rw-r--r--makefu/2configs/bgt/social-to-irc.nix32
-rw-r--r--makefu/2configs/bgt/template.md (renamed from makefu/2configs/deployment/docker/template.md)0
-rw-r--r--makefu/2configs/binary-cache/server.nix1
-rw-r--r--makefu/2configs/bureautomation/automation/philosophische-tuer.nix108
-rw-r--r--makefu/2configs/bureautomation/default.nix10
-rw-r--r--makefu/2configs/bureautomation/zigbee2mqtt/default.nix (renamed from makefu/2configs/ham/zigbee2mqtt/default.nix)9
-rw-r--r--makefu/2configs/bureautomation/zigbee2mqtt/hass.nix (renamed from makefu/2configs/ham/zigbee2mqtt/hass.nix)0
-rw-r--r--makefu/2configs/default.nix1
-rw-r--r--makefu/2configs/gui/wbob-kiosk.nix15
-rw-r--r--makefu/2configs/home/airsonic.nix29
-rw-r--r--makefu/2configs/home/ham/automation/fenster_auf.nix33
-rw-r--r--makefu/2configs/home/ham/automation/firetv_restart.nix (renamed from makefu/2configs/ham/automation/firetv_restart.nix)0
-rw-r--r--makefu/2configs/home/ham/automation/giesskanne.nix (renamed from makefu/2configs/ham/automation/giesskanne.nix)0
-rw-r--r--makefu/2configs/home/ham/automation/light_buttons.nix (renamed from makefu/2configs/ham/automation/light_buttons.nix)0
-rw-r--r--makefu/2configs/home/ham/automation/moodlight.nix (renamed from makefu/2configs/ham/automation/moodlight.nix)0
-rw-r--r--makefu/2configs/home/ham/automation/urlaub.nix (renamed from makefu/2configs/ham/automation/urlaub.nix)0
-rw-r--r--makefu/2configs/home/ham/automation/wohnzimmer_rf_fernbedienung.nix (renamed from makefu/2configs/ham/automation/wohnzimmer_rf_fernbedienung.nix)0
-rw-r--r--makefu/2configs/home/ham/calendar/nextcloud.nix (renamed from makefu/2configs/ham/calendar/nextcloud.nix)0
-rw-r--r--makefu/2configs/home/ham/default.nix (renamed from makefu/2configs/ham/default.nix)74
-rw-r--r--makefu/2configs/home/ham/deps/dwdwfsapi.nix (renamed from makefu/2configs/ham/deps/dwdwfsapi.nix)0
-rw-r--r--makefu/2configs/home/ham/deps/pykodi.nix (renamed from makefu/2configs/ham/deps/pykodi.nix)0
-rw-r--r--makefu/2configs/home/ham/device_tracker/openwrt.nix (renamed from makefu/2configs/ham/device_tracker/openwrt.nix)0
-rw-r--r--makefu/2configs/home/ham/lib/default.nix (renamed from makefu/2configs/ham/lib/default.nix)0
-rw-r--r--makefu/2configs/home/ham/light/arbeitszimmer.nix (renamed from makefu/2configs/ham/light/arbeitszimmer.nix)0
-rw-r--r--makefu/2configs/home/ham/light/schlafzimmer.nix (renamed from makefu/2configs/ham/light/schlafzimmer.nix)0
-rw-r--r--makefu/2configs/home/ham/light/wohnzimmer.nix (renamed from makefu/2configs/ham/light/wohnzimmer.nix)0
-rw-r--r--makefu/2configs/home/ham/mqtt.nix (renamed from makefu/2configs/ham/mqtt.nix)0
-rw-r--r--makefu/2configs/home/ham/multi/fliegen-couter.nix (renamed from makefu/2configs/ham/multi/fliegen-couter.nix)0
-rw-r--r--makefu/2configs/home/ham/multi/flurlicht.nix (renamed from makefu/2configs/ham/multi/flurlicht.nix)0
-rw-r--r--makefu/2configs/home/ham/multi/kurzzeitwecker.nix (renamed from makefu/2configs/ham/multi/kurzzeitwecker.nix)0
-rw-r--r--makefu/2configs/home/ham/multi/the_playlist.nix (renamed from makefu/2configs/ham/multi/the_playlist.nix)0
-rw-r--r--makefu/2configs/home/ham/nginx.nix15
-rw-r--r--makefu/2configs/home/ham/sensor/outside.nix (renamed from makefu/2configs/ham/sensor/outside.nix)0
-rw-r--r--makefu/2configs/home/ham/signal-rest/default.nix18
-rw-r--r--makefu/2configs/home/ham/zigbee2mqtt/default.nix91
-rw-r--r--makefu/2configs/home/ham/zigbee2mqtt/hass.nix130
-rw-r--r--makefu/2configs/home/ham/zigbee2mqtt/osram.nix (renamed from makefu/2configs/ham/zigbee2mqtt/osram.nix)0
-rw-r--r--makefu/2configs/home/metube.nix35
-rw-r--r--makefu/2configs/home/photoprism.nix147
-rw-r--r--makefu/2configs/hw/tp-x230.nix8
-rw-r--r--makefu/2configs/hw/xmm7360.nix11
-rw-r--r--makefu/2configs/printer.nix6
-rw-r--r--makefu/2configs/share/omo-client.nix28
-rw-r--r--makefu/2configs/stats/server.nix1
-rw-r--r--makefu/2configs/storj/client.nix27
-rw-r--r--makefu/2configs/storj/forward-port.nix22
-rw-r--r--makefu/2configs/systemdultras/ircbot.nix4
-rw-r--r--makefu/2configs/tools/core.nix1
-rw-r--r--makefu/2configs/wireguard/server.nix2
-rw-r--r--makefu/5pkgs/xmm7360/default.nix47
-rw-r--r--makefu/krops.nix3
71 files changed, 1111 insertions, 230 deletions
diff --git a/krebs/1systems/puyak/net.nix b/krebs/1systems/puyak/net.nix
index 4cb8d247c..8dab11e16 100644
--- a/krebs/1systems/puyak/net.nix
+++ b/krebs/1systems/puyak/net.nix
@@ -1,11 +1,11 @@
let
- ext-if = "enp0s25";
+ ext-if = "et0";
shack-ip = "10.42.22.184";
shack-gw = "10.42.20.1";
in {
services.udev.extraRules = ''
SUBSYSTEM=="net", ATTR{address}=="8c:70:5a:b2:84:58", NAME="wl0"
- SUBSYSTEM=="net", ATTR{address}=="3c:97:0e:07:b9:14", NAME="et0"
+ SUBSYSTEM=="net", ATTR{address}=="3c:97:0e:07:b9:14", NAME="${ext-if}"
'';
networking = {
firewall.enable = false;
@@ -13,7 +13,7 @@ in {
interfaces."${ext-if}".ipv4.addresses = [
{
address = shack-ip;
- prefixLength = 20;
+ prefixLength = 22;
}
];
diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix
index c8e1e0386..f9fa037d3 100644
--- a/krebs/3modules/makefu/default.nix
+++ b/krebs/3modules/makefu/default.nix
@@ -108,12 +108,6 @@ in {
ci = false;
cores = 1;
nets = {
- lan = {
- ip4.addr = "192.168.1.12";
- aliases = [
- "filepimp.lan"
- ];
- };
retiolum.ip4.addr = "10.243.153.102";
};
};
@@ -123,12 +117,6 @@ in {
cores = 2;
nets = {
- lan = {
- ip4.addr = "192.168.1.11";
- aliases = [
- "omo.lan"
- ];
- };
retiolum = {
ip4.addr = "10.243.0.89";
aliases = [
@@ -143,13 +131,6 @@ in {
ci = true;
cores = 4;
nets = {
- lan = {
- ip4.addr = "192.168.8.11";
- aliases = [
- "wbob.lan"
- "log.wbob.lan"
- ];
- };
retiolum = {
ip4.addr = "10.243.214.15";
aliases = [
diff --git a/makefu/0tests/data/secrets/photoprism.nix b/makefu/0tests/data/secrets/photoprism.nix
new file mode 100644
index 000000000..17811ec5f
--- /dev/null
+++ b/makefu/0tests/data/secrets/photoprism.nix
@@ -0,0 +1,4 @@
+{
+ db.username = "photoprism";
+ db.password = "photoprism";
+}
diff --git a/makefu/0tests/data/secrets/zigbee2mqtt.nix b/makefu/0tests/data/secrets/zigbee2mqtt.nix
new file mode 100644
index 000000000..c67ff3865
--- /dev/null
+++ b/makefu/0tests/data/secrets/zigbee2mqtt.nix
@@ -0,0 +1,6 @@
+{
+ mqtt.password = "hass";
+ mqtt.username = "hass";
+ zigbee.network_key = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ];
+}
+
diff --git a/makefu/1systems/filepimp/config.nix b/makefu/1systems/filepimp/config.nix
index e023c2885..346de10ba 100644
--- a/makefu/1systems/filepimp/config.nix
+++ b/makefu/1systems/filepimp/config.nix
@@ -1,26 +1,13 @@
{ config, pkgs, lib, ... }:
+# nix-shell -p wol --run 'wol C8:CB:B8:CF:E4:DC --passwd=CA-FE-BA-BE-13-37'
let
- byid = dev: "/dev/disk/by-id/" + dev;
- part1 = disk: disk + "-part1";
- rootDisk = byid "ata-SanDisk_SDSSDP064G_140237402890";
- primary-interface = "enp3s0"; # c8:cb:b8:cf:e4:dc
- # N54L Chassis:
- # ____________________
- # |______FRONT_______|
- # | [ ]|
- # | [ d1 ** d3 d4 ]|
- # |___[_____________]|
- jDisk1 = byid "ata-ST4000DM000-1F2168_Z3040NEA";
-
- # transfer to omo
- # jDisk0 = byid "ata-ST4000DM000-1F2168_Z303HVSG";
- jDisk2 = byid "ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E0621363";
- jDisk3 = byid "ata-TOSHIBA_MD04ACA400_156GK89OFSBA";
- allDisks = [ rootDisk jDisk1 jDisk2 jDisk3 ];
+ itf = config.makefu.server.primary-itf;
in {
imports =
[ # Include the results of the hardware scan.
+ ./hw.nix
<stockholm/makefu>
+ <stockholm/makefu/2configs/home-manager>
<stockholm/makefu/2configs/fs/single-partition-ext4.nix>
<stockholm/makefu/2configs/smart-monitor.nix>
<stockholm/makefu/2configs/tinc/retiolum.nix>
@@ -28,64 +15,12 @@ in {
];
krebs.build.host = config.krebs.hosts.filepimp;
- # AMD N54L
- boot = {
- loader.grub.device = rootDisk;
-
- initrd.availableKernelModules = [
- "ahci"
- "ohci_pci"
- "ehci_pci"
- "pata_atiixp"
- "usb_storage"
- "usbhid"
- ];
-
- kernelModules = [ "kvm-amd" ];
- extraModulePackages = [ ];
- };
- hardware.enableRedistributableFirmware = true;
- hardware.cpu.amd.updateMicrocode = true;
-
- zramSwap.enable = true;
-
- makefu.snapraid = let
- toMedia = name: "/media/" + name;
- in {
- enable = true;
- # todo combine creation when enabling the mount point
- disks = map toMedia [
- # "j0"
- "j1"
- "j2"
- ];
- parity = toMedia "par0";
- };
- # TODO: refactor, copy-paste from omo
- services.smartd.devices = builtins.map (x: { device = x; }) allDisks;
- powerManagement.powerUpCommands = lib.concatStrings (map (disk: ''
- ${pkgs.hdparm}/sbin/hdparm -S 100 ${disk}
- ${pkgs.hdparm}/sbin/hdparm -B 127 ${disk}
- ${pkgs.hdparm}/sbin/hdparm -y ${disk}
- '') allDisks);
- fileSystems = let
- xfsmount = name: dev:
- { "/media/${name}" = {
- device = dev; fsType = "xfs";
- options = [ "nofail" ];
- }; };
- in
- # (xfsmount "j0" (part1 jDisk0)) //
- (xfsmount "j1" (part1 jDisk1)) //
- (xfsmount "j2" (part1 jDisk2)) //
- (xfsmount "par0" (part1 jDisk3))
- ;
- networking.firewall.trustedInterfaces = [ primary-interface ];
+ networking.firewall.trustedInterfaces = [ itf ];
services.wakeonlan.interfaces = [
{
- interface = primary-interface;
+ interface = itf ;
method = "password";
password = "CA:FE:BA:BE:13:37";
}
diff --git a/makefu/1systems/filepimp/hw.nix b/makefu/1systems/filepimp/hw.nix
new file mode 100644
index 000000000..6f02d9b1b
--- /dev/null
+++ b/makefu/1systems/filepimp/hw.nix
@@ -0,0 +1,83 @@
+{ config, pkgs, lib, ... }:
+
+let
+ byid = dev: "/dev/disk/by-id/" + dev;
+ part1 = disk: disk + "-part1";
+ rootDisk = byid "ata-SanDisk_SDSSDP064G_140237402890";
+ primary-interface = "enp3s0"; # c8:cb:b8:cf:e4:dc
+ # N54L Chassis:
+ # ____________________
+ # |______FRONT_______|
+ # | [ ]|
+ # | [ d1 d0 d3 d4 ]|
+ # |___[_____________]|
+ jDisk1 = byid "ata-ST4000DM000-1F2168_Z3040NEA";
+
+ # transfer to omo
+ jDisk0 = byid "ata-ST4000DM000-1F2168_Z303HVSG";
+ jDisk2 = byid "ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E0621363";
+ jDisk3 = byid "ata-TOSHIBA_MD04ACA400_156GK89OFSBA";
+ allDisks = [ rootDisk jDisk0 jDisk1 jDisk2 jDisk3 ];
+in {
+ boot = {
+ loader.grub.device = rootDisk;
+
+ initrd.availableKernelModules = [
+ "ahci"
+ "ohci_pci"
+ "ehci_pci"
+ "pata_atiixp"
+ "usb_storage"
+ "usbhid"
+ ];
+
+ kernelModules = [ "kvm-amd" ];
+ extraModulePackages = [ ];
+ };
+ makefu.server.primary-itf = primary-interface;
+
+ hardware.enableRedistributableFirmware = true;
+ hardware.cpu.amd.updateMicrocode = true;
+
+ zramSwap.enable = true;
+
+ makefu.snapraid = let
+ toMedia = name: "/media/" + name;
+ in {
+ enable = true;
+ # todo combine creation when enabling the mount point
+ disks = map toMedia [
+ "j0"
+ "j1"
+ "j2"
+ ];
+ parity = toMedia "par0";
+ };
+ # TODO: refactor, copy-paste from omo
+ services.smartd.devices = builtins.map (x: { device = x; }) allDisks;
+ powerManagement.powerUpCommands = lib.concatStrings (map (disk: ''
+ ${pkgs.hdparm}/sbin/hdparm -S 100 ${disk}
+ ${pkgs.hdparm}/sbin/hdparm -B 127 ${disk}
+ ${pkgs.hdparm}/sbin/hdparm -y ${disk}
+ '') allDisks);
+ fileSystems = let
+ xfsmount = name: dev:
+ { "/media/${name}" = {
+ device = dev; fsType = "xfs";
+ options = [ "nofail" ];
+ }; };
+ tomedia = id: "/media/${id}";
+ in
+ (xfsmount "j0" (part1 jDisk0)) //
+ (xfsmount "j1" (part1 jDisk1)) //
+ (xfsmount "j2" (part1 jDisk2)) //
+ (xfsmount "par0" (part1 jDisk3)) //
+ { "/media/jX" = {
+ device = (lib.concatMapStringsSep ":" (d: (tomedia d)) ["j0" "j1" "j2" ]);
+ fsType = "mergerfs";
+ noCheck = true;
+ options = [ "defaults" "allow_other" "nofail" "nonempty" ];
+ };
+ };
+ environment.systemPackages = [ pkgs.mergerfs ];
+}
diff --git a/makefu/1systems/filepimp/source.nix b/makefu/1systems/filepimp/source.nix
index b81a2bf4a..9930f0e42 100644
--- a/makefu/1systems/filepimp/source.nix
+++ b/makefu/1systems/filepimp/source.nix
@@ -1,3 +1,4 @@
{
name="filepimp";
+ home-manager = true;
}
diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix
index 2fd99122a..83fbd8f83 100644
--- a/makefu/1systems/gum/config.nix
+++ b/makefu/1systems/gum/config.nix
@@ -43,6 +43,7 @@ in {
<stockholm/makefu/2configs/zsh-user.nix>
<stockholm/makefu/2configs/mosh.nix>
+ <stockholm/makefu/2configs/storj/forward-port.nix>
# <stockholm/makefu/2configs/gui/xpra.nix>
# networking
@@ -147,7 +148,7 @@ in {
<stockholm/makefu/2configs/deployment/boot-euer.nix>
<stockholm/makefu/2configs/deployment/gecloudpad>
<stockholm/makefu/2configs/deployment/docker/archiveteam-warrior.nix>
- <stockholm/makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix>
+ <stockholm/makefu/2configs/bgt/etherpad.euer.krebsco.de.nix>
# <stockholm/makefu/2configs/deployment/systemdultras-rss.nix>
<stockholm/makefu/2configs/shiori.nix>
@@ -156,6 +157,7 @@ in {
<stockholm/makefu/2configs/bgt/download.binaergewitter.de.nix>
<stockholm/makefu/2configs/bgt/hidden_service.nix>
<stockholm/makefu/2configs/bgt/backup.nix>
+ <stockholm/makefu/2configs/bgt/social-to-irc.nix>
# <stockholm/makefu/2configs/logging/client.nix>
@@ -203,7 +205,10 @@ in {
# Network
networking = {
firewall = {
- allowedTCPPorts = [ 80 443 ];
+ allowedTCPPorts = [
+ 80 443
+ 28967 # storj
+ ];
allowPing = true;
logRefusedConnections = false;
};
diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix
index a9e307ddf..a04593715 100644
--- a/makefu/1systems/omo/config.nix
+++ b/makefu/1systems/omo/config.nix
@@ -28,9 +28,11 @@ in {
<stockholm/makefu/2configs/home-manager>
<stockholm/makefu/2configs/home-manager/cli.nix>
<stockholm/makefu/2configs/editor/neovim>
+ <stockholm/makefu/2configs/storj/client.nix>
<stockholm/makefu/2configs/backup/state.nix>
+ <stockholm/makefu/2configs/backup/server.nix>
<stockholm/makefu/2configs/exim-retiolum.nix>
# <stockholm/makefu/2configs/smart-monitor.nix>
<stockholm/makefu/2configs/mail-client.nix>
@@ -68,7 +70,7 @@ in {
<stockholm/makefu/2configs/tinc/retiolum.nix>
# statistics
- <stockholm/makefu/2configs/stats/client.nix>
+ # <stockholm/makefu/2configs/stats/client.nix>
# Logging
#influx + grafana
<stockholm/makefu/2configs/stats/server.nix>
@@ -91,13 +93,18 @@ in {
<stockholm/makefu/2configs/virtualisation/docker.nix>
<stockholm/makefu/2configs/bluetooth-mpd.nix>
- <stockholm/makefu/2configs/ham>
+ <stockholm/makefu/2configs/home/ham>
+ <stockholm/makefu/2configs/home/airsonic.nix>
+ <stockholm/makefu/2configs/home/photoprism.nix>
+ <stockholm/makefu/2configs/home/metube.nix>
{
makefu.ps3netsrv = {
enable = true;
servedir = "/media/cryptX/emu/ps3";
};
}
+
+
{
hardware.pulseaudio.systemWide = true;
makefu.mpd.musicDirectory = "/media/cryptX/music";
@@ -107,7 +114,15 @@ in {
<stockholm/makefu/2configs/sshd-totp.nix>
# <stockholm/makefu/2configs/logging/central-logging-client.nix>
- <stockholm/makefu/2configs/torrent.nix>
+ # <stockholm/makefu/2configs/torrent.nix>
+ {
+ #krebs.rtorrent = {
+ # downloadDir = lib.mkForce "/media/cryptX/torrent";
+ # extraConfig = ''
+ # upload_rate = 500
+ # '';
+ #};
+ }
# <stockholm/makefu/2configs/elchos/search.nix>
# <stockholm/makefu/2configs/elchos/log.nix>
@@ -118,16 +133,11 @@ in {