From e71561caafa36ad62fee67575bcd8f95af1032b7 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 31 Dec 2018 10:15:22 +0100 Subject: ma cake.r: add Mic92 ssh key to authorized keys --- krebs/1systems/wolf/config.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs') diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix index 914b38051..ec8830711 100644 --- a/krebs/1systems/wolf/config.nix +++ b/krebs/1systems/wolf/config.nix @@ -161,6 +161,7 @@ in users.extraUsers.root.openssh.authorizedKeys.keys = [ config.krebs.users.ulrich.pubkey + config.krebs.users.raute.pubkey config.krebs.users.makefu-omo.pubkey "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQDb9NPa2Hf51afcG1H13UPbE5E02J8aC9a1sGCRls592wAVlQbmojYR1jWDPA2m32Bsyv0ztqi81zDyndWWZPQVJVBk00VjYBcgk6D5ifqoAuWLzfuHJPWZGOvBf/U74/LNFNUkj1ywjneK7HYTRPXrRBBfBSQNmQzkvue7s599L2vdueZKyjNsMpx2m6nm2SchaMuDskSQut/168JgU1l4M8BeT68Bo4WdelhBYnhSI1a59FGkgdu2SCjyighLQRy2sOH3ksnkHWENPkA+wwQOlKl7R3DsEybrNd4NU9FSwFDyDmdhfv5gJp8UGSFdjAwx43+8zM5t5ruZ25J0LnVb0PuTuRA00UsW83MkLxFpDQLrQV08tlsY6iGrqxP67C3VJ6t4v6oTp7/vaRLhEFc1PhOLh+sZ18o8MLO+e2rGmHGHQnSKfBOLUvDMGa4jb01XBGjdnIXLOkVo79YR5jZn7jJb2gTZ95OD6bWSDADoURSuwuLa7kh4ti1ItAKuhkIvbuky3rRVvQEc92kJ6aNUswIUXJa0K2ibbIY6ycKAA3Ljksl3Mm9KzOn6yc/i/lSF+SOrTGhabPJigKkIoqKIwnV5IU3gkfsxPQJOBMPqHDGAOeYQe3WpWedEPYuhQEczw4exMb9TkNE96F71PzuQPJDl5sPAWyPLeMKpy5XbfRiF2by4nxN3ZIQvjtoyVkjNV+qM0q0yKBzLxuRAEQOZ2yCEaBudZQkQiwHD97H2vu4SRQ/2aOie1XiOnmdbQRDZSO3BsoDK569K1w+gDfSnqY7zVUMj6tw+uKx6Gstck5lbvYMtdWKsfPv/pDM8eyIVFLL93dKTX+ertcQj6xDwLfOiNubE5ayFXhYkjwImV6NgfBuq+3hLK0URP2rPlOZbbZTQ0WlKD6CCRZPMSZCU9oD2zYfqpvRArBUcdkAwGePezORkfJQLE6mYEJp6pdFkJ/IeFLbO6M0lZVlfnpzAC9kjjkMCRofZUETcFSppyTImCbgo3+ok59/PkNU5oavBXyW80ue2tWHr08HX/QALNte3UITmIIlU6SFMCPMWJqadK1eDPWfJ4H4iDXRNn3D5wqN++iMloKvpaj0wieqXLY4+YfvNTNr177OU48GEWW8DnoEkbpwsCbjPxznGDQhdDqdYyMY/fDgRQReKITvKYGHRzesGysw5cKsp9LEfXD0R6WE2TeiiENla5AWzTgXJB0AyZEcOiIfqOgT9Nr9S8q5gc/BdA7P+jhGGJgEHhV3dVlfIZ7pmZc27Yu7UTQ0lbAKWqcMSTOdne+QL6ILzbvLrQwdvax4tQdm5opfU16SrOox1AMwAbkdq84z6uJqYVx3cUXfMJgTyDNrVv3or root@plattenschwein" # for backup ]; -- cgit v1.2.3 From de6ca6e60b0ac70042262d0d735c8f0991f0d7f4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 2 Jan 2019 21:41:05 +0100 Subject: external: add matchbox --- krebs/3modules/external/default.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'krebs') diff --git a/krebs/3modules/external/default.nix b/krebs/3modules/external/default.nix index baa49dbe0..1363df1a6 100644 --- a/krebs/3modules/external/default.nix +++ b/krebs/3modules/external/default.nix @@ -344,6 +344,30 @@ in { }; }; }; + matchbox = { + owner = config.krebs.users.Mic92; + nets = { + retiolum = { + ip4.addr = "10.243.29.172"; + aliases = [ "matchbox.r" ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIICCgKCAgEAqwB9pzV889vpMp/am+T0sfm5qO/wAWS/tv0auYK3Zyx3ChxrQX2m + VrxO5a/bjR/g1fi/t2kJIV/6tsVSRHfzKuKHprE2KxeNOmwUuSjjiM4CboASMR+w + nra6U0Ldf5vBxtEj5bj384QxwxxVLhSw8NbE43FCM07swSvAT8Y/ZmGUd738674u + TNC6zM6zwLvN0dxCDLuD5bwUq7y73JNQTm2YXv1Hfw3T8XqJK/Xson2Atv2Y5ZbE + TA0RaH3PoEkhkVeJG/EuUIJhvmunS5bBjFSiOiUZ8oEOSjo9nHUMD0u+x1BZIg/1 + yy5B5iB4YSGPAtjMJhwD/LRIoI8msWpdVCCnA+FlKCKAsgC7JbJgcOUtK9eDFdbO + 4FyzdUJbK+4PDguraPGzIX7p+K3SY8bbyo3SSp5rEb+CEWtFf26oJm7eBhDBT6K4 + Ofmzp0GjFbS8qkqEGCQcfi4cAsXMVCn4AJ6CKs89y19pLZ42fUtWg7WgUZA7GWV/ + bPE2RSBMUkGb0ovgoe7Z7NXsL3AST8EQEy+3lAEyUrPFLiwoeGJZmfTDTy1VBFI4 + nCShp7V+MSmz4DnLK1HLksLVLmGyZmouGsLjYUnEa414EI6NJF3bfEO2ZRGaswyR + /vW066YCTe7wi+YrvrMDgkdbyfn/ecMTn2iXsTb4k9/fuO0+hsqL+isCAwEAAQ== + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; miaoski = { owner = config.krebs.users.miaoski; nets = { -- cgit v1.2.3 From 6db1a249e64c4be07c2db8daa2b305f3d35decb9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 3 Jan 2019 17:24:50 +0100 Subject: nixpkgs: b9fa31c -> 0396345 --- krebs/nixpkgs.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'krebs') diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index 821c79cde..d3f681a65 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,7 +1,7 @@ { "url": "https://github.com/NixOS/nixpkgs-channels", - "rev": "b9fa31cea0e119ecf1867af4944ddc2f7633aacd", - "date": "2018-12-22T15:37:52+00:00", - "sha256": "1iqdra7nvcwbydjirjsk71rpzk4ljc0gzqy33fcp8l18y8iwh47k", + "rev": "0396345b79436f54920f7eb651ab42acf2eb7973", + "date": "2018-12-30T21:22:33-05:00", + "sha256": "10wd0wsair6dlilgaviqw2p9spgcf8qg736bzs08jha0f4zfqjs4", "fetchSubmodules": false } -- cgit v1.2.3 From 05f9389e4f9e17be04e1bdef5b1cf695d3a8687b Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 3 Jan 2019 21:32:23 +0100 Subject: krops: use nixpkgs derivation for ci --- krebs/krops.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'krebs') diff --git a/krebs/krops.nix b/krebs/krops.nix index ab7524941..76bca026d 100644 --- a/krebs/krops.nix +++ b/krebs/krops.nix @@ -9,15 +9,15 @@ krebs-source = { test ? false }: rec { nixpkgs = if test then { - file = { - path = toString (pkgs.fetchFromGitHub { + derivation = '' + with import {}; + pkgs.fetchFromGitHub { owner = "nixos"; repo = "nixpkgs"; - rev = (lib.importJSON ./nixpkgs.json).rev; - sha256 = (lib.importJSON ./nixpkgs.json).sha256; - }); - useChecksum = true; - }; + rev = "${(lib.importJSON ./nixpkgs.json).rev}"; + sha256 = "${(lib.importJSON ./nixpkgs.json).sha256}"; + } + ''; } else { git = { ref = (lib.importJSON ./nixpkgs.json).rev; -- cgit v1.2.3 From 7176d12ff89a2637f8ca0f828c4f05a6543885d1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 3 Jan 2019 22:28:44 +0100 Subject: external matchbox: use free ipv4 --- krebs/3modules/external/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/3modules/external/default.nix b/krebs/3modules/external/default.nix index 1363df1a6..a7ec0e158 100644 --- a/krebs/3modules/external/default.nix +++ b/krebs/3modules/external/default.nix @@ -348,7 +348,7 @@ in { owner = config.krebs.users.Mic92; nets = { retiolum = { - ip4.addr = "10.243.29.172"; + ip4.addr = "10.243.29.176"; aliases = [ "matchbox.r" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- -- cgit v1.2.3 From 6044ffe3a53ab7745f413847ffe87fbf7a4d11f8 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 3 Jan 2019 23:01:16 +0100 Subject: external: use unused ip for matchbox --- krebs/3modules/external/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/3modules/external/default.nix b/krebs/3modules/external/default.nix index 1363df1a6..a7ec0e158 100644 --- a/krebs/3modules/external/default.nix +++ b/krebs/3modules/external/default.nix @@ -348,7 +348,7 @@ in { owner = config.krebs.users.Mic92; nets = { retiolum = { - ip4.addr = "10.243.29.172"; + ip4.addr = "10.243.29.176"; aliases = [ "matchbox.r" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- -- cgit v1.2.3 From 6e5a61b676eea8a066be7848e2a879f57f2c0c4a Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 5 Jan 2019 20:16:17 +0100 Subject: per-user module: enable only if configured --- krebs/3modules/per-user.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/3modules/per-user.nix b/krebs/3modules/per-user.nix index a7a07a8e6..5beb859aa 100644 --- a/krebs/3modules/per-user.nix +++ b/krebs/3modules/per-user.nix @@ -13,7 +13,7 @@ in { }); default = {}; }; - config = { + config = mkIf (cfg != {}) { environment = { etc = mapAttrs' -- cgit v1.2.3 From a1d9c22bbd8eff9198f378e9007ddf4cb9ee2e5c Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 10 Jan 2019 20:17:51 +0100 Subject: Reaktor plugins: merge task with todo, make task like todo --- krebs/2configs/reaktor-krebs.nix | 6 +-- krebs/2configs/reaktor-retiolum.nix | 6 +-- krebs/5pkgs/simple/Reaktor/plugins.nix | 68 ++++++++++++---------------------- 3 files changed, 25 insertions(+), 55 deletions(-) (limited to 'krebs') diff --git a/krebs/2configs/reaktor-krebs.nix b/krebs/2configs/reaktor-krebs.nix index dc2838cae..862c9b991 100644 --- a/krebs/2configs/reaktor-krebs.nix +++ b/krebs/2configs/reaktor-krebs.nix @@ -14,12 +14,8 @@ with import ; }; plugins = with pkgs.ReaktorPlugins; [ sed-plugin - task-add - task-delete - task-done - task-list ] ++ - (attrValues (todo "agenda")) + (attrValues (task "agenda")) ; }; krebs.secret.files.nix-serve-key = { diff --git a/krebs/2configs/reaktor-retiolum.nix b/krebs/2configs/reaktor-retiolum.nix index 824f59d09..69fc4b202 100644 --- a/krebs/2configs/reaktor-retiolum.nix +++ b/krebs/2configs/reaktor-retiolum.nix @@ -10,12 +10,8 @@ with import ; }; plugins = with pkgs.ReaktorPlugins; [ sed-plugin - task-add - task-delete - task-done - task-list ] ++ - (attrValues (todo "agenda")) + (attrValues (task "agenda")) ; }; } diff --git a/krebs/5pkgs/simple/Reaktor/plugins.nix b/krebs/5pkgs/simple/Reaktor/plugins.nix index 6f59ad1de..1b19a1178 100644 --- a/krebs/5pkgs/simple/Reaktor/plugins.nix +++ b/krebs/5pkgs/simple/Reaktor/plugins.nix @@ -146,58 +146,36 @@ rec { ''; }); - 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} export | ${pkgs.jq}/bin/jq -r '.[] | select(.id != 0) | "\(.id) \(.description)"' - ''; - }; - - task-delete = buildSimpleReaktorPlugin "task-delete" { - pattern = "^task-delete: (?P.*)$$"; - script = pkgs.writeDash "task-delete" '' - ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} delete "$*" - ''; - }; - - task-done = buildSimpleReaktorPlugin "task-done" { - pattern = "^task-done: (?P.*)$$"; - script = pkgs.writeDash "task-done" '' - ${pkgs.taskwarrior}/bin/task rc:${taskrcFile} done "$*" - ''; - }; - - todo = name: { - add = buildSimpleReaktorPlugin "${name}-add" { + task = name: let + rcFile = builtins.toFile "taskrc" '' + confirmation=no + ''; + in { + add = buildSimpleReaktorPlugin "${name}-task-add" { pattern = "^${name}-add: (?P.*)$$"; script = pkgs.writeDash "${name}-add" '' - echo "$*" >> ${name}-todo - echo "added ${name} todo" + TASKDATA=$HOME/${name} ${pkgs.taskwarrior}/bin/task rc:${rcFile} add "$*" ''; }; - delete = buildSimpleReaktorPlugin "${name}-delete" { + + list = buildSimpleReaktorPlugin "task-list" { + pattern = "^${name}-list"; + script = pkgs.writeDash "task-list" '' + TASKDATA=$HOME/${name} ${pkgs.taskwarrior}/bin/task rc:${rcFile} export | ${pkgs.jq}/bin/jq -r '.[] | select(.id != 0) | "\(.id) \(.description)"' + ''; + }; + + delete = buildSimpleReaktorPlugin "task-delete" { pattern = "^${name}-delete: (?P.*)$$"; - script = pkgs.writeDash "${name}-delete" '' - ${pkgs.gnugrep}/bin/grep -Fvxe "$*" ${name}-todo > ${name}-todo.tmp - ${pkgs.coreutils}/bin/mv ${name}-todo.tmp ${name}-todo - echo "removed ${name} todo: $*" + script = pkgs.writeDash "task-delete" '' + TASKDATA=$HOME/${name} ${pkgs.taskwarrior}/bin/task rc:${rcFile} delete "$*" ''; }; - show = buildSimpleReaktorPlugin "${name}-show" { - pattern = "^${name}-show$"; - script = pkgs.writeDash "${name}-show" '' - ${pkgs.coreutils}/bin/cat ${name}-todo + + done = buildSimpleReaktorPlugin "task-done" { + pattern = "^${name}-done: (?P.*)$$"; + script = pkgs.writeDash "task-done" '' + TASKDATA=$HOME/${name} ${pkgs.taskwarrior}/bin/task rc:${rcFile} done "$*" ''; }; }; -- cgit v1.2.3 From dd22da5e6b4232677a08c24609e9d6517ee2d1b7 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 11 Jan 2019 22:50:40 +0100 Subject: external: new ip for eve --- krebs/3modules/external/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/3modules/external/default.nix b/krebs/3modules/external/default.nix index a7ec0e158..df18b4dd3 100644 --- a/krebs/3modules/external/default.nix +++ b/krebs/3modules/external/default.nix @@ -84,8 +84,8 @@ in { nets = rec { internet = { # eve.thalheim.io - ip4.addr = "188.68.39.17"; - ip6.addr = "2a03:4000:13:31e::1"; + ip4.addr = "95.216.112.61"; + ip6.addr = "2a01:4f9:2b:1605::1"; aliases = [ "eve.i" ]; }; retiolum = { -- cgit v1.2.3 From 2d2ab95f0707209c4c248d43cb57877a50a37991 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 16 Jan 2019 11:10:34 +0100 Subject: krebs tinc: Broadcast = no --- krebs/3modules/tinc.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'krebs') diff --git a/krebs/3modules/tinc.nix b/krebs/3modules/tinc.nix index ecd449b09..24eac7158 100644 --- a/krebs/3modules/tinc.nix +++ b/krebs/3modules/tinc.nix @@ -27,6 +27,7 @@ let "tinc.conf" = pkgs.writeText "${netname}-tinc.conf" '' Name = ${tinc.config.host.name} Interface = ${netname} + Broadcast = no ${concatMapStrings (c: "ConnectTo = ${c}\n") tinc.config.connectTo} PrivateKeyFile = ${tinc.config.privkey.path} Port = ${toString tinc.config.host.nets.${netname}.tinc.port} -- cgit v1.2.3 From 1decf0bf37755d2557991c54cf77ccddff9bf936 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 18 Jan 2019 12:43:00 +0100 Subject: nixpkgs: 0396345 -> 97e0d53 --- krebs/nixpkgs.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'krebs') diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index d3f681a65..614d5bccf 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,7 +1,7 @@ { "url": "https://github.com/NixOS/nixpkgs-channels", - "rev": "0396345b79436f54920f7eb651ab42acf2eb7973", - "date": "2018-12-30T21:22:33-05:00", - "sha256": "10wd0wsair6dlilgaviqw2p9spgcf8qg736bzs08jha0f4zfqjs4", + "rev": "97e0d53d669cd07f0750a42fd535524b3cdd46d1", + "date": "2019-01-15T00:11:44+01:00", + "sha256": "111xa7qn9142dar29cil4br2mvn8f1rbiy310lkhwl73126fq8dw", "fetchSubmodules": false } -- cgit v1.2.3 From c4be6cf076a9af9fc435992bcb2e42337fa7776e Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 18 Jan 2019 13:58:42 +0100 Subject: blessings: 1.2.0 -> 1.3.0 --- krebs/5pkgs/haskell/blessings.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/haskell/blessings.nix b/krebs/5pkgs/haskell/blessings.nix index 59c5b7984..19f8da19d 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.2.0"; - sha256 = "03hz43ixww0h4fwxqrlrlvmj3pxswhb50ijaapwjz8457il2r300"; + version = "1.3.0"; + sha256 = "1y9jhh9pchrr48zgfib2jip97x1fkm7qb1gnfx477rmmryjs500h"; }; }.${versions.majorMinor nixpkgsVersion}; -- cgit v1.2.3 From 9f2a6465666ee7a69d9261beee0e5ab3cd133933 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 21 Jan 2019 10:09:16 +0100 Subject: krebs: move github known hosts to dedicated file --- krebs/3modules/default.nix | 26 +---------------------- krebs/3modules/github-known-hosts.nix | 40 +++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 25 deletions(-) create mode 100644 krebs/3modules/github-known-hosts.nix (limited to 'krebs') diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index 2e7c61fb5..0b785c0cc 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -23,6 +23,7 @@ let ./exim-smarthost.nix ./fetchWallpaper.nix ./github-hosts-sync.nix + ./github-known-hosts.nix ./git.nix ./go.nix ./hidden-ssh.nix @@ -238,31 +239,6 @@ let }; }) // - { - github = { - hostNames = [ - "github.com" - # List generated with - # curl -sS https://api.github.com/meta | jq -r .git[] | cidr2glob - "192.30.252.*" - "192.30.253.*" - "192.30.254.*" - "192.30.255.*" - "185.199.108.*" - "185.199.109.*" - "185.199.110.*" - "185.199.111.*" - "13.229.188.59" - "13.250.177.223" - "18.194.104.89" - "18.195.85.27" - "35.159.8.160" - "52.74.223.119" - ]; - publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=="; - }; - } - // mapAttrs (name: host: { hostNames = diff --git a/krebs/3modules/github-known-hosts.nix b/krebs/3modules/github-known-hosts.nix new file mode 100644 index 000000000..def06f17a --- /dev/null +++ b/krebs/3modules/github-known-hosts.nix @@ -0,0 +1,40 @@ +{ + services.openssh.knownHosts.github = { + hostNames = [ + "github.com" + # List generated with + # curl -sS https://api.github.com/meta | jq -r .git[] | nix-shell -p cidr2glob --run cidr2glob | jq -R . + "192.30.252.*" + "192.30.253.*" + "192.30.254.*" + "192.30.255.*" + "185.199.108.*" + "185.199.109.*" + "185.199.110.*" + "185.199.111.*" + "140.82.112.*" + "140.82.113.*" + "140.82.114.*" + "140.82.115.*" + "140.82.116.*" + "140.82.117.*" + "140.82.118.*" + "140.82.119.*" + "140.82.120.*" + "140.82.121.*" + "140.82.122.*" + "140.82.123.*" + "140.82.124.*" + "140.82.125.*" + "140.82.126.*" + "140.82.127.*" + "13.229.188.59" + "13.250.177.223" + "18.194.104.89" + "18.195.85.27" + "35.159.8.160" + "52.74.223.119" + ]; + publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=="; + }; +} -- cgit v1.2.3 From 9082adf6878b5f917efc633cba63932d94942d13 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 21 Jan 2019 10:22:18 +0100 Subject: krebs: move exim aliases to dedicated file --- krebs/2configs/exim-smarthost.nix | 50 +++++++++++++++++++++++++++++++++++++++ krebs/3modules/default.nix | 45 ----------------------------------- 2 files changed, 50 insertions(+), 45 deletions(-) create mode 100644 krebs/2configs/exim-smarthost.nix (limited to 'krebs') diff --git a/krebs/2configs/exim-smarthost.nix b/krebs/2configs/exim-smarthost.nix new file mode 100644 index 000000000..5dc24f1de --- /dev/null +++ b/krebs/2configs/exim-smarthost.nix @@ -0,0 +1,50 @@ +with import ; +{ config, ... }: let + + format = from: to: { + inherit from; + # TODO assert is-retiolum-mail-address to; + to = concatMapStringsSep "," (getAttr "mail") (toList to); + }; + +in { + krebs.exim-smarthost.internet-aliases = + mapAttrsToList format (with config.krebs.users; let + brain-ml = [ + lass + makefu + tv + ]; + eloop-ml = spam-ml ++ [ ciko ]; + spam-ml = [ + lass + makefu + tv + ]; + ciko.mail = "ciko@slash16.net"; + in { + "anmeldung@eloop.org" = eloop-ml; + "brain@krebsco.de" = brain-ml; + "cfp@eloop.org" = eloop-ml; + "kontakt@eloop.org" = eloop-ml; + "root@eloop.org" = eloop-ml; + "youtube@eloop.org" = eloop-ml; + "eloop2016@krebsco.de" = eloop-ml; + "eloop2017@krebsco.de" = eloop-ml; + "postmaster@krebsco.de" = spam-ml; # RFC 822 + "lass@krebsco.de" = lass; + "makefu@krebsco.de" = makefu; + "spam@krebsco.de" = spam-ml; + "tv@krebsco.de" = tv; + # XXX These are no internet aliases + # XXX exim-retiolum hosts should be able to relay to retiolum addresses + "lass@retiolum" = lass; + "makefu@retiolum" = makefu; + "spam@retiolum" = spam-ml; + "tv@retiolum" = tv; + "lass@r" = lass; + "makefu@r" = makefu; + "spam@r" = spam-ml; + "tv@r" = tv; + }); +} diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index 0b785c0cc..7b0f4ebf8 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -180,51 +180,6 @@ let ''; }; - krebs.exim-smarthost.internet-aliases = let - format = from: to: { - inherit from; - # TODO assert is-retiolum-mail-address to; - to = concatMapStringsSep "," (getAttr "mail") (toList to); - }; - in mapAttrsToList format (with config.krebs.users; let - brain-ml = [ - lass - makefu - tv - ]; - eloop-ml = spam-ml ++ [ ciko ]; - spam-ml = [ - lass - makefu - tv - ]; - ciko.mail = "ciko@slash16.net"; - in { - "anmeldung@eloop.org" = eloop-ml; - "brain@krebsco.de" = brain-ml; - "cfp@eloop.org" = eloop-ml; - "kontakt@eloop.org" = eloop-ml; - "root@eloop.org" = eloop-ml; - "youtube@eloop.org" = eloop-ml; - "eloop2016@krebsco.de" = eloop-ml; - "eloop2017@krebsco.de" = eloop-ml; - "postmaster@krebsco.de" = spam-ml; # RFC 822 - "lass@krebsco.de" = lass; - "makefu@krebsco.de" = makefu; - "spam@krebsco.de" = spam-ml; - "tv@krebsco.de" = tv; - # XXX These are no internet aliases - # XXX exim-retiolum hosts should be able to relay to retiolum addresses - "lass@retiolum" = lass; - "makefu@retiolum" = makefu; - "spam@retiolum" = spam-ml; - "tv@retiolum" = tv; - "lass@r" = lass; - "makefu@r" = makefu; - "spam@r" = spam-ml; - "tv@r" = tv; - }); - services.openssh.hostKeys = let inherit (config.krebs.build.host.ssh) privkey; in mkIf (privkey != null) (mkForce [privkey]); -- cgit v1.2.3 From da79d23ebbc0c3fb7c579b366f29fb3744948706 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 21 Jan 2019 10:32:15 +0100 Subject: krebs: move dns stuff to dedicated file --- krebs/3modules/default.nix | 26 ++++++++------------------ krebs/3modules/dns.nix | 12 ++++++++++++ 2 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 krebs/3modules/dns.nix (limited to 'krebs') diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index 7b0f4ebf8..21d68ef3f 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -18,6 +18,7 @@ let ./charybdis.nix ./ci.nix ./current.nix + ./dns.nix ./exim.nix ./exim-retiolum.nix ./exim-smarthost.nix @@ -59,12 +60,6 @@ let api = { enable = mkEnableOption "krebs"; - dns = { - providers = mkOption { - type = with types; attrsOf str; - }; - }; - hosts = mkOption { type = with types; attrsOf host; default = {}; @@ -74,13 +69,6 @@ let type = with types; attrsOf user; }; - # XXX is there a better place to define search-domain? - # TODO search-domains :: listOf hostname - search-domain = mkOption { - type = types.hostname; - default = "r"; - }; - sitemap = mkOption { default = {}; type = types.attrsOf types.sitemap.entry; @@ -126,6 +114,8 @@ let w = "hosts"; }; + krebs.dns.search-domain = mkDefault "r"; + krebs.users = { krebs = { home = "/krebs"; @@ -147,7 +137,7 @@ let let aliases = longs ++ shorts; longs = filter check net.aliases; - shorts = let s = ".${cfg.search-domain}"; in + shorts = let s = ".${cfg.dns.search-domain}"; in map (removeSuffix s) (filter (hasSuffix s) longs); in optionals @@ -203,8 +193,8 @@ let let longs = net.aliases; shorts = - map (removeSuffix ".${cfg.search-domain}") - (filter (hasSuffix ".${cfg.search-domain}") + map (removeSuffix ".${cfg.dns.search-domain}") + (filter (hasSuffix ".${cfg.dns.search-domain}") longs); add-port = a: if net.ssh.port != 22 @@ -228,8 +218,8 @@ let (concatMap (host: attrValues host.nets) (mapAttrsToList (_: host: recursiveUpdate host - (optionalAttrs (hasAttr config.krebs.search-domain host.nets) { - nets."" = host.nets.${config.krebs.search-domain} // { + (optionalAttrs (hasAttr cfg.dns.search-domain host.nets) { + nets."" = host.nets.${cfg.dns.search-domain} // { aliases = [host.name]; addrs = []; }; diff --git a/krebs/3modules/dns.nix b/krebs/3modules/dns.nix new file mode 100644 index 000000000..b7e2a2cbb --- /dev/null +++ b/krebs/3modules/dns.nix @@ -0,0 +1,12 @@ +with import ; +{ + options = { + krebs.dns.providers = mkOption { + type = types.attrsOf types.str; + }; + + krebs.dns.search-domain = mkOption { + type = types.hostname; + }; + }; +} -- cgit v1.2.3 From 799f132d588f2a5f6c6dabc43e862c90d9efa4b7 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 21 Jan 2019 10:54:01 +0100 Subject: krebs: move retiolum-hosts to dedicated file --- krebs/3modules/default.nix | 24 +----------------------- krebs/3modules/retiolum-hosts.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 krebs/3modules/retiolum-hosts.nix (limited to 'krebs') diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index 21d68ef3f..ea4d03ad6 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -43,6 +43,7 @@ let ./Reaktor.nix ./realwallpaper.nix ./retiolum-bootstrap.nix + ./retiolum-hosts.nix ./rtorrent.nix ./secret.nix ./setuid.nix @@ -147,29 +148,6 @@ let ) cfg.hosts )); - # TODO dedup with networking.extraHosts - nixpkgs.config.packageOverrides = oldpkgs: - let - domains = attrNames (filterAttrs (_: eq "hosts") cfg.dns.providers); - check = hostname: any (domain: hasSuffix ".${domain}" hostname) domains; - in - { - retiolum-hosts = oldpkgs.writeText "retiolum-hosts" '' - ${concatStringsSep "\n" (flatten ( - map (host: - let - net = host.nets.retiolum; - aliases = longs; - longs = filter check net.aliases; - in - optionals - (aliases != []) - (map (addr: "${addr} ${toString aliases}") net.addrs) - ) (filter (host: hasAttr "retiolum" host.nets) - (attrValues cfg.hosts))))} - ''; - }; - services.openssh.hostKeys = let inherit (config.krebs.build.host.ssh) privkey; in mkIf (privkey != null) (mkForce [privkey]); diff --git a/krebs/3modules/retiolum-hosts.nix b/krebs/3modules/retiolum-hosts.nix new file mode 100644 index 000000000..2821d62d1 --- /dev/null +++ b/krebs/3modules/retiolum-hosts.nix @@ -0,0 +1,28 @@ +with import ; +{ config, ... }: let + # TODO dedup functions with networking.extraHosts + check = hostname: any (domain: hasSuffix ".${domain}" hostname) domains; + domains = attrNames (filterAttrs (_: eq "hosts") config.krebs.dns.providers); +in { + nixpkgs.config.packageOverrides = super: { + retiolum-hosts = + super.writeText "retiolum-hosts" '' + ${ + concatStringsSep + "\n" + (flatten + (map + (host: let + net = host.nets.retiolum; + aliases = longs; + longs = filter check net.aliases; + in + optionals + (aliases != []) + (map (addr: "${addr} ${toString aliases}") net.addrs)) + (filter (host: hasAttr "retiolum" host.nets) + (attrValues config.krebs.hosts)))) + } + ''; + }; +} -- cgit v1.2.3 From af0463b23493d8c31ce725beb8ff5a2fd0398001 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 21 Jan 2019 11:04:37 +0100 Subject: krebs: move hosts to dedeicated file --- krebs/3modules/default.nix | 25 +------------------------ krebs/3modules/hosts.nix | 36 ++++++++++++++++++++++++++++++++++++ krebs/3modules/retiolum-hosts.nix | 2 +- 3 files changed, 38 insertions(+), 25 deletions(-) create mode 100644 krebs/3modules/hosts.nix (limited to 'krebs') diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index ea4d03ad6..bb69bfad3 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -28,6 +28,7 @@ let ./git.nix ./go.nix ./hidden-ssh.nix + ./hosts.nix ./htgen.nix ./iana-etc.nix ./iptables.nix @@ -61,11 +62,6 @@ let api = { enable = mkEnableOption "krebs"; - hosts = mkOption { - type = with types; attrsOf host; - default = {}; - }; - users = mkOption { type = with types; attrsOf user; }; @@ -129,25 +125,6 @@ let }; }; - networking.extraHosts = let - domains = attrNames (filterAttrs (_: eq "hosts") cfg.dns.providers); - check = hostname: any (domain: hasSuffix ".${domain}" hostname) domains; - in concatStringsSep "\n" (flatten ( - mapAttrsToList (hostname: host: - mapAttrsToList (netname: net: - let - aliases = longs ++ shorts; - longs = filter check net.aliases; - shorts = let s = ".${cfg.dns.search-domain}"; in - map (removeSuffix s) (filter (hasSuffix s) longs); - in - optionals - (aliases != []) - (map (addr: "${addr} ${toString aliases}") net.addrs) - ) (filterAttrs (name: host: host.aliases != []) host.nets) - ) cfg.hosts - )); - services.openssh.hostKeys = let inherit (config.krebs.build.host.ssh) privkey; in mkIf (privkey != null) (mkForce [privkey]); diff --git a/krebs/3modules/hosts.nix b/krebs/3modules/hosts.nix new file mode 100644 index 000000000..a95557b3d --- /dev/null +++ b/krebs/3modules/hosts.nix @@ -0,0 +1,36 @@ +with import ; +{ config, ... }: let + # TODO dedup functions with ./retiolum-hosts.nix + check = hostname: any (domain: hasSuffix ".${domain}" hostname) domains; + domains = attrNames (filterAttrs (_: eq "hosts") config.krebs.dns.providers); +in { + + options = { + krebs.hosts = mkOption { + default = {}; + type = types.attrsOf types.host; + }; + }; + + config = { + networking.extraHosts = + concatStringsSep + "\n" + (flatten + (mapAttrsToList + (hostname: host: + mapAttrsToList + (netname: net: let + aliases = longs ++ shorts; + longs = filter check net.aliases; + shorts = let s = ".${config.krebs.dns.search-domain}"; in + map (removeSuffix s) (filter (hasSuffix s) longs); + in + optionals + (aliases != []) + (map (addr: "${addr} ${toString aliases}") net.addrs)) + (filterAttrs (name: host: host.aliases != []) host.nets)) + config.krebs.hosts)); + }; + +} diff --git a/krebs/3modules/retiolum-hosts.nix b/krebs/3modules/retiolum-hosts.nix index 2821d62d1..ddf85ead7 100644 --- a/krebs/3modules/retiolum-hosts.nix +++ b/krebs/3modules/retiolum-hosts.nix @@ -1,6 +1,6 @@ with import ; { config, ... }: let - # TODO dedup functions with networking.extraHosts + # TODO dedup functions with ./hosts.nix check = hostname: any (domain: hasSuffix ".${domain}" hostname) domains; domains = attrNames (filterAttrs (_: eq "hosts") config.krebs.dns.providers); in { -- cgit v1.2.3 From f1298103173cf1953be0e7c359f10d18894ce770 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 21 Jan 2019 11:51:15 +0100 Subject: krebs hosts: extraHost -> hosts --- krebs/3modules/hosts.nix | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'krebs') diff --git a/krebs/3modules/hosts.nix b/krebs/3modules/hosts.nix index a95557b3d..0985bb539 100644 --- a/krebs/3modules/hosts.nix +++ b/krebs/3modules/hosts.nix @@ -13,24 +13,23 @@ in { }; config = { - networking.extraHosts = - concatStringsSep - "\n" - (flatten - (mapAttrsToList - (hostname: host: - mapAttrsToList - (netname: net: let + networking.hosts = + filterAttrs + (_name: value: value != []) + (zipAttrsWith + (_: concatLists) + (concatMap + (host: + concatMap + (net: let aliases = longs ++ shorts; longs = filter check net.aliases; shorts = let s = ".${config.krebs.dns.search-domain}"; in map (removeSuffix s) (filter (hasSuffix s) longs); in - optionals - (aliases != []) - (map (addr: "${addr} ${toString aliases}") net.addrs)) - (filterAttrs (name: host: host.aliases != []) host.nets)) - config.krebs.hosts)); + map (addr: { ${addr} = aliases; }) net.addrs) + (attrValues host.nets)) + (attrValues config.krebs.hosts))); }; } -- cgit v1.2.3 From 153d27e6c8c3354494913c4f9e32843ec09d6c40 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 21 Jan 2019 12:09:29 +0100 Subject: reaktor2: init at 0.0.0 --- krebs/5pkgs/default.nix | 2 ++ krebs/5pkgs/haskell/reaktor2.nix | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 krebs/5pkgs/haskell/reaktor2.nix (limited to 'krebs') diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 84c00e82d..dc04b6a72 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -22,6 +22,8 @@ foldl' mergeAttrs {} }; }); + reaktor2 = self.haskellPackages.reaktor2; + ReaktorPlugins = self.callPackage ./simple/Reaktor/plugins.nix {}; # https://github.com/proot-me/PRoot/issues/106 diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix new file mode 100644 index 000000000..447738425 --- /dev/null +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -0,0 +1,23 @@ +{ 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 +}: +mkDerivation { + pname = "reaktor2"; + version = "0.0.0"; + src = fetchgit { + url = "https://cgit.krebsco.de/reaktor2"; + sha256 = "1q2rb78mzpyd8wxfmlbfdz7zq5smsrrvb4n874ap1p8f2bmmp0am"; + rev = "ce276eee82ec0b8c4106beb4c51d6f9eb77335c4"; + 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 + ]; + license = stdenv.lib.licenses.mit; +} -- cgit v1.2.3 From fabef3638584e88be50b10ec1cf3649b98752eac Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 21 Jan 2019 12:11:03 +0100 Subject: reaktor2 service: init --- krebs/3modules/reaktor2.nix | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 krebs/3modules/reaktor2.nix (limited to 'krebs') diff --git a/krebs/3modules/reaktor2.nix b/krebs/3modules/reaktor2.nix new file mode 100644 index 000000000..b667bcc92 --- /dev/null +++ b/krebs/3modules/reaktor2.nix @@ -0,0 +1,63 @@ +with import ; +{ config, pkgs, ... }: { + + options.krebs.reaktor2 = mkOption { + default = {}; + type = types.attrsOf (types.submodule (self: let + name = self.config._module.args.name; + in { + options = { + nick = mkOption { + default = name; + # TODO types.irc.nickname + type = types.str; + }; + hostname = mkOption { + default = "irc.r"; + type = types.hostname; + }; + port = mkOption { + default = "6667"; + # TODO type = types.service-name + }; + plugins = mkOption { + default = []; + type = types.listOf types.attrs; + }; + stateDir = mkOption { + default = "/var/lib/${self.config.systemd-service-name}"; + readOnly = true; + type = types.absolute-pathname; + }; + systemd-service-name = mkOption { + default = "reaktor2${optionalString (name != "default") "-${name}"}"; + type = types.filename; + }; + }; + })); + }; + + config = { + systemd.services = flip mapAttrs' config.krebs.reaktor2 (_: cfg: + nameValuePair cfg.systemd-service-name { + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + User = cfg.systemd-service-name; + Group = "reaktor2"; + DynamicUser = true; + StateDirectory = cfg.systemd-service-name; + ExecStart = let + configFile = pkgs.writeJSON configFileName configValue; + configFileName = "${cfg.systemd-service-name}.config.json"; + configValue = recursiveUpdate { + logTime = false; + } (removeAttrs cfg ["_module"]); + in "${pkgs.reaktor2}/bin/reaktor ${configFile}"; + Restart = "always"; + RestartSec = "30"; + }; + } + ); + }; +} -- cgit v1.2.3 From 9033d807f9ba6230f175dd1a0dd0ea1d710e247f Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 21 Jan 2019 16:25:27 +0100 Subject: external: add idontcare.r --- krebs/3modules/external/default.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'krebs') diff --git a/krebs/3modules/external/default.nix b/krebs/3modules/external/default.nix index df18b4dd3..6f521fc43 100644 --- a/krebs/3modules/external/default.nix +++ b/krebs/3modules/external/default.nix @@ -141,6 +141,29 @@ in { }; }; }; + idontcare = { + owner = config.krebs.users.Mic92; + nets = rec { + retiolum = { + addrs = [ + config.krebs.hosts.idontcare.nets.retiolum.ip4.addr + config.krebs.hosts.idontcare.nets.retiolum.ip6.addr + ]; + ip4.addr = "10.243.29.177"; + aliases = [ "idontcare.r" ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIIBCgKCAQEAxmmbQLVXcnCU9Vg9TCoJxfq/RyNfzaTj8XJsn4Kpo3CvQOwFzL6O + qZnbG55WjPjPumuFgtUdHA/G8mgtrTVaIRbVE9ck2l2wWFzMWxORzuvDbMh5xP8A + OW2Z2qjlH6O9GTBCzpYyHuyBWCjtiN4x9zEqxkIsBARKOylAoy3zQIiiQF0d72An + lqKFi9vYUU90zo9rP8BTzx2ZsEWb28xhHUlwf1+vgaOHI1jI99gnr12dVYl/i/Hb + O28gDUogfpP/5pWFAHJ+53ZscHo8/Y7imjiKgGXmOHywoXOsKQ67M6ROEU/0xPnw + jKmq2p7zTJk2mDhphjePi5idd5yKNX5Q3wIDAQAB + -----END RSA PUBLIC KEY----- + ''; + }; + }; + }; justraute = { owner = config.krebs.users.raute; # laptop nets = { -- cgit v1.2.3 From bc2aedb2d0a6d22089d4f666082d440e4ffb07e6 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 21 Jan 2019 16:25:51 +0100 Subject: Mic92: change mail address --- krebs/3modules/external/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/3modules/external/default.nix b/krebs/3modules/external/default.nix index 6f521fc43..089113ac6 100644 --- a/krebs/3modules/external/default.nix +++ b/krebs/3modules/external/default.nix @@ -416,7 +416,7 @@ in { pubkey = ssh-for "kmein"; }; Mic92 = { - mail = "joerg@higgsboson.tk"; + mail = "joerg@thalheim.io"; pubkey = ssh-for "Mic92"; }; palo = { -- cgit v1.2.3 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(+) (limited to 'krebs') 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 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(+) (limited to 'krebs') 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(-) (limited to 'krebs') 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(-) (limited to 'krebs') 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 (limited to 'krebs') 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(-) (limited to 'krebs') 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(-) (limited to 'krebs') 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(-) (limited to 'krebs') 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 --- 5 files changed, 34 insertions(+), 36 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 (limited to 'krebs') 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 {} -- 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(-) (limited to 'krebs') 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(-) (limited to 'krebs') 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(-) (limited to 'krebs') 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 (limited to 'krebs') 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 (limited to 'krebs') 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(-) (limited to 'krebs') 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 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(+) (limited to 'krebs') 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(-) (limited to 'krebs') 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 (limited to 'krebs') 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(-) (limited to 'krebs') 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(-) (limited to 'krebs') 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(-) (limited to 'krebs') 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(-) (limited to 'krebs') 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(+) (limited to 'krebs') 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 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(-) (limited to 'krebs') 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.nix +++ b/krebs/5pkgs/simple/reaktor2-plugins.nix @@ -1,5 +1,5 @@ -{ lib, pkgs, ... }: with import ; +{ lib, pkgs, ... }: rec { generators = { -- cgit v1.2.3 From 52ef20148e44f2b2017a0edc30899860799ad652 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jan 2019 20:06:06 +0100 Subject: reaktor2 service: user -> username + proper type --- krebs/2configs/reaktor2.nix | 4 ++-- krebs/3modules/reaktor2.nix | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'krebs') diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index f1e59142e..2beb6561b 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -146,7 +146,7 @@ in { } systemPlugin ]; - user = "reaktor2"; + username = "reaktor2"; }; r = { nick = "reaktor2|krebs"; @@ -162,7 +162,7 @@ in { } systemPlugin ]; - user = "reaktor2"; + username = "reaktor2"; }; }; } diff --git a/krebs/3modules/reaktor2.nix b/krebs/3modules/reaktor2.nix index 3f263d010..e3e6ddf4f 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.user}"; + default = "/var/lib/${self.config.username}"; readOnly = true; type = types.absolute-pathname; }; @@ -33,9 +33,9 @@ with import ; default = "reaktor2${optionalString (name != "default") "-${name}"}"; type = types.filename; }; - user = mkOption { + username = mkOption { default = self.config.systemd-service-name; - type = types.str; + type = types.username; }; useTLS = mkOption { default = self.config.port == "6697"; @@ -51,10 +51,10 @@ with import ; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - User = cfg.user; + User = cfg.username; Group = "reaktor2"; DynamicUser = true; - StateDirectory = cfg.user; + StateDirectory = cfg.username; ExecStart = let configFile = pkgs.writeJSON configFileName configValue; configFileName = "${cfg.systemd-service-name}.config.json"; -- cgit v1.2.3 From b4f24ff76ad708343b67afce45765a66c6bfb660 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jan 2019 20:09:11 +0100 Subject: krebs nscd-fix: normalize style --- krebs/2configs/nscd-fix.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'krebs') diff --git a/krebs/2configs/nscd-fix.nix b/krebs/2configs/nscd-fix.nix index 20dc3bae4..8e5909e72 100644 --- a/krebs/2configs/nscd-fix.nix +++ b/krebs/2configs/nscd-fix.nix @@ -1,18 +1,19 @@ -{ pkgs, ... }: with import ; -let +{ pkgs, ... }: let + + enable = versionOlderThan "19.03"; + 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 - ''; + warning = '' + Using custom services.nscd.config because + https://github.com/NixOS/nixpkgs/pull/50316 + ''; + in optionalAttrs enable (trace warning { services.nscd.enable = mkForce true; @@ -21,4 +22,3 @@ in sha256 = "1jlddk38lyynjn51zx3xi1nc29ahajyh0qg48qbq6dqlsrn3wxqs"; })); }) - -- cgit v1.2.3 From 74dbc7c8b21a345626659cbbcc6bf11836939945 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jan 2019 20:15:40 +0100 Subject: Reaktor: 0.6.2 -> 0.7.0 --- krebs/3modules/Reaktor.nix | 5 +++-- krebs/5pkgs/simple/Reaktor/default.nix | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'krebs') diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix index 669483f3c..308c6d41d 100644 --- a/krebs/3modules/Reaktor.nix +++ b/krebs/3modules/Reaktor.nix @@ -113,10 +113,11 @@ let ''; in nameValuePair "Reaktor-${name}" { path = with pkgs; [ - utillinux #flock for tell_on-join git # for nag + jq # for tell python # for caps - ]; + utillinux # flock for tell + ]; description = "Reaktor IRC Bot"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; diff --git a/krebs/5pkgs/simple/Reaktor/default.nix b/krebs/5pkgs/simple/Reaktor/default.nix index 3ef9ffb7d..a88db6379 100644 --- a/krebs/5pkgs/simple/Reaktor/default.nix +++ b/krebs/5pkgs/simple/Reaktor/default.nix @@ -2,7 +2,7 @@ python3Packages.buildPythonPackage rec { name = "Reaktor-${version}"; - version = "0.6.2"; + version = "0.7.0"; doCheck = false; @@ -13,8 +13,8 @@ python3Packages.buildPythonPackage rec { src = fetchFromGitHub { owner = "krebs"; repo = "Reaktor"; - rev = version; - sha256 = "0h8pj0x9b5fnxddwrc0f63rxd3275v5phmjc0fv4kiwlzvbcxj6m"; + rev = "v${version}"; + sha256 = "12yy06vk0smjs0rmahrn2kd4bcdh1yjw1fz6rifw6nmgx889d9hj"; }; meta = { homepage = http://krebsco.de/; -- cgit v1.2.3 From f608351da19aeae5fd06dd700a8f11150433d15e Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jan 2019 20:27:16 +0100 Subject: reaktor2: 0.2.0 -> 0.2.1 --- krebs/5pkgs/haskell/reaktor2.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index dd8c3578b..40c628802 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -7,11 +7,11 @@ }: mkDerivation { pname = "reaktor2"; - version = "0.2.0"; + version = "0.2.1"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "1wls61d9z9zkvvfgq60clcph0800kpvymqw63dpsk0sp13zygpg9"; - rev = "e9ca12a945b1d1c068e9c31050e264cb20690db4"; + sha256 = "0wg76wlzfi893rl0lzhfs6bkpdcvwvgl6mpnz6w7r8f7znr4a9vr"; + rev = "0e199f7a357a4c5973e5837ec67699cf224ca69c"; fetchSubmodules = true; }; isLibrary = false; -- cgit v1.2.3 From 06b23af29d434f448faebf822d5f1f1e8a0c0a39 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 27 Jan 2019 20:32:04 +0100 Subject: reaktor2 task: define env in hook --- krebs/2configs/reaktor2.nix | 48 +++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 32 deletions(-) (limited to 'krebs') diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 2beb6561b..ff6b539ba 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -18,39 +18,23 @@ let activate = "match"; command = 1; arguments = [2]; + env.TASKDATA = "${stateDir}/${name}"; commands = { - add = { - env = { - TASKDATA = "${stateDir}/${name}"; - }; - filename = pkgs.writeDash "${name}-task-add" '' - ${pkgs.taskwarrior}/bin/task rc:${rcFile} add "$*" - ''; - }; - list = { - 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)"' - ''; - }; - delete = { - env = { - TASKDATA = "${stateDir}/${name}"; - }; - filename = pkgs.writeDash "${name}-task-delete" '' - ${pkgs.taskwarrior}/bin/task rc:${rcFile} delete "$*" - ''; - }; - done = { - env = { - TASKDATA = "${stateDir}/${name}"; - }; - filename = pkgs.writeDash "${name}-task-done" '' - ${pkgs.taskwarrior}/bin/task rc:${rcFile} done "$*" - ''; - }; + add.filename = pkgs.writeDash "${name}-task-add" '' + ${pkgs.taskwarrior}/bin/task rc:${rcFile} add "$1" + ''; + list.filename = pkgs.writeDash "${name}-task-list" '' + ${pkgs.taskwarrior}/bin/task rc:${rcFile} export \ + | ${pkgs.jq}/bin/jq -r ' + .[] | select(.id != 0) | "\(.id) \(.description)" + ' + ''; + delete.filename = pkgs.writeDash "${name}-task-delete" '' + ${pkgs.taskwarrior}/bin/task rc:${rcFile} delete "$1" + ''; + done.filename = pkgs.writeDash "${name}-task-done" '' + ${pkgs.taskwarrior}/bin/task rc:${rcFile} done "$1" + ''; }; }; -- cgit v1.2.3 From 0ead7ae0a71247581eb968c701e02af782424cd0 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 28 Jan 2019 08:29:19 +0100 Subject: k shack/ympd: add next and prev buttons at top --- krebs/2configs/shack/mobile.mpd.nix | 5 ++++- krebs/2configs/shack/ympd-top-next.patch | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 krebs/2configs/shack/ympd-top-next.patch (limited to 'krebs') diff --git a/krebs/2configs/shack/mobile.mpd.nix b/krebs/2configs/shack/mobile.mpd.nix index 2dc466edb..751d233ec 100644 --- a/krebs/2configs/shack/mobile.mpd.nix +++ b/krebs/2configs/shack/mobile.mpd.nix @@ -1,5 +1,8 @@ {lib,pkgs, ... }: let + pkg = lib.overrideDerivation pkgs.ympd (old: { + patches = [ ./ympd-top-next.patch ]; + }); mpdHost = "mpd.shack"; ympd = name: port: let webPort = 10000 + port; @@ -7,7 +10,7 @@ let systemd.services."ympd-${name}" = { description = "mpd for ${name}"; wantedBy = [ "multi-user.target" ]; - serviceConfig.ExecStart = "${pkgs.ympd}/bin/ympd --host ${mpdHost} --port ${toString port} --webport ${toString webPort} --user nobody"; + serviceConfig.ExecStart = "${pkg}/bin/ympd --host ${mpdHost} --port ${toString port} --webport ${toString webPort} --user nobody"; }; services.nginx.virtualHosts."mobile.${name}.mpd.shack" = { serverAliases = [ diff --git a/krebs/2configs/shack/ympd-top-next.patch b/krebs/2configs/shack/ympd-top-next.patch new file mode 100644 index 000000000..fd424f11a --- /dev/null +++ b/krebs/2configs/shack/ympd-top-next.patch @@ -0,0 +1,16 @@ +diff --git a/htdocs/index.html b/htdocs/index.html +index ed77279..eaf92b6 100644 +--- a/htdocs/index.html ++++ b/htdocs/index.html +@@ -76,6 +76,11 @@ + +
+
++ ++ + +
+ -- cgit v1.2.3 From fd5615a298ff4b7cfa7e8cccbcac0afb680cc9a9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 28 Jan 2019 23:05:38 +0100 Subject: krops: bootstrap nixpkgs --- krebs/krops.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'krebs') diff --git a/krebs/krops.nix b/krebs/krops.nix index 76bca026d..94418fdc2 100644 --- a/krebs/krops.nix +++ b/krebs/krops.nix @@ -9,13 +9,19 @@ krebs-source = { test ? false }: rec { nixpkgs = if test then { - derivation = '' - with import {}; + derivation = let + rev = (lib.importJSON ./nixpkgs.json).rev; + sha256 = (lib.importJSON ./nixpkgs.json).sha256; + in '' + with import (builtins.fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz"; + sha256 = "${sha256}"; + }) {}; pkgs.fetchFromGitHub { owner = "nixos"; repo = "nixpkgs"; - rev = "${(lib.importJSON ./nixpkgs.json).rev}"; - sha256 = "${(lib.importJSON ./nixpkgs.json).sha256}"; + rev = "${rev}"; + sha256 = "${sha256}"; } ''; } else { -- cgit v1.2.3 [cgit] Unable to lock slot /tmp/cgit/54300000.lock: No such file or directory (2)