From cef765bc1068b71e863f47144ee3795d43d7210f Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 17 May 2017 11:50:17 +0200 Subject: m 3 taskserver: rip --- makefu/3modules/default.nix | 1 - makefu/3modules/taskserver.nix | 60 ------------------------------------------ 2 files changed, 61 deletions(-) delete mode 100644 makefu/3modules/taskserver.nix (limited to 'makefu') diff --git a/makefu/3modules/default.nix b/makefu/3modules/default.nix index 546fed10..2981e0fa 100644 --- a/makefu/3modules/default.nix +++ b/makefu/3modules/default.nix @@ -11,7 +11,6 @@ _: ./logging-config.nix ./server-config.nix ./snapraid.nix - ./taskserver.nix ./torrent.nix ./udpt.nix ./umts.nix diff --git a/makefu/3modules/taskserver.nix b/makefu/3modules/taskserver.nix deleted file mode 100644 index 40a18fe0..00000000 --- a/makefu/3modules/taskserver.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ config, lib, pkgs, ... }: - -with import ; -let - cfg = config.makefu.taskserver; - - out = { - options.makefu.taskserver = api; - config = lib.mkIf cfg.enable imp; - }; - - api = { - enable = mkEnableOption "taskserver"; - - workingDir = mkOption { - type = types.str; - default = "/var/lib/taskserver"; - }; - - package = mkOption { - type = types.package; - default = pkgs.taskserver; - }; - - - }; - - imp = { - environment.systemPackages = [ cfg.package ]; - systemd.services.taskserver = { - description = "taskd server"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - restartIfChanged = true; - unitConfig = { - Documentation = "http://taskwarrior.org/docs/#taskd" ; - # https://taskwarrior.org/docs/taskserver/configure.html - ConditionPathExists = "${cfg.workingDir}/config"; - }; - serviceConfig = { - Type = "simple"; - ExecStart = "${cfg.package}/bin/taskd server --data ${cfg.workingDir}"; - WorkingDirectory = cfg.workingDir; - # PrivateTmp = true; - # InaccessibleDirectories = "/home /boot /opt /mnt /media"; - User = "taskd"; - }; - }; - - users.users.taskd = { - uid = genid "taskd"; - home = cfg.workingDir; - createHome = true; - }; - users.groups.taskd.gid = genid "taskd"; - }; - -in -out - -- cgit v1.2.3 From a16ec260c6005536ba8d73e38be2aa55b314c80f Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 19 May 2017 11:53:44 +0200 Subject: m 2 zsh: enable autocompletion for nix commands --- makefu/2configs/zsh-user.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'makefu') diff --git a/makefu/2configs/zsh-user.nix b/makefu/2configs/zsh-user.nix index 0f904fe3..453bfbe8 100644 --- a/makefu/2configs/zsh-user.nix +++ b/makefu/2configs/zsh-user.nix @@ -44,4 +44,8 @@ in fi ''; }; + + krebs.per-user.${mainUser}.packages = [ + pkgs.nix-zsh-completions + ]; } -- cgit v1.2.3 From 7383125f6b0f0d7965ea389234a4a4d9da8151f3 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 19 May 2017 11:54:37 +0200 Subject: m 2 time-machine: init --- makefu/2configs/time-machine.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 makefu/2configs/time-machine.nix (limited to 'makefu') diff --git a/makefu/2configs/time-machine.nix b/makefu/2configs/time-machine.nix new file mode 100644 index 00000000..90d44e54 --- /dev/null +++ b/makefu/2configs/time-machine.nix @@ -0,0 +1,31 @@ +let + time-machine-path = "/media/crypt2/backup/time-machine/misa"; +in { + networking.firewall.allowedTCPPorts = [ + 548 # netatalk + ]; + + services = { + netatalk = { + enable = true; + + volumes = { + "misa-time-machine" = { + "time machine" = "yes"; + path = time-machine-path; + "valid users" = "misa"; + }; + }; + }; + + avahi = { + enable = true; + nssmdns = true; + + publish = { + enable = true; + userServices = true; + }; + }; + }; +} -- cgit v1.2.3 From d9d7f7fd32295a3208ace7c2c1cdfaf61ab70f04 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 24 May 2017 10:48:14 +0200 Subject: m 2 aralast: init --- makefu/2configs/logging/external/aralast.nix | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 makefu/2configs/logging/external/aralast.nix (limited to 'makefu') diff --git a/makefu/2configs/logging/external/aralast.nix b/makefu/2configs/logging/external/aralast.nix new file mode 100644 index 00000000..c335db45 --- /dev/null +++ b/makefu/2configs/logging/external/aralast.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, ... }: + +with import ; +let + pkg = pkgs.stdenv.mkDerivation { + name = "aralast-master"; + src = pkgs.fetchFromGitHub { + owner = "makefu"; + repo = "aralast"; + rev = "7121598"; + sha256 = "0vw027c698h9b69ksid5p3pji9960hd7n9xi4arrax0vfkwryb4m"; + }; + installPhase = '' + install -m755 -D aralast.sh $out/bin/aralast + ''; + }; +in { + systemd.services.aralast = { + description = "periodically fetch aramark"; + path = [ + pkgs.curl + pkgs.gnugrep + pkgs.gnused + ]; + wantedBy = [ "multi-user.target" ]; + environment = { + INFLUX_HOST = "localhost"; + INFLUX_PORT = "8086"; + }; + # every 10 seconds when the cantina is open + startAt = "Mon,Tue,Wed,Thu,Fri *-*-* 6,7,8,9,10,11,12,13,14,15:*:0/10"; + serviceConfig = { + User = "nobody"; + ExecStart = "${pkg}/bin/aralast"; + PrivateTmp = true; + }; + }; +} -- cgit v1.2.3 From c29ba49d3dba4386ee90e784912d38b37e63efa6 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 24 May 2017 10:49:34 +0200 Subject: m 2 central-stats-server: redirect http://stats.makefu.r to grafana --- makefu/2configs/logging/central-stats-server.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'makefu') diff --git a/makefu/2configs/logging/central-stats-server.nix b/makefu/2configs/logging/central-stats-server.nix index 4f7961f3..602fcc6d 100644 --- a/makefu/2configs/logging/central-stats-server.nix +++ b/makefu/2configs/logging/central-stats-server.nix @@ -12,7 +12,9 @@ in { services.grafana.addr = "0.0.0.0"; services.influxdb.enable = true; - + # redirect grafana to stats.makefu.r + services.nginx.enable = true; + services.nginx.virtualHosts."stats.makefu.r".locations."/".proxyPass = "http://localhost:3000"; # forward these via nginx services.influxdb.extraConfig = { meta.hostname = config.krebs.build.host.name; -- cgit v1.2.3 From ce43883b50db14453c21da35c8a6bd50422cfe06 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 24 May 2017 10:51:12 +0200 Subject: m 2 jack-on-pulse: start as systemd user service --- makefu/2configs/audio/jack-on-pulse.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'makefu') diff --git a/makefu/2configs/audio/jack-on-pulse.nix b/makefu/2configs/audio/jack-on-pulse.nix index 09d03ea9..49b61d5a 100644 --- a/makefu/2configs/audio/jack-on-pulse.nix +++ b/makefu/2configs/audio/jack-on-pulse.nix @@ -2,6 +2,7 @@ let pulse = pkgs.pulseaudioFull; user = config.makefu.gui.user; + wait_time = 30; in { sound.enable = true; @@ -13,16 +14,17 @@ in environment.systemPackages = with pkgs; [ jack2Full ]; # from http://anderspapitto.com/posts/2015-11-26-overtone-on-nixos-with-jack-and-pulseaudio.html - systemd.services = { + systemd.user.services = { jackdbus = { description = "Runs jack, and points pulseaudio at it"; serviceConfig = { - User = user; Type = "oneshot"; ExecStart = pkgs.writeScript "start_jack.sh" '' #! ${pkgs.bash}/bin/bash . ${config.system.build.setEnvironment} - sleep 5 # wait for the gui to load + + # TODO: correctly wait for pulseaudio, cannot use pulseaudio.service + sleep ${toString wait_time} # wait for the gui to load ${pkgs.jack2Full}/bin/jack_control start sleep 3 # give some time for sources/sinks to be created @@ -37,9 +39,11 @@ in ${pkgs.jack2Full}/bin/jack_control stop ''; RemainAfterExit = true; + Restart = "always"; + RestartSec = "5"; }; - after = [ "display-manager.service" "sound.target" ]; - wantedBy = [ "multi-user.target" ]; + # after = [ "display-manager.service" "sound.target" ]; + wantedBy = [ "default.target" ]; }; }; } -- cgit v1.2.3 From 01d31cb57ddcb38d64f1eeedc25ca70ad5913e4c Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 24 May 2017 10:51:36 +0200 Subject: m 2 led-fader: wait for mosquitto if defined locally --- makefu/2configs/deployment/led-fader.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'makefu') diff --git a/makefu/2configs/deployment/led-fader.nix b/makefu/2configs/deployment/led-fader.nix index a1841649..e4d62ae7 100644 --- a/makefu/2configs/deployment/led-fader.nix +++ b/makefu/2configs/deployment/led-fader.nix @@ -29,7 +29,8 @@ in { environment = { NIX_PATH = "/var/src"; }; - wantedBy = [ "multi-user.target" ]; + after = [ (lib.optional config.services.mosqitto.enable "mosquitto.service") ]; + wantedBy = [ "multi-user.target" ]; serviceConfig = { # User = "nobody"; # need a user with permissions to run nix-shell ExecStart = "${pkg}/bin/ampel 4 ${pkg}/share/times.json"; -- cgit v1.2.3 From 00f5855223ecda48979314eeb550b5885e418a00 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 24 May 2017 10:52:37 +0200 Subject: m 2 games: include games-user-env --- makefu/2configs/tools/games.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'makefu') diff --git a/makefu/2configs/tools/games.nix b/makefu/2configs/tools/games.nix index 34c68645..47f06287 100644 --- a/makefu/2configs/tools/games.nix +++ b/makefu/2configs/tools/games.nix @@ -3,5 +3,6 @@ { krebs.per-user.makefu.packages = with pkgs; [ steam + games-user-env ]; } -- cgit v1.2.3 From 54ca947fe1f918d1b62d479df308637d60a3143b Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 24 May 2017 10:53:08 +0200 Subject: m 2 wiki-irc-bot: move to subdir, add patch --- .../2configs/deployment/wiki-irc-bot/default.nix | 67 ++++++++++++++++++++++ .../deployment/wiki-irc-bot/irc-out-notice.patch | 26 +++++++++ makefu/2configs/deployment/wiki-irc.nix | 62 -------------------- 3 files changed, 93 insertions(+), 62 deletions(-) create mode 100644 makefu/2configs/deployment/wiki-irc-bot/default.nix create mode 100644 makefu/2configs/deployment/wiki-irc-bot/irc-out-notice.patch delete mode 100644 makefu/2configs/deployment/wiki-irc.nix (limited to 'makefu') diff --git a/makefu/2configs/deployment/wiki-irc-bot/default.nix b/makefu/2configs/deployment/wiki-irc-bot/default.nix new file mode 100644 index 00000000..7ab31e69 --- /dev/null +++ b/makefu/2configs/deployment/wiki-irc-bot/default.nix @@ -0,0 +1,67 @@ +{ pkgs, lib, ... }: + +with lib; +let + port = 18872; +in { + nixpkgs.config.packageOverrides = pkgs: with pkgs; { + logstash = pkgs.stdenv.lib.overrideDerivation pkgs.logstash (old: { + patches = [ ./irc-out-notice.patch ]; }); + }; + services.logstash = { + enable = true; + inputConfig = '' + http { + port => ${toString port} + host => "127.0.0.1" + } + ''; + filterConfig = '' + if ([pages]) { + ruby { + code => ' + require "net/http" + require "net/https" + http = Net::HTTP.new("git.io", 443) + http.use_ssl = true + lines = [] + event["pages"].each {|p| + url = "#{p["html_url"]}/_compare/#{p["sha"]}" + short_url = begin + request = Net::HTTP::Post.new "/" + request.set_form_data ({"url" => url }) + response = http.request(request) + response["location"] + end + lines << "\"#{p["title"]}\" #{p["action"]} by #{event["sender"]["login"]} #{short_url}" + } + event["output"] = lines.join("\n") + ' + } + } + ''; + outputConfig = '' + file { path => "/tmp/logs.json" codec => "json_lines" } + if [output] { + irc { + channels => [ "#krebs", "#nixos" ] + host => "irc.freenode.net" + nick => "nixos-users-wiki" + format => "%{output}" + notice => true + } + } + ''; + plugins = [ ]; + }; + + services.nginx = { + enable = lib.mkDefault true; + virtualHosts."ghook.krebsco.de" = { + locations."/".proxyPass = "http://localhost:${toString port}/"; + enableSSL = true; + enableACME = true; + forceSSL = true; + }; + }; +} diff --git a/makefu/2configs/deployment/wiki-irc-bot/irc-out-notice.patch b/makefu/2configs/deployment/wiki-irc-bot/irc-out-notice.patch new file mode 100644 index 00000000..040643f8 --- /dev/null +++ b/makefu/2configs/deployment/wiki-irc-bot/irc-out-notice.patch @@ -0,0 +1,26 @@ +index b63339d..8c8c747 100644 +--- a/vendor/bundle/jruby/1.9/gems/logstash-output-irc-2.0.4/lib/logstash/outputs/irc.rb ++++ b/vendor/bundle/jruby/1.9/gems/logstash-output-irc-2.0.4/lib/logstash/outputs/irc.rb +@@ -48,6 +48,9 @@ class LogStash::Outputs::Irc < LogStash::Outputs::Base + # Static string after event + config :post_string, :validate => :string, :required => false + ++ # Set this to true to send messages as notice ++ config :notice, :validate => :boolean, :default => false ++ + public + + def inject_bot(bot) +@@ -90,9 +93,9 @@ class LogStash::Outputs::Irc < LogStash::Outputs::Base + + @bot.channels.each do |channel| + @logger.debug("Sending to...", :channel => channel, :text => text) +- channel.msg(pre_string) if !@pre_string.nil? +- channel.msg(text) +- channel.msg(post_string) if !@post_string.nil? ++ channel.send(pre_string, :notice => @notice) if !@pre_string.nil? ++ channel.send(text, :notice => @notice) ++ channel.send(post_string, :notice => @notice) if !@post_string.nil? + end # channels.each + end # def receive + end # class LogStash::Outputs::Irc diff --git a/makefu/2configs/deployment/wiki-irc.nix b/makefu/2configs/deployment/wiki-irc.nix deleted file mode 100644 index dc7c8afe..00000000 --- a/makefu/2configs/deployment/wiki-irc.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ pkgs, lib, ... }: - -with lib; -let - port = 18872; -in { - services.logstash = { - enable = true; - inputConfig = '' - http { - port => ${toString port} - host => "127.0.0.1" - } - ''; - filterConfig = '' - if ([pages]) { - ruby { - code => ' - require "net/http" - require "net/https" - http = Net::HTTP.new("git.io", 443) - http.use_ssl = true - lines = [] - event["pages"].each {|p| - url = "#{p["html_url"]}/_compare/#{p["sha"]}" - short_url = begin - request = Net::HTTP::Post.new "/" - request.set_form_data ({"url" => url }) - response = http.request(request) - response["location"] - end - lines << "\"#{p["title"]}\" #{p["action"]} by #{event["sender"]["login"]} #{short_url}" - } - event["output"] = lines.join("\n") - ' - } - } - ''; - outputConfig = '' - file { path => "/tmp/logs.json" codec => "json_lines" } - if [output] { - irc { - channels => [ "#nixos" , "#krebs" ] - host => "irc.freenode.net" - nick => "nixos-users-wiki" - format => "%{output}" - } - } - ''; - plugins = [ ]; - }; - - services.nginx = { - enable = lib.mkDefault true; - virtualHosts."ghook.krebsco.de" = { - locations."/".proxyPass = "http://localhost:${toString port}/"; - enableSSL = true; - enableACME = true; - forceSSL = true; - }; - }; -} -- cgit v1.2.3 From b4289416165428a490542784b0ee418d85c85226 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 24 May 2017 10:53:50 +0200 Subject: m 1 gum: use upstream taskserver config --- makefu/1systems/gum.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'makefu') diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index 92c44621..ddff9f78 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -48,8 +48,18 @@ in { ../2configs/deployment/mycube.connector.one.nix ../2configs/deployment/graphs.nix ../2configs/deployment/owncloud.nix - ../2configs/deployment/wiki-irc.nix + ../2configs/deployment/wiki-irc-bot ../2configs/deployment/boot-euer.nix + { + services.taskserver.enable = true; + services.taskserver.fqdn = config.krebs.build.host.name; + services.taskserver.listenHost = "::"; + services.taskserver.organisations.home.users = [ "makefu" ]; + networking.firewall.extraCommands = '' + iptables -A INPUT -i retiolum -p tcp --dport 53589 -j ACCEPT + ip6tables -A INPUT -i retiolum -p tcp --dport 53589 -j ACCEPT + ''; + } # ../2configs/ipfs.nix ../2configs/syncthing.nix @@ -78,7 +88,6 @@ in { ]; }; - makefu.taskserver.enable = true; # access @@ -122,6 +131,8 @@ in { 21031 # taskserver 53589 + # temp vnc + 18001 ]; allowedUDPPorts = [ # tinc -- cgit v1.2.3 From 243d33abe350a1a7b41a7f2c6106fd5b92bde4c8 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 24 May 2017 16:53:57 +0200 Subject: m 2 gui/base: euro-sign --- makefu/2configs/gui/base.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'makefu') diff --git a/makefu/2configs/gui/base.nix b/makefu/2configs/gui/base.nix index bf6bef29..0247010b 100644 --- a/makefu/2configs/gui/base.nix +++ b/makefu/2configs/gui/base.nix @@ -24,7 +24,7 @@ in enable = true; layout = "us"; xkbVariant = "altgr-intl"; - xkbOptions = "ctrl:nocaps"; + xkbOptions = "ctrl:nocaps, eurosign:e"; windowManager = { awesome.enable = true; -- cgit v1.2.3 From 0c92dd719a46139523f6e353c354871bd78024a4 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 25 May 2017 23:19:36 +0200 Subject: m 2: rename stats and share --- makefu/1systems/gum.nix | 6 +- makefu/1systems/omo.nix | 13 ++-- makefu/2configs/gum-share.nix | 39 ---------- makefu/2configs/logging/central-logging-client.nix | 32 --------- makefu/2configs/logging/central-logging-server.nix | 23 ------ makefu/2configs/logging/central-stats-client.nix | 60 ---------------- makefu/2configs/logging/central-stats-server.nix | 84 ---------------------- makefu/2configs/logging/client.nix | 32 +++++++++ makefu/2configs/logging/external/aralast.nix | 38 ---------- makefu/2configs/logging/server.nix | 23 ++++++ makefu/2configs/omo-share.nix | 69 ------------------ makefu/2configs/share/gum.nix | 39 ++++++++++ makefu/2configs/share/omo.nix | 69 ++++++++++++++++++ makefu/2configs/share/temp-share-samba.nix | 31 ++++++++ makefu/2configs/stats/client.nix | 60 ++++++++++++++++ makefu/2configs/stats/external/aralast.nix | 38 ++++++++++ makefu/2configs/stats/server.nix | 84 ++++++++++++++++++++++ makefu/2configs/temp-share-samba.nix | 31 -------- 18 files changed, 387 insertions(+), 384 deletions(-) delete mode 100644 makefu/2configs/gum-share.nix delete mode 100644 makefu/2configs/logging/central-logging-client.nix delete mode 100644 makefu/2configs/logging/central-logging-server.nix delete mode 100644 makefu/2configs/logging/central-stats-client.nix delete mode 100644 makefu/2configs/logging/central-stats-server.nix create mode 100644 makefu/2configs/logging/client.nix delete mode 100644 makefu/2configs/logging/external/aralast.nix create mode 100644 makefu/2configs/logging/server.nix delete mode 100644 makefu/2configs/omo-share.nix create mode 100644 makefu/2configs/share/gum.nix create mode 100644 makefu/2configs/share/omo.nix create mode 100644 makefu/2configs/share/temp-share-samba.nix create mode 100644 makefu/2configs/stats/client.nix create mode 100644 makefu/2configs/stats/external/aralast.nix create mode 100644 makefu/2configs/stats/server.nix delete mode 100644 makefu/2configs/temp-share-samba.nix (limited to 'makefu') diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index ddff9f78..fb4fac3f 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -32,7 +32,7 @@ in { ../2configs/tools/sec.nix # services - ../2configs/gum-share.nix + ../2configs/share/gum.nix ../2configs/sabnzbd.nix ../2configs/torrent.nix ../2configs/iodined.nix @@ -64,8 +64,8 @@ in { ../2configs/syncthing.nix # ../2configs/opentracker.nix - ../2configs/logging/central-stats-client.nix - # ../2configs/logging/central-logging-client.nix + ../2configs/stats/client.nix + # ../2configs/logging/client.nix ]; makefu.dl-dir = "/var/download"; diff --git a/makefu/1systems/omo.nix b/makefu/1systems/omo.nix index 91785a07..0f1b8e0d 100644 --- a/makefu/1systems/omo.nix +++ b/makefu/1systems/omo.nix @@ -50,11 +50,13 @@ in { # ../2configs/disable_v6.nix #../2configs/graphite-standalone.nix #../2configs/share-user-sftp.nix - ../2configs/omo-share.nix + ../2configs/share/omo.nix ../2configs/tinc/retiolum.nix - ../2configs/logging/central-stats-server.nix - # ../2configs/logging/central-logging-server.nix - ../2configs/logging/central-stats-client.nix + + # Logging + ../2configs/stats/server.nix #influx + grafana + ../2configs/stats/client.nix + ../2configs/stats/external/aralast.nix # logs to influx # services ../2configs/syncthing.nix @@ -180,7 +182,8 @@ in { uid = 9002; name = "misa"; }; - hardware.enableAllFirmware = true; + # hardware.enableAllFirmware = true; + hardware.enableRedistributableFirmware = true; hardware.cpu.intel.updateMicrocode = true; zramSwap.enable = true; diff --git a/makefu/2configs/gum-share.nix b/makefu/2configs/gum-share.nix deleted file mode 100644 index e578f43d..00000000 --- a/makefu/2configs/gum-share.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ config, lib, pkgs, ... }: - -with config.krebs.lib; -let - hostname = config.krebs.build.host.name; -in { - # users.users.smbguest = { - # name = "smbguest"; - # uid = config.ids.uids.smbguest; - # description = "smb guest user"; - # home = "/var/empty"; - # }; - - users.users.download = { }; - services.samba = { - enable = true; - shares = { - download = { - path = "/var/download"; - "read only" = "no"; - browseable = "yes"; - "guest ok" = "no"; - "valid users" = "download"; - }; - }; - extraConfig = '' - # guest account = smbguest - # map to guest = bad user - # disable printing - load printers = no - printing = bsd - printcap name = /dev/null - disable spoolss = yes - ''; - }; - networking.firewall.extraCommands = '' - iptables -A INPUT -i retiolum -p tcp --dport 445 -j ACCEPT - ''; -} diff --git a/makefu/2configs/logging/central-logging-client.nix b/makefu/2configs/logging/central-logging-client.nix deleted file mode 100644 index 04d2de0d..00000000 --- a/makefu/2configs/logging/central-logging-client.nix +++ /dev/null @@ -1,32 +0,0 @@ -{pkgs, buil, config, ...}: -let - log-server = config.makefu.log-server; - log-port = 9200; -in { - services.journalbeat = { - enable = true; - # TODO: filter for certain journal fields, not all - extraConfig = '' - journalbeat: - name: logs-${config.krebs.build.host.name} - seek_position: cursor - cursor_seek_fallback: tail - write_cursor_state: true - cursor_flush_period: 5s - clean_field_names: true - convert_to_numbers: false - move_metadata_to_field: journal - default_type: journal - output.elasticsearch: - enabled: true - hosts: ["${log-server}:${builtins.toString log-port}"] - template.enabled: false - #output.console: - # enabled: true - logging.level: info - logging.to_syslog: true - logging.selectors: ["*"] - - ''; - }; -} diff --git a/makefu/2configs/logging/central-logging-server.nix b/makefu/2configs/logging/central-logging-server.nix deleted file mode 100644 index 90f8e668..00000000 --- a/makefu/2configs/logging/central-logging-server.nix +++ /dev/null @@ -1,23 +0,0 @@ -{pkgs, config, ...}: - -with import ; -let - es-port = 9200; - kibana-port = 5601; -in { - services.elasticsearch = { - enable = true; - listenAddress = "0.0.0.0"; - port = es-port; - }; - services.kibana = { - enable = true; - listenAddress = "0.0.0.0"; - port = kibana-port; - }; - - networking.firewall.extraCommands = '' - iptables -A INPUT -i retiolum -p tcp --dport ${toString es-port} -j ACCEPT - iptables -A INPUT -i retiolum -p tcp --dport ${toString kibana-port} -j ACCEPT - ''; -} diff --git a/makefu/2configs/logging/central-stats-client.nix b/makefu/2configs/logging/central-stats-client.nix deleted file mode 100644 index dd6dddda..00000000 --- a/makefu/2configs/logging/central-stats-client.nix +++ /dev/null @@ -1,60 +0,0 @@ -{pkgs, config, ...}: -{ - services.collectd = { - enable = true; - autoLoadPlugin = true; - extraConfig = '' - Hostname ${config.krebs.build.host.name} - LoadPlugin load - LoadPlugin disk - LoadPlugin memory - LoadPlugin df - Interval 30.0 - - LoadPlugin interface - - Interface "*Link" - Interface "lo" - Interface "vboxnet*" - Interface "virbr*" - IgnoreSelected true - - - LoadPlugin df - - MountPoint "/nix/store" - # MountPoint "/run*" - # MountPoint "/sys*" - # MountPoint "/dev" - # MountPoint "/dev/shm" - # MountPoint "/tmp" - FSType "tmpfs" - FSType "binfmt_misc" - FSType "debugfs" - FSType "mqueue" - FSType "hugetlbfs" - FSType "systemd-1" - FSType "cgroup" - FSType "securityfs" - FSType "ramfs" - FSType "proc" - FSType "devpts" - FSType "devtmpfs" - MountPoint "/var/lib/docker/devicemapper" - IgnoreSelected true - - - LoadPlugin cpu - - ReportByCpu true - ReportByState true - ValuesPercentage true - - - LoadPlugin network - - Server "${config.makefu.stats-server}" "25826" - - ''; - }; -} diff --git a/makefu/2configs/logging/central-stats-server.nix b/makefu/2configs/logging/central-stats-server.nix deleted file mode 100644 index 602fcc6d..00000000 --- a/makefu/2configs/logging/central-stats-server.nix +++ /dev/null @@ -1,84 +0,0 @@ -{pkgs, config, ...}: - -with import ; -let - collectd-port = 25826; - influx-port = 8086; - grafana-port = 3000; # TODO nginx forward - db = "collectd_db"; - logging-interface = config.makefu.server.primary-itf; -in { - services.grafana.enable = true; - services.grafana.addr = "0.0.0.0"; - - services.influxdb.enable = true; - # redirect grafana to stats.makefu.r - services.nginx.enable = true; - services.nginx.virtualHosts."stats.makefu.r".locations."/".proxyPass = "http://localhost:3000"; - # forward these via nginx - services.influxdb.extraConfig = { - meta.hostname = config.krebs.build.host.name; - # meta.logging-enabled = true; - http.bind-address = ":${toString influx-port}"; - admin.bind-address = ":8083"; - monitoring = { - enabled = false; - # write-interval = "24h"; - }; - collectd = [{ - enabled = true; - typesdb = "${pkgs.collectd}/share/collectd/types.db"; - database = db; - port = collectd-port; - }]; - }; - krebs.kapacitor = - let - echoToIrc = pkgs.writeDash "echo_irc" '' - set -euf - data="$(${pkgs.jq}/bin/jq -r .message)" - export LOGNAME=malarm - ${pkgs.irc-announce}/bin/irc-announce \ - irc.freenode.org 6667 malarm \#krebs-bots "$data" >/dev/null - ''; - in { - enable = true; - alarms = { - cpu_deadman.database = db; - cpu_deadman.text = '' - var data = batch - |query(${"'''"} - SELECT mean("value") AS mean - FROM "collectd_db"."default"."cpu_value" - WHERE "type_instance" = 'idle' AND "type" = 'percent' fill(0) - ${"'''"}) - .period(10m) - .every(1m) - .groupBy('host') - data |alert() - .crit(lambda: "mean" < 50) - .stateChangesOnly() - .exec('${echoToIrc}') - data |deadman(1.0,5m) - .stateChangesOnly() - .exec('${echoToIrc}') - ''; - }; - - }; - networking.firewall.extraCommands = '' - iptables -A INPUT -i retiolum -p udp --dport ${toString collectd-port} -j ACCEPT - iptables -A INPUT -i retiolum -p tcp --dport ${toString influx-port} -j ACCEPT - iptables -A INPUT -i retiolum -p tcp --dport ${toString grafana-port} -j ACCEPT - iptables -A INPUT -i ${logging-interface} -p udp --dport ${toString collectd-port} -j ACCEPT - iptables -A INPUT -i ${logging-interface} -p tcp --dport ${toString influx-port} -j ACCEPT - iptables -A INPUT -i ${logging-interface} -p tcp --dport ${toString grafana-port} -j ACCEPT - - ip6tables -A INPUT -i retiolum -p udp --dport ${toString collectd-port} -j ACCEPT - ip6tables -A INPUT -i retiolum -p tcp --dport ${toString influx-port} -j ACCEPT - ip6tables -A INPUT -i retiolum -p tcp --dport ${toString grafana-port} -j ACCEPT - ip6tables -A INPUT -i ${logging-interface} -p udp --dport ${toString collectd-port} -j ACCEPT - ip6tables -A INPUT -i ${logging-interface} -p tcp --dport ${toString influx-port} -j ACCEPT - ip6tables -A INPUT -i ${logging-interface} -p tcp --dport ${toString grafana-port} -j ACCEPT - ''; -} diff --git a/makefu/2configs/logging/client.nix b/makefu/2configs/logging/client.nix new file mode 100644 index 00000000..04d2de0d --- /dev/null +++ b/makefu/2configs/logging/client.nix @@ -0,0 +1,32 @@ +{pkgs, buil, config, ...}: +let + log-server = config.makefu.log-server; + log-port = 9200; +in { + services.journalbeat = { + enable = true; + # TODO: filter for certain journal fields, not all + extraConfig = '' + journalbeat: + name: logs-${config.krebs.build.host.name} + seek_position: cursor + cursor_seek_fallback: tail + write_cursor_state: true + cursor_flush_period: 5s + clean_field_names: true + convert_to_numbers: false + move_metadata_to_field: journal + default_type: journal + output.elasticsearch: + enabled: true + hosts: ["${log-server}:${builtins.toString log-port}"] + template.enabled: false + #output.console: + # enabled: true + logging.level: info + logging.to_syslog: true + logging.selectors: ["*"] + + ''; + }; +} diff --git a/makefu/2configs/logging/external/aralast.nix b/makefu/2configs/logging/external/aralast.nix deleted file mode 100644 index c335db45..00000000 --- a/makefu/2configs/logging/external/aralast.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, lib, pkgs, ... }: - -with import ; -let - pkg = pkgs.stdenv.mkDerivation { - name = "aralast-master"; - src = pkgs.fetchFromGitHub { - owner = "makefu"; - repo = "aralast"; - rev = "7121598"; - sha256 = "0vw027c698h9b69ksid5p3pji9960hd7n9xi4arrax0vfkwryb4m"; - }; - installPhase = '' - install -m755 -D aralast.sh $out/bin/aralast - ''; - }; -in { - systemd.services.aralast = { - description = "periodically fetch aramark"; - path = [ - pkgs.curl - pkgs.gnugrep - pkgs.gnused - ]; - wantedBy = [ "multi-user.target" ]; - environment = { - INFLUX_HOST = "localhost"; - INFLUX_PORT = "8086"; - }; - # every 10 seconds when the cantina is open - startAt = "Mon,Tue,Wed,Thu,Fri *-*-* 6,7,8,9,10,11,12,13,14,15:*:0/10"; - serviceConfig = { - User = "nobody"; - ExecStart = "${pkg}/bin/aralast"; - PrivateTmp = true; - }; - }; -} diff --git a/makefu/2configs/logging/server.nix b/makefu/2configs/logging/server.nix new file mode 100644 index 00000000..90f8e668 --- /dev/null +++ b/makefu/2configs/logging/server.nix @@ -0,0 +1,23 @@ +{pkgs, config, ...}: + +with import ; +let + es-port = 9200; + kibana-port = 5601; +in { + services.elasticsearch = { + enable = true; + listenAddress = "0.0.0.0"; + port = es-port; + }; + services.kibana = { + enable = true; + listenAddress = "0.0.0.0"; + port = kibana-port; + }; + + networking.firewall.extraCommands = '' + iptables -A INPUT -i retiolum -p tcp --dport ${toString es-port} -j ACCEPT + iptables -A INPUT -i retiolum -p tcp --dport ${toString kibana-port} -j ACCEPT + ''; +} diff --git a/makefu/2configs/omo-share.nix b/makefu/2configs/omo-share.nix deleted file mode 100644 index 7d7a4ec5..00000000 --- a/makefu/2configs/omo-share.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ config, lib, pkgs, ... }: - -with import ; -let - hostname = config.krebs.build.host.name; - # TODO local-ip from the nets config - local-ip = "192.168.1.11"; - # local-ip = config.krebs.build.host.nets.retiolum.ip4.addr; -in { - - # samba share /media/crypt1/share - users.users.smbguest = { - name = "smbguest"; - uid = config.ids.uids.smbguest; - description = "smb guest user"; - home = "/var/empty"; - }; - services.samba = { - enable = true; - shares = { - winshare = { - path = "/media/crypt1/share"; - "read only" = "no"; - browseable = "yes"; - "guest ok" = "yes"; - }; - emu = { - path = "/media/crypt1/emu"; - "read only" = "yes"; - browseable = "yes"; - "guest ok" = "yes"; - }; - usenet = { - path = "/media/crypt0/usenet/dst"; - "read only" = "yes"; - browseable = "yes"; - "guest ok" = "yes"; - }; - pyload = { - path = "/media/crypt0/pyload"; - "read only" = "yes"; - browseable = "yes"; - "guest ok" = "yes"; - }; - crypt0 = { - path = "/media/crypt0"; - "read only" = "yes"; - browseable = "yes"; - "guest ok" = "yes"; - }; - media-rw = { - path = "/media/"; - "read only" = "no"; - browseable = "yes"; - "guest ok" = "no"; - "valid users" = "makefu"; - }; - }; - extraConfig = '' - guest account = smbguest - map to guest = bad user - # disable printing - load printers = no - printing = bsd - printcap name = /dev/null - disable spoolss = yes - ''; - }; -} diff --git a/makefu/2configs/share/gum.nix b/makefu/2configs/share/gum.nix new file mode 100644 index 00000000..e578f43d --- /dev/null +++ b/makefu/2configs/share/gum.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs, ... }: + +with config.krebs.lib; +let + hostname = config.krebs.build.host.name; +in { + # users.users.smbguest = { + # name = "smbguest"; + # uid = config.ids.uids.smbguest; + # description = "smb guest user"; + # home = "/var/empty"; + # }; + + users.users.download = { }; + services.samba = { + enable = true; + shares = { + download = { + path = "/var/download"; + "read only" = "no"; + browseable = "yes"; + "guest ok" = "no"; + "valid users" = "download"; + }; + }; + extraConfig = '' + # guest account = smbguest + # map to guest = bad user + # disable printing + load printers = no + printing = bsd + printcap name = /dev/null + disable spoolss = yes + ''; + }; + networking.firewall.extraCommands = '' + iptables -A INPUT -i retiolum -p tcp --dport 445 -j ACCEPT + ''; +} diff --git a/makefu/2configs/share/omo.nix b/makefu/2configs/share/omo.nix new file mode 100644 index 00000000..7d7a4ec5 --- /dev/null +++ b/makefu/2configs/share/omo.nix @@ -0,0 +1,69 @@ +{ config, lib, pkgs, ... }: + +with import ; +let + hostname = config.krebs.build.host.name; + # TODO local-ip from the nets config + local-ip = "192.168.1.11"; + # local-ip = config.krebs.build.host.nets.retiolum.ip4.addr; +in { + + # samba share /media/crypt1/share + users.users.smbguest = { + name = "smbguest"; + uid = config.ids.uids.smbguest; + description = "smb guest user"; + home = "/var/empty"; + }; + services.samba = { + enable = true; + shares = { + winshare = { + path = "/media/crypt1/share"; + "read only" = "no"; + browseable = "yes"; + "guest ok" = "yes"; + }; + emu = { + path = "/media/crypt1/emu"; + "read only" = "yes"; + browseable = "yes"; + "guest ok" = "yes"; + }; + usenet = { + path = "/media/crypt0/usenet/dst"; + "read only" = "yes"; + browseable = "yes"; + "guest ok" = "yes"; + }; + pyload = { + path = "/media/crypt0/pyload"; + "read only" = "yes"; + browseable = "yes"; + "guest ok" = "yes"; + }; + crypt0 = { + path = "/media/crypt0"; + "read only" = "yes"; + browseable = "yes"; + "guest ok" = "yes"; + }; + media-rw = { + path = "/media/"; + "read only" = "no"; + browseable = "yes"; + "guest ok" = "no"; + "valid users" = "makefu"; + }; + }; + extraConfig = '' + guest account = smbguest + map to guest = bad user + # disable printing + load printers = no + printing = bsd + printcap name = /dev/null + disable spoolss = yes + ''; + }; +} diff --git a/makefu/2configs/share/temp-share-samba.nix b/makefu/2configs/share/temp-share-samba.nix new file mode 100644 index 00000000..0907c2db --- /dev/null +++ b/makefu/2configs/share/temp-share-samba.nix @@ -0,0 +1,31 @@ +{config, ... }:{ + networking.firewall.allowedUDPPorts = [ 137 138 ]; + networking.firewall.allowedTCPPorts = [ 139 445 ]; + users.users.smbguest = { + name = "smbguest"; + uid = config.ids.uids.smbguest; + description = "smb guest user"; + home = "/home/share"; + createHome = true; + }; + services.samba = { + enable = true; + shares = { + share-home = { + path = "/home/share/"; + "read only" = "no"; + browseable = "yes"; + "guest ok" = "yes"; + }; + }; + extraConfig = '' + guest account = smbguest + map to guest = bad user + # disable printing + load printers = no + printing = bsd + printcap name = /dev/null + disable spoolss = yes + ''; + }; +} diff --git a/makefu/2configs/stats/client.nix b/makefu/2configs/stats/client.nix new file mode 100644 index 00000000..dd6dddda --- /dev/null +++ b/makefu/2configs/stats/client.nix @@ -0,0 +1,60 @@ +{pkgs, config, ...}: +{ + services.collectd = { + enable = true; + autoLoadPlugin = true; + extraConfig = '' + Hostname ${config.krebs.build.host.name} + LoadPlugin load + LoadPlugin disk + LoadPlugin memory + LoadPlugin df + Interval 30.0 + + LoadPlugin interface + + Interface "*Link" + Interface "lo" + Interface "vboxnet*" + Interface "virbr*" + IgnoreSelected true + + + LoadPlugin df + + MountPoint "/nix/store" + # MountPoint "/run*" + # MountPoint "/sys*" + # MountPoint "/dev" + # MountPoint "/dev/shm" + # MountPoint "/tmp" + FSType "tmpfs" + FSType "binfmt_misc" + FSType "debugfs" + FSType "mqueue" + FSType "hugetlbfs" + FSType "systemd-1" + FSType "cgroup" + FSType "securityfs" + FSType "ramfs" + FSType "proc" + FSType "devpts" + FSType "devtmpfs" + MountPoint "/var/lib/docker/devicemapper" + IgnoreSelected true + + + LoadPlugin cpu + + ReportByCpu true + ReportByState true + ValuesPercentage true + + + LoadPlugin network + + Server "${config.makefu.stats-server}" "25826" + + ''; + }; +} diff --git a/makefu/2configs/stats/external/aralast.nix b/makefu/2configs/stats/external/aralast.nix new file mode 100644 index 00000000..c335db45 --- /dev/null +++ b/makefu/2configs/stats/external/aralast.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, ... }: + +with import ; +let + pkg = pkgs.stdenv.mkDerivation { + name = "aralast-master"; + src = pkgs.fetchFromGitHub { + owner = "makefu"; + repo = "aralast"; + rev = "7121598"; + sha256 = "0vw027c698h9b69ksid5p3pji9960hd7n9xi4arrax0vfkwryb4m"; + }; + installPhase = '' + install -m755 -D aralast.sh $out/bin/aralast + ''; + }; +in { + systemd.services.aralast = { + description = "periodically fetch aramark"; + path = [ + pkgs.curl + pkgs.gnugrep + pkgs.gnused + ]; + wantedBy = [ "multi-user.target" ]; + environment = { + INFLUX_HOST = "localhost"; + INFLUX_PORT = "8086"; + }; + # every 10 seconds when the cantina is open + startAt = "Mon,Tue,Wed,Thu,Fri *-*-* 6,7,8,9,10,11,12,13,14,15:*:0/10"; + serviceConfig = { + User = "nobody"; + ExecStart = "${pkg}/bin/aralast"; + PrivateTmp = true; + }; + }; +} diff --git a/makefu/2configs/stats/server.nix b/makefu/2configs/stats/server.nix new file mode 100644 index 00000000..602fcc6d --- /dev/null +++ b/makefu/2configs/stats/server.nix @@ -0,0 +1,84 @@ +{pkgs, config, ...}: + +with import ; +let + collectd-port = 25826; + influx-port = 8086; + grafana-port = 3000; # TODO nginx forward + db = "collectd_db"; + logging-interface = config.makefu.server.primary-itf; +in { + services.grafana.enable = true; + services.grafana.addr = "0.0.0.0"; + + services.influxdb.enable = true; + # redirect grafana to stats.makefu.r + services.nginx.enable = true; + services.nginx.virtualHosts."stats.makefu.r".locations."/".proxyPass = "http://localhost:3000"; + # forward these via nginx + services.influxdb.extraConfig = { + meta.hostname = config.krebs.build.host.name; + # meta.logging-enabled = true; + http.bind-address = ":${toString influx-port}"; + admin.bind-address = ":8083"; + monitoring = { + enabled = false; + # write-interval = "24h"; + }; + collectd = [{ + enabled = true; + typesdb = "${pkgs.collectd}/share/collectd/types.db"; + database = db; + port = collectd-port; + }]; + }; + krebs.kapacitor = + let + echoToIrc = pkgs.writeDash "echo_irc" '' + set -euf + data="$(${pkgs.jq}/bin/jq -r .message)" + export LOGNAME=malarm + ${pkgs.irc-announce}/bin/irc-announce \ + irc.freenode.org 6667 malarm \#krebs-bots "$data" >/dev/null + ''; + in { + enable = true; + alarms = { + cpu_deadman.database = db; + cpu_deadman.text = '' + var data = batch + |query(${"'''"} + SELECT mean("value") AS mean + FROM "collectd_db"."default"."cpu_value" + WHERE "type_instance" = 'idle' AND "type" = 'percent' fill(0) + ${"'''"}) + .period(10m) + .every(1m) + .groupBy('host') + data |alert() + .crit(lambda: "mean" < 50) + .stateChangesOnly() + .exec('${echoToIrc}') + data |deadman(1.0,5m) + .stateChangesOnly() + .exec('${echoToIrc}') + ''; + }; + + }; + networking.firewall.extraCommands = '' + iptables -A INPUT -i retiolum -p udp --dport ${toString collectd-port} -j ACCEPT + iptables -A INPUT -i retiolum -p tcp --dport ${toString influx-port} -j ACCEPT + iptables -A INPUT -i retiolum -p tcp --dport ${toString grafana-port} -j ACCEPT + iptables -A INPUT -i ${logging-interface} -p udp --dport ${toString collectd-port} -j ACCEPT + iptables -A INPUT -i ${logging-interface} -p tcp --dport ${toString influx-port} -j ACCEPT + iptables -A INPUT -i ${logging-interface} -p tcp --dport ${toString grafana-port} -j ACCEPT + + ip6tables -A INPUT -i retiolum -p udp --dport ${toString collectd-port} -j ACCEPT + ip6tables -A INPUT -i retiolum -p tcp --dport ${toString influx-port} -j ACCEPT + ip6tables -A INPUT -i retiolum -p tcp --dport ${toString grafana-port} -j ACCEPT + ip6tables -A INPUT -i ${logging-interface} -p udp --dport ${toString collectd-port} -j ACCEPT + ip6tables -A INPUT -i ${logging-interface} -p tcp --dport ${toString influx-port} -j ACCEPT + ip6tables -A INPUT -i ${logging-interface} -p tcp --dport ${toString grafana-port} -j ACCEPT + ''; +} diff --git a/makefu/2configs/temp-share-samba.nix b/makefu/2configs/temp-share-samba.nix deleted file mode 100644 index 0907c2db..00000000 --- a/makefu/2configs/temp-share-samba.nix +++ /dev/null @@ -1,31 +0,0 @@ -{config, ... }:{ - networking.firewall.allowedUDPPorts = [ 137 138 ]; - networking.firewall.allowedTCPPorts = [ 139 445 ]; - users.users.smbguest = { - name = "smbguest"; - uid = config.ids.uids.smbguest; - description = "smb guest user"; - home = "/home/share"; - createHome = true; - }; - services.samba = { - enable = true; - shares = { - share-home = { - path = "/home/share/"; - "read only" = "no"; - browseable = "yes"; - "guest ok" = "yes"; - }; - }; - extraConfig = '' - guest account = smbguest - map to guest = bad user - # disable printing - load printers = no - printing = bsd - printcap name = /dev/null - disable spoolss = yes - ''; - }; -} -- cgit v1.2.3 From 90822f64e0bf247c5cca2f035077553cac5ceb79 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 1 Jun 2017 09:21:20 +0200 Subject: shared: move shack config to shack/ --- makefu/2configs/deployment/hound/default.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 makefu/2configs/deployment/hound/default.nix (limited to 'makefu') diff --git a/makefu/2configs/deployment/hound/default.nix b/makefu/2configs/deployment/hound/default.nix new file mode 100644 index 00000000..9e8f8889 --- /dev/null +++ b/makefu/2configs/deployment/hound/default.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: +{ + services.nginx.virtualHosts."wikisearch.krebsco.de".locations."/".proxyPass = "http://localhost:6080"; + services.hound = { + enable = true; + listen = "127.0.0.1:6080"; + # package = pkgs.hound.overrideDerivation(oldAttrs: { + # patches = [ ./keep-repo.patch ]; + # }); + config = ''{ + "max-concurrent-indexers" : 2, + "dbpath" : "${config.services.hound.home}/data", + "repos" : { + "nixos-users-wiki": { + "url" : "https://github.com/nixos-users/wiki.wiki.git", + "url-pattern" : { + "base-url" : "{url}/{path}" + } + } + } + }''; + }; + +} -- cgit v1.2.3 From bb4c3d978a59f6efa5e6084afd55cd3e4f708a56 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 1 Jun 2017 10:12:43 +0200 Subject: m: add hound to omo, wikisearch.krebsco.de --- makefu/1systems/gum.nix | 1 + makefu/2configs/deployment/hound/default.nix | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'makefu') diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index fb4fac3f..519313f5 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -50,6 +50,7 @@ in { ../2configs/deployment/owncloud.nix ../2configs/deployment/wiki-irc-bot ../2configs/deployment/boot-euer.nix + ../2configs/deployment/hound { services.taskserver.enable = true; services.taskserver.fqdn = config.krebs.build.host.name; diff --git a/makefu/2configs/deployment/hound/default.nix b/makefu/2configs/deployment/hound/default.nix index 9e8f8889..0cfb5cde 100644 --- a/makefu/2configs/deployment/hound/default.nix +++ b/makefu/2configs/deployment/hound/default.nix @@ -1,6 +1,10 @@ { config, pkgs, ... }: { - services.nginx.virtualHosts."wikisearch.krebsco.de".locations."/".proxyPass = "http://localhost:6080"; + services.nginx.virtualHosts."wikisearch.krebsco.de" = { + forceSSL = true; + enableACME = true; + locations."/".proxyPass = "http://localhost:6080"; + }; services.hound = { enable = true; listen = "127.0.0.1:6080"; -- cgit v1.2.3 From 28b51692a2f2fe22301954d1ae1b4fd36fc3f8bb Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 1 Jun 2017 10:14:01 +0200 Subject: m 2 aralast:fix timing --- makefu/2configs/stats/external/aralast.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'makefu') diff --git a/makefu/2configs/stats/external/aralast.nix b/makefu/2configs/stats/external/aralast.nix index c335db45..870db99a 100644 --- a/makefu/2configs/stats/external/aralast.nix +++ b/makefu/2configs/stats/external/aralast.nix @@ -28,7 +28,7 @@ in { INFLUX_PORT = "8086"; }; # every 10 seconds when the cantina is open - startAt = "Mon,Tue,Wed,Thu,Fri *-*-* 6,7,8,9,10,11,12,13,14,15:*:0/10"; + startAt = "Mon,Tue,Wed,Thu,Fri *-*-* 6,7,8,9,10,11,12,13,14,15:*:0,15,30,45"; serviceConfig = { User = "nobody"; ExecStart = "${pkg}/bin/aralast"; -- cgit v1.2.3 From cee103989f43adb9eb0db81803c5b2f6ea7068e7 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 1 Jun 2017 10:14:55 +0200 Subject: m 1 studio: add real-time audio --- makefu/1systems/studio.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'makefu') diff --git a/makefu/1systems/studio.nix b/makefu/1systems/studio.nix index 400d9f88..f7d49cac 100644 --- a/makefu/1systems/studio.nix +++ b/makefu/1systems/studio.nix @@ -5,8 +5,10 @@ ../2configs/vncserver.nix ../2configs/vim.nix ../2configs/disable_v6.nix - ../2configs/jack-on-pulse.nix + ../2configs/audio/jack-on-pulse.nix + ../2configs/audio/realtime-audio.nix ../2configs/gui/studio.nix + ../2configs/binary-cache/lass.nix ]; makefu.gui.user = "user"; # we use an extra user -- cgit v1.2.3 From 9e04d0132133840fba14aca194f18925e3f353d5 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 1 Jun 2017 10:15:28 +0200 Subject: m 1 wbob: add stats client --- makefu/1systems/wbob.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'makefu') diff --git a/makefu/1systems/wbob.nix b/makefu/1systems/wbob.nix index 7f465ec7..5d0dd4a7 100644 --- a/makefu/1systems/wbob.nix +++ b/makefu/1systems/wbob.nix @@ -18,6 +18,7 @@ in { ../2configs/mqtt.nix ../2configs/deployment/led-fader.nix # ../2configs/gui/wbob-kiosk.nix + ../2configs/stats/client.nix ../2configs/gui/studio.nix ../2configs/audio/jack-on-pulse.nix -- cgit v1.2.3