From 30bfcf1a10d8b490e23dd8a3a86cf205b4f2cdd5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Jan 2019 16:23:08 +0100 Subject: reaktor-krebs: join #nixos-de --- krebs/2configs/reaktor-krebs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/2configs/reaktor-krebs.nix b/krebs/2configs/reaktor-krebs.nix index 862c9b991..67ca23ecd 100644 --- a/krebs/2configs/reaktor-krebs.nix +++ b/krebs/2configs/reaktor-krebs.nix @@ -7,6 +7,7 @@ with import ; channels = [ "#krebs" "#nixos-wiki" + "#nixos-de" ]; extraEnviron = { REAKTOR_HOST = "irc.freenode.org"; -- cgit v1.2.3 From 77baef49ab6c461e293c27bf51bd0e2cc5f200f4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Jan 2019 16:26:30 +0100 Subject: l prism.r hfos: update ip addresses --- lass/1systems/prism/config.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index df2778bef..dbd4ceb1c 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -36,10 +36,10 @@ with import ; # TODO write function for proxy_pass (ssl/nonssl) krebs.iptables.tables.filter.FORWARD.rules = [ - { v6 = false; precedence = 1000; predicate = "-d 192.168.122.92"; target = "ACCEPT"; } + { v6 = false; precedence = 1000; predicate = "-d 192.168.122.141"; target = "ACCEPT"; } ]; krebs.iptables.tables.nat.PREROUTING.rules = [ - { v6 = false; precedence = 1000; predicate = "-d 46.4.114.243"; target = "DNAT --to-destination 192.168.122.92"; } + { v6 = false; precedence = 1000; predicate = "-d 95.216.1.130"; target = "DNAT --to-destination 192.168.122.141"; } ]; } { -- cgit v1.2.3 From b3587bfbfa74c5581987e0dd965189d51d96bcce Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Jan 2019 16:27:18 +0100 Subject: l prism.r: add uid for download user --- lass/1systems/prism/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index dbd4ceb1c..b4a514d54 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -379,6 +379,7 @@ with import ; name = "download"; home = "/var/download"; useDefaultShell = true; + uid = genid "download"; openssh.authorizedKeys.keys = with config.krebs.users; [ lass.pubkey lass-shodan.pubkey -- cgit v1.2.3 From c893dbd47960335402a9727c879f6f92c104aaf4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Jan 2019 16:27:56 +0100 Subject: l prism.r: add Mic92 to trustedUsers --- lass/1systems/prism/config.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index b4a514d54..23746d210 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -421,6 +421,16 @@ with import ; { predicate = "-i wiregrill -p udp --dport 4000:4002"; target = "ACCEPT"; } ]; } + { + nix.trustedUsers = [ "Mic92" ]; + users.users.Mic92 = { + uid = genid_uint31 "Mic92"; + isNormalUser = true; + openssh.authorizedKeys.keys = [ + config.krebs.users.Mic92.pubkey + ]; + }; + } ]; krebs.build.host = config.krebs.hosts.prism; -- cgit v1.2.3 From 04297e6c094a13051ee54d700d6fe55ad1f1ede5 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Jan 2019 16:28:50 +0100 Subject: l prism.r: add new ip --- lass/1systems/prism/physical.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lass/1systems/prism/physical.nix b/lass/1systems/prism/physical.nix index a2b5efb29..9a84e9d63 100644 --- a/lass/1systems/prism/physical.nix +++ b/lass/1systems/prism/physical.nix @@ -63,9 +63,15 @@ defaultGateway = "95.216.1.129"; # Use google's public DNS server nameservers = [ "8.8.8.8" ]; - interfaces.eth0 = { - ipAddress = "95.216.1.150"; - prefixLength = 26; - }; + interfaces.eth0.ipv4.addresses = [ + { + address = "95.216.1.150"; + prefixLength = 26; + } + { + address = "95.216.1.130"; + prefixLength = 26; + } + ]; }; } -- cgit v1.2.3 From a3dca9ea20a4d09c75981a315eed596be852ec01 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Jan 2019 16:30:27 +0100 Subject: l yellow.r: rotate nordvpn endpoint --- lass/1systems/yellow/config.nix | 92 ++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/lass/1systems/yellow/config.nix b/lass/1systems/yellow/config.nix index 58fa564a1..9d8bcd7be 100644 --- a/lass/1systems/yellow/config.nix +++ b/lass/1systems/yellow/config.nix @@ -88,7 +88,7 @@ with import ; client dev tun proto udp - remote 82.102.16.229 1194 + remote 89.249.65.83 1194 resolv-retry infinite remote-random nobind @@ -103,13 +103,9 @@ with import ; reneg-sec 0 comp-lzo no - explicit-exit-notify 3 - remote-cert-tls server - #mute 10000 auth-user-pass ${toString } - verb 3 pull fast-io @@ -118,32 +114,33 @@ with import ; -----BEGIN CERTIFICATE----- - MIIEyjCCA7KgAwIBAgIJANIxRSmgmjW6MA0GCSqGSIb3DQEBCwUAMIGeMQswCQYD - VQQGEwJQQTELMAkGA1UECBMCUEExDzANBgNVBAcTBlBhbmFtYTEQMA4GA1UEChMH - Tm9yZFZQTjEQMA4GA1UECxMHTm9yZFZQTjEaMBgGA1UEAxMRZGUyMjkubm9yZHZw - bi5jb20xEDAOBgNVBCkTB05vcmRWUE4xHzAdBgkqhkiG9w0BCQEWEGNlcnRAbm9y - ZHZwbi5jb20wHhcNMTcxMTIyMTQ1MTQ2WhcNMjcxMTIwMTQ1MTQ2WjCBnjELMAkG - A1UEBhMCUEExCzAJBgNVBAgTAlBBMQ8wDQYDVQQHEwZQYW5hbWExEDAOBgNVBAoT - B05vcmRWUE4xEDAOBgNVBAsTB05vcmRWUE4xGjAYBgNVBAMTEWRlMjI5Lm5vcmR2 - cG4uY29tMRAwDgYDVQQpEwdOb3JkVlBOMR8wHQYJKoZIhvcNAQkBFhBjZXJ0QG5v - cmR2cG4uY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv++dfZlG - UeFF2sGdXjbreygfo78Ujti6X2OiMDFnwgqrhELstumXl7WrFf5EzCYbVriNuUny - mNCx3OxXxw49xvvg/KplX1CE3rKBNnzbeaxPmeyEeXe+NgA7rwOCbYPQJScFxK7X - +D16ZShY25GyIG7hqFGML0Qz6gpZRGaHSd0Lc3wSgoLzGtsIg8hunhfi00dNqMBT - ukCzgfIqbQUuqmOibsWnYvZoXoYKnbRL0Bj8IYvwvu4p2oBQpvM+JR4DC+rv52LI - 583Q6g3LebQ4JuQf8jgxvEEV4UL1CsUBqN3mcRpVUKJS3ijXmzEX9MfpBRcp1rBA - VsiE4Mrk7PXhkwIDAQABo4IBBzCCAQMwHQYDVR0OBBYEFFIv1UuKN2NXaVjRNXDT - Rs/+LT/9MIHTBgNVHSMEgcswgciAFFIv1UuKN2NXaVjRNXDTRs/+LT/9oYGkpIGh - MIGeMQswCQYDVQQGEwJQQTELMAkGA1UECBMCUEExDzANBgNVBAcTBlBhbmFtYTEQ - MA4GA1UEChMHTm9yZFZQTjEQMA4GA1UECxMHTm9yZFZQTjEaMBgGA1UEAxMRZGUy - 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 -----END CERTIFICATE----- key-direction 1 @@ -152,23 +149,24 @@ with import ; # 2048 bit OpenVPN static key # -----BEGIN OpenVPN Static key V1----- - 49b2f54c6ee58d2d97331681bb577d55 - 054f56d92b743c31e80b684de0388702 - ad3bf51088cd88f3fac7eb0729f2263c - 51d82a6eb7e2ed4ae6dfa65b1ac764d0 - b9dedf1379c1b29b36396d64cb6fd6b2 - e61f869f9a13001dadc02db171f04c4d - c46d1132c1f31709e7b54a6eabae3ea8 - fbd2681363c185f4cb1be5aa42a27c31 - 21db7b2187fd11c1acf224a0d5a44466 - b4b5a3cc34ec0227fe40007e8b379654 - f1e8e2b63c6b46ee7ab6f1bd82f57837 - 92c209e8f25bc9ed493cb5c1d891ae72 - 7f54f4693c5b20f136ca23e639fd8ea0 - 865b4e22dd2af43e13e6b075f12427b2 - 08af9ffd09c56baa694165f57fe2697a - 3377fa34aebcba587c79941d83deaf45 + e685bdaf659a25a200e2b9e39e51ff03 + 0fc72cf1ce07232bd8b2be5e6c670143 + f51e937e670eee09d4f2ea5a6e4e6996 + 5db852c275351b86fc4ca892d78ae002 + d6f70d029bd79c4d1c26cf14e9588033 + cf639f8a74809f29f72b9d58f9b8f5fe + fc7938eade40e9fed6cb92184abb2cc1 + 0eb1a296df243b251df0643d53724cdb + 5a92a1d6cb817804c4a9319b57d53be5 + 80815bcfcb2df55018cc83fc43bc7ff8 + 2d51f9b88364776ee9d12fc85cc7ea5b + 9741c4f598c485316db066d52db4540e + 212e1518a9bd4828219e24b20d88f598 + a196c9de96012090e333519ae18d3509 + 9427e7b372d348d352dc4c85e18cd4b9 + 3f8a56ddb2e64eb67adfc9b337157ff4 -----END OpenVPN Static key V1----- + ''; } -- cgit v1.2.3 From 6bb0dca62ff59ed006533ae68cba74d17c04dcc4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Jan 2019 16:30:57 +0100 Subject: l: add tcpdump to pkgs --- lass/2configs/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix index 69e697a1d..d3676a9b9 100644 --- a/lass/2configs/default.nix +++ b/lass/2configs/default.nix @@ -115,6 +115,7 @@ with import ; #network iptables iftop + tcpdump #stuff for dl aria2 -- cgit v1.2.3 From bd6fb423e4aff7dd2f2fbefd8544961e420432d6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Jan 2019 16:31:51 +0100 Subject: l mails: add more addresses --- lass/2configs/exim-smarthost.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/2configs/exim-smarthost.nix b/lass/2configs/exim-smarthost.nix index f487a9910..555295422 100644 --- a/lass/2configs/exim-smarthost.nix +++ b/lass/2configs/exim-smarthost.nix @@ -96,6 +96,7 @@ with import ; { from = "nordvpn@lassul.us"; to = lass.mail; } { from = "csv-direct@lassul.us"; to = lass.mail; } { from = "nintendo@lassul.us"; to = lass.mail; } + { from = "overleaf@lassul.us"; to = lass.mail; } ]; system-aliases = [ { from = "mailer-daemon"; to = "postmaster"; } -- cgit v1.2.3 From 39e9cf1aa6f20bb08c7e8d4d05dd2ed17113ca45 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Jan 2019 16:32:18 +0100 Subject: l domsen: add UBIK-SFTP account --- lass/2configs/websites/domsen.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix index 223fc73ba..10d3b56c2 100644 --- a/lass/2configs/websites/domsen.nix +++ b/lass/2configs/websites/domsen.nix @@ -155,6 +155,13 @@ in { ssl_key = "/var/lib/acme/lassul.us/key.pem"; }; + users.users.UBIK-SFTP = { + uid = genid_uint31 "UBIK-SFTP"; + home = "/home/UBIK-SFTP"; + useDefaultShell = true; + createHome = true; + }; + users.users.xanf = { uid = genid_uint31 "xanf"; home = "/home/xanf"; -- cgit v1.2.3 From e14abf9583a2605eb3fad186cfef1a5ec11beb7f Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 22 Jan 2019 16:32:48 +0100 Subject: l domsen: add backups --- lass/2configs/websites/domsen.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lass/2configs/websites/domsen.nix b/lass/2configs/websites/domsen.nix index 10d3b56c2..7fb248139 100644 --- a/lass/2configs/websites/domsen.nix +++ b/lass/2configs/websites/domsen.nix @@ -234,5 +234,22 @@ in { createHome = true; }; + services.restic.backups.domsen = { + initialize = true; + extraOptions = [ "sftp.command='ssh efOVcMWSZ@wilhelmstr.duckdns.org -p 52222 -i ${toString + "/ssh.id_ed25519"} -s sftp'" ]; + repository = "sftp:efOVcMWSZ@wilhelmstr.duckdns.org:/mnt/UBIK-9TB-Pool/BACKUP/XXXX-MAX-UND-ANDERES"; + passwordFile = toString + "/domsen_backup_pw"; + paths = [ + "/srv/http" + "/home/domsen/Mail" + "/home/ms/Mail" + "/home/klabusterbeere/Mail" + "/home/jms/Mail" + "/home/bruno/Mail" + "/home/akayguen/Mail" + "/backups/sql_dumps" + ]; + }; + } -- cgit v1.2.3 From ef6d1453c3119b3ba1f554c1e3860773e5c2e87e Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 22 Jan 2019 19:35:03 +0100 Subject: krebs: import reaktor2 service --- krebs/3modules/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index bb69bfad3..9303a81fb 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -42,6 +42,7 @@ let ./per-user.nix ./power-action.nix ./Reaktor.nix + ./reaktor2.nix ./realwallpaper.nix ./retiolum-bootstrap.nix ./retiolum-hosts.nix -- cgit v1.2.3 From 659eb2e6c5a3be36044ed27a8dfdea71d3ec43c7 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 23 Jan 2019 00:04:51 +0100 Subject: reaktor2: 0.0.0 -> 0.1.0 --- krebs/5pkgs/haskell/reaktor2.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index 447738425..10dc3fc49 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -1,23 +1,25 @@ { mkDerivation, aeson, attoparsec, base, blessings, bytestring -, containers, fetchgit, filepath, network, network-simple -, network-simple-tls, pcre-heavy, pcre-light, process, random -, stdenv, text, time, transformers, unix, unordered-containers +, containers, data-default, fetchgit, filepath, lens, lens-aeson +, network, network-simple, network-simple-tls, pcre-heavy +, pcre-light, process, random, stdenv, text, time, transformers +, unagi-chan, unix, unordered-containers }: mkDerivation { pname = "reaktor2"; - version = "0.0.0"; + version = "0.1.0"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "1q2rb78mzpyd8wxfmlbfdz7zq5smsrrvb4n874ap1p8f2bmmp0am"; - rev = "ce276eee82ec0b8c4106beb4c51d6f9eb77335c4"; + sha256 = "0g5b40y2gbknghzw12jar1im87k0g4hjg259wf1gp5v55dh3xwk6"; + rev = "d40815fd56bf1895af89b72b1171675a2e0ae5f7"; fetchSubmodules = true; }; isLibrary = false; isExecutable = true; executableHaskellDepends = [ - aeson attoparsec base blessings bytestring containers filepath - network network-simple network-simple-tls pcre-heavy pcre-light - process random text time transformers unix unordered-containers + aeson attoparsec base blessings bytestring containers data-default + filepath lens lens-aeson network network-simple network-simple-tls + pcre-heavy pcre-light process random text time transformers + unagi-chan unix unordered-containers ]; license = stdenv.lib.licenses.mit; } -- cgit v1.2.3 From 31a987903f0d007a19a84d7db4c18b6641d0454a Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 23 Jan 2019 13:50:09 +0100 Subject: reaktor2: 0.1.0 -> 0.1.1 --- krebs/5pkgs/haskell/reaktor2.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index 10dc3fc49..e33cbde2c 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -1,16 +1,16 @@ { mkDerivation, aeson, attoparsec, base, blessings, bytestring , containers, data-default, fetchgit, filepath, lens, lens-aeson , network, network-simple, network-simple-tls, pcre-heavy -, pcre-light, process, random, stdenv, text, time, transformers -, unagi-chan, unix, unordered-containers +, pcre-light, process, random, stdenv, stringsearch, text, time +, transformers, unagi-chan, unix, unordered-containers, vector }: mkDerivation { pname = "reaktor2"; - version = "0.1.0"; + version = "0.1.1"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "0g5b40y2gbknghzw12jar1im87k0g4hjg259wf1gp5v55dh3xwk6"; - rev = "d40815fd56bf1895af89b72b1171675a2e0ae5f7"; + sha256 = "0d78560gj8hm02zaps63f9mby4lzz82f45i8ypwc9l3lnsypdsr3"; + rev = "4fa5cb937c016f8c10bf8f40d017ca3a436db2d3"; fetchSubmodules = true; }; isLibrary = false; @@ -18,8 +18,8 @@ mkDerivation { executableHaskellDepends = [ aeson attoparsec base blessings bytestring containers data-default filepath lens lens-aeson network network-simple network-simple-tls - pcre-heavy pcre-light process random text time transformers - unagi-chan unix unordered-containers + pcre-heavy pcre-light process random stringsearch text time + transformers unagi-chan unix unordered-containers vector ]; license = stdenv.lib.licenses.mit; } -- cgit v1.2.3 From 282e4049b6b76fc19276b5ea786d7c40ed3a231f Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 23 Jan 2019 14:01:48 +0100 Subject: Reaktor scripts: chmod +x --- krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh | 0 krebs/5pkgs/simple/Reaktor/scripts/random-issue.sh | 0 krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py | 0 krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh mode change 100644 => 100755 krebs/5pkgs/simple/Reaktor/scripts/random-issue.sh mode change 100644 => 100755 krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py mode change 100644 => 100755 krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh diff --git a/krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh b/krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh old mode 100644 new mode 100755 diff --git a/krebs/5pkgs/simple/Reaktor/scripts/random-issue.sh b/krebs/5pkgs/simple/Reaktor/scripts/random-issue.sh old mode 100644 new mode 100755 diff --git a/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py b/krebs/5pkgs/simple/Reaktor/scripts/sed-plugin.py old mode 100644 new mode 100755 diff --git a/krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh b/krebs/5pkgs/simple/Reaktor/scripts/shack-correct.sh old mode 100644 new mode 100755 -- cgit v1.2.3 From 00c529b9d5d0567d9c30e640b2ffbbc79d987c4b Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 23 Jan 2019 14:08:51 +0100 Subject: Reaktor random-emoji: curl -S --- krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh b/krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh index 386aa68b9..6f3dd4a3f 100755 --- a/krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh +++ b/krebs/5pkgs/simple/Reaktor/scripts/random-emoji.sh @@ -1,5 +1,5 @@ #!/bin/sh -curl http://emojicons.com/random -s | \ +curl -sS http://emojicons.com/random | \ grep data-text | \ sed -n 's/.*>\(.*\)<\/textarea>/\1/p' | \ head -n 1 | \ -- cgit v1.2.3 From f60d2867465e1aa26846cd5cce39f5f70c654e03 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 24 Jan 2019 17:23:54 +0100 Subject: reaktor2: 0.1.1 -> 0.1.2 --- krebs/5pkgs/haskell/reaktor2.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index e33cbde2c..9b02b2727 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -6,11 +6,11 @@ }: mkDerivation { pname = "reaktor2"; - version = "0.1.1"; + version = "0.1.2"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "0d78560gj8hm02zaps63f9mby4lzz82f45i8ypwc9l3lnsypdsr3"; - rev = "4fa5cb937c016f8c10bf8f40d017ca3a436db2d3"; + sha256 = "1198sajpkd6m87j402y796270hwifyn9wk2by6wcrxvwhq1vgs9k"; + rev = "d5f66b27b2cd7c36eb7c2e81b0cdca10c5a5ef90"; fetchSubmodules = true; }; isLibrary = false; -- cgit v1.2.3 From 2e5ed5d1bbf158a933f330119b9a5f931e192560 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 24 Jan 2019 21:16:44 +0100 Subject: reaktor2: 0.1.2 -> 0.1.3 --- krebs/5pkgs/haskell/reaktor2.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index 9b02b2727..c0c7281a6 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -6,11 +6,11 @@ }: mkDerivation { pname = "reaktor2"; - version = "0.1.2"; + version = "0.1.3"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "1198sajpkd6m87j402y796270hwifyn9wk2by6wcrxvwhq1vgs9k"; - rev = "d5f66b27b2cd7c36eb7c2e81b0cdca10c5a5ef90"; + sha256 = "15qhycfja7psnd7v5hn4qb5wrs6bjx4qhny49nkhb7agj4vzwnwi"; + rev = "6c629a0cc422872abdfc40f9621ac0c4f6a420a8"; fetchSubmodules = true; }; isLibrary = false; -- cgit v1.2.3 From 7c160fd1fac105402c27925a46a84cec9c12ca1a Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 25 Jan 2019 14:26:50 +0100 Subject: blessings: 1.3.0 -> 2.1.0 --- krebs/5pkgs/haskell/blessings.nix | 4 ++-- krebs/5pkgs/haskell/much.nix | 29 +++++++++++++++++++++++++++++ krebs/5pkgs/haskell/reaktor2.nix | 6 +++--- krebs/5pkgs/simple/much/cabal.nix | 28 ---------------------------- krebs/5pkgs/simple/much/default.nix | 3 --- lass/2configs/mail.nix | 2 +- tv/2configs/mail-client.nix | 17 +++++++---------- 7 files changed, 42 insertions(+), 47 deletions(-) create mode 100644 krebs/5pkgs/haskell/much.nix delete mode 100644 krebs/5pkgs/simple/much/cabal.nix delete mode 100644 krebs/5pkgs/simple/much/default.nix diff --git a/krebs/5pkgs/haskell/blessings.nix b/krebs/5pkgs/haskell/blessings.nix index 19f8da19d..97e4a717c 100644 --- a/krebs/5pkgs/haskell/blessings.nix +++ b/krebs/5pkgs/haskell/blessings.nix @@ -7,8 +7,8 @@ with import ; sha256 = "1k908zap3694fcxdk4bb29s54b0lhdh557y10ybjskfwnym7szn1"; }; "18.09" = { - version = "1.3.0"; - sha256 = "1y9jhh9pchrr48zgfib2jip97x1fkm7qb1gnfx477rmmryjs500h"; + version = "2.1.0"; + sha256 = "0wc8v48bb0bkvypc0j6imvnf8xc8572hykk9sgjhzf2w0ggqxv5d"; }; }.${versions.majorMinor nixpkgsVersion}; diff --git a/krebs/5pkgs/haskell/much.nix b/krebs/5pkgs/haskell/much.nix new file mode 100644 index 000000000..db168f8a1 --- /dev/null +++ b/krebs/5pkgs/haskell/much.nix @@ -0,0 +1,29 @@ +{ mkDerivation, aeson, attoparsec, base, base64-bytestring +, blaze-builder, blessings, bytestring, case-insensitive +, containers, deepseq, directory, docopt, email-header, fetchgit +, filepath, friendly-time, hyphenation, linebreak, old-locale +, process, random, rosezipper, safe, scanner, split, stdenv +, terminal-size, text, time, transformers, transformers-compat +, unix, vector +}: +mkDerivation { + pname = "much"; + version = "1.2.0"; + src = fetchgit { + url = "https://cgit.krebsco.de/much"; + sha256 = "0gfvppi8acylz0q7xh8dkm3dj676d4sc1m1gxwp663bkn4748873"; + rev = "8fc4fbb5bb7781626da8f63cd8df8bb0f554cfe7"; + fetchSubmodules = true; + }; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + aeson attoparsec base base64-bytestring blaze-builder blessings + bytestring case-insensitive containers deepseq directory docopt + email-header filepath friendly-time hyphenation linebreak + old-locale process random rosezipper safe scanner split + terminal-size text time transformers transformers-compat unix + vector + ]; + license = stdenv.lib.licenses.mit; +} diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index c0c7281a6..f0835428d 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -6,11 +6,11 @@ }: mkDerivation { pname = "reaktor2"; - version = "0.1.3"; + version = "0.1.4"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "15qhycfja7psnd7v5hn4qb5wrs6bjx4qhny49nkhb7agj4vzwnwi"; - rev = "6c629a0cc422872abdfc40f9621ac0c4f6a420a8"; + sha256 = "1qfm3vb78r02ma8wdcfbwzmigj6skjl53nmp2z7czjcfjhm1zyq5"; + rev = "147f818a72f4561ed57131e0d181704b599d09f6"; fetchSubmodules = true; }; isLibrary = false; diff --git a/krebs/5pkgs/simple/much/cabal.nix b/krebs/5pkgs/simple/much/cabal.nix deleted file mode 100644 index 09bc7b5df..000000000 --- a/krebs/5pkgs/simple/much/cabal.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ mkDerivation, aeson, attoparsec, base, base64-bytestring -, blaze-builder, blessings, bytestring, case-insensitive -, containers, deepseq, directory, docopt, email-header, fetchgit -, filepath, friendly-time, hyphenation, linebreak, old-locale -, process, random, rosezipper, safe, scanner, split, stdenv -, terminal-size, text, time, transformers, transformers-compat -, unix, vector -}: -mkDerivation { - pname = "much"; - version = "1.1.0"; - src = fetchgit { - url = "http://cgit.ni.krebsco.de/much"; - sha256 = "1325554zymr1dd0clj8c5ygl70c791csvs0hz33jcfr6b8wysdrl"; - rev = "dfec37d848e11c00d9b7f03295af1fc7b0e83ef5"; - }; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ - aeson attoparsec base base64-bytestring blaze-builder blessings - bytestring case-insensitive containers deepseq directory docopt - email-header filepath friendly-time hyphenation linebreak - old-locale process random rosezipper safe scanner split - terminal-size text time transformers transformers-compat unix - vector - ]; - license = stdenv.lib.licenses.mit; -} diff --git a/krebs/5pkgs/simple/much/default.nix b/krebs/5pkgs/simple/much/default.nix deleted file mode 100644 index cf55eb537..000000000 --- a/krebs/5pkgs/simple/much/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ haskellPackages, ... }: - -haskellPackages.callPackage ./cabal.nix {} diff --git a/lass/2configs/mail.nix b/lass/2configs/mail.nix index 3c19fe061..52d380b7c 100644 --- a/lass/2configs/mail.nix +++ b/lass/2configs/mail.nix @@ -225,7 +225,7 @@ in { msmtp mutt pkgs.notmuch - pkgs.much + pkgs.haskellPackages.much tag-new-mails tag-old-mails ]; diff --git a/tv/2configs/mail-client.nix b/tv/2configs/mail-client.nix index 8b6f8bbcd..0caf5264a 100644 --- a/tv/2configs/mail-client.nix +++ b/tv/2configs/mail-client.nix @@ -1,13 +1,10 @@ -{ pkgs, ... }: - -with pkgs; -{ +{ pkgs, ... }: { environment.systemPackages = [ - much - msmtp - notmuch - pythonPackages.alot - qprint - w3m + pkgs.haskellPackages.much + pkgs.msmtp + pkgs.notmuch + pkgs.pythonPackages.alot + pkgs.qprint + pkgs.w3m ]; } -- cgit v1.2.3 From b3c65141b8179dddbfdcd783e14a20575be5d2e2 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 25 Jan 2019 14:54:31 +0100 Subject: reaktor2: 0.1.4 -> 0.1.5 --- krebs/5pkgs/haskell/reaktor2.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index f0835428d..6c0a3e634 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -6,11 +6,11 @@ }: mkDerivation { pname = "reaktor2"; - version = "0.1.4"; + version = "0.1.5"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "1qfm3vb78r02ma8wdcfbwzmigj6skjl53nmp2z7czjcfjhm1zyq5"; - rev = "147f818a72f4561ed57131e0d181704b599d09f6"; + sha256 = "1n20ms61pp0yncs0y0mx40nj80ivv9qqv4l2ya39rfp21anmwf1s"; + rev = "f8c5b4cfe57cb50503b8333d5d06bd0f99fdecc6"; fetchSubmodules = true; }; isLibrary = false; -- cgit v1.2.3 From 27bd27f150a913782203fc3de30861a2488a1cea Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 26 Jan 2019 20:41:45 +0100 Subject: reaktor2: 0.1.5 -> 0.1.6 --- krebs/5pkgs/haskell/reaktor2.nix | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index 6c0a3e634..3369108f3 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -1,25 +1,27 @@ -{ mkDerivation, aeson, attoparsec, base, blessings, bytestring -, containers, data-default, fetchgit, filepath, lens, lens-aeson -, network, network-simple, network-simple-tls, pcre-heavy -, pcre-light, process, random, stdenv, stringsearch, text, time -, transformers, unagi-chan, unix, unordered-containers, vector +{ mkDerivation, aeson, async, attoparsec, base, blessings +, bytestring, containers, data-default, fetchgit, filepath, lens +, lens-aeson, network, network-simple, network-simple-tls +, pcre-heavy, pcre-light, process, random, stdenv, stringsearch +, text, time, transformers, unagi-chan, unix, unordered-containers +, vector }: mkDerivation { pname = "reaktor2"; - version = "0.1.5"; + version = "0.1.6"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "1n20ms61pp0yncs0y0mx40nj80ivv9qqv4l2ya39rfp21anmwf1s"; - rev = "f8c5b4cfe57cb50503b8333d5d06bd0f99fdecc6"; + sha256 = "0fkf9g431332fbd4wd496lnbllidyrx96gzwhcjsvaz5m7yla411"; + rev = "ed95e04bb1a5ce6ffc425647bafc7cc50f71f561"; fetchSubmodules = true; }; isLibrary = false; isExecutable = true; executableHaskellDepends = [ - aeson attoparsec base blessings bytestring containers data-default - filepath lens lens-aeson network network-simple network-simple-tls - pcre-heavy pcre-light process random stringsearch text time - transformers unagi-chan unix unordered-containers vector + aeson async attoparsec base blessings bytestring containers + data-default filepath lens lens-aeson network network-simple + network-simple-tls pcre-heavy pcre-light process random + stringsearch text time transformers unagi-chan unix + unordered-containers vector ]; license = stdenv.lib.licenses.mit; } -- cgit v1.2.3 From 775d7a789dd9f36e37c795d3a186d9a124551295 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 26 Jan 2019 21:28:35 +0100 Subject: reaktor2: 0.1.6 -> 0.1.7 --- krebs/5pkgs/haskell/reaktor2.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index 3369108f3..33ae40cd6 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -7,11 +7,11 @@ }: mkDerivation { pname = "reaktor2"; - version = "0.1.6"; + version = "0.1.7"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "0fkf9g431332fbd4wd496lnbllidyrx96gzwhcjsvaz5m7yla411"; - rev = "ed95e04bb1a5ce6ffc425647bafc7cc50f71f561"; + sha256 = "1ifjwn5dadlyhbdyym1i3g5vbsc7dyv7qzyprmcvx0qspr3rrk82"; + rev = "0395a9d9815d7d82469f0064738bef80ac87dbe3"; fetchSubmodules = true; }; isLibrary = false; -- cgit v1.2.3 From 2263863845ce9636aa08d06eec15ae00b83139e7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 03:18:03 +0100 Subject: add nscd-fix --- krebs/2configs/nscd-fix.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 krebs/2configs/nscd-fix.nix diff --git a/krebs/2configs/nscd-fix.nix b/krebs/2configs/nscd-fix.nix new file mode 100644 index 000000000..20dc3bae4 --- /dev/null +++ b/krebs/2configs/nscd-fix.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +with import ; +let + versionOlderThan = v: + compareVersions + (versions.majorMinor version) + (versions.majorMinor v) + == -1; + + enable = + versionOlderThan "19.03"; + warning = '' + Using custom services.nscd.config because + https://github.com/NixOS/nixpkgs/pull/50316 + ''; +in + optionalAttrs enable (trace warning { + services.nscd.enable = mkForce true; + services.nscd.config = mkForce (readFile (pkgs.fetchurl { + url = https://raw.githubusercontent.com/arianvp/nixpkgs/1d5f4cb/nixos/modules/services/system/nscd.conf; + sha256 = "1jlddk38lyynjn51zx3xi1nc29ahajyh0qg48qbq6dqlsrn3wxqs"; + })); + }) + -- cgit v1.2.3 From a7af3289a94568ba9a092ee8d36c6719f2ddf34d Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 03:27:29 +0100 Subject: pkgs: add reaktor2-plugins --- krebs/5pkgs/simple/reaktor2-plugins.nix | 106 ++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 krebs/5pkgs/simple/reaktor2-plugins.nix diff --git a/krebs/5pkgs/simple/reaktor2-plugins.nix b/krebs/5pkgs/simple/reaktor2-plugins.nix new file mode 100644 index 000000000..fcbcd6365 --- /dev/null +++ b/krebs/5pkgs/simple/reaktor2-plugins.nix @@ -0,0 +1,106 @@ +{ lib, pkgs, ... }: +with import ; + +rec { + generators = { + command_hook = commands: { + pattern = + "^\\s*([0-9A-Za-z._][0-9A-Za-z._-]*)(?:\\s+(.*\\S))?\\s*$"; + command = 1; + arguments = [2]; + commands = commands; + }; + }; + + commands = { + + hello = { + filename = "${pkgs.Reaktor.src}/reaktor/commands/hello"; + }; + + random-emoji = { + filename = ; + env = { + PATH = makeBinPath (with pkgs; [ coreutils gnused gnugrep xmlstarlet wget ]); + }; + }; + + nixos-version = { + filename = pkgs.writeDash "nixos-version" '' + . /etc/os-release + echo "$PRETTY_NAME" + ''; + }; + + stockholm-issue = { + filename = ; + env = { + PATH = makeBinPath (with pkgs; [ coreutils git gnused haskellPackages.lentil ]); + origin = "http://cgit.gum/stockholm"; + state_dir = "/tmp/stockholm-issue"; + }; + }; + + }; + + hooks = { + + sed = { + activate = "always"; + pattern = "^(.*)$"; + arguments = [1]; + command = { + env = { + PATH = makeBinPath (with pkgs; [ gnused ]); + state_dir = "/tmp"; + }; + filename = pkgs.writeDash "sed-plugin" '' + set -efu + exec ${pkgs.python3}/bin/python \ + ${} "$@" + ''; + }; + }; + + shack-correct = { + activate = "match"; + pattern = "^(.*Shack.*)$"; + arguments = [1]; + command.filename = ; + }; + + + url-title = { + #pattern = "^.*(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+).*$"; + pattern = "^.*(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+).*$"; + activate = "match"; + arguments = [1]; + command = { + filename = pkgs.writePython3 "url-title" { deps = with pkgs.python3Packages; [ beautifulsoup4 lxml ]; } '' + import cgi + import sys + import urllib.request + from bs4 import BeautifulSoup + + try: + req = urllib.request.Request(sys.argv[1]) + req.add_header('user-agent', 'Reaktor-url-title') + resp = urllib.request.urlopen(req) + if resp.headers['content-type'].find('text/html') >= 0: + soup = BeautifulSoup(resp.read(16000), "lxml") + title = soup.find('title').string + + if len(title.split('\n')) > 5: + title = '\n'.join(title.split('\n')[:5]) + + print(title[:450]) + else: + cd_header = resp.headers['content-disposition'] + print(cgi.parse_header(cd_header)[1]['filename']) + except: # noqa: E722 + pass + ''; + }; + }; + }; +} -- cgit v1.2.3 From ab18e5a468980e7b7dd7ae97566675680b1b8c88 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jan 2019 03:29:00 +0100 Subject: reaktor2: 0.1.7 -> 0.2.0 --- krebs/5pkgs/haskell/reaktor2.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index 33ae40cd6..dd8c3578b 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -1,27 +1,27 @@ { mkDerivation, aeson, async, attoparsec, base, blessings -, bytestring, containers, data-default, fetchgit, filepath, lens -, lens-aeson, network, network-simple, network-simple-tls -, pcre-heavy, pcre-light, process, random, stdenv, stringsearch -, text, time, transformers, unagi-chan, unix, unordered-containers -, vector +, bytestring, containers, data-default, fetchgit, filepath +, hashable, lens, lens-aeson, network, network-simple +, network-simple-tls, pcre-light, process, random, stdenv +, string-conversions, stringsearch, text, time, transformers +, unagi-chan, unix, unordered-containers, vector }: mkDerivation { pname = "reaktor2"; - version = "0.1.7"; + version = "0.2.0"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "1ifjwn5dadlyhbdyym1i3g5vbsc7dyv7qzyprmcvx0qspr3rrk82"; - rev = "0395a9d9815d7d82469f0064738bef80ac87dbe3"; + sha256 = "1wls61d9z9zkvvfgq60clcph0800kpvymqw63dpsk0sp13zygpg9"; + rev = "e9ca12a945b1d1c068e9c31050e264cb20690db4"; fetchSubmodules = true; }; isLibrary = false; isExecutable = true; executableHaskellDepends = [ aeson async attoparsec base blessings bytestring containers - data-default filepath lens lens-aeson network network-simple - network-simple-tls pcre-heavy pcre-light process random - stringsearch text time transformers unagi-chan unix - unordered-containers vector + data-default filepath hashable lens lens-aeson network + network-simple network-simple-tls pcre-light process random + string-conversions stringsearch text time transformers unagi-chan + unix unordered-containers vector ]; license = stdenv.lib.licenses.mit; } -- cgit v1.2.3 From 0f1c14e647f8c8e4c90c9e5b099f5a470333e651 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 03:32:55 +0100 Subject: l: enable nscd with fix --- lass/2configs/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lass/2configs/default.nix b/lass/2configs/default.nix index d3676a9b9..2547e8bac 100644 --- a/lass/2configs/default.nix +++ b/lass/2configs/default.nix @@ -2,6 +2,7 @@ with import ; { config, pkgs, ... }: { imports = [ + ./binary-cache/client.nix ./gc.nix ./mc.nix @@ -81,9 +82,6 @@ with import ; services.timesyncd.enable = mkForce true; - #why is this on in the first place? - services.nscd.enable = false; - systemd.tmpfiles.rules = [ "d /tmp 1777 root root - -" ]; -- cgit v1.2.3 From aa070d5db7e9fac66addcbf2005f4c404c84c019 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 03:33:30 +0100 Subject: hotdog.r: import nscd-fix --- krebs/1systems/hotdog/config.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix index cf72e0d73..2f6f76f79 100644 --- a/krebs/1systems/hotdog/config.nix +++ b/krebs/1systems/hotdog/config.nix @@ -14,6 +14,7 @@ + ]; -- cgit v1.2.3 From 6271cfaed465ca826534494951b450713773c1a4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 13:41:51 +0100 Subject: reaktor2: add user option --- krebs/3modules/reaktor2.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/krebs/3modules/reaktor2.nix b/krebs/3modules/reaktor2.nix index b667bcc92..d31447c93 100644 --- a/krebs/3modules/reaktor2.nix +++ b/krebs/3modules/reaktor2.nix @@ -25,7 +25,7 @@ with import ; type = types.listOf types.attrs; }; stateDir = mkOption { - default = "/var/lib/${self.config.systemd-service-name}"; + default = "/var/lib/${self.config.user}"; readOnly = true; type = types.absolute-pathname; }; @@ -33,6 +33,10 @@ with import ; default = "reaktor2${optionalString (name != "default") "-${name}"}"; type = types.filename; }; + user = mkOption { + default = self.config.systemd-service-name; + type = types.str; + }; }; })); }; @@ -43,10 +47,10 @@ with import ; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - User = cfg.systemd-service-name; + User = cfg.user; Group = "reaktor2"; DynamicUser = true; - StateDirectory = cfg.systemd-service-name; + StateDirectory = cfg.user; ExecStart = let configFile = pkgs.writeJSON configFileName configValue; configFileName = "${cfg.systemd-service-name}.config.json"; -- cgit v1.2.3 From b28706964e78199859cbf6b78f869e9cc2f8a8ac Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 03:34:47 +0100 Subject: hotdog.r: Reaktor -> reaktor2 --- krebs/1systems/hotdog/config.nix | 3 +- krebs/2configs/reaktor-krebs.nix | 27 ------ krebs/2configs/reaktor-retiolum.nix | 17 ---- krebs/2configs/reaktor2.nix | 181 ++++++++++++++++++++++++++++++++++++ 4 files changed, 182 insertions(+), 46 deletions(-) delete mode 100644 krebs/2configs/reaktor-krebs.nix delete mode 100644 krebs/2configs/reaktor-retiolum.nix create mode 100644 krebs/2configs/reaktor2.nix diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix index 2f6f76f79..916073375 100644 --- a/krebs/1systems/hotdog/config.nix +++ b/krebs/1systems/hotdog/config.nix @@ -12,9 +12,8 @@ - - + ]; diff --git a/krebs/2configs/reaktor-krebs.nix b/krebs/2configs/reaktor-krebs.nix deleted file mode 100644 index 67ca23ecd..000000000 --- a/krebs/2configs/reaktor-krebs.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, lib, pkgs, ... }: -with import ; - -{ - krebs.Reaktor.krebs = { - nickname = "Reaktor|krebs"; - channels = [ - "#krebs" - "#nixos-wiki" - "#nixos-de" - ]; - extraEnviron = { - REAKTOR_HOST = "irc.freenode.org"; - REAKTOR_NICKSERV_PASSWORD = "/var/lib/Reaktor/reaktor_nickserv_password"; - }; - plugins = with pkgs.ReaktorPlugins; [ - sed-plugin - ] ++ - (attrValues (task "agenda")) - ; - }; - krebs.secret.files.nix-serve-key = { - path = "/var/lib/Reaktor/reaktor_nickserv_password"; - owner.name = "Reaktor"; - source-path = toString + "/reaktor_nickserv_password"; - }; -} diff --git a/krebs/2configs/reaktor-retiolum.nix b/krebs/2configs/reaktor-retiolum.nix deleted file mode 100644 index 69fc4b202..000000000 --- a/krebs/2configs/reaktor-retiolum.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, ... }: -with import ; - -{ - krebs.Reaktor.retiolum = { - nickname = "Reaktor|lass"; - channels = [ "#noise" "#xxx" ]; - extraEnviron = { - REAKTOR_HOST = "irc.r"; - }; - plugins = with pkgs.ReaktorPlugins; [ - sed-plugin - ] ++ - (attrValues (task "agenda")) - ; - }; -} diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix new file mode 100644 index 000000000..95a95b8f5 --- /dev/null +++ b/krebs/2configs/reaktor2.nix @@ -0,0 +1,181 @@ +with import ; +{ config, pkgs, ... }: + +let + stateDir = config.krebs.reaktor2.r.stateDir; + + generators = pkgs.reaktor2-plugins.generators; + hooks = pkgs.reaktor2-plugins.hooks; + commands = pkgs.reaktor2-plugins.commands; + + task = name: let + rcFile = builtins.toFile "taskrc" '' + confirmation=no + ''; + in { + "${name}-task-add" = { + pattern = "^${name}-add: (.*)$"; + activate = "match"; + arguments = [1]; + command = { + env = { + TASKDATA = "${stateDir}/${name}"; + }; + filename = pkgs.writeDash "${name}-task-add" '' + ${pkgs.taskwarrior}/bin/task rc:${rcFile} add "$*" + ''; + }; + }; + + "${name}-task-list" = { + pattern = "^${name}-list$"; + activate = "match"; + command = { + env = { + TASKDATA = "${stateDir}/${name}"; + }; + filename = pkgs.writeDash "${name}-task-list" '' + ${pkgs.taskwarrior}/bin/task rc:${rcFile} export | ${pkgs.jq}/bin/jq -r '.[] | select(.id != 0) | "\(.id) \(.description)"' + ''; + }; + }; + + "${name}-task-delete" = { + pattern = "^${name}-delete: (.*)$"; + activate = "match"; + arguments = [1]; + command = { + env = { + TASKDATA = "${stateDir}/${name}"; + }; + filename = pkgs.writeDash "${name}-task-delete" '' + ${pkgs.taskwarrior}/bin/task rc:${rcFile} delete "$*" + ''; + }; + }; + + "${name}-task-done" = { + pattern = "^${name}-done: (.*)$"; + activate = "match"; + arguments = [1]; + command = { + env = { + TASKDATA = "${stateDir}/${name}"; + }; + filename = pkgs.writeDash "${name}-task-done" '' + ${pkgs.taskwarrior}/bin/task rc:${rcFile} done "$*" + ''; + }; + }; + }; + + systemPlugin = { + plugin = "system"; + config = { + workdir = stateDir; + hooks.JOIN = [ + { + activate = "always"; + command = { + filename = + "${pkgs.Reaktor.src}/reaktor/commands/tell-on_join"; + env = { + PATH = makeBinPath [ + pkgs.coreutils # XXX env, touch + pkgs.jq # XXX sed + pkgs.utillinux # XXX flock + ]; + state_file = "${stateDir}/tell.json"; + }; + }; + } + ]; + hooks.PRIVMSG = [ + { + pattern = "^ledger balance"; + activate = "match"; + command = { + env = { + state_file = "${stateDir}/ledger"; + }; + filename = pkgs.writeDash "ledger-balance" '' + ${pkgs.hledger}/bin/hledger -f $state_file bal -N + ''; + }; + } + { + pattern = ''^(\S+)\s+([+-][1-9][0-9]*)\s+(\S+)$''; + activate = "match"; + arguments = [1 2 3]; + command = { + env = { + # TODO; get state as argument + state_file = "${stateDir}/ledger"; + }; + filename = pkgs.writeDash "ledger-add" '' + set -x + tonick=$1 + amt=$2 + unit=$3 + printf '%s\n %s %d %s\n %s %d %s\n' "$(date -Id)" "$tonick" "$amt" "$unit" "$_from" "$(expr 0 - "''${amt#+}")" "$unit" >> $state_file + ''; + }; + } + hooks.sed + (generators.command_hook { + inherit (commands) hello random-emoji nixos-version stockholm-issue; + tell = { + filename = + "${pkgs.Reaktor.src}/reaktor/commands/tell-on_privmsg"; + env = { + PATH = makeBinPath [ + pkgs.coreutils # XXX date, env + pkgs.jq # XXX sed + pkgs.utillinux # XXX flock + ]; + state_file = "${stateDir}/tell.txt"; + }; + }; + }) + ] ++ (attrValues (task "agenda")) + ; + }; + }; + +in { + + krebs.reaktor2 = { + freenode = { + hostname = "irc.freenode.org"; + nick = "reaktor2|krebs"; + plugins = [ + { + plugin = "register"; + config = { + channels = [ + "#krebs" + ]; + }; + } + systemPlugin + ]; + user = "reaktor2"; + }; + r = { + nick = "reaktor2|krebs"; + plugins = [ + { + plugin = "register"; + config = { + channels = [ + "#noise" + "#xxx" + ]; + }; + } + systemPlugin + ]; + user = "reaktor2"; + }; + }; +} -- cgit v1.2.3 From 052cef71fd24ce36bbd043e2aa12d2ff3a9d247c Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 13:50:31 +0100 Subject: reaktor: ledger balance -> bier balance --- krebs/2configs/reaktor2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 95a95b8f5..ae2e975a2 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -92,13 +92,13 @@ let ]; hooks.PRIVMSG = [ { - pattern = "^ledger balance"; + pattern = "^bier balance"; activate = "match"; command = { env = { state_file = "${stateDir}/ledger"; }; - filename = pkgs.writeDash "ledger-balance" '' + filename = pkgs.writeDash "bier-balance" '' ${pkgs.hledger}/bin/hledger -f $state_file bal -N ''; }; -- cgit v1.2.3 From fd4876da16d436a38700b358f26ba48903de8d20 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 14:27:54 +0100 Subject: reaktor2: pretty print bier balance --- krebs/2configs/reaktor2.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index ae2e975a2..bdd95a256 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -99,7 +99,9 @@ let state_file = "${stateDir}/ledger"; }; filename = pkgs.writeDash "bier-balance" '' - ${pkgs.hledger}/bin/hledger -f $state_file bal -N + ${pkgs.hledger}/bin/hledger -f $state_file bal -N -O csv \ + | ${pkgs.coreutils}/bin/tail +2 \ + | ${pkgs.miller}/bin/mlr --icsv --opprint cat ''; }; } -- cgit v1.2.3 From 92caf2dadae82310fe13830dfaac30fe885fbf3e Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 14:32:33 +0100 Subject: reaktor2 bier: allow 'bier bal' as command --- krebs/2configs/reaktor2.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index bdd95a256..9ca60b5bf 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -92,7 +92,7 @@ let ]; hooks.PRIVMSG = [ { - pattern = "^bier balance"; + pattern = "^bier bal(ance)*$"; activate = "match"; command = { env = { -- cgit v1.2.3 From 5926a718593544c69301f4168d30051ff1d61aab Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 16:55:47 +0100 Subject: reaktor2 task: use single hook for more efficency --- krebs/2configs/reaktor2.nix | 39 ++++++++++++--------------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 9ca60b5bf..f1e59142e 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -2,6 +2,7 @@ with import ; { config, pkgs, ... }: let + #for shared state directory stateDir = config.krebs.reaktor2.r.stateDir; generators = pkgs.reaktor2-plugins.generators; @@ -13,11 +14,12 @@ let confirmation=no ''; in { - "${name}-task-add" = { - pattern = "^${name}-add: (.*)$"; - activate = "match"; - arguments = [1]; - command = { + pattern = "^${name}-([a-z]+)(?::\\s*(.*))?"; + activate = "match"; + command = 1; + arguments = [2]; + commands = { + add = { env = { TASKDATA = "${stateDir}/${name}"; }; @@ -25,12 +27,7 @@ let ${pkgs.taskwarrior}/bin/task rc:${rcFile} add "$*" ''; }; - }; - - "${name}-task-list" = { - pattern = "^${name}-list$"; - activate = "match"; - command = { + list = { env = { TASKDATA = "${stateDir}/${name}"; }; @@ -38,13 +35,7 @@ let ${pkgs.taskwarrior}/bin/task rc:${rcFile} export | ${pkgs.jq}/bin/jq -r '.[] | select(.id != 0) | "\(.id) \(.description)"' ''; }; - }; - - "${name}-task-delete" = { - pattern = "^${name}-delete: (.*)$"; - activate = "match"; - arguments = [1]; - command = { + delete = { env = { TASKDATA = "${stateDir}/${name}"; }; @@ -52,13 +43,7 @@ let ${pkgs.taskwarrior}/bin/task rc:${rcFile} delete "$*" ''; }; - }; - - "${name}-task-done" = { - pattern = "^${name}-done: (.*)$"; - activate = "match"; - arguments = [1]; - command = { + done = { env = { TASKDATA = "${stateDir}/${name}"; }; @@ -139,8 +124,8 @@ let }; }; }) - ] ++ (attrValues (task "agenda")) - ; + (task "agenda") + ]; }; }; -- cgit v1.2.3 From 6965a1df8e7fe5e85128349c31057fdc8c8d54f6 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jan 2019 18:33:22 +0100 Subject: reaktor2 service: add useTLS option --- krebs/3modules/reaktor2.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/krebs/3modules/reaktor2.nix b/krebs/3modules/reaktor2.nix index b667bcc92..3dd86503f 100644 --- a/krebs/3modules/reaktor2.nix +++ b/krebs/3modules/reaktor2.nix @@ -33,6 +33,10 @@ with import ; default = "reaktor2${optionalString (name != "default") "-${name}"}"; type = types.filename; }; + useTLS = mkOption { + default = self.config.port == "6697"; + type = types.bool; + }; }; })); }; -- cgit v1.2.3 From 0830a0ccdcc60aea4aaaa79c01db66b88c0a65a0 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 19:29:28 +0100 Subject: l reaktor-coders: Reaktor -> reaktor2 --- lass/2configs/reaktor-coders.nix | 194 ++++++++++++++++++++------------------- 1 file changed, 101 insertions(+), 93 deletions(-) diff --git a/lass/2configs/reaktor-coders.nix b/lass/2configs/reaktor-coders.nix index 7cdcdf20c..44d9d6866 100644 --- a/lass/2configs/reaktor-coders.nix +++ b/lass/2configs/reaktor-coders.nix @@ -1,99 +1,107 @@ { config, lib, pkgs, ... }: with import ; -{ - krebs.Reaktor.coders = { - nickname = "Reaktor|lass"; - channels = [ "#coders" "#germany" "#panthermoderns" ]; - extraEnviron = { - REAKTOR_HOST = "irc.hackint.org"; - }; - plugins = with pkgs.ReaktorPlugins; let - - lambdabot = (import (pkgs.fetchFromGitHub { - owner = "NixOS"; repo = "nixpkgs"; - rev = "a4ec1841da14fc98c5c35cc72242c23bb698d4ac"; - sha256 = "148fpw31s922hxrf28yhrci296f7c7zd81hf0k6zs05rq0i3szgy"; - }) {}).lambdabot; - - lambdabotflags = '' - -XStandaloneDeriving -XGADTs -XFlexibleContexts \ - -XFlexibleInstances -XMultiParamTypeClasses \ - -XOverloadedStrings -XFunctionalDependencies \''; - in [ - sed-plugin - url-title - (buildSimpleReaktorPlugin "lambdabot-pl" { - pattern = "^@pl (?P.*)$$"; - script = pkgs.writeDash "lambda-pl" '' - exec ${lambdabot}/bin/lambdabot \ - ${indent lambdabotflags} - -e "@pl $1" - ''; - }) - (buildSimpleReaktorPlugin "lambdabot-type" { - pattern = "^@type (?P.*)$$"; - script = pkgs.writeDash "lambda-type" '' - exec ${lambdabot}/bin/lambdabot \ - ${indent lambdabotflags} - -e "@type $1" - ''; - }) - (buildSimpleReaktorPlugin "lambdabot-let" { - pattern = "^@let (?P.*)$$"; - script = pkgs.writeDash "lambda-let" '' - exec ${lambdabot}/bin/lambdabot \ - ${indent lambdabotflags} - -e "@let $1" - ''; - }) - (buildSimpleReaktorPlugin "lambdabot-run" { - pattern = "^@run (?P.*)$$"; - script = pkgs.writeDash "lambda-run" '' - exec ${lambdabot}/bin/lambdabot \ - ${indent lambdabotflags} - -e "@run $1" - ''; - }) - (buildSimpleReaktorPlugin "lambdabot-kind" { - pattern = "^@kind (?P.*)$$"; - script = pkgs.writeDash "lambda-kind" '' - exec ${lambdabot}/bin/lambdabot \ - ${indent lambdabotflags} - -e "@kind $1" - ''; - }) - (buildSimpleReaktorPlugin "ping" { - pattern = "^!ping (?P.*)$$"; - script = pkgs.writeDash "ping" '' - exec /run/wrappers/bin/ping -q -c1 "$1" 2>&1 | tail -1 - ''; - }) - (buildSimpleReaktorPlugin "google" { - pattern = "^!g (?P.*)$$"; - script = pkgs.writeDash "google" '' - exec ${pkgs.ddgr}/bin/ddgr -C -n1 --json "$@" | \ - ${pkgs.jq}/bin/jq '@text "\(.[0].abstract) \(.[0].url)"' - ''; - }) - (buildSimpleReaktorPlugin "blockchain" { - pattern = ".*[Bb]lockchain.*$$"; - script = pkgs.writeDash "blockchain" '' - exec echo 'DID SOMEBODY SAY BLOCKCHAIN? https://paste.krebsco.de/r99pMoQq/+inline' - ''; - }) - (buildSimpleReaktorPlugin "shrug" { - pattern = "^!shrug$"; - script = pkgs.writeDash "shrug" '' - exec echo '¯\_(ツ)_/¯' - ''; - }) - (buildSimpleReaktorPlugin "flip" { - pattern = "^!flip$"; - script = pkgs.writeDash "shrug" '' - exec echo '(╯°□°)╯ ┻━┻' - ''; - }) +let + hooks = pkgs.reaktor2-plugins.hooks; +in { + krebs.reaktor2.coders = { + hostname = "irc.hackint.org"; + port = "9999"; + useTLS = true; + nick = "reaktor2|lass"; + plugins = [ + { + plugin = "register"; + config = { + channels = [ + "#coders" + "#germany" + "#panthermoderns" + ]; + }; + } + { + plugin = "system"; + config = { + workdir = config.krebs.reaktor2.coders.stateDir; + hooks.PRIVMSG = [ + hooks.sed + hooks.url-title + { + activate = "match"; + pattern = ''@([^ ]+) (.*)$''; + command = 1; + arguments = [2]; + commands = let + lambdabot = (import (pkgs.fetchFromGitHub { + owner = "NixOS"; repo = "nixpkgs"; + rev = "a4ec1841da14fc98c5c35cc72242c23bb698d4ac"; + sha256 = "148fpw31s922hxrf28yhrci296f7c7zd81hf0k6zs05rq0i3szgy"; + }) {}).lambdabot; + lambdabotWrapper = pkgs.writeDash "lambdabot.wrapper" '' + exec ${lambdabot}/bin/lambdabot \ + -XStandaloneDeriving -XGADTs -XFlexibleContexts \ + -XFlexibleInstances -XMultiParamTypeClasses \ + -XOverloadedStrings -XFunctionalDependencies \ + -e "$@" + ''; + in { + pl = { + env.HOME = config.krebs.reaktor2.coders.stateDir; + filename = pkgs.writeDash "lambdabot-pl" '' + ${lambdabotWrapper} "@pl $1" + ''; + }; + type = { + env.HOME = config.krebs.reaktor2.coders.stateDir; + filename = pkgs.writeDash "lambdabot-type" '' + ${lambdabotWrapper} "@type $1" + ''; + }; + "let" = { + env.HOME = config.krebs.reaktor2.coders.stateDir; + filename = pkgs.writeDash "lambdabot-let" '' + ${lambdabotWrapper} "@let $1" + ''; + }; + run = { + env.HOME = config.krebs.reaktor2.coders.stateDir; + filename = pkgs.writeDash "lambdabot-run" '' + ${lambdabotWrapper} "@run $1" + ''; + }; + kind = { + env.HOME = config.krebs.reaktor2.coders.stateDir; + filename = pkgs.writeDash "lambdabot-kind" '' + ${lambdabotWrapper} "@kind $1" + ''; + }; + }; + } + { + activate = "match"; + pattern = ''!([^ ]+)(?:\s*(.*))?''; + command = 1; + arguments = [2]; + commands = { + ping.filename = pkgs.writeDash "ping" '' + exec /run/wrappers/bin/ping -q -c1 "$1" 2>&1 | tail -1 + ''; + google.filename = pkgs.writeDash "google" '' + exec ${pkgs.ddgr}/bin/ddgr -C -n1 --json "$@" | \ + ${pkgs.jq}/bin/jq '@text "\(.[0].abstract) \(.[0].url)"' + ''; + shrug.filename = pkgs.writeDash "shrug" '' + exec echo '¯\_(ツ)_/¯' + ''; + table.filename = pkgs.writeDash "table" '' + exec echo '(╯°□°)╯ ┻━┻' + ''; + }; + } + ]; + }; + } ]; }; } -- cgit v1.2.3 From 4fd18dc654137de5a87c95a163efb9126ac07bf7 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 19:32:04 +0100 Subject: l baseX: use correct urxvt packagename --- lass/2configs/baseX.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index b8a0a9f2a..1d2d1173d 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -74,7 +74,7 @@ in { nmap pavucontrol powertop - rxvt_unicode_with-plugins + rxvt_unicode-with-plugins sxiv taskwarrior termite -- cgit v1.2.3 From fa1e5d5b7fa2424e636d5807141c3043770affaf Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 27 Jan 2019 19:33:43 +0100 Subject: l reaktor-plugins: use correct header --- krebs/5pkgs/simple/reaktor2-plugins.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krebs/5pkgs/simple/reaktor2-plugins.nix b/krebs/5pkgs/simple/reaktor2-plugins.nix index fcbcd6365..48464c0b6 100644 --- a/krebs/5pkgs/simple/reaktor2-plugins.