From 862851f1837e3b331a42d3dde92a409900987fff Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 20 Jun 2018 12:44:53 +0200 Subject: buildbot: also fetch submodules --- krebs/2configs/buildbot-stockholm.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs') diff --git a/krebs/2configs/buildbot-stockholm.nix b/krebs/2configs/buildbot-stockholm.nix index 04b1c999f..62a5f9ab5 100644 --- a/krebs/2configs/buildbot-stockholm.nix +++ b/krebs/2configs/buildbot-stockholm.nix @@ -63,6 +63,7 @@ in grab_repo = steps.Git( repourl=stockholm_repo, mode='full', + submodules=True, ) ''; builder = { -- cgit v1.2.3 From 4613095009ca1bffaa2c5a6a0eb3a18c1ab83131 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 20 Jun 2018 12:47:11 +0200 Subject: l: add radio.lassul.us --- krebs/3modules/lass/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs') diff --git a/krebs/3modules/lass/default.nix b/krebs/3modules/lass/default.nix index fd74983fa..e2322e171 100644 --- a/krebs/3modules/lass/default.nix +++ b/krebs/3modules/lass/default.nix @@ -66,6 +66,7 @@ with import ; ions 60 IN A ${config.krebs.hosts.prism.nets.internet.ip4.addr} paste 60 IN A ${config.krebs.hosts.prism.nets.internet.ip4.addr} lol 60 IN A ${config.krebs.hosts.prism.nets.internet.ip4.addr} + radio 60 IN A ${config.krebs.hosts.prism.nets.internet.ip4.addr} ''; }; nets = rec { -- cgit v1.2.3 From 14693d22bbd3f5a171becb2b92cad5a53d4e3ea4 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 24 Jun 2018 23:41:27 +0200 Subject: nextgum.r: init --- krebs/3modules/makefu/default.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'krebs') diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix index d7a750c6e..c5404f96d 100644 --- a/krebs/3modules/makefu/default.nix +++ b/krebs/3modules/makefu/default.nix @@ -520,6 +520,38 @@ with import ; ssh.privkey.path = ; ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN5ZmJSypW3LXIJ67DdbxMxCfLtORFkl5jEuD131S5Tr"; }; + nextgum = rec { + ci = true; + cores = 8; + nets = rec { + internet = { + ip4.addr = "144.76.26.247"; + ip6.addr = "2a01:4f8:191:12f6::2"; + aliases = [ + "nextgum.i" + ]; + }; + retiolum = { + via = internet; + ip4.addr = "10.243.0.213"; + ip6.addr = "42:f9f0:0000:0000:0000:0000:0000:70d3"; + aliases = [ + "nextgum.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAucCebFmS96WorD+Br4UQudmAhMlLpacErjwA/u2argBTT2nGHTR8 + aN4e0xf3IYLA+iogLIW/JuQfKLe8evEK21iZ3jleW8N7mbCulhasi/0lqWlirrpO + npJAiSNF1m7ijoylkEKxtmehze+8ojprUT2hx1ImMlHMWGxvs+TmBbZBMgxAGMJh + 6cMMDJQi+4d9XrJQ3+XUVK3MkviLA91oIAXsLdFptL6b12siUaz4StQXDJUHemBF + 3ZwlO+W2Es69ifEhmV6NaDDRcSRdChGbHTz1OU8wYaFNaxWla/iprQQ+jEUldpcN + VC18QGYRUAgZ0PCIpKurjWNehJFB3zXt+wIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; + ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIcxWFEPzke/Sdd9qNX6rSJgXal8NmINYajpFCxXfYdj root@gum"; + }; gum = rec { ci = true; -- cgit v1.2.3 From 179a0c8e86868428d2895742d2b066cc72542070 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 24 Jun 2018 23:42:30 +0200 Subject: onebutton.r: add mpc-booter --- krebs/1systems/onebutton/config.nix | 30 ++++++++++++++++++++++++++++++ krebs/1systems/onebutton/source.nix | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/1systems/onebutton/config.nix b/krebs/1systems/onebutton/config.nix index dca00a206..b87aef5a3 100644 --- a/krebs/1systems/onebutton/config.nix +++ b/krebs/1systems/onebutton/config.nix @@ -16,6 +16,36 @@ services.nixosManual.enable = false; services.journald.extraConfig = "SystemMaxUse=50M"; } + { + systemd.services.mpc-booter = let + mpc = "${pkgs.mpc_cli}/bin/mpc -h mpd.shack -p 6600"; + url = "http://lassul.us:8000/radio.ogg"; + say = pkgs.writeDash "say" '' + tmpfile=$(${pkgs.coreutils}/bin/mktemp) + echo "$@" > $tmpfile + ${pkgs.curl}/bin/curl -i -H "content-type: text/plain" -X POST -d "@$tmpfile" gobbelz.shack/say/ + rm "$tmpfile" + ''; + in { + wantedBy = [ "multi-user.target" ]; + after = [ "network-online.target" ]; + serviceConfig = { + RemainAfterExit = "yes"; + Type = "oneshot"; + ExecStart = pkgs.writeDash "mpc-boot" '' + until ${mpc} stats;do + echo "waiting for mpd.shack to appear" + sleep 1 + done + ${say} "Willkommen im Shack wertes Mitglied" + + ${say} "Lassulus Super Radio wurde gestartet" + ${mpc} add ${url} + ${mpc} play + ''; + }; + }; + } ]; krebs.build.host = config.krebs.hosts.onebutton; # NixOS wants to enable GRUB by default diff --git a/krebs/1systems/onebutton/source.nix b/krebs/1systems/onebutton/source.nix index 8f25881c9..6842bfaab 100644 --- a/krebs/1systems/onebutton/source.nix +++ b/krebs/1systems/onebutton/source.nix @@ -4,7 +4,7 @@ let nixpkgs = pkgs.fetchFromGitHub { owner = "nixos"; repo = "nixpkgs-channels"; - rev = "6c064e6b"; # only binary cache for unstable arm6 + rev = "nixos-unstable"; # only binary cache for unstable arm6 sha256 = "1rqzh475xn43phagrr30lb0fd292c1s8as53irihsnd5wcksnbyd"; }; in import { -- cgit v1.2.3 From c362761aa09f7126bcc8eeae3cdb07ab7e936ac6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 25 Jun 2018 10:18:24 +0200 Subject: 7295e17 -> 91b286c --- krebs/krops.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/krops.nix b/krebs/krops.nix index 97cd6a939..6a8a05726 100644 --- a/krebs/krops.nix +++ b/krebs/krops.nix @@ -12,7 +12,7 @@ krebs-source = { nixpkgs.git = { - ref = "7295e175bf6c6e8aa54f1b4d99256ee95d13d385"; + ref = "91b286c8935b8c5df4a99302715200d3bd561977"; url = https://github.com/NixOS/nixpkgs; }; stockholm.file = toString ../.; -- cgit v1.2.3 From 8462db2612364ddc6479621dd0d9207376c33cdd Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 26 Jun 2018 22:32:42 +0200 Subject: thesauron -> cholerab --- krebs/5pkgs/simple/cholerab/default.nix | 7 +++++++ krebs/5pkgs/simple/thesauron/default.nix | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 krebs/5pkgs/simple/cholerab/default.nix delete mode 100644 krebs/5pkgs/simple/thesauron/default.nix (limited to 'krebs') diff --git a/krebs/5pkgs/simple/cholerab/default.nix b/krebs/5pkgs/simple/cholerab/default.nix new file mode 100644 index 000000000..9e60898a3 --- /dev/null +++ b/krebs/5pkgs/simple/cholerab/default.nix @@ -0,0 +1,7 @@ +{ fetchgit, callPackage }: let + src = fetchgit { + url = "https://github.com/krebs/cholerab"; + rev = "8ac22588cf2c20465e3c9348e7ce04885599c2a5"; + "sha256"= "1ivkjl235dnm5aaqqvarnxkz7zh0gvah22b0fqwlsflrcd5wmgva"; + }; +in callPackage src {} diff --git a/krebs/5pkgs/simple/thesauron/default.nix b/krebs/5pkgs/simple/thesauron/default.nix deleted file mode 100644 index d543319f2..000000000 --- a/krebs/5pkgs/simple/thesauron/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ fetchgit, callPackage }: let - src = fetchgit { - url = "https://github.com/krebs/thesauron"; - rev = "8ac22588cf2c20465e3c9348e7ce04885599c2a5"; - "sha256"= "1ivkjl235dnm5aaqqvarnxkz7zh0gvah22b0fqwlsflrcd5wmgva"; - }; -in callPackage src {} -- cgit v1.2.3 From d87e52d7cd10fc042d104fc8a77552896d865ee4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 27 Jun 2018 16:14:16 +0200 Subject: cholerab: 8ac2258 -> 4031072 --- krebs/5pkgs/simple/cholerab/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/cholerab/default.nix b/krebs/5pkgs/simple/cholerab/default.nix index 9e60898a3..c9ea8faef 100644 --- a/krebs/5pkgs/simple/cholerab/default.nix +++ b/krebs/5pkgs/simple/cholerab/default.nix @@ -1,7 +1,7 @@ { fetchgit, callPackage }: let src = fetchgit { url = "https://github.com/krebs/cholerab"; - rev = "8ac22588cf2c20465e3c9348e7ce04885599c2a5"; - "sha256"= "1ivkjl235dnm5aaqqvarnxkz7zh0gvah22b0fqwlsflrcd5wmgva"; + rev = "403107219ba9f3b6881f2cdae57ac373a13d98f0"; + sha256 = "076giaha52zxkvkr2f471g2rl9c5m8r5g03wncgh46qmdfcb5idb"; }; in callPackage src {} -- cgit v1.2.3 From 625aee57e71d97f6aa2fe6c02929482698307351 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 27 Jun 2018 23:37:46 +0200 Subject: l ftb: mesa -> mesa_glu --- krebs/5pkgs/simple/ftb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/ftb/default.nix b/krebs/5pkgs/simple/ftb/default.nix index c2e83c9f4..ab7d6e651 100644 --- a/krebs/5pkgs/simple/ftb/default.nix +++ b/krebs/5pkgs/simple/ftb/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl , jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm , openjdk -, mesa, openal +, mesa_glu, openal , useAlsa ? false, alsaOss ? null }: with stdenv.lib; @@ -26,7 +26,7 @@ stdenv.mkDerivation { #!${stdenv.shell} export _JAVA_AWT_WM_NONREPARENTING=1 - export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm mesa openal ]} + export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm mesa_glu openal ]} ${if useAlsa then "${alsaOss}/bin/aoss" else "" } \ ${jre}/bin/java -jar $out/ftb.jar EOF -- cgit v1.2.3 From a098e2ad4a0b39c9046c9c42282ddeb2bffd6d9d Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 28 Jun 2018 14:10:54 +0200 Subject: cholerab: 4031072 -> 25d7ef05 --- krebs/5pkgs/simple/cholerab/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/cholerab/default.nix b/krebs/5pkgs/simple/cholerab/default.nix index c9ea8faef..94514fe44 100644 --- a/krebs/5pkgs/simple/cholerab/default.nix +++ b/krebs/5pkgs/simple/cholerab/default.nix @@ -1,7 +1,7 @@ { fetchgit, callPackage }: let src = fetchgit { url = "https://github.com/krebs/cholerab"; - rev = "403107219ba9f3b6881f2cdae57ac373a13d98f0"; - sha256 = "076giaha52zxkvkr2f471g2rl9c5m8r5g03wncgh46qmdfcb5idb"; + rev = "25d7ef051d6fc74d99b155e768b3c650296a230c"; + sha256 = "1pymw7v2ql42iq825ccx98s4fp9jsz5b2hjr1qad6bamfc6i7yy9"; }; in callPackage src {} -- cgit v1.2.3 From 67e3986769c7d889d401b4f6fc093a95165f9c32 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 1 Jul 2018 15:00:45 +0200 Subject: add buildbotSlave pubkey --- krebs/3modules/krebs/default.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'krebs') diff --git a/krebs/3modules/krebs/default.nix b/krebs/3modules/krebs/default.nix index a938f8ec9..e6eb3d287 100644 --- a/krebs/3modules/krebs/default.nix +++ b/krebs/3modules/krebs/default.nix @@ -174,5 +174,8 @@ in { mail = "spam@krebsco.de"; pubkey = ''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwuAZB3wtAvBJFYh+gWdyGaZU4mtqM2dFXmh2rORlbXeh02msu1uv07ck1VKkQ4LgvCBcBsAOeVa1NTz99eLqutwgcqMCytvRNUCibcoEWwHObsK53KhDJj+zotwlFhnPPeK9+EpOP4ngh/tprJikttos5BwBwe2K+lfiid3fmVPZcTTYa77nCwijimMvWEx6CEjq1wiXMUc4+qcEn8Swbwomz/EEQdNE2hgoC3iMW9RqduTFdIJWnjVi0KaxenX9CvQRGbVK5SSu2gwzN59D/okQOCP6+p1gL5r3QRHSLSSRiEHctVQTkpKOifrtLZGSr5zArEmLd/cOVyssHQPCX repo-sync@wolf''; }; + buildbotSlave = { + pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP7cre2crQMI6O4XtIfIiGl1GUqIi060fJlOQJgG0/NH"; + }; }; } -- cgit v1.2.3 From 8cde86561a54652541d9a6c90109d5aa438c21f5 Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 3 Jul 2018 20:34:29 +0200 Subject: Reaktor plugins: +taskwarrior --- krebs/5pkgs/simple/Reaktor/plugins.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index c39e39799..4016b6a16 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -141,6 +141,13 @@ rec { ''; }); + taskwarrior = buildSimpleReaktorPlugin "task" { + pattern = "^task: (?P.*)$$"; + script = pkgs.writeDash "task-wrapper" '' + task "$*" + ''; + }; + todo = name: { add = buildSimpleReaktorPlugin "${name}-add" { pattern = "^${name}-add: (?P.*)$$"; -- cgit v1.2.3 From 68608f53b04c6c4397a53fd7a094be50d9552c5c Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 3 Jul 2018 20:39:53 +0200 Subject: reaktor-krebs: +taskwarrior --- krebs/2configs/reaktor-krebs.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs') diff --git a/krebs/2configs/reaktor-krebs.nix b/krebs/2configs/reaktor-krebs.nix index fa51b84f0..d80fd0eb1 100644 --- a/krebs/2configs/reaktor-krebs.nix +++ b/krebs/2configs/reaktor-krebs.nix @@ -13,6 +13,7 @@ with import ; }; plugins = with pkgs.ReaktorPlugins; [ sed-plugin + taskwarrior ] ++ (attrValues (todo "agenda")) ; -- cgit v1.2.3 From 70e8c4b0a4255a989bf93fe6fca96244ee617eee Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 3 Jul 2018 21:35:43 +0200 Subject: Reaktor taskwarrior: fix path to taskwarrior --- krebs/5pkgs/simple/Reaktor/plugins.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index 418a3c73c..cd389366e 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -144,7 +144,7 @@ rec { taskwarrior = buildSimpleReaktorPlugin "task" { pattern = "^task: (?P.*)$$"; script = pkgs.writeDash "task-wrapper" '' - task "$*" + ${pkgs.taskwarrior}/bin/task "$*" ''; }; -- cgit v1.2.3 From d6df7ae483b984b90bdc8d4540301ef394885a98 Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 3 Jul 2018 22:22:49 +0200 Subject: Reaktor taskwarrior: touch if no taskrc exists --- krebs/5pkgs/simple/Reaktor/plugins.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index cd389366e..7573c9256 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -143,9 +143,15 @@ rec { taskwarrior = buildSimpleReaktorPlugin "task" { pattern = "^task: (?P.*)$$"; - script = pkgs.writeDash "task-wrapper" '' - ${pkgs.taskwarrior}/bin/task "$*" - ''; + script = let + taskrc = "$HOME/.taskrc"; + in + pkgs.writeDash "task-wrapper" '' + if [ -f ${taskrc} ] ; then + touch ${taskrc} + fi + ${pkgs.taskwarrior}/bin/task "$*" + ''; }; todo = name: { -- cgit v1.2.3 From 92aa5bb2329c39cf97d4399839989e7401820ae4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 6 Jul 2018 17:42:04 +0200 Subject: Reaktor url-title: fix some issues with weird urls ref: https://irc-bot-science.clsr.net/ --- krebs/5pkgs/simple/Reaktor/plugins.nix | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index cd389366e..4a7917b68 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -121,21 +121,27 @@ rec { pattern = "^.*(?Phttp[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+).*$$"; path = with pkgs; [ curl perl ]; script = pkgs.writePython3 "url-title" [ "beautifulsoup4" "lxml" ] '' + import cgi import sys import urllib.request from bs4 import BeautifulSoup try: - soup = BeautifulSoup(urllib.request.urlopen(sys.argv[1]), "lxml") - title = soup.find('title').string + resp = urllib.request.urlopen(sys.argv[1]) + if resp.headers['content-type'].find('text/html') >= 0: + soup = BeautifulSoup(resp.read(16000), "lxml") + title = soup.find('title').string - if title: - if len(title) > 512: - print('message to long, skipped') - elif len(title.split('\n')) > 5: - print('to many lines, skipped') - else: - print(title) + if title: + if len(title) > 450: + print('message to long, rest skipped') + elif len(title.split('\n')) > 5: + print('to many lines, skipped') + else: + print(title) + else: + cd_header = resp.headers['content-disposition'] + print(cgi.parse_header(cd_header)[1]['filename']) except: # noqa: E722 pass ''; -- cgit v1.2.3 From 48fdd37c032bfb2e53ca94ee5b48633a24e1e897 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 7 Jul 2018 14:40:59 +0200 Subject: Reaktor url-title: show 450 chars max --- krebs/5pkgs/simple/Reaktor/plugins.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index 4a7917b68..3730b9e66 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -127,18 +127,17 @@ rec { from bs4 import BeautifulSoup try: - resp = urllib.request.urlopen(sys.argv[1]) + 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 title: - if len(title) > 450: - print('message to long, rest skipped') - elif len(title.split('\n')) > 5: - print('to many lines, skipped') - else: - print(title) + 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']) -- cgit v1.2.3 From b3476561c5fddc324cdfebb1cae84834d21fae52 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 7 Jul 2018 14:42:27 +0200 Subject: nixpkgs: 91b286c -> 56fad14 --- krebs/krops.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/krops.nix b/krebs/krops.nix index 6a8a05726..861f2d323 100644 --- a/krebs/krops.nix +++ b/krebs/krops.nix @@ -12,7 +12,7 @@ krebs-source = { nixpkgs.git = { - ref = "91b286c8935b8c5df4a99302715200d3bd561977"; + ref = "56fad146a12a6f934d1d5ef875eb729be1b19129"; url = https://github.com/NixOS/nixpkgs; }; stockholm.file = toString ../.; -- cgit v1.2.3 From ea4fe76393a527eb4a754d0c8a8fa35de2bd20e5 Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 10 Jul 2018 20:35:38 +0200 Subject: Reaktor: taskwarrior -> task-{add,delete,list} --- krebs/5pkgs/simple/Reaktor/plugins.nix | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index 7573c9256..96e0af2d7 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -141,16 +141,28 @@ rec { ''; }); - taskwarrior = buildSimpleReaktorPlugin "task" { - pattern = "^task: (?P.*)$$"; - script = let - taskrc = "$HOME/.taskrc"; - in - pkgs.writeDash "task-wrapper" '' - if [ -f ${taskrc} ] ; then - touch ${taskrc} - fi - ${pkgs.taskwarrior}/bin/task "$*" + taskrcFile = builtins.toFile "taskrc" '' + confirmation=no + ''; + + task-add = buildSimpleReaktorPlugin "task-add" { + pattern = "^task-add: (?P.*)$$"; + script = pkgs.writeDash "task-add" '' + ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} add "$*" + ''; + }; + + task-list = buildSimpleReaktorPlugin "task-list" { + pattern = "^task-list"; + script = pkgs.writeDash "task-list" '' + ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} list + ''; + }; + + task-delete = buildSimpleReaktorPlugin "task-delete" { + pattern = "^task-remove: (?P.*)$$"; + script = pkgs.writeDash "task-delete" '' + ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} delete "$*" ''; }; -- cgit v1.2.3 From 9f9cd592c50911e49956cf47e8e385a8299ac410 Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 10 Jul 2018 20:55:35 +0200 Subject: Reaktor: +plugins: task-{add, delete, list} -taskwarrior --- krebs/2configs/reaktor-krebs.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/2configs/reaktor-krebs.nix b/krebs/2configs/reaktor-krebs.nix index d80fd0eb1..2e63f1385 100644 --- a/krebs/2configs/reaktor-krebs.nix +++ b/krebs/2configs/reaktor-krebs.nix @@ -13,7 +13,9 @@ with import ; }; plugins = with pkgs.ReaktorPlugins; [ sed-plugin - taskwarrior + task-add + task-delete + task-list ] ++ (attrValues (todo "agenda")) ; -- cgit v1.2.3