From 54feede990f042cc75a240dab50ad2016ed4c9ec Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 7 Sep 2017 21:51:24 +0200 Subject: ma vncserver: retab --- makefu/2configs/vncserver.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefu/2configs/vncserver.nix b/makefu/2configs/vncserver.nix index 3d1d9fe75..e62a3f748 100644 --- a/makefu/2configs/vncserver.nix +++ b/makefu/2configs/vncserver.nix @@ -33,7 +33,7 @@ in { serviceConfig = { User = "nobody"; ExecStart = "${pkgs.novnc}/bin/launch-novnc.sh --listen ${toString web_port} --vnc localhost:${toString vnc_port}"; - PrivateTmp = true; + PrivateTmp = true; }; }; }; -- cgit v1.2.3 From 265bfe7949c7cccd80763d0b642df7b00f102a41 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 9 Sep 2017 16:27:30 +0200 Subject: wolf: add plattenschwein pubkey --- krebs/1systems/wolf/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix index 91aabb716..4796d26fd 100644 --- a/krebs/1systems/wolf/config.nix +++ b/krebs/1systems/wolf/config.nix @@ -100,6 +100,7 @@ in users.extraUsers.root.openssh.authorizedKeys.keys = [ config.krebs.users.ulrich.pubkey config.krebs.users.makefu-omo.pubkey + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQDb9NPa2Hf51afcG1H13UPbE5E02J8aC9a1sGCRls592wAVlQbmojYR1jWDPA2m32Bsyv0ztqi81zDyndWWZPQVJVBk00VjYBcgk6D5ifqoAuWLzfuHJPWZGOvBf/U74/LNFNUkj1ywjneK7HYTRPXrRBBfBSQNmQzkvue7s599L2vdueZKyjNsMpx2m6nm2SchaMuDskSQut/168JgU1l4M8BeT68Bo4WdelhBYnhSI1a59FGkgdu2SCjyighLQRy2sOH3ksnkHWENPkA+wwQOlKl7R3DsEybrNd4NU9FSwFDyDmdhfv5gJp8UGSFdjAwx43+8zM5t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2.3 From e03866490e69df3040ca3143e55ca3538aa06db1 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 9 Sep 2017 20:58:36 +0200 Subject: ma steam: fix startup reference: https://github.com/NixOS/nixpkgs/issues/25957 --- makefu/2configs/steam.nix | 6 ------ makefu/2configs/tools/games.nix | 6 ++++-- makefu/2configs/tools/steam.nix | 10 ++++++++++ 3 files changed, 14 insertions(+), 8 deletions(-) delete mode 100644 makefu/2configs/steam.nix create mode 100644 makefu/2configs/tools/steam.nix diff --git a/makefu/2configs/steam.nix b/makefu/2configs/steam.nix deleted file mode 100644 index d4ec84abf..000000000 --- a/makefu/2configs/steam.nix +++ /dev/null @@ -1,6 +0,0 @@ -{pkgs, ...}: -{ - environment.systemPackages = [ pkgs.steam ]; - hardware.opengl.driSupport32Bit = true; - hardware.pulseaudio.support32Bit = true; -} diff --git a/makefu/2configs/tools/games.nix b/makefu/2configs/tools/games.nix index 47f06287b..0257e1870 100644 --- a/makefu/2configs/tools/games.nix +++ b/makefu/2configs/tools/games.nix @@ -1,8 +1,10 @@ { pkgs, ... }: { - krebs.per-user.makefu.packages = with pkgs; [ - steam + imports = [ + ../steam.nix + ]; + users.users.makefu.packages = with pkgs; [ games-user-env ]; } diff --git a/makefu/2configs/tools/steam.nix b/makefu/2configs/tools/steam.nix new file mode 100644 index 000000000..dbe51270d --- /dev/null +++ b/makefu/2configs/tools/steam.nix @@ -0,0 +1,10 @@ +{pkgs, ...}: +{ + environment.systemPackages = [ + (pkgs.steam.override { + newStdcpp = true; + }) + ]; + hardware.opengl.driSupport32Bit = true; + hardware.pulseaudio.support32Bit = true; +} -- cgit v1.2.3 From f82de12a9a235a97085b768848c97dd023285066 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 9 Sep 2017 20:58:50 +0200 Subject: ma docker: add self to docker group --- makefu/2configs/virtualisation/docker.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefu/2configs/virtualisation/docker.nix b/makefu/2configs/virtualisation/docker.nix index ddef9e371..951bdbf26 100644 --- a/makefu/2configs/virtualisation/docker.nix +++ b/makefu/2configs/virtualisation/docker.nix @@ -1,8 +1,9 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { virtualisation.docker.enable = true; environment.systemPackages = with pkgs;[ docker docker_compose ]; + users.extraUsers.${config.krebs.build.user.name}.extraGroups = [ "docker" ]; } -- cgit v1.2.3 From 31b9df0a3b7828887ff9ee4eaddf12b26707c3bf Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 10 Sep 2017 01:32:53 +0200 Subject: wolf: add telegraf snmp --- krebs/1systems/wolf/config.nix | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix index 4796d26fd..d89d0b0b2 100644 --- a/krebs/1systems/wolf/config.nix +++ b/krebs/1systems/wolf/config.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: let shack-ip = config.krebs.build.host.nets.shack.ip4.addr; + influx-host = "127.0.0.1"; in { imports = [ @@ -23,6 +24,58 @@ in + { + systemd.services.telegraf.path = [ pkgs.net_snmp ]; # for snmptranslate + #systemd.services.telegraf.environment = { + # "MIBDIRS" : ""; # extra mibs like ADSL + #}; + services.telegraf = { + enable = true; + extraConfig = { + inputs = { + snmp = { + agents = [ "10.0.1.3:161" ]; + version = 2; + community = "shack"; + name = "snmp"; + field = [ + { + name = "hostname"; + oid = "RFC1213-MIB::sysName.0"; + is_tag = true; + } + { + name = "load-percent"; #cisco + oid = ".1.3.6.1.4.1.9.9.109.1.1.1.1.4.9"; + } + { + name = "uptime"; + oid = "DISMAN-EVENT-MIB::sysUpTimeInstance"; + } + ]; + table = [{ + name = "snmp"; + inherit_tags = [ "hostname" ]; + oid = "IF-MIB::ifXTable"; + field = [{ + name = "ifName"; + oid = "IF-MIB::ifName"; + is_tag = true; + }]; + }]; + }; + }; + outputs = { + influxdb = { + urls = [ "http://${influx-host}:8086" ]; + database = "telegraf"; + write_consistency = "any"; + timeout = "5s"; + }; + }; + }; + }; + } ]; # use your own binary cache, fallback use cache.nixos.org (which is used by -- cgit v1.2.3 From dede52e436625471e905360d4d78d5a9c5d6fe81 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 10 Sep 2017 13:05:34 +0200 Subject: ma x: steam is now a tool --- makefu/1systems/x/config.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index faa29f3db..892eb1095 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -56,7 +56,6 @@ with import ; - # # Hardware -- cgit v1.2.3 From 8a50e700166835c86d4339647c378c465a2970a3 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 10 Sep 2017 13:40:59 +0200 Subject: ma tools/games: fix path to steam --- makefu/2configs/tools/games.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefu/2configs/tools/games.nix b/makefu/2configs/tools/games.nix index 0257e1870..8e815da5e 100644 --- a/makefu/2configs/tools/games.nix +++ b/makefu/2configs/tools/games.nix @@ -2,7 +2,7 @@ { imports = [ - ../steam.nix + ./steam.nix ]; users.users.makefu.packages = with pkgs; [ games-user-env -- cgit v1.2.3 From ffbd8c9d51753e479fb2c9f83721e0fda58c441a Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 11 Sep 2017 23:01:24 +0200 Subject: wolf.r: add copyKernels --- krebs/1systems/wolf/config.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix index d89d0b0b2..21ae20ea0 100644 --- a/krebs/1systems/wolf/config.nix +++ b/krebs/1systems/wolf/config.nix @@ -139,6 +139,9 @@ in boot.loader.grub.version = 2; boot.loader.grub.device = "/dev/vda"; + # without it `/nix/store` is not added grub paths + boot.loader.grub.copyKernels = true; + fileSystems."/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; }; swapDevices = [ -- cgit v1.2.3 From 044320bfe49d822f102daf82b270e20308f9049f Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 11 Sep 2017 23:02:10 +0200 Subject: wolf muell_caller: bump to latest version --- krebs/2configs/shack/muell_caller.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/2configs/shack/muell_caller.nix b/krebs/2configs/shack/muell_caller.nix index 2d8d78e33..7e8d278f6 100644 --- a/krebs/2configs/shack/muell_caller.nix +++ b/krebs/2configs/shack/muell_caller.nix @@ -6,8 +6,8 @@ let name = "muell_caller-2017-06-01"; src = pkgs.fetchgit { url = "https://github.com/shackspace/muell_caller/"; - rev = "bbd4009"; - sha256 = "1bfnfl2vdh0p5wzyz5p48qh04vvsg2445avg86fzhzragx25fqv0"; + rev = "ee4e499"; + sha256 = "0q1v07q633sbqg4wkgf0zya2bnqrikpyjhzp05iwn2vcs8rvsi3k"; }; buildInputs = [ (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ -- cgit v1.2.3 From 2b4d7d951299d7dada001476872d809310f40810 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 11 Sep 2017 23:02:28 +0200 Subject: ma gum.r: disable torrent --- makefu/1systems/gum/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index 934bfa685..2f288e708 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -40,7 +40,7 @@ in { # services - + # -- cgit v1.2.3 From 4b19401a82378ef9d091c8f58da0a67b33ec8ac6 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 11 Sep 2017 23:02:58 +0200 Subject: ma printer: add SXC-3205W network scanner --- makefu/2configs/printer.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/makefu/2configs/printer.nix b/makefu/2configs/printer.nix index 0865a0841..51e69d8b7 100644 --- a/makefu/2configs/printer.nix +++ b/makefu/2configs/printer.nix @@ -14,17 +14,20 @@ in { # scanners are printers just in reverse anyway services.saned.enable = true; - users.users."${mainUser}".extraGroups = [ "scanner" ]; + users.users."${mainUser}".extraGroups = [ "scanner" "lp" ]; hardware.sane = { enable = true; - extraBackends = [ pkgs.samsungUnifiedLinuxDriver ]; + extraBackends = [ ]; # $ scanimage -p --format=jpg --mode=Gray --source="Automatic Document Feeder" -v --batch="lol%d.jpg" --resolution=150 # requires 'sane-extra', scan via: - extraConfig."magicolor" = '' - net 10.42.20.30 0x2098 - ''; # 10.42.20.30: uhrenkind.shack magicolor 1690mf + #extraConfig."magicolor" = '' + # net 10.42.20.30 0x2098 + #''; # 10.42.20.30: uhrenkind.shack magicolor 1690mf + extraConfig."xerox_mfp" = '' + tcp 192.168.1.5 + ''; #home printer SCX-3205W }; } -- cgit v1.2.3 From 4ea52583d189d2c72b0a64cf605216f8b5bbcf56 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 11 Sep 2017 23:09:47 +0200 Subject: ma tools: add scanner-tools --- makefu/2configs/tools/all.nix | 1 + makefu/2configs/tools/scanner-tools.nix | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 makefu/2configs/tools/scanner-tools.nix diff --git a/makefu/2configs/tools/all.nix b/makefu/2configs/tools/all.nix index c7a116918..7755e2872 100644 --- a/makefu/2configs/tools/all.nix +++ b/makefu/2configs/tools/all.nix @@ -7,6 +7,7 @@ ./extra-gui.nix ./games.nix ./media.nix + ./scanner-tools.nix ./sec.nix ./sec-gui.nix ./studio.nix diff --git a/makefu/2configs/tools/scanner-tools.nix b/makefu/2configs/tools/scanner-tools.nix new file mode 100644 index 000000000..ef2e913e4 --- /dev/null +++ b/makefu/2configs/tools/scanner-tools.nix @@ -0,0 +1,7 @@ +{ + # ln -s /run/current-system/sw/bin/xsane ~/.gimp-2.8/plug-ins/xsane + nixpkgs.config.packageOverrides = pkgs: { + xsaneGimp = pkgs.xsane.override { gimpSupport = true; }; + }; +} + -- cgit v1.2.3 From 21c284a2c7b4fcb330f0c90ccd773f65f78721aa Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 19 Sep 2017 16:37:46 +0200 Subject: ma telegraf: init also add europastats --- makefu/2configs/stats/telegraf/default.nix | 20 ++++++++++++ makefu/2configs/stats/telegraf/europastats.nix | 43 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 makefu/2configs/stats/telegraf/default.nix create mode 100644 makefu/2configs/stats/telegraf/europastats.nix diff --git a/makefu/2configs/stats/telegraf/default.nix b/makefu/2configs/stats/telegraf/default.nix new file mode 100644 index 000000000..4da6561d6 --- /dev/null +++ b/makefu/2configs/stats/telegraf/default.nix @@ -0,0 +1,20 @@ +{...}: +let + url = "http://localhost:8086"; +in { + imports = [ + ./europastats.nix + ]; + services.telegraf = { + enable = true; + extraConfig = { + agent.debug = true; + outputs = { + influxdb = [{ + urls = [ url ]; + database = "telegraf"; + }]; + }; + }; + }; +} diff --git a/makefu/2configs/stats/telegraf/europastats.nix b/makefu/2configs/stats/telegraf/europastats.nix new file mode 100644 index 000000000..9249280c5 --- /dev/null +++ b/makefu/2configs/stats/telegraf/europastats.nix @@ -0,0 +1,43 @@ +{ pkgs, ...}: +let + pkg = with pkgs.python3Packages;buildPythonPackage rec { + rev = "be31da7"; + name = "europastats-${rev}"; + propagatedBuildInputs = [ + requests2 + docopt + ]; + src = pkgs.fetchgit { + url = "http://cgit.euer.krebsco.de/europastats"; + inherit rev; + sha256 = "0qj18vgj9nm6aisyqhk3iz3rf8xp7mn5jc6sfylcaw588a9sjfvc"; + }; + }; +in { + services.telegraf.extraConfig.inputs.exec = [ + { + commands = [ "${pkg}/bin/europa-attractions"]; + timeout = "1m"; + data_format = "json"; + name_override = "europawaiting"; + interval = "1m"; + tag_keys = [ + "status" + "type" + "name" + ]; + } + { + commands = [ "${pkg}/bin/europa-weather"]; + timeout = "20s"; + data_format = "json"; + name_override = "europaweather"; + interval = "10m"; + tag_keys = [ + "type" + "name" + "offset" + ]; + } + ]; +} -- cgit v1.2.3 From ad06126dcedfd5f28a3b64f2df2f32428f933a08 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 19 Sep 2017 16:39:58 +0200 Subject: ma omo.r: enable telegraf --- makefu/1systems/omo/config.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix index 4c93a7a3e..32cd3f900 100644 --- a/makefu/1systems/omo/config.nix +++ b/makefu/1systems/omo/config.nix @@ -60,6 +60,7 @@ in { # logs to influx + # services @@ -77,6 +78,9 @@ in { ## as long as pyload is not in nixpkgs: # 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 writl/pyload + + # Temporary: + ]; makefu.full-populate = true; makefu.server.primary-itf = primaryInterface; -- cgit v1.2.3