From 6cb6c96255427580d35fc6b6d545c016f882dcde Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Mar 2016 08:41:13 +0100 Subject: ma 1 darth: configure aux disk --- makefu/1systems/darth.nix | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/darth.nix b/makefu/1systems/darth.nix index a33744f0b..ad3ac4f22 100644 --- a/makefu/1systems/darth.nix +++ b/makefu/1systems/darth.nix @@ -1,17 +1,39 @@ { config, pkgs, lib, ... }: with config.krebs.lib; -{ +let + byid = dev: "/dev/disk/by-id/" + dev; + rootDisk = byid "ata-ADATA_SSD_S599_64GB_10460000000000000039"; + auxDisk = byid "ata-HGST_HTS721010A9E630_JR10006PH3A02F"; + dataPartition = auxDisk + "-part1"; + + allDisks = [ rootDisk auxDisk ]; +in { imports = [ + ../. ../2configs/fs/single-partition-ext4.nix ../2configs/zsh-user.nix - ../. + ../2configs/smart-monitor.nix ]; + # virtualisation.nova.enableSingleNode = true; krebs.retiolum.enable = true; - boot.loader.grub.device = "/dev/disk/by-id/ata-ADATA_SSD_S599_64GB_10460000000000000039"; + # TODO smartd omo darth gum all-in-one + services.smartd.devices = builtins.map (x: { device = x; }) allDisks; + zramSwap.enable = true; + + fileSystems."/data" = { + device = dataPartition; + fsType = "ext4"; + }; + + boot.loader.grub.device = rootDisk; + users.users.root.openssh.authorizedKeys.keys = [ config.krebs.users.makefu-omo.pubkey + config.krebs.users.makefu-vbob.pubkey ]; + + krebs.build.host = config.krebs.hosts.darth; } -- cgit v1.2.3 From 6f7801509fd13c09161f9f1e28caa4cb89db1bfb Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Mar 2016 08:42:19 +0100 Subject: ma 1 gum: allow vbob and omo users --- makefu/1systems/gum.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'makefu/1systems') diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index e784fdc12..2ddd2dccc 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -45,6 +45,12 @@ in { "cgit.euer.krebsco.de" ]; + # access + users.users = { + root.openssh.authorizedKeys.keys = [ config.krebs.users.makefu-omo.pubkey ]; + makefu.openssh.authorizedKeys.keys = [ config.krebs.users.makefu-vbob.pubkey ]; + }; + # Chat environment.systemPackages = with pkgs;[ weechat -- cgit v1.2.3 From 04ba4784ae0918fe9e79af5c95bace3cf8605792 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 16 Mar 2016 08:43:20 +0100 Subject: ma 1 omo: fix misleading comment --- makefu/1systems/omo.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/omo.nix b/makefu/1systems/omo.nix index bfcd2298a..f0f1d3088 100644 --- a/makefu/1systems/omo.nix +++ b/makefu/1systems/omo.nix @@ -11,7 +11,7 @@ let # cryptsetup luksFormat $dev --cipher aes-xts-plain64 -s 512 -h sha512 # cryptsetup luksAddKey $dev tmpkey # cryptsetup luksOpen $dev crypt0 --key-file tmpkey --keyfile-size=4096 - # mkfs.ext4 /dev/mapper/crypt0 -L crypt0 -T largefile + # mkfs.xfs /dev/mapper/crypt0 -L crypt0 # omo Chassis: # __FRONT_ @@ -30,6 +30,8 @@ let cryptDisk2 = byid "ata-ST4000DM000-1F2168_Z303HVSG"; # cryptDisk3 = byid "ata-WDC_WD20EARS-00MVWB0_WD-WMAZA1786907"; # all physical disks + + # TODO callPackage ../3modules/MonitorDisks { disks = allDisks } allDisks = [ rootDisk cryptDisk0 cryptDisk1 cryptDisk2 ]; in { imports = -- cgit v1.2.3 From d6958d32c0a32aeea2f7d0b774bcba00da061149 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 19 Mar 2016 23:37:27 +0100 Subject: ma 1 add more nginx --- makefu/1systems/gum.nix | 7 ++++--- makefu/1systems/pornocauster.nix | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index 2ddd2dccc..710421659 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -41,9 +41,10 @@ in { ]; }; - krebs.nginx.servers.cgit.server-names = [ - "cgit.euer.krebsco.de" - ]; + krebs.nginx.servers.cgit = { + server-names = [ "cgit.euer.krebsco.de" ]; + listen = [ "${external-ip}:80" "${internal-ip}:80" ]; + }; # access users.users = { diff --git a/makefu/1systems/pornocauster.nix b/makefu/1systems/pornocauster.nix index 119f0e5e4..88c187758 100644 --- a/makefu/1systems/pornocauster.nix +++ b/makefu/1systems/pornocauster.nix @@ -36,7 +36,11 @@ #../2configs/wordpress.nix ../2configs/nginx/public_html.nix ]; - + krebs.nginx = { + default404 = false; + servers.default.listen = [ "80 default_server" ]; + servers.default.server-names = [ "_" ]; + }; krebs.retiolum.enable = true; # steam hardware.opengl.driSupport32Bit = true; -- cgit v1.2.3 From 4f55e3862c942d8d05591873f587cc767aef3a0d Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 3 Apr 2016 21:42:13 +0200 Subject: ma 1 darth: add virtualization --- makefu/1systems/darth.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/darth.nix b/makefu/1systems/darth.nix index ad3ac4f22..2f2358ddc 100644 --- a/makefu/1systems/darth.nix +++ b/makefu/1systems/darth.nix @@ -10,15 +10,27 @@ let allDisks = [ rootDisk auxDisk ]; in { imports = [ - ../. - ../2configs/fs/single-partition-ext4.nix - ../2configs/zsh-user.nix - ../2configs/smart-monitor.nix + ../. + ../2configs/fs/single-partition-ext4.nix + ../2configs/zsh-user.nix + ../2configs/smart-monitor.nix + ../2configs/exim-retiolum.nix + ../2configs/virtualization.nix ]; + networking.firewall.allowedUDPPorts = [ 80 655 67 ]; + networking.firewall.allowedTCPPorts = [ 80 655 ]; + networking.firewall.checkReversePath = false; + #networking.firewall.enable = false; # virtualisation.nova.enableSingleNode = true; krebs.retiolum.enable = true; + boot.kernelModules = [ "coretemp" "f71882fg" ]; + + hardware.enableAllFirmware = true; + nixpkgs.config.allowUnfree = true; + networking.wireless.enable = true; + # TODO smartd omo darth gum all-in-one services.smartd.devices = builtins.map (x: { device = x; }) allDisks; zramSwap.enable = true; -- cgit v1.2.3 From bc72bad6e22eeae9fa138be1583e742eec1e162f Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 3 Apr 2016 21:43:31 +0200 Subject: ma 1 vbob: remove obsolete source --- makefu/1systems/vbob.nix | 5 ----- 1 file changed, 5 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/vbob.nix b/makefu/1systems/vbob.nix index 748b08ef1..5e2382f37 100644 --- a/makefu/1systems/vbob.nix +++ b/makefu/1systems/vbob.nix @@ -15,11 +15,6 @@ ]; nixpkgs.config.allowUnfree = true; - krebs.build.source.upstream-nixpkgs = { - url = https://github.com/makefu/nixpkgs; - # HTTP Everywhere + libredir - rev = "8239ac6"; - }; fileSystems."/nix" = { device ="/dev/disk/by-label/nixstore"; fsType = "ext4"; -- cgit v1.2.3 From ac7cece1d27422ce6b17540618cacc90ac4bfdb0 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 3 Apr 2016 21:52:16 +0200 Subject: ma 1 omo: cleanup --- makefu/1systems/omo.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/omo.nix b/makefu/1systems/omo.nix index f0f1d3088..fbd06a9c7 100644 --- a/makefu/1systems/omo.nix +++ b/makefu/1systems/omo.nix @@ -44,16 +44,21 @@ in { ../2configs/smart-monitor.nix ../2configs/mail-client.nix ../2configs/share-user-sftp.nix + ../2configs/graphite-standalone.nix ../2configs/omo-share.nix ]; + krebs.retiolum.enable = true; networking.firewall.trustedInterfaces = [ "enp3s0" ]; # udp:137 udp:138 tcp:445 tcp:139 - samba, allowed in local net # tcp:80 - nginx for sharing files # tcp:655 udp:655 - tinc - # tcp:8080 - sabnzbd + # tcp:8111 - graphite + # tcp:9090 - sabnzbd + # tcp:9200 - elasticsearch + # tcp:5601 - kibana networking.firewall.allowedUDPPorts = [ 655 ]; - networking.firewall.allowedTCPPorts = [ 80 655 8080 ]; + networking.firewall.allowedTCPPorts = [ 80 655 5601 8111 9200 9090 ]; # services.openssh.allowSFTP = false; -- cgit v1.2.3