diff options
-rw-r--r-- | krebs/2configs/shack/muellshack.nix | 2 | ||||
-rw-r--r-- | krebs/3modules/external/default.nix | 56 | ||||
-rw-r--r-- | krebs/3modules/external/palo.nix | 2 | ||||
-rw-r--r-- | krebs/3modules/reaktor2.nix | 3 | ||||
-rw-r--r-- | krebs/3modules/rtorrent.nix | 5 | ||||
-rw-r--r-- | krebs/nixpkgs.json | 6 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/default.nix | 26 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/deps/gtts-token.nix | 27 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/deps/openwrt-luci-rpc.nix | 34 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/deps/pyhaversion.nix | 33 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/device_tracker/openwrt.nix | 1 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/light/statuslight.nix | 8 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/sensor/outside.nix | 2 | ||||
-rw-r--r-- | makefu/2configs/bureautomation/sensor/pollen.nix | 2 | ||||
-rw-r--r-- | makefu/2configs/deployment/owncloud.nix | 1 | ||||
-rw-r--r-- | makefu/2configs/nginx/euer.wiki.nix | 1 | ||||
-rw-r--r-- | makefu/5pkgs/_4nxci/default.nix | 4 |
17 files changed, 124 insertions, 89 deletions
diff --git a/krebs/2configs/shack/muellshack.nix b/krebs/2configs/shack/muellshack.nix index 9168c9ba7..179855c4c 100644 --- a/krebs/2configs/shack/muellshack.nix +++ b/krebs/2configs/shack/muellshack.nix @@ -6,7 +6,7 @@ let url = "https://git.shackspace.de/rz/muellshack"; rev = "d8a5e2d4c0a22804838675ac42b468299dcd9a76"; sha256 = "0ff6q64dgdxmpszp94z100fdic175b1vvxn4crg8p0jcabzxsv0m"; - }) {}; + }) { mkYarnPackage = pkgs.yarn2nix-moretea.mkYarnPackage; }; home = "/var/lib/muellshack"; port = "8081"; in { diff --git a/krebs/3modules/external/default.nix b/krebs/3modules/external/default.nix index 1546cac62..247dae69c 100644 --- a/krebs/3modules/external/default.nix +++ b/krebs/3modules/external/default.nix @@ -354,6 +354,62 @@ in { }; }; }; + amy = { + owner = config.krebs.users.Mic92; + nets = rec { + retiolum = { + addrs = [ + config.krebs.hosts.donna.nets.retiolum.ip4.addr + config.krebs.hosts.donna.nets.retiolum.ip6.addr + ]; + ip4.addr = "10.243.29.181"; + aliases = [ "amy.r" ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIICCgKCAgEAr3jQRA1+hLKYVgHJA2ax5W8J3GVMTnaGpYw9Q2xXXrX/jxLZ6Ia8 + hBjIcCBDVL5Q3FnyrKB9NJeeIvCOKg8WG+8O0+wKcePKd0Vhbsx4Whog/6PWs6qh + q2sURs2tp1hjHks4kZo2WtiYD7Ue9HHdV6FlUO6yuBV0bW2RzHdLPCDSGxnQVkBM + tSwAvMCZwvVBiv4m6RyMXqmpdbAPBzgJcmJS0FY+zGxpiwsR/AdoVvnzYyFMCVpG + iFl5+k9OGhUJq72MwAXzjW5ZdCPrG+2Dd+QBhhtIMJGA2sJiJteT8vdvpTNCiHJ/ + HnW7movliN2mW86qwo7QqB5v0c9f9TjfpOld7sS/4vE3zlGi/Stf6SQWaoXez/u3 + /P9GzupcYgj76m8Z3j7BMHXCBw8iwP2pZpL9hnLdIyCcyLrzXDIzq4hlt60DPhSU + klTDBUA/cUdSJGcSn2N+WHLOTfI6qeBNKqcTk70OQsa69jAJeAtA+I9OprNYOXqb + MmQakNNlrTaNtGQxfQqEL+wqHlo8CVDGm3O9pQSNF309P4TLNU1EYm+ItScNiVCE + DKhcgvE6xHCwZnVyJN8MMy1CVyDmnHVYoaTEZ2cCvNi/hXIXgO9KWjSpAv5tP764 + UkOE4dlDpEW6G1pNf84BERfRYGDj29A/Jk9LJC/6D09QJXNu18HR0sUCAwEAAQ== + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; + clara = { + owner = config.krebs.users.Mic92; + nets = rec { + retiolum = { + addrs = [ + config.krebs.hosts.donna.nets.retiolum.ip4.addr + config.krebs.hosts.donna.nets.retiolum.ip6.addr + ]; + ip4.addr = "10.243.29.182"; + aliases = [ "clara.r" ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIICCgKCAgEA07G1n2sA804nnjWQzq0Fi9i6kxJUo+jVJjtkm5unw3hjflAAd/3d + WN+01GdJCk/gr7DfU/Xr5KnR39Z3ADoT1tbUb+i5AJZ5/8VHUwWM8D8mQAam6LBf + UEeLxhVH8rG6lHaKwVi9oe4gPhgptUOzX/YIlJOMYDlYRxc7Wbj7YQOAKlPuTAjY + Z5bLswfkqTMO0cioJNwwMCNWSMJf3jbKi3eTQ36sf7TDMEneNGSBUpeSjGddoNT/ + rrVIDDT8tGmtACKr+3Y0H+EA2K5IxdQKKfnPRR31RBWiTkEXBbaJzYO/ZV5/xlbN + wmblskwq9d9IwDY7qeMctci+ZUZ3epG8MUwYa4faOrgmmkQpa5B+6UOMzw/WDJEc + jTfvSzfPo4anoj8C+MOQYzRvYmp60YEZKomv2BQdBvpGIpUul8WAR2aV0K+wz66e + mUamljAXmLiPxgGKduX5VFVuXzYxeMiBBujQCLTjc+xTB2EdwihxNX1rkxz10BDc + WrgPV+/VVyThKhOvVCifWARHtT2VGcZazfQOW/y3ZmEPOYuc5ZvrSEiMeG3f64+v + UU8cQZ3yBLIhTtC+38pRlsdBQHt526q0j0rrnd30JXVAUdWBunP2UJ5QGtA8/mWn + cWSlvRf5sfbyrISz6+mLPM2qGHnCkKwORNxmv/1DY07O3Rn6hX0OY4ECAwEAAQ== + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; inspector = { owner = config.krebs.users.Mic92; nets = rec { diff --git a/krebs/3modules/external/palo.nix b/krebs/3modules/external/palo.nix index e81dd9b58..aea1792f4 100644 --- a/krebs/3modules/external/palo.nix +++ b/krebs/3modules/external/palo.nix @@ -78,7 +78,7 @@ in { }; users = { palo = { - pubkey = "ssh-rsa AAAAB3NzaC1y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lmUqQB5awcB1S2d9pJ141V4vjiCMKUJHIdspFrI23rFNYD9k2ZXDA8VOnQE33BzmgF9xOVh6qr4G0oEpsNqJoKybVTUeSyl4+ifzdQANouvySgLJV/pcqaxX1srSDIUlcM2vDMWAs3ryCa0aAlmAVZIHgRhh6wa+IXW8gIYt+5biPWUuihJ4zGBEwkyVXXf2xsecMWCAGPWPDL0/fBfY9krNfC5M2sqxey2ShFIq+R/wMdaI7yVjUCF2QIUNiIdFbJL6bDrDyHnEXJJN+rAo23jUoTZZRv7Jq3DB/A5H7a73VCcblZyUmwMSlpg3wos7pdw5Ctta3zQPoxoAKGS1uZ+yTeZbPMmdbw=="; }; }; } diff --git a/krebs/3modules/reaktor2.nix b/krebs/3modules/reaktor2.nix index 9ab207d88..837a9bea7 100644 --- a/krebs/3modules/reaktor2.nix +++ b/krebs/3modules/reaktor2.nix @@ -53,6 +53,9 @@ with import <stockholm/lib>; systemd.services = flip mapAttrs' config.krebs.reaktor2 (_: cfg: nameValuePair cfg.systemd-service-name { after = [ "network.target" ]; + environment = { + LC_ALL = "en_US.UTF-8"; + }; wantedBy = [ "multi-user.target" ]; serviceConfig = { User = cfg.username; diff --git a/krebs/3modules/rtorrent.nix b/krebs/3modules/rtorrent.nix index d59569317..1f88a49e1 100644 --- a/krebs/3modules/rtorrent.nix +++ b/krebs/3modules/rtorrent.nix @@ -8,7 +8,7 @@ let nginx-user = config.services.nginx.user; nginx-group = config.services.nginx.group; - fpm-socket = "/var/run/php5-fpm-rutorrent.sock"; + fpm-socket = config.services.phpfpm.pools.rutorrent.socket; webdir = rucfg.webdir; systemd-logfile = cfg.workDir + "/rtorrent-systemd.log"; @@ -332,12 +332,11 @@ let rutorrent-imp = { services.phpfpm = { - # phpfpm does not have an enable option pools.rutorrent = { user = nginx-user; group = nginx-group; - listen = fpm-socket; settings = { + "listen.owner" = nginx-user; "pm" = "dynamic"; "pm.max_children" = 5; "pm.start_servers" = 2; diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index 01230b439..fabd3691a 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,7 +1,7 @@ { "url": "https://github.com/NixOS/nixpkgs-channels", - "rev": "7952807791daf3c60c99f10f371f732d897e3de8", - "date": "2019-10-13T01:14:01+02:00", - "sha256": "1h9wg0arazbyj8xfgvfhzn2gw6ya8sgcxscy1n5j182b5xri1xdk", + "rev": "c75de8bc12cc7e713206199e5ca30b224e295041", + "date": "2019-10-27T17:40:06+01:00", + "sha256": "1awipcjfvs354spzj2la1nzmi9rh2ci2mdapzf4kkabf58ilra6x", "fetchSubmodules": false } diff --git a/makefu/2configs/bureautomation/default.nix b/makefu/2configs/bureautomation/default.nix index d745d894a..e07e0ddf0 100644 --- a/makefu/2configs/bureautomation/default.nix +++ b/makefu/2configs/bureautomation/default.nix @@ -33,8 +33,7 @@ in { extraPackages = ps: with ps; [ pkgs.pico2wave python-forecastio jsonrpc-async jsonrpc-websocket mpd2 - (callPackage ./deps/gtts-token.nix { }) - (callPackage ./deps/pyhaversion.nix { }) + (callPackage ./deps/openwrt-luci-rpc.nix { }) ]; }; autoExtraComponents = true; @@ -47,8 +46,16 @@ in { elevation = 303; auth_providers = [ { type = "homeassistant";} - { type = "legacy_api_password";} + { type = "legacy_api_password"; + api_password = "sistemas"; + } { type = "trusted_networks"; + trusted_networks = [ + "127.0.0.1/32" + "192.168.8.0/24" + "::1/128" + "fd00::/8" + ]; # allow_bypass_login = true; } ]; @@ -119,7 +126,7 @@ in { aramark.binary_sensor; sensor = - [{ platform = "version"; }] ++ + # [{ platform = "version"; }] ++ # pyhaversion (import ./sensor/pollen.nix) ++ (import ./sensor/espeasy.nix) ++ (import ./sensor/airquality.nix) ++ @@ -140,20 +147,15 @@ in { http = { # TODO: https://github.com/home-assistant/home-assistant/issues/16149 base_url = "http://192.168.8.11:8123"; - api_password = "sistemas"; - trusted_networks = [ - "127.0.0.1/32" - "192.168.8.0/24" - "::1/128" - "fd00::/8" - ]; }; conversation = {}; history = {}; logbook = {}; tts = [ - { platform = "google"; + { platform = "google_translate"; language = "de"; + time_memory = 57600; + service_name = "google_say"; } { platform = "voicerss"; api_key = builtins.readFile <secrets/hass/voicerss.apikey>; diff --git a/makefu/2configs/bureautomation/deps/gtts-token.nix b/makefu/2configs/bureautomation/deps/gtts-token.nix deleted file mode 100644 index 69640f03d..000000000 --- a/makefu/2configs/bureautomation/deps/gtts-token.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, requests -}: - -buildPythonPackage rec { - pname = "gtts-token"; - version = "1.1.3"; - - src = fetchPypi { - pname = "gTTS-token"; - inherit version; - sha256 = "9d6819a85b813f235397ef931ad4b680f03d843c9b2a9e74dd95175a4bc012c5"; - }; - - propagatedBuildInputs = [ - requests - ]; - - meta = with lib; { - description = "Calculates a token to run the Google Translate text to speech"; - homepage = https://github.com/boudewijn26/gTTS-token; - license = licenses.mit; - # maintainers = [ maintainers. ]; - }; -} diff --git a/makefu/2configs/bureautomation/deps/openwrt-luci-rpc.nix b/makefu/2configs/bureautomation/deps/openwrt-luci-rpc.nix new file mode 100644 index 000000000..4eceeb146 --- /dev/null +++ b/makefu/2configs/bureautomation/deps/openwrt-luci-rpc.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, click +, requests +, packaging +}: + +buildPythonPackage rec { + pname = "openwrt-luci-rpc"; + version = "1.1.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "174a1f6c0bb2a2ed76e5299d14e2be05c612e8bcd4c15b9a9aedee1ef8e18b90"; + }; + + patchPhase = '' + sed -i -e "s/requests==2.21.0/requests/" -e "s/packaging==19.1/packaging/" setup.py + ''; + + propagatedBuildInputs = [ + click + requests + packaging + ]; + + meta = with lib; { + description = "Module for interacting with OpenWrt Luci RPC interface"; + homepage = https://github.com/fbradyirl/openwrt-luci-rpc; + license = licenses.asl20; + maintainers = [ maintainers.makefu ]; + }; +} diff --git a/makefu/2configs/bureautomation/deps/pyhaversion.nix b/makefu/2configs/bureautomation/deps/pyhaversion.nix deleted file mode 100644 index a75c6a976..000000000 --- a/makefu/2configs/bureautomation/deps/pyhaversion.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib -, buildPythonPackage -, fetchpatch -, fetchPypi -, aiohttp -, async-timeout -}: - -buildPythonPackage rec { - pname = "pyhaversion"; - version = "2.2.1"; - - src = fetchPypi { - inherit pname version; - sha256 = "72b65aa25d7b2dbb839a4d0218df2005c2335e93526035904d365bb668030b9f"; - }; - patches = [ - (fetchpatch { url = "https://github.com/makefu/pyhaversion/commit/f3bdc38970272cd345c2cfbde3037ea492ca27c4.patch"; - sha256 = - "1rhq4z7mdgnwhwpf5fmarnbc1ba3qysk1wqjdr0hvbzi8vmvbfcc";}) - ]; - doCheck = false; - propagatedBuildInputs = [ - aiohttp - async-timeout - ]; - - meta = with lib; { - description = ""; - homepage = https://github.com/ludeeus/pyhaversion; - # maintainers = [ maintainers. ]; - }; -} diff --git a/makefu/2configs/bureautomation/device_tracker/openwrt.nix b/makefu/2configs/bureautomation/device_tracker/openwrt.nix index d32eab60f..5de216474 100644 --- a/makefu/2configs/bureautomation/device_tracker/openwrt.nix +++ b/makefu/2configs/bureautomation/device_tracker/openwrt.nix @@ -3,7 +3,6 @@ [ { platform = "luci"; - name = "router"; host = "192.168.8.1"; username = "root"; password = import <secrets/hass/router.nix>; diff --git a/makefu/2configs/bureautomation/light/statuslight.nix b/makefu/2configs/bureautomation/light/statuslight.nix index 31f52f492..c9d301758 100644 --- a/makefu/2configs/bureautomation/light/statuslight.nix +++ b/makefu/2configs/bureautomation/light/statuslight.nix @@ -24,13 +24,13 @@ let brightness_command_topic = "/bam/${topic}/cmnd/Dimmer"; brightness_scale = 100; # color - rgb_state_topic = "/bam/${topic}/stat/Color"; + rgb_state_topic = "/bam/${topic}/stat/RESULT"; rgb_command_topic = "/bam/${topic}/cmnd/Color2"; - rgb_command_mode = "hex"; - rgb_command_template = "{{ '%02x%02x%02x' | format(red, green, blue)}}"; + rgb_value_template = "{{(value_json.Channel[0]*2.55)|int}},{{(value_json.Channel[1]*2.55)|int}},{{(value_json.Channel[2]*2.55)|int}}"; + # effects effect_state_topic = "/bam/${topic}/tele/STATE"; - effects_value_template = "{{value_json.Scheme|default(0)}}"; + effect_value_template = "{{value_json.Scheme|default(0)}}"; effect_command_topic = "/bam/${topic}/cmnd/Scheme"; effect_list = [ 0 # single color for LED light diff --git a/makefu/2configs/bureautomation/sensor/outside.nix b/makefu/2configs/bureautomation/sensor/outside.nix index 7dbc192a4..596473f17 100644 --- a/makefu/2configs/bureautomation/sensor/outside.nix +++ b/makefu/2configs/bureautomation/sensor/outside.nix @@ -15,7 +15,7 @@ "uv_index" ]; units = "si" ; - update_interval = { days = 0; hours = 0; minutes = 30; seconds = 0; }; + scan_interval = "00:30:00"; } { platform = "luftdaten"; name = "Ditzingen"; diff --git a/makefu/2configs/bureautomation/sensor/pollen.nix b/makefu/2configs/bureautomation/sensor/pollen.nix index 506dbf123..8ddb49e58 100644 --- a/makefu/2configs/bureautomation/sensor/pollen.nix +++ b/makefu/2configs/bureautomation/sensor/pollen.nix @@ -1,6 +1,6 @@ [ { platform = "dwd_pollen"; - partsregion_ids = [ + partregion_ids = [ 112 ]; } diff --git a/makefu/2configs/deployment/owncloud.nix b/makefu/2configs/deployment/owncloud.nix index 59dfa3203..ed3155efc 100644 --- a/makefu/2configs/deployment/owncloud.nix +++ b/makefu/2configs/deployment/owncloud.nix @@ -127,6 +127,7 @@ let group = "nginx"; listen = socket; settings = { + "listen.owner" = "nginx"; "pm" = "dynamic"; "pm.max_children" = 32; "pm.max_requests" = 500; diff --git a/makefu/2configs/nginx/euer.wiki.nix b/makefu/2configs/nginx/euer.wiki.nix index a6766eeec..2f44d8cc1 100644 --- a/makefu/2configs/nginx/euer.wiki.nix +++ b/makefu/2configs/nginx/euer.wiki.nix @@ -27,6 +27,7 @@ in { inherit user group; listen = fpm-socket; settings = { + "listen.owner" = user; "pm" = "dynamic"; "pm.max_children" = 5; "pm.start_servers" = 2; diff --git a/makefu/5pkgs/_4nxci/default.nix b/makefu/5pkgs/_4nxci/default.nix index dafa37ff6..47c02aca4 100644 --- a/makefu/5pkgs/_4nxci/default.nix +++ b/makefu/5pkgs/_4nxci/default.nix @@ -1,11 +1,11 @@ { stdenv, lib, fetchFromGitHub, mbedtls, python2, perl }: let - version = "1.35"; + version = "4.03"; src = fetchFromGitHub { owner = "The-4n"; repo = "4NXCI"; rev = "v${version}"; - sha256 = "0yq0irxzi4wi71ajw8ld01zfpkrgknpq7g3m76pbnwmdzkm7dra6"; + sha256 = "0n49sqv6s8cj2dw1dbcyskfc2zr92p27f1bdd6jqfbawv0fqr1wf"; }; mymbedtls = stdenv.mkDerivation { |