diff options
Diffstat (limited to 'krebs')
31 files changed, 76 insertions, 1072 deletions
diff --git a/krebs/1systems/puyak/config.nix b/krebs/1systems/puyak/config.nix index 542106d5f..0c361cc42 100644 --- a/krebs/1systems/puyak/config.nix +++ b/krebs/1systems/puyak/config.nix @@ -11,7 +11,7 @@ # brain hosts/puyak/root ../../2configs/hw/getty-for-esp.nix - ../../2configs/buildbot/worker.nix + # ../../2configs/buildbot/worker.nix ## initrd unlocking # (brain hosts/puyak/luks-ssd;echo) | ssh root@$(brain krebs-secrets/puyak/initrd/hostname) 'cat /crypt-ramfs/passphrase' @@ -67,7 +67,7 @@ } # create samba share for anonymous usage with the laser and 3d printer pc - ../../2configs/shack/share.nix + # ../../2configs/shack/share.nix # mobile.lounge.mpd.shack ../../2configs/shack/mobile.mpd.nix @@ -159,7 +159,6 @@ services.logind.lidSwitchExternalPower = "ignore"; - environment.systemPackages = [ pkgs.zsh ]; system.activationScripts."disengage fancontrol" = '' diff --git a/krebs/2configs/exim-smarthost.nix b/krebs/2configs/exim-smarthost.nix index ceb11ca64..11b8b3ec1 100644 --- a/krebs/2configs/exim-smarthost.nix +++ b/krebs/2configs/exim-smarthost.nix @@ -35,6 +35,7 @@ in { "brain@krebsco.de" = brain-ml; "eloop2022@krebsco.de" = eloop-ml; "2024@eloop.org" = eloop-ml; + "2025@eloop.org" = eloop-ml; "root@eloop.org" = eloop-ml; # obsolete, use spam@eloop.org instead "spam@eloop.org" = eloop-ml; "youtube@eloop.org" = eloop-ml; # obsolete, use spam@eloop.org instead diff --git a/krebs/2configs/mastodon.nix b/krebs/2configs/mastodon.nix index b81c229b6..3c7205167 100644 --- a/krebs/2configs/mastodon.nix +++ b/krebs/2configs/mastodon.nix @@ -1,4 +1,14 @@ { config, lib, pkgs, ... }: +let + mastodon-clear-cache = pkgs.writers.writeDashBin "mastodon-clear-cache" '' + /run/current-system/sw/bin/mastodon-tootctl media remove --prune-profiles --days=14 --concurrency=30 + /run/current-system/sw/bin/mastodon-tootctl media remove-orphans + /run/current-system/sw/bin/mastodon-tootctl preview_cards remove --days=14 + /run/current-system/sw/bin/mastodon-tootctl accounts prune + /run/current-system/sw/bin/mastodon-tootctl statuses remove --days 4 + /run/current-system/sw/bin/mastodon-tootctl media remove --days 4 + ''; +in { services.postgresql = { enable = true; @@ -25,12 +35,20 @@ 443 ]; + systemd.services.mastodon-clear-cache = { + description = "Mastodon Clear Cache"; + wantedBy = [ "timers.target" ]; + startAt = "daily"; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${mastodon-clear-cache}/bin/mastodon-clear-cache"; + User = "mastodon"; + WorkingDirectory = "/var/lib/mastodon"; + }; + }; + environment.systemPackages = [ - (pkgs.writers.writeDashBin "clear-mastodon-cache" '' - mastodon-tootctl media remove --prune-profiles --days=14 --concurrency=30 - mastodon-tootctl media remove-orphans - mastodon-tootctl preview_cards remove --days=14 - '') + mastodon-clear-cache (pkgs.writers.writeDashBin "create-mastodon-user" '' set -efu nick=$1 diff --git a/krebs/2configs/mud.nix b/krebs/2configs/mud.nix index a53596cc6..992f2ebdc 100644 --- a/krebs/2configs/mud.nix +++ b/krebs/2configs/mud.nix @@ -5,18 +5,6 @@ MUD_SERVER=''${MUD_SERVER:-127.0.0.1} MUD_PORT=''${MUD_PORT:-8080} - if $(${pkgs.libressl.nc}/bin/nc -z "$MUD_SERVER" "$MUD_PORT"); then - ${nvim}/bin/nvim \ - +"let g:instant_username = \"$MUD_NICKNAME\"" \ - +":InstantJoinSession $MUD_SERVER $MUD_PORT" \ - "$@" - else - ${nvim}/bin/nvim \ - +"let g:instant_username = \"$MUD_NICKNAME\"" \ - +":InstantStartServer $MUD_SERVER $MUD_PORT" \ - +":InstantStartSession $MUD_SERVER $MUD_PORT" \ - "$@" - fi ''; nvim = pkgs.neovim.override { # vimAlias = true; @@ -31,7 +19,6 @@ nerdtree # file structure inside nvim rainbow # Color parenthesis customPlugins.hack-color - customPlugins.instant ]; opt = []; }; @@ -97,15 +84,6 @@ inoremap <f2> <esc>:tabn<cr> ''; customPlugins = { - instant = pkgs.vimUtils.buildVimPlugin { - name = "instant"; - src = pkgs.fetchFromGitHub { - owner = "jbyuki"; - repo = "instant.nvim"; - rev = "c02d72267b12130609b7ad39b76cf7f4a3bc9554"; - sha256 = "sha256-7Pr2Au/oGKp5kMXuLsQY4BK5Wny9L1EBdXtyS5EaZPI="; - }; - }; hack-color = (rtp: rtp // { inherit rtp; }) (pkgs.writeTextFile (let name = "hack"; in { @@ -162,10 +140,6 @@ in { ]; packages = with pkgs; [ tmux - (pkgs.writers.writeDashBin "instant_server" '' - find ${customPlugins.instant} - find ${customPlugins.instant.src} - '') mud ]; }; diff --git a/krebs/2configs/nameserver.nix b/krebs/2configs/nameserver.nix index 633f6f5d5..fb22dc6f9 100644 --- a/krebs/2configs/nameserver.nix +++ b/krebs/2configs/nameserver.nix @@ -66,6 +66,10 @@ in { - id: hostingde_ns1 address: 134.0.30.178 + - id: krebscode_ne + address: ${config.krebs.hosts.ne.nets.internet.ip4.addr} + key: krebs_transfer_notify_key + - id: krebscode_ni address: ${config.krebs.hosts.ni.nets.internet.ip4.addr} key: krebs_transfer_notify_key @@ -119,6 +123,7 @@ in { dnssec-policy: rsa2k notify: henet_ns1 notify: hostingde_ns1 + notify: krebscode_ne notify: krebscode_ni acl: transfer_to_henet_secondary acl: transfer_to_hostingde_secondary diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 7cc6c7550..faabf7677 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -410,7 +410,6 @@ let bedger-balance bing bing-img - hooks.sed interrogate say (generators.command_hook { diff --git a/krebs/2configs/shack/share.nix b/krebs/2configs/shack/share.nix index bc483e8d0..0ba22af78 100644 --- a/krebs/2configs/shack/share.nix +++ b/krebs/2configs/shack/share.nix @@ -26,21 +26,17 @@ "guest ok" = "yes"; }; }; - extraConfig = '' - guest account = smbguest - map to guest = bad user - # disable printing - load printers = no - printing = bsd - printcap name = /dev/null - disable spoolss = yes - - # for legacy systems - client min protocol = NT1 - server min protocol = NT1 - workgroup = WORKGROUP - server string = ${config.networking.hostName} - netbios name = ${config.networking.hostName} - ''; + settings.global = { + "guest account" = "smbguest"; + "map to guest" = "bad user"; + # disable printing + "load printers" = "no"; + "printing" = "bsd"; + "printcap name" = "/dev/null"; + "disable spoolss" = "yes"; + "workgroup" = "WORKGROUP"; + "server string" = config.networking.hostName; + "netbios name" = config.networking.hostName; + }; }; } diff --git a/krebs/2configs/shack/ssh-keys.nix b/krebs/2configs/shack/ssh-keys.nix index 80957f3a5..183a81f99 100644 --- a/krebs/2configs/shack/ssh-keys.nix +++ b/krebs/2configs/shack/ssh-keys.nix @@ -2,6 +2,7 @@ { users.users.root.openssh.authorizedKeys.keys = [ config.krebs.users."0x4A6F".pubkey + config.krebs.users.susanne.pubkey config.krebs.users.hase.pubkey config.krebs.users.neos.pubkey config.krebs.users.raute.pubkey diff --git a/krebs/2configs/shack/worlddomination.nix b/krebs/2configs/shack/worlddomination.nix index b7a8f18df..66a4095db 100644 --- a/krebs/2configs/shack/worlddomination.nix +++ b/krebs/2configs/shack/worlddomination.nix @@ -7,11 +7,11 @@ let src = pkgs.fetchFromGitHub { owner = "shackspace"; repo = "worlddomination"; - rev = "c7aedcde7cd1fcb870b5356a6125e1a384b0776c"; - sha256 = "0y6haz5apwa33lz64l7b2x78wrrckbw39j4wzyd1hfk46478xi2y"; + rev = "934387c3525e819e6b5981c417a7561d70b8b61a"; + sha256 = "sha256-AbRqxxY6hYNg4qkk/akuw4f+wJh4nx1hfEA4Lp5B+1E="; }; buildInputs = [ - (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ + (pkgs.python310.withPackages (pythonPackages: with pythonPackages; [ docopt LinkHeader aiocoap @@ -30,41 +30,7 @@ let }; pythonPackages = pkgs.python3Packages; # https://github.com/chrysn/aiocoap - grequests = pythonPackages.buildPythonPackage rec { - pname = "grequests"; - version = "0.3.1"; - name = "${pname}-${version}"; - src = pkgs.fetchFromGitHub { - owner = "kennethreitz"; - repo = "grequests"; - rev = "d1e70eb"; - sha256 = "0drfx4fx65k0g5sj0pw8z3q1s0sp7idn2yz8xfb45nd6v82i37hc"; - }; - - doCheck = false; - - propagatedBuildInputs = with pythonPackages; [ requests gevent ]; - - meta = with lib;{ - description = "Asynchronous HTTP requests"; - homepage = https://github.com/kennethreitz/grequests; - license = with licenses; [ bsd2 ]; - maintainers = with maintainers; [ matejc ]; - }; - }; - - aiocoap = pythonPackages.buildPythonPackage { - name = "aiocoap-0.3"; - src = pkgs.fetchurl { url = "https://pypi.python.org/packages/9c/f6/d839e4b14258d76e74a39810829c13f8dd31de2bfe0915579b2a609d1bbe/aiocoap-0.3.tar.gz"; sha256 = "402d4151db6d8d0b1d66af5b6e10e0de1521decbf12140637e5b8d2aa9c5aef6"; }; - propagatedBuildInputs = [ ]; - doCheck = false; # 2 errors, dunnolol - meta = with pkgs.lib; { - homepage = ""; - license = licenses.mit; - description = "Python CoAP library"; - }; - }; LinkHeader = pythonPackages.buildPythonPackage { name = "LinkHeader-0.4.3"; src = pkgs.fetchurl { url = "https://files.pythonhosted.org/packages/27/d4/eb1da743b2dc825e936ef1d9e04356b5701e3a9ea022c7aaffdf4f6b0594/LinkHeader-0.4.3.tar.gz"; sha256 = "7fbbc35c0ba3fbbc530571db7e1c886e7db3d718b29b345848ac9686f21b50c3"; }; diff --git a/krebs/3modules/brockman.nix b/krebs/3modules/brockman.nix index 3f0dd0861..a3acf83cf 100644 --- a/krebs/3modules/brockman.nix +++ b/krebs/3modules/brockman.nix @@ -6,6 +6,7 @@ let in { options.krebs.brockman = { enable = mkEnableOption "brockman"; + package = mkPackageOption pkgs "brockman" { }; config = mkOption { type = types.attrs; }; # TODO make real config here }; @@ -26,7 +27,7 @@ in { serviceConfig = { Restart = "always"; ExecStart = '' - ${pkgs.brockman}/bin/brockman ${pkgs.writeText "brockman.json" (builtins.toJSON cfg.config)} + ${cfg.package}/bin/brockman ${pkgs.writeText "brockman.json" (builtins.toJSON cfg.config)} ''; User = config.users.extraUsers.brockman.name; PrivateTmp = true; diff --git a/krebs/3modules/go.nix b/krebs/3modules/go.nix index f52394dbc..1db19e1ca 100644 --- a/krebs/3modules/go.nix +++ b/krebs/3modules/go.nix @@ -25,7 +25,7 @@ let krebs.htgen.go = { port = cfg.port; - script = ''. ${pkgs.writeDash "go" '' + script = ''. ${pkgs.writers.writeDash "go" '' set -x case "$Method $Request_URI" in diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 866796a4e..8046d9b71 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -20,7 +20,27 @@ fix (foldl' (flip extends) (self: super) ( [ (self: super: { brockman = self.haskellPackages.brockman; - reaktor2 = self.haskellPackages.reaktor2; + reaktor2 = self.haskellPackages.reaktor2.override { + blessings = + self.haskellPackages.callPackage ( + { mkDerivation, base, bytestring, extra, fetchgit, hspec, lib + , QuickCheck, text, wcwidth + }: + mkDerivation { + pname = "blessings"; + version = "2.5.0"; + src = fetchgit { + url = "https://cgit.krebsco.de/blessings"; + sha256 = "1spwm4xjz72c76wkkxxxbvxpgkxam344iwq37js5lhfbb2hbjqbx"; + rev = "8f9b20f3aa93f7fbba9d24de7732f4cca0119154"; + fetchSubmodules = true; + }; + libraryHaskellDepends = [ base bytestring extra text wcwidth ]; + testHaskellDepends = [ base hspec QuickCheck ]; + license = lib.licenses.mit; + } + ) {}; + }; }) ] )) diff --git a/krebs/5pkgs/haskell/X11-aeson.nix b/krebs/5pkgs/haskell/X11-aeson.nix deleted file mode 100644 index 103d87faa..000000000 --- a/krebs/5pkgs/haskell/X11-aeson.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ mkDerivation, aeson, base, fetchgit, lib, X11 }: -mkDerivation { - pname = "X11-aeson"; - version = "1.0.0"; - src = fetchgit { - url = "https://cgit.krebsco.de/X11-aeson"; - sha256 = "0y9nvssqpvqgl46g7nz9738l8jmpa7an8r3am3qaqcvmvzgwxh0d"; - rev = "c0a70a62513baf2b437db4ebe3e5a32e3cfa5905"; - fetchSubmodules = true; - }; - libraryHaskellDepends = [ aeson base X11 ]; - license = lib.licenses.mit; -} diff --git a/krebs/5pkgs/haskell/blessings.nix b/krebs/5pkgs/haskell/blessings.nix deleted file mode 100644 index 2176db2ff..000000000 --- a/krebs/5pkgs/haskell/blessings.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ mkDerivation, base, fetchgit, hspec, QuickCheck, lib, stockholm, text }: -with stockholm.lib; - -let - cfg = { - "18.03" = { - version = "1.1.0"; - sha256 = "1k908zap3694fcxdk4bb29s54b0lhdh557y10ybjskfwnym7szn1"; - }; - }.${versions.majorMinor version} or { - version = "2.2.0"; - sha256 = "1pb56dgf3jj2kq3cbbppwzyg3ccgqy9xara62hkjwyxzdx20clk1"; - }; - -in mkDerivation { - pname = "blessings"; - version = cfg.version; - src = fetchgit { - url = http://cgit.ni.krebsco.de/blessings; - rev = "refs/tags/v${cfg.version}"; - sha256 = cfg.sha256; - }; - libraryHaskellDepends = [ base text ]; - testHaskellDepends = [ base hspec QuickCheck ]; - doHaddock = false; - # WTFPL is the true license, which is unknown to cabal. - license = lib.licenses.wtfpl; -} diff --git a/krebs/5pkgs/haskell/email-header.nix b/krebs/5pkgs/haskell/email-header.nix deleted file mode 100644 index f8ce03f39..000000000 --- a/krebs/5pkgs/haskell/email-header.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ mkDerivation, attoparsec, base, base64-bytestring, bytestring -, case-insensitive, containers, exceptions, fetchgit, QuickCheck -, lib, stockholm, tasty, tasty-quickcheck, text, text-icu, time -}: -with stockholm.lib; - -let - - cfg = { - "18.03" = { - version = "0.3.0"; - rev = "7b179bd31192ead8afe7a0b6e34bcad4039deaa8"; - sha256 = "12j2n3sbvzjnw99gga7kkdygm8n3qx2lh8q26ad6a53xm5whnz59"; - }; - "20.03" = { - version = "0.4.1-tv1"; - rev = "refs/tags/v${cfg.version}"; - sha256 = "11xjivpj495r2ss9aqljnpzzycb57cm4sr7yzmf939rzwsd3ib0x"; - }; - }.${versions.majorMinor version} or { - version = "0.4.2-tv1"; - rev = "refs/tags/v${cfg.version}"; - sha256 = "JZfqvkbb/1t0q1iWmZHmmCN2Vr+QKTiq4LVncrG+xMU="; - }; - -in mkDerivation { - pname = "email-header"; - version = cfg.version; - src = fetchgit { - url = "https://github.com/4z3/email-header"; - rev = cfg.rev; - sha256 = cfg.sha256; - }; - buildDepends = [ - attoparsec base base64-bytestring bytestring case-insensitive - containers exceptions text text-icu time - ]; - testDepends = [ - base bytestring case-insensitive containers QuickCheck tasty - tasty-quickcheck text time - ]; - jailbreak = true; - homepage = "http://github.com/knrafto/email-header"; - description = "Parsing and rendering of email and MIME headers"; - license = lib.licenses.bsd3; -} diff --git a/krebs/5pkgs/haskell/kirk.nix b/krebs/5pkgs/haskell/kirk.nix deleted file mode 100644 index d6fdec4c9..000000000 --- a/krebs/5pkgs/haskell/kirk.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ mkDerivation, async, base, bytestring, fetchgit, lib, network -, optparse-applicative, text -}: -mkDerivation { - pname = "kirk"; - version = "1.0.1"; - src = fetchgit { - url = "http://cgit.krebsco.de/kirk"; - sha256 = "1acsmmc485c54axpy9bd0320j18hs261vl1vdxns4n04sxzqd7k0"; - rev = "cdf3cb373af8f9b03a9487a63eb32e0226913589"; - fetchSubmodules = true; - }; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - base bytestring network optparse-applicative text - ]; - executableHaskellDepends = [ - async base network optparse-applicative text - ]; - license = lib.licenses.mit; -} diff --git a/krebs/5pkgs/haskell/mailaids.nix b/krebs/5pkgs/haskell/mailaids.nix deleted file mode 100644 index 91b4cc451..000000000 --- a/krebs/5pkgs/haskell/mailaids.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ mkDerivation, aeson, aeson-pretty, base, bytestring -, case-insensitive, fetchgit, lens, lib, optparse-applicative -, purebred-email, text, vector, word8 -}: -mkDerivation { - pname = "mailaids"; - version = "1.1.0"; - src = fetchgit { - url = "https://cgit.krebsco.de/mailaids"; - sha256 = "0mkq3b0j28h7ydg6aaqlqnvajb8nhdc9g7rmil2d4vl5fxxaqspv"; - rev = "a25fc32eceefc10a91ef77ff2763b3f1b9324aaf"; - fetchSubmodules = true; - }; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ - aeson aeson-pretty base bytestring case-insensitive lens - optparse-applicative purebred-email text vector word8 - ]; - license = lib.licenses.mit; -} diff --git a/krebs/5pkgs/haskell/nix-serve-ng.nix b/krebs/5pkgs/haskell/nix-serve-ng.nix deleted file mode 100644 index 62e02ce82..000000000 --- a/krebs/5pkgs/haskell/nix-serve-ng.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ mkDerivation, async, base, base16, base32, bytestring, charset -, fetchgit, http-client, http-types, lib, managed, megaparsec, mtl -, network, nix, optparse-applicative, tasty-bench, temporary, text -, turtle, vector, wai, wai-extra, warp, warp-tls -, boost -}: -mkDerivation { - pname = "nix-serve-ng"; - version = "1.0.1"; - src = fetchgit { - url = "https://github.com/aristanetworks/nix-serve-ng"; - sha256 = "sha256-PkzwtjUgYuqfWtCH1nRqVRaajihN1SqMVjWmoSG/CCY="; - rev = "9b546864f4090736f3f9069a01ea5d42cf7bab7c"; - fetchSubmodules = true; - }; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ - base base16 base32 bytestring charset http-types managed megaparsec - mtl network optparse-applicative vector wai wai-extra warp warp-tls - ]; - executablePkgconfigDepends = [ nix ]; - executableSystemDepends = [ boost.dev ]; - benchmarkHaskellDepends = [ - async base bytestring http-client tasty-bench temporary text turtle - vector - ]; - description = "A drop-in replacement for nix-serve that's faster and more stable"; - license = lib.licenses.bsd3; -} diff --git a/krebs/5pkgs/haskell/purebred-email/default.nix b/krebs/5pkgs/haskell/purebred-email/default.nix deleted file mode 100644 index 62fc82183..000000000 --- a/krebs/5pkgs/haskell/purebred-email/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ mkDerivation, attoparsec, base, base64-bytestring, bytestring -, case-insensitive, concise, deepseq, fetchgit, hedgehog, lens, lib -, QuickCheck, quickcheck-instances, random, semigroupoids -, stringsearch, tasty, tasty-golden, tasty-hedgehog, tasty-hunit -, tasty-quickcheck, text, time -}: -mkDerivation { - pname = "purebred-email"; - version = "0.5.1"; - src = fetchgit { - url = "https://github.com/purebred-mua/purebred-email"; - sha256 = "0iilyy5dkbzbiazyyfjdz585c3x8b7c2piynmycm7krkc48993vw"; - rev = "7ba346e10ad1521a923bc04a4ffeca479d8dd071"; - fetchSubmodules = true; - }; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - attoparsec base base64-bytestring bytestring case-insensitive - concise deepseq lens random semigroupoids stringsearch text time - ]; - testHaskellDepends = [ - attoparsec base bytestring case-insensitive hedgehog lens - QuickCheck quickcheck-instances random tasty tasty-golden - tasty-hedgehog tasty-hunit tasty-quickcheck text time - ]; - homepage = "https://github.com/purebred-mua/purebred-email"; - description = "types and parser for email messages (including MIME)"; - license = lib.licenses.agpl3Plus; -} diff --git a/krebs/5pkgs/haskell/purebred-email/untweak-mime-version-header.patch b/krebs/5pkgs/haskell/purebred-email/untweak-mime-version-header.patch deleted file mode 100644 index 97baf7ac1..000000000 --- a/krebs/5pkgs/haskell/purebred-email/untweak-mime-version-header.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff --git a/src/Data/MIME.hs b/src/Data/MIME.hs -index 19af53e..be8cbd4 100644 ---- a/src/Data/MIME.hs -+++ b/src/Data/MIME.hs -@@ -810,7 +810,6 @@ multipart takeTillEnd boundary = - -- | Sets the @MIME-Version: 1.0@ header. - -- - instance RenderMessage MIME where -- tweakHeaders = set (headers . at "MIME-Version") (Just "1.0") - buildBody h z = Just $ case z of - Part partbody -> Builder.byteString partbody - Encapsulated msg -> buildMessage msg -diff --git a/tests/Generator.hs b/tests/Generator.hs -index 9e1f166..23bd122 100644 ---- a/tests/Generator.hs -+++ b/tests/Generator.hs -@@ -64,7 +64,7 @@ exampleMailsParseSuccessfully = - textPlain7bit :: MIMEMessage - textPlain7bit = - let m = createTextPlainMessage "This is a simple mail." -- in over headers (\(Headers xs) -> Headers $ (CI.mk "Subject", "Hello there") : xs) m -+ in over headers (\(Headers xs) -> Headers $ (CI.mk "MIME-Version", "1.0") : (CI.mk "Subject", "Hello there") : xs) m - - multiPartMail :: MIMEMessage - multiPartMail = -@@ -72,13 +72,16 @@ multiPartMail = - to' = Single $ Mailbox Nothing (AddrSpec "bar" (DomainDotAtom $ pure "bar.com")) - subject = "Hello there" - p = createTextPlainMessage "This is a simple mail." -+ & set (headers . at "MIME-Version") (Just "1.0") - a = createAttachment - contentTypeApplicationOctetStream - (Just "foo.bin") - "fileContentsASDF" -+ & set (headers . at "MIME-Version") (Just "1.0") - now = UTCTime (ModifiedJulianDay 123) (secondsToDiffTime 123) - in createMultipartMixedMessage "asdf" (fromList [p, a]) -- & set (headers . at "From") (Just $ renderMailboxes [from']) -+ & set (headers . at "MIME-Version") (Just "1.0") -+ . set (headers . at "From") (Just $ renderMailboxes [from']) - . set (headers . at "To") (Just $ renderAddresses [to']) - . set (headers . at "Date") (Just $ renderRFC5422Date now) - . set (headers . at "Subject") (Just $ T.encodeUtf8 subject) -diff --git a/tests/Message.hs b/tests/Message.hs -index 6711519..3e40397 100644 ---- a/tests/Message.hs -+++ b/tests/Message.hs -@@ -29,7 +29,7 @@ import Data.Char (isPrint) - import Data.Foldable (fold) - import Data.List.NonEmpty (NonEmpty(..), intersperse) - --import Control.Lens (set, view) -+import Control.Lens ((&), at, set, view) - import qualified Data.ByteString as B - import qualified Data.Text as T - -@@ -99,7 +99,7 @@ genMessage = Gen.choice [ genTextPlain, genMultipart, encapsulate <$> genMessage - prop_messageRoundTrip :: Property - prop_messageRoundTrip = property $ do - msg <- forAll genMessage -- parse (message mime) (renderMessage msg) === Right msg -+ parse (message mime) (renderMessage $ msg & set (headers . at "MIME-Version") (Just "1.0")) === Right msg - - prop_messageFromRoundTrip :: Property - prop_messageFromRoundTrip = property $ do diff --git a/krebs/5pkgs/haskell/reaktor2/default.nix b/krebs/5pkgs/haskell/reaktor2/default.nix index 7f89c0b1f..3f227a4d6 100644 --- a/krebs/5pkgs/haskell/reaktor2/default.nix +++ b/krebs/5pkgs/haskell/reaktor2/default.nix @@ -8,11 +8,11 @@ }: mkDerivation { pname = "reaktor2"; - version = "0.4.2"; + version = "0.4.3"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - hash = "sha256-JPQyy0hDSH5JqQGjwoO5BNsD4qk+GKP1VH+j4/2cqes"; - rev = "53a11f421fb18e8687fa06e5511cea8bd9defc36"; + hash = "sha256-gsYMtPaljHBgIVV2+uwyyklOhQjLFdTBVRGG3UVeIVw="; + rev = "30309581b7ae02b466b466af43009b6b1edb9b39"; fetchSubmodules = true; }; isLibrary = false; diff --git a/krebs/5pkgs/haskell/scanner.nix b/krebs/5pkgs/haskell/scanner.nix deleted file mode 100644 index a317e575e..000000000 --- a/krebs/5pkgs/haskell/scanner.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ mkDerivation, base, fetchgit, lib }: -mkDerivation { - pname = "scanner"; - version = "1.0.1"; - src = fetchgit { - url = "http://cgit.ni.krebsco.de/scanner"; - sha256 = "1lgl158axczsm4fx53fyq1d4116v91jsx4dbz66ka4k1ljqrmhgn"; - rev = "7f091a3bc152ad3974a1873b460fa1759bf8dcad"; - fetchSubmodules = true; - }; - libraryHaskellDepends = [ base ]; - license = lib.licenses.mit; -} diff --git a/krebs/5pkgs/haskell/xmonad-aeson.nix b/krebs/5pkgs/haskell/xmonad-aeson.nix deleted file mode 100644 index d27f9c783..000000000 --- a/krebs/5pkgs/haskell/xmonad-aeson.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ mkDerivation, aeson, base, fetchgit, lib, X11-aeson, xmonad }: -mkDerivation { - pname = "xmonad-aeson"; - version = "1.0.0"; - src = fetchgit { - url = "https://cgit.krebsco.de/xmonad-aeson"; - sha256 = "0l1gna6p1498vzm6kj0ywj0i7775mz5n7k9nymwggvfb1pyxv3h9"; - rev = "a95f652b150f17db3f2439214a6346335d6d8d89"; - fetchSubmodules = true; - }; - libraryHaskellDepends = [ aeson base X11-aeson xmonad ]; - license = lib.licenses.mit; -} diff --git a/krebs/5pkgs/haskell/xmonad-stockholm.nix b/krebs/5pkgs/haskell/xmonad-stockholm.nix deleted file mode 100644 index c43dbe271..000000000 --- a/krebs/5pkgs/haskell/xmonad-stockholm.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ mkDerivation, base, containers, directory, fetchgit, filepath -, lib, unix, X11, X11-xft, X11-xshape, xmonad, xmonad-contrib -}: -mkDerivation { - pname = "xmonad-stockholm"; - version = "1.3.1"; - src = fetchgit { - url = "https://cgit.krebsco.de/xmonad-stockholm"; - sha256 = "1m4kkppy143jvjzhy5aawh8q6sglpnqhiajxbdcr42j02ibf3vvq"; |
