This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

modules.reaktor2: vendor from stockholm

Copied from stockholm krebs/3modules/reaktor2.nix (cc283503). The bot
itself goes to pkgs/reaktor2 (with blessings, which nixpkgs lacks),
since stockholm's packages output does not include it.

+247 -5
-4
configs/mumble-reminder.nix
··· 1 1 { 2 - self, 3 2 config, 4 3 lib, 5 4 pkgs, ··· 77 76 78 77 in 79 78 { 80 - imports = [ 81 - self.inputs.stockholm.nixosModules.reaktor2 82 - ]; 83 79 krebs.reaktor2.mumble-reminder = { 84 80 hostname = "irc.hackint.org"; 85 81 nick = "lassulus__";
+1
modules/default.nix
··· 7 7 ./parley.nix 8 8 # copied from stockholm, see the header of each 9 9 ./htgen.nix 10 + ./reaktor2.nix 10 11 ]; 11 12 }
+110
modules/reaktor2.nix
··· 1 + # Copied from stockholm krebs/3modules/reaktor2.nix (cc283503); the daemon is 2 + # pkgs/reaktor2, stockholm's packages output does not include it. 3 + { 4 + config, 5 + pkgs, 6 + self, 7 + ... 8 + }: 9 + with self.inputs.stockholm.lib; 10 + { 11 + 12 + options.krebs.reaktor2 = mkOption { 13 + default = { }; 14 + type = types.attrsOf ( 15 + types.submodule ( 16 + self: 17 + let 18 + name = self.config._module.args.name; 19 + in 20 + { 21 + options = { 22 + nick = mkOption { 23 + default = name; 24 + # TODO types.irc.nickname 25 + type = types.str; 26 + }; 27 + hostname = mkOption { 28 + default = "irc.r"; 29 + type = types.hostname; 30 + }; 31 + port = mkOption { 32 + default = "6667"; 33 + type = types.str; 34 + }; 35 + plugins = mkOption { 36 + default = [ ]; 37 + type = types.listOf types.attrs; 38 + }; 39 + stateDir = mkOption { 40 + default = "/var/lib/${self.config.username}"; 41 + defaultText = "/var/lib/‹username›"; 42 + readOnly = true; 43 + type = types.absolute-pathname; 44 + }; 45 + systemd-service-name = mkOption { 46 + default = "reaktor2${optionalString (name != "default") "-${name}"}"; 47 + defaultText = "reaktor2-‹name› or just reaktor2 if ‹name› is \"default\""; 48 + type = types.filename; 49 + }; 50 + sendDelaySec = mkOption { 51 + default = 0.7; 52 + type = types.nullOr types.float; 53 + }; 54 + username = mkOption { 55 + default = self.config.systemd-service-name; 56 + defaultText = "‹systemd-service-name›"; 57 + type = types.username; 58 + }; 59 + useTLS = mkOption { 60 + default = self.config.port == "6697"; 61 + type = types.bool; 62 + }; 63 + API.listen = mkOption { 64 + default = null; 65 + type = types.nullOr types.str; 66 + }; 67 + }; 68 + } 69 + ) 70 + ); 71 + }; 72 + 73 + config = { 74 + systemd.services = flip mapAttrs' config.krebs.reaktor2 ( 75 + _: cfg: 76 + nameValuePair cfg.systemd-service-name { 77 + after = [ "network.target" ]; 78 + environment = { 79 + LC_ALL = "en_US.UTF-8"; 80 + }; 81 + wantedBy = [ "multi-user.target" ]; 82 + serviceConfig = { 83 + User = cfg.username; 84 + Group = "reaktor2"; 85 + DynamicUser = true; 86 + StateDirectory = cfg.username; 87 + #ExecStartPre = [ 88 + # (pkgs.writers.writeDash "test-dynamic-user" '' 89 + # set -efux 90 + # ${pkgs.coreutils}/bin/id 91 + # '') 92 + #]; 93 + ExecStart = 94 + let 95 + configFile = pkgs.writers.writeJSON configFileName configValue; 96 + configFileName = "${cfg.systemd-service-name}.config.json"; 97 + configValue = stripAttr ( 98 + recursiveUpdate { 99 + logTime = false; 100 + } (removeAttrs cfg [ "_module" ]) 101 + ); 102 + in 103 + "${self.packages.${pkgs.stdenv.hostPlatform.system}.reaktor2}/bin/reaktor ${configFile}"; 104 + Restart = "always"; 105 + RestartSec = "30"; 106 + }; 107 + } 108 + ); 109 + }; 110 + }
+35
pkgs/reaktor2/blessings.nix
··· 1 + { 2 + mkDerivation, 3 + base, 4 + bytestring, 5 + extra, 6 + fetchgit, 7 + hspec, 8 + lib, 9 + QuickCheck, 10 + text, 11 + wcwidth, 12 + }: 13 + mkDerivation { 14 + pname = "blessings"; 15 + version = "2.5.0"; 16 + src = fetchgit { 17 + url = "https://cgit.krebsco.de/blessings"; 18 + sha256 = "1spwm4xjz72c76wkkxxxbvxpgkxam344iwq37js5lhfbb2hbjqbx"; 19 + rev = "8f9b20f3aa93f7fbba9d24de7732f4cca0119154"; 20 + fetchSubmodules = true; 21 + }; 22 + libraryHaskellDepends = [ 23 + base 24 + bytestring 25 + extra 26 + text 27 + wcwidth 28 + ]; 29 + testHaskellDepends = [ 30 + base 31 + hspec 32 + QuickCheck 33 + ]; 34 + license = lib.licenses.mit; 35 + }
+12
pkgs/reaktor2/package.nix
··· 1 + # reaktor2 IRC bot, taken from stockholm's krebs/5pkgs/haskell (cc283503), 2 + # which is not part of stockholm's packages output. blessings is not in 3 + # nixpkgs' haskellPackages, so it comes along. 4 + { haskellPackages }: 5 + let 6 + hp = haskellPackages.override { 7 + overrides = self: _: { 8 + blessings = self.callPackage ./blessings.nix { }; 9 + }; 10 + }; 11 + in 12 + hp.callPackage ./reaktor2.nix { }
+89
pkgs/reaktor2/reaktor2.nix
··· 1 + { 2 + mkDerivation, 3 + aeson, 4 + async, 5 + attoparsec, 6 + base, 7 + base64, 8 + blessings, 9 + bytestring, 10 + containers, 11 + data-default, 12 + directory, 13 + fetchgit, 14 + filepath, 15 + hashable, 16 + http-types, 17 + lens, 18 + lens-aeson, 19 + lib, 20 + network, 21 + network-simple, 22 + network-simple-tls, 23 + network-uri, 24 + pcre-light, 25 + process, 26 + random, 27 + servant-server, 28 + string-conversions, 29 + stringsearch, 30 + text, 31 + time, 32 + transformers, 33 + unagi-chan, 34 + unix, 35 + unordered-containers, 36 + vector, 37 + wai, 38 + warp, 39 + }: 40 + mkDerivation { 41 + pname = "reaktor2"; 42 + version = "0.4.5"; 43 + src = fetchgit { 44 + url = "https://cgit.krebsco.de/reaktor2"; 45 + sha256 = "0arcw06k3hhmcp6kk5lxrzadin3lx6ywxrznicljr92flkgj8isc"; 46 + rev = "6ff1335c7c9775e1cf167b950b6de97359d3b659"; 47 + fetchSubmodules = true; 48 + }; 49 + isLibrary = false; 50 + isExecutable = true; 51 + executableHaskellDepends = [ 52 + aeson 53 + async 54 + attoparsec 55 + base 56 + base64 57 + blessings 58 + bytestring 59 + containers 60 + data-default 61 + directory 62 + filepath 63 + hashable 64 + http-types 65 + lens 66 + lens-aeson 67 + network 68 + network-simple 69 + network-simple-tls 70 + network-uri 71 + pcre-light 72 + process 73 + random 74 + servant-server 75 + string-conversions 76 + stringsearch 77 + text 78 + time 79 + transformers 80 + unagi-chan 81 + unix 82 + unordered-containers 83 + vector 84 + wai 85 + warp 86 + ]; 87 + license = lib.licenses.mit; 88 + mainProgram = "reaktor"; 89 + }
-1
configs/services/radio/default.nix
··· 80 80 ./news.nix 81 81 ./weather.nix 82 82 self.inputs.stockholm.nixosModules.acl 83 - # self.inputs.stockholm.nixosModules.reaktor2 84 83 ]; 85 84 86 85 users.users = {