Commit graph

267 commits

Author SHA1 Message Date
Profpatsch
3de9601764 feat(users/Profpatsch/whatcd-resolver): add executable
Change-Id: I28f5c26443b9a878f8f374af2c7935831d17ab12
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9355
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-09-17 18:05:42 +00:00
Profpatsch
07b0dff209 refactor(users/Profpatsch/whatcd-resolver): rename main function
Change-Id: I8ce8ef1cc8a35358d20610be7c8bdadefd3aa30f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9354
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-09-17 18:05:42 +00:00
Profpatsch
d111a0fda8 feat(users/Profpatsch/whatcd-resolver): misc improvements
* run on port 9092 (transmission runs on 9091)
* run postgres on port 5431 instead of 5432 (to not interfere)
* only search for albums for now
* correctly handle missing torrent file in SELECT

Change-Id: I20125f7731c9b80a9e8ea05b726adfb1244a24bc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9335
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-09-15 12:44:06 +00:00
Profpatsch
8cfe6bc99b feat(users/Profpatsch/whatcd-resolver): query all pages in search
If more than one page is returned by the search, query all of them.

Also add an ON CONFLICT clause in case the torrent group already
exists, to update it.

This function is getting a bit unwieldy (plus it suffers from an n+1
problem), but ok.

Change-Id: Ib505a2be8286d658ae44a3fe124a4fb42d0fc0c6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9334
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-09-15 12:34:04 +00:00
Profpatsch
88c3e2b4a0 chore(users/Profpatsch/htmx-experiment): move to Multipart2
We don’t strictly need servant-multipart, if all we need is to parse
some multipart forms. This removes some deps.

Change-Id: I218731fada056b9edfb3d01fc33880673d14473e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9187
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-08-31 17:50:28 +00:00
Profpatsch
081f6beb8d feat(users/Profpatsch): add my xmonad config
Change-Id: I41d7c3029990f5f1ae56a767331781b38e69997c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9077
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-08-13 14:41:41 +00:00
Profpatsch
33fa42a1a3 chore(users/Profpatsch): Update postgres module n stuff
Improvements from “upstream”, fresh served.

Change-Id: I60e02835730f6a65739eaa729f3e3eed1a0693e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9025
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-08-08 20:03:22 +00:00
Profpatsch
8dac21b444 feat(users/Profpatsch/whatcd-resolver): Prefer remasters
Usually remasters just … sound better. Thus let’s give them a boost in
the selection score. In case they are horrible they should have
significantly less people seeding them and less snatches than their
originals anyway (maybe the multiplier should be 1.5 or 2 instead?)

Change-Id: I6817091f42b7bcb75eaf57a6aa635b5ba468f99e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9014
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
2023-08-07 14:03:01 +00:00
Profpatsch
3e5a2ea57f chore(users/Profpatsch): Move Multipart2 into new webstuff package
Change-Id: I903f1b554beed1240d2a9cf14ff44d1f3cb41ec5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9013
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-08-06 16:08:23 +00:00
Profpatsch
b41af857ae chore(users/Profpatsch/whatcd-resolver): build with nix
Change-Id: I2d6ee30671bb60a96bcbfede1fd7a17fcf7c3ca8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9012
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-08-06 11:21:38 +00:00
Profpatsch
1fd59f5158 chore(users/Profpatsch): clean up haskell libs a little
Change-Id: Ia9a6c5a754ca8f2912308feb5a26f5276a08d24c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9011
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-08-06 11:17:36 +00:00
Profpatsch
ce4acc08a5 docs(users/Profpatsch/jbovlaste-sqlite): add parser docs
Change-Id: I62b6b9ee1ce5231e1d486db9f7e1e7b66408fca6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9010
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-08-06 11:17:36 +00:00
Profpatsch
57bab040ed chore(users/Profpatsch): move utils to my-prelude
I want to use these in multiple projects.

Change-Id: I5dfdad8614bc5835e59df06f724de78acae78d42
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8971
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-07-16 20:15:49 +00:00
Profpatsch
c266f5133f feat(users/Profpatsch): init httzip
A streaming webserver which serves directories as .zip recursively.
Because everything sucks and this is the best way to get dirs
delivered to people.

Change-Id: I451885cfc5082db12ac32eb0a4bfb04bc983d3c2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8953
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-07-14 08:03:14 +00:00
Profpatsch
b4cfddfc80 fix(netencode/README): fix the example of ignored fields
Forgot this example when I changed the spec to ignore earlier
duplicated fields.

Change-Id: I9bc8d3e27201afd0d256aa4771b6420059fc68a7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8949
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-07-14 08:03:14 +00:00
Profpatsch
43feacb64b feat(users/Profpatsch/whatcd-resolver): Show percent done
Change-Id: I6d7852570bdca807e4d4fff01d72de9f1084fd42
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8910
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-07-14 08:03:14 +00:00
Profpatsch
50c27b6ba1 feat(users/Profpatsch/whatcd-resolver): Somewhat fix torrent state
I feel like I’m slowly but steadily coding myself into a corner here,
have to rething the whole state thing.

Anyway, now the refresh will display roughly the same information as
the interactive one, which is *a* first step I guess.

Change-Id: I8820c2e321e6e8c9eba0f2f1cc70ce07a044621c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8906
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-07-14 08:03:14 +00:00
Profpatsch
12d23b3e64 feat(users/Profpatsch/whatcd-resolver): Add torrent & basic status
This is a bit dirty, ideally we have a single polling loop that uses
`hx-swap-oob` to fill all status fields in the table (to avoid O(n)
looping requests).

Change-Id: I78ab392964cf00e39424002fe48cb35a60af184a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8875
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-07-14 08:03:14 +00:00
Profpatsch
9504914a59 feat(users/Profpatsch/whatcd-resolver): Download torrent file
Change-Id: I75422a1fc4f94e8aa856f1ea1b2dbec42360c7ac
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8874
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-07-14 08:03:14 +00:00
Profpatsch
4ec27ed088 feat(users/Profpatsch/whatcd-resolver): Display transmission torrent
Change-Id: I1a45dd4c7fa798c161545abf545017be1f83a8f9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8873
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-07-14 08:03:14 +00:00
Profpatsch
fa0b7d0804 feat(users/Profpatsch/whatcd-resolver): Remove dynatable
In favor of all-server-side rendering.

Change-Id: I439c31cc6184cd1f6f77843819eebfb396e0ace8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8872
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-07-14 08:03:14 +00:00
Profpatsch
68a9037d17 feat(users/Profpatsch/whatcd-resolver): Add server-side search
Change-Id: Ifbbe3bca6988b0a090f456ae8d9dbaa808c89e19
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8867
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-07-14 08:03:14 +00:00
Profpatsch
5cfdd259df feat(users/Profpatsch/whatcd-resolver): Cache searches & web UI
When looking up stuff on the tracker, cache the results in our
database and display the best torrent matches in a simple web UI.

Change-Id: Iba8417fbdd3ea812765ab0289a1d5b03b7c2be81
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8857
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-07-14 08:03:14 +00:00
Profpatsch
70da4318f5 feat(users/Profpatsch/whatcd-resolver): INSERT red search results
Change-Id: Ice7fdb2e265cfb99734ed41d17b62ac98f7a4869
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8840
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-07-14 08:03:14 +00:00
Profpatsch
98e38339f2 feat(users/Profpatsch/whatcd-resolver): add initial redacted API
Change-Id: I3143a932646d61b7661df4e4da4edf24a360f6cc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8833
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-07-14 08:03:14 +00:00
Profpatsch
07b976ccd8 feat(users/Profpatsch): init whatcd-resolver
Change-Id: Ieb377fb8caa60e716703153dfeca5173f9a6779d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8830
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-07-14 08:03:14 +00:00
Profpatsch
5daa31db3b feat(users/Profpatsch/jbovlaste-sqlite): create jbovlaste sqlite
Change-Id: I7be8f158eb8af6a88d9edca5bd91451a87f1c96f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8710
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2023-07-14 08:03:14 +00:00
Profpatsch
9a91669ba7 feat(users/Profpatsch/jbovlaste-sqlite): add XML parser
nice.

Change-Id: Iea90578742bfb689cd0508dbaf641c31aed577ad
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8709
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-07-13 23:03:11 +00:00
Profpatsch
c2baefbecc feat(users/Profpatsch): init jbovlaste sqlite
This is intended to convert the XML dump from
https://jbovlaste.lojban.org/ to an sqlite database at one point.

So far only XML parsing and some pretty printing

Change-Id: I48c989a3109c8d513c812703fa7a8f2689a157ee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8687
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2023-07-13 23:03:10 +00:00
Profpatsch
8c4730c433 chore(users/Profpatsch/*): more cabal maintenance
Change-Id: Ib1714abce2815873eb50dbeac088e812fa9098ab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8686
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2023-07-13 23:03:09 +00:00
Profpatsch
ee21f725a3 feat(users/Profpatsch): init HtmxExperiment
I’m playing around with htmx (server-side html snippet rendering),
this is a simple registration form and some form validation that
happens in-place.

Change-Id: I29602a7881e66c3e4d1cc0ba8027f98e0bd3461c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8660
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2023-07-13 20:50:56 +00:00
Profpatsch
6a15e8e71a chore(users/Profpatsch): replace Label with pa-label
We upstreamed some of these modules to hackage, so I can get rid of it
here.

Change-Id: I70e1e864a81029cadbbd96cc019a768728431cff
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8659
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: sterni <sternenseemann@systemli.org>
2023-07-13 20:50:56 +00:00
Profpatsch
285e045fc4 feat(users/Profpatsch/my-prelude): add RunCommand.hs
Change-Id: I08231027a7363ba89006e4dcd510302599be7b4c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8499
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-04-22 17:17:03 +00:00
Profpatsch
04838db0a8 chore(users/Profpatsch/alacritty): inline dhall config
Change-Id: I1e5e5fcd1e065f42ea2cff555d6fce7d54b5aae8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8498
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-04-22 17:17:03 +00:00
Profpatsch
9630949f88 chore(users/Profpatsch/alacritty): remove unused solarized conf
Change-Id: I757ec06ccbae99106d4472d8396a9f106447fb88
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8497
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-04-22 17:17:03 +00:00
Profpatsch
56b2ae0e59 docs(users/Profpatsch): Add toplevel README
Change-Id: Iae4b46932cb964c5668ed679ad068c20d480cdf0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8472
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-04-08 13:16:00 +00:00
Profpatsch
970fd0a891 feat(users/Profpatsch): Actually add the mentioned .hlint file
Change-Id: I6d08379835160dfb941fe45e708cfc2f942acfbf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8471
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-04-08 13:16:00 +00:00
Profpatsch
80e04da5d4 docs(users/Profpatsch): Add small README to most subdirs
Change-Id: I2912e32fe1b2d3d3aff7bafba809634ec4c9adb6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8470
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-04-08 12:25:07 +00:00
Profpatsch
260626e016 refactor(users/Profpatsch/lorri-wait-for-eval): use MyPrelude
Change-Id: I45aec0cd178cd51b1857b576e9c3a8ccc1866100
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8469
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-04-08 12:25:07 +00:00
Profpatsch
ca7c1a4eae chore(users/Profpatsch): delete struct-edit
Change-Id: I17c6c1b2659267a74ed252e18363c46ea89d99fc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8468
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-04-08 12:25:06 +00:00
Profpatsch
34d89cd6a8 chore(users/Profpatsch): delete nixpkgs-rewriter
Change-Id: I0e8a1f4e6e23cbeead46ea60129cad66d3ffe844
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8467
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-04-08 12:25:06 +00:00
Profpatsch
0d4ca2c31b chore(users/Profpatsch): delete check-crate-advisory
Change-Id: Iefd7d8bcd699c9bef5c88e730e1d2dc5ec407ee0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8466
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-04-08 12:25:06 +00:00
Profpatsch
5e400b5b24 chore(users/Profpatsch): bring reverse-haskell-deps into shape
Add a cabal file and move into subdir.
Use MyPrelude & fix a few linter warnings.

Change-Id: I19d5ba47be789fc24f8e02ee8721f73c706ae3e9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8465
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-04-08 12:25:05 +00:00
Profpatsch
de3eedff9b chore(users/Profpatsch): remove failed aerc experiment
I didn’t ever get aerc to work, so let’s get rid of this.

Change-Id: Ie59b23fe7d5af70ca82c1c624c1e11d21da735f4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8189
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: sterni <sternenseemann@systemli.org>
2023-03-01 14:01:54 +00:00
Profpatsch
f627ee84b3 feat(users/Profpatsch/mailbox-org): add simple request json example
Adds a simple json quasiquoter thingy.

Json can be sent to the `/mailfilter?action=update` endpoint.

Change-Id: Iba80c2ab69178e431519933c4a01cd68aaa9f637
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7839
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-01-15 20:36:33 +00:00
Profpatsch
1a18c25d81 feat(users/Profpatsch/mailbox-org): accept tools in main
Move the tool parsers down. Get `pass` from the tools. Add some
helpers for running tools.

Change-Id: Id2c47be58417faf434966eaae81e4944372f1bd5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7838
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-15 20:36:33 +00:00
Profpatsch
48686ca0d6 feat(users/Profpatsch/mailbox-org): Set up passing of sieve-test
Implement a parser for tools, and instantiate once for
arglib-netencode arguments (parsed by the new netencode parser) and
one just from the PATH for testing from the repl.

Change-Id: Id0cf264100123a87700880c7230d68426224fd0d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7798
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-08 23:10:28 +00:00
Profpatsch
cd40585ea4 feat(users/Profpatsch/netencode): Add initial Haskell parser
A simple categorical parser that does not implement Monad, and does
not contain an `m` and some rudementary error message handling.

In the future I’d probably want to wrap everything in an additional
`m`, so that subparsers can somehow use `Selective` to throw errors
from within `m` that contain the parsing context if at all possible.
Hard to do without Monad, I have to say. Not even stuff like `StateT`
works without the inner `m` implementing `Monad`.

Change-Id: I1366eda606ddfb019637b09c82d8b0e30bd4e318
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7797
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-01-08 23:10:28 +00:00
Profpatsch
8cdefc5b25 feat(users/Profpatsch/arglib/netencode): add with-args
Wraps a command in some arguments via arglib.

Also refactor the module to be a `let`.

Change-Id: Ie9b64f7d40c57a4e57bd4d6c411bef5ef57a2b59
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7796
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-08 23:10:28 +00:00
Profpatsch
e3c1981619 docs(users/Profpatsch): notes for a tagtime reimplementation
Change-Id: I2c225a9f023b8694c292f4fb962b88db6e3cce07
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7795
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-07 15:21:52 +00:00
Profpatsch
727e6d890c feat(users/Profpatsch): global shell for my userdir
For my tooling, I want to be able to use vscode language servers for
all subprojects, and the best ways to do that I’ve found so far is to
add a global shell.nix which contains the transitive closure of all
dependencies I need.

This is not /nice/ per se, but it does the job with minimal effort
right now and gives me a good development environment for all these
crazy & dumb experiments in here.

Change-Id: I717a72f490e9d58d45e4e15e9ba604c36b299814
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7794
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-01-07 15:21:52 +00:00
Profpatsch
b3d93a5048 feat(users/Profpatsch/my-prelude): Add Test.hs
Change-Id: Icdbbd310243baf2dc9a0038d9ea5eee7c65be421
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7793
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2023-01-07 14:28:37 +00:00
Profpatsch
83fb27dfbc chore(users/Profpatsch): move rust exec-helpers to own subdir
This is so we can use the rust language server for the file.

Change-Id: I8a2fe15ea67fd0e26814fda57bf0cace0d264cae
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7792
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-07 14:28:37 +00:00
Profpatsch
37883389bc feat(users/Profpatsch): add writeHaskellInteractive
Instead of compiling the module, run it in interpreted mode. Saves on
linking times and can probably be driven to do cooler things in the
future, like calling functions directly via an environment variable or
something.

Change-Id: I9c835005462cdd86055fb7702630a44f78c36107
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7781
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-06 18:12:41 +00:00
Profpatsch
30ec1adce8 feat(users/Profpatsch/mailbox-org): prepare adjusting filter config
In the end, it should be possible to write a single config which is
pushed to the service to steer which emails arrive.

This implements some helper functions and some more endpoints.

We implement Semigroup/Monoid for labelled tuples.

Change-Id: I48bfd311e4a7bba5bc08a9681d823a6a7d5175a8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7727
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-05 22:10:20 +00:00
Profpatsch
e6862413ca feat(users/Profpatsch/my-prelude): show Label name in Show instance
Before:

`show (label @"foo" 23) => "Label 23"`

Now:

`show (label @"foo" 42) => "Label @"foo" 42"

Also with good bracketing due to showsPrec (and correct string
escaping of the label).

Change-Id: Ia5448ab9028ef5ab6c0b53407fe4df1d0e40ff5f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7719
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-02 02:18:03 +00:00
Profpatsch
1b003db725 feat(users/Profpatsch/mailbox-org): list & update filters
One step closer towards a declarative description of filters.
In the end, the filters should be updated by their `rulename` field.

This implements a simple scheme where we list all filters, parse some
of their fields, use those fields to determine whether we want to
change the filters, and then only update the filters where we changed
something.

Unfortunately, we can only update the filters one-by-one (a common
mistake in APIs).

Pulls in some modules for Json parsing that I like to use, and an
`ErrorTree` abstraction over `Error` and `Data.Tree`.

Change-Id: Iea45d5aa0a3fee7ec570f06d3e77009769091274
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7720
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-01-02 02:14:55 +00:00
Profpatsch
545f9384b5 fix(users/Profpatsch/lorri-wait-for-eval): actually search for shell
The function & error message said it was searching upwards for
shell.nix, but it didn’t actually search upwards.

Change-Id: I7b81d20a1cc19fdccdc7828427cf17b42e57f414
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7718
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2023-01-02 00:50:10 +00:00
Profpatsch
7168cb0ed3 feat(users/Profpatsch/mailbox-org): init
A smol little tool to talk to the mailbox.org backend. This is handy
for eventually setting stuff like email filters. Their API is absolute
crap, but we’ll deal with it.

Updates the prelude & adds some pretty printing helpers.

Change-Id: Ie3688f8ee1d7f23c65bcf4bfecc00c8269dae788
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7717
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-01 22:02:25 +00:00
Profpatsch
e5fa10b209 chore(users/Profpatsch/cas-serve): remove dependency on superrecord
The use of superrecord here can be replaced by simple labelled tuples.

Change-Id: I23690cd0b88896440521fe81e83347ef4773d4a0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7713
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2023-01-01 22:02:25 +00:00
sterni
5a063def51 chore(3p/sources): Bump channels & overlays
The main change is that nixpkgs updated to GHC 9.2 and Stackage LTS-20,
so we suffer from a bit of churn.

* //3p/overlays/haskell:

  - use updated dhall-nix patch for hnix 0.16

  - use superrecord fork with fixes for GHC 9.2

  - use graphmod-1.4.5.1 which has support for GHC 9.2

* //users/Profpatsch: relax constraints on base in Haskell pkgs

* //users/Profpatsch/cas-serve: inherit superrecord from 3p

* //users/grfn/xanthous:

  - //3p/overlays/haskell for 8.10.7:

    * Provide missing dependency of binary-orphans. Fix already commited
      upstream as e238c3fdaab710a2ce0135e5a77cd7e6bb023a22, can be
      dropped when channel advances.

    * Downgrade to brick 0.71.1, the latest version xanthous supports.

  - Adjust to generic-arbitrary >= 1.0, providing Arg constraints where
    necessary.

  - Increase constraint-solver-iterations to 6 (default 4), so
    Xanthous.Command and Xanthous.Data can be typechecked.

  - Drop NFData instances for Key and Modifier which have been added to
    vty upstream.

Change-Id: I2170438c2ce8130b65f1a9fe07c4fecab5683d66
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7654
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-12-29 20:06:12 +00:00
Profpatsch
6324f586c9 feat(users/Profpatsch/haskell-module-deps): init
Three small helper functions that can display module graphs of haskell
projects.

Change-Id: I7395ffc8b025f4322efc6c1e494e6a6a0145342c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7675
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-12-29 15:52:16 +00:00
Profpatsch
c9c996bc88 fix(users/Profpatsch/alacritty): Add a 0 to scrollback buffer
Change-Id: I3bf2c2417042a234f851e2d1de57c4c0a8044331
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7674
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
2022-12-29 15:30:39 +00:00
Profpatsch
061a91ff8f refactor(users/Profpatsch/netstring): use toplevel aliases as impls
Apparently I had forgotten that these already exist on the toplevel.
At one point I should unify the two namespaces, but for now at least
acknowledge that they are the same functions.

Change-Id: Ie7d14de0b65f6c750d97630798c65f777b3eda8c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7673
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-12-29 15:30:38 +00:00
sterni
8699370fae chore(tools/rust-crates-advisory): move custom checker to user dir
Profpatsch originally implemented an advisory checker from scratch in
Rust. We now ended up just using cargo-audit for the global checks
exposed via CI and the custom implementation is unused. To clean up
//tools/rust-crates-advisory a bit, we can move the unused parts to his
user directory.

Change-Id: Iacbd27c163edd07c804220fd1b3569c23aebd3e7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7171
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-11-06 18:40:59 +00:00
Profpatsch
0f74816d43 feat(users/Profpatsch/netencode.rs): parse multiple stdin values
Adds support for parsing multiple netencode values from stdin.

This is overly complicated for my tastes, but I don’t see a better way
of writing this logic that does not read all of stdin before starting
to parse the first value.

A kingdom for a conduit.

Change-Id: Ia4f849d4096c43e887756b756d2a85d7f9cd380a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6631
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-09-25 14:17:39 +00:00
Luke Granger-Brown
f190712b7f chore(gerrit): migrate OWNERS files to code-owners style
Change-Id: Iacc521dfdd4b4a2d5cef3920cf8189bcce35a488
2022-09-19 11:13:28 +00:00
Profpatsch
db093ad10c feat(users/Profpatsch): init ical-smolify
ical, but smol

to fit in qr

Change-Id: I37f99a20cfc96b85778a097b7c4f70923f026cd4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6617
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-09-16 21:18:14 +00:00
Profpatsch
61a30555dd docs(users/Profpatsch/netencode): add docstrings to Netencode.hs
Change-Id: I509ea7949990e8c652133bd9ef21243a41f58e44
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6202
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-09-01 14:23:48 +00:00
sterni
3f64e1fb04 chore(3p/sources): Bump channels & overlays
* //users/Profpatsch/writers: adjust for API change in
  makePythonWriter: Since it has become cross-aware, we also
  need to provide the buildPackages python set we want to use.

Change-Id: I4a201647281827ad983eb2dda6f6305f1ed824e7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6196
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-08-30 10:11:48 +00:00
sterni
df7cd63fa1 chore(3p/sources): Bump channels & overlays
* //users/tazjin/predlozhnik: bump wasm-bindgen & run `cargo update`

* //users/Profpatsch/writers:
  use proper keyword syntax to make make flake8 happy.

* //third_party/nixpkgs: pick binaryen from stable channel

Change-Id: Ia711d8c396aa09b78413d80f35eedf63fa315596
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6118
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-08-22 13:54:18 +00:00
Profpatsch
fdc5763f5b feat(users/Profpatsch): init haskell arglib-netencode
Mirrors the rust exec-helpers

Change-Id: I96f211d6545e228b8ae0c1dce4e60e6f6867690c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6117
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-08-22 12:47:53 +00:00
Profpatsch
0fc1634255 feat(users/Profpatsch): init haskell exec-helpers
Mirrors the rust exec-helpers

Change-Id: I8fba49525949a8f38ca8c215e2ec7ba9d97d3bf9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6116
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-08-22 12:47:53 +00:00
Profpatsch
240edcd289 fix(users/Profpatsch/my-prelude): use exactSource
Change-Id: I1b797fb69f69e09f2dda99fce2f12adef0ac2ad2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6115
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-08-22 12:47:53 +00:00
Profpatsch
aed86ea4b3 feat(users/Profpatsch): init netencode-hs
Haskell implementation of the netncode parser & generators.

Change-Id: I904df752e78641110af2857e71d8206bf432d427
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6114
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-08-22 12:47:53 +00:00
Profpatsch
c04c66c637 feat(users/Profpatsch/cas-serve): init
A dumb little daemon that stores arbitrary files by content-hash, and
exposes a randomly generated URL by which the file can be fetched
again.

If the same file is uploaded twice, it will only be stored once.
CAS hashes are not exposed to the user, so they can’t figure out
whether a file they know is in the database.

Change-Id: Ie57bc09d429a9f31c8f0fc5f63f78d6a84d650f7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5952
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-07-17 17:00:43 +00:00
Profpatsch
46f908c3c1 docs(users/Profpatsch/netencode): Parser security considerations
Netencode parsers should probably set an upper length limit.

Change-Id: Ibe65f2b59058106b720867a83435bf45660f1adf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5908
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-07-01 12:37:32 +00:00
Profpatsch
8f55567cf2 feat(users/Profpatsch): add lorri-wait-for-eval
A small exec wrapper which will query the lorri daemon for the last
few events, and if it sees a build running for the current
project (searching upwards for shell.nix), it will wait for the build
to finish before executing the command (in the new direnv
environment).

TODO: should patch lorri so that it can provide this information in a
better digestive format; right now it might have a later evaluation
running, so it’s hard to know which completion to wait for …

Change-Id: I8fa4a10484830a731fe3ec58f2694498f46a496c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5903
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-06-30 09:09:23 +00:00
Profpatsch
7c0874c228 feat(users/Profpatsch/sync-abfall): caldav vdirsyncer config gen
Gonna have to generate some vdirsyncer config, reusing the toIni
stuff, nice.

Change-Id: I036ce9990f70d3b035e47151f336d0d3971f2c91
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5888
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-06-19 13:29:02 +00:00
Profpatsch
3c3713c69f refactor(users/Profpatsch/aerc): move ini stuff out
First shot at generating a dhall FFI standard.

Change-Id: I1cdf7eeaa6b2668a49282315f308a8e51abd0cf6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5887
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-06-19 13:29:02 +00:00
Profpatsch
4f0750cf90 feat(users/Profpatsch/sync-abfall-ics-aichach-friedberg): init
A small script that fetches calendar files for our local trash
provider. First step towards integrating ics files into my calendar
setup.

Change-Id: I0e8915a00c19349104cb6256e9dc87c17620fcae
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5883
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2022-06-19 04:15:56 +00:00
Vincent Ambo
d10cbc711d refactor(Profpatsch/blog): Prepare for restricted-eval
Change-Id: Ia73db534634b11c6361e4e88a4d73a1512d969ca
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5685
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-05-26 16:09:47 +00:00
Profpatsch
54684f6c34 feat(users/Profpatsch/aerc): use toINI
Uses the list-based toINI, which removes a lot of the complications
caused by the INI DSL (it was fun to write but really not necessary).

Change-Id: Ia6c30a726662416c99ed74f9eb33537573543383
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5530
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-05-05 22:43:08 +00:00
Profpatsch
0c51608f6c feat(users/Profpatsch): add toINI
This is a morph of the `pkgs.lib.generators.toINIWithGlobalSection`
function, which is simplified, inlined, and takes lists instead of
attrsets. This makes the key ordering stable and is easy to generate
from dhall.

Ideally I’d upstream it at one point (in the sense that
`generators.toINI` can also take lists), but that will be a lot more
work that is not necessary atm.

Change-Id: I7d6c129cfee9faedb62f69d479e59a6e05bb7ac6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5529
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-05-05 22:43:08 +00:00
Profpatsch
9dac448466 feat(users/Profpatsch/importDhall): print dhall command
It’s often not obvious what dhall command to run to (type)-check the
dhall files directly without the nix roundtrip.

Now we just print the command, easy to copy.

Change-Id: I704a647bff13f73d5a1b1d33b00a46bcb1a9de4e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5528
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-05-05 22:43:08 +00:00
Profpatsch
2a6928fb4c feat(users/Profpatsch): init initial aerc config
aerc is a mail client. It needs some ini files to work.
This is an initial attempt at generating them.

Change-Id: I087955f19d2c4527275500a1e13eeb071c98a7b9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5526
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-05-05 20:18:36 +00:00
Profpatsch
f0e52f31cd feat(users/Profpatsch/importDhall): print type annotation
If no type annotation is given, debugging errors gets a lot harder
because there is nothing to compare it against.

But we can tell dhall to print the type first (this means double
evaluation, but that’s an optimization problem to be solved later).

Change-Id: Icf793828070cd6bb8daeb4c07de3162a5e064653
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5525
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-05-05 20:18:36 +00:00
Profpatsch
7406e95954 fix(users/Profpatsch/alacritty): remove stable alacritty
I figured out that the problem came from me installing alacritty in my
home profile, which was out of sync with my system closure’s opengl.

Updating the home profile “fixed” it.

Change-Id: I1e2b3a91da9a3ab8c47182e0e0a8e69b9285c75b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5522
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2022-05-05 15:18:12 +00:00
Profpatsch
c8ef9fcfa7 fix(users/Profpatsch/alacritty): use alacritty from stable
Change-Id: I8a3f22dd752b5cd70518424335de876210e9bcd4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5487
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-04-21 10:19:32 +00:00
Profpatsch
535ad8732a feat(users/Profpatsch/blog): Idealized Conflang blogpost
Change-Id: Iec01bc2a1a5ed5d21627ba1f9554ec4b3a8fc4ad
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5480
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-04-20 15:12:56 +00:00
Profpatsch
ea871fdcd7 feat(users/Profpatsch/alacritty): Some more configuration
Change-Id: Ibb2e1892327bd1f27a16dcde1424b8d55c7783d2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5479
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2022-04-20 15:12:56 +00:00
Profpatsch
72b46e8fe8 feat(users/Profpatsch/nix-home): add terminal-emulator to ~/bin
This is an ad-hoc way of adding “well known” executables to my
user directory for now. It’s not pretty, it is what it is.

Change-Id: I93ee1d75b48536692da86485f0ac517aa1935ec4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5335
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-02-28 14:32:27 +00:00
Profpatsch
fd519c825f feat(users/Profpatsch): Basic alacritty dhall configuration
Change-Id: I73e91a0abeec013445d0b14867e38637b2a9397f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5334
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-02-28 14:32:27 +00:00
Profpatsch
9014804e2c feat(users/Profpatsch): add importDhall
Makes it possible to import a dhall file as a nix expression (at IfD
time), embedding dhall into nix.

There’s some setup for adding dhall dependencies as well, but it
hasn’t been really battle-tested yet.

Change-Id: I3e5670f93c612f2eb530d7c65d6bb4b1bf7bd8bd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5333
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-02-28 14:32:27 +00:00
Profpatsch
b4d76836b8 feat(users/Profpatsch): add exactSource
This is a little helper that Graham cobbled together at one point, it
will filter an exact list of files.

Change-Id: Iab786abcd4a7a3cce45a20b2950f103defa91998
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5332
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-02-28 14:32:27 +00:00
Profpatsch
baecea1cbe feat(users/Profpatsch/nix-home): add findia* aliases
Change-Id: I66d3e69ae2cb4cf56a49c970f59f62fa945dd736
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4840
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
2022-02-28 14:32:27 +00:00
Profpatsch
ed68ba6751 feat(users/Profpatsch/netencode): ignore earlier record entries
It turns out that the netencode spec requiring to ignore *later*
entries meant that every parser has to do an extra check for each
element, instead of just overriding the key in the hash map.

This leads to a situation where the simple implementation is the wrong
one, which would lead to very subtle problems in parsers (see also the
infamous “json duplicate record entry” problem which has been used for
various exploits in the past).

To be fair, exploits are still possible, but at least a `Map.fromList`
will be the right implementation (provided it folds from the left) now
instead of the wrong one.

Examples of the trivial implementation being now right:

Python:

    > dict([("foo", 1), ("foo", 2)])
    {'foo': 2}

Rust:

    > println!("{:?}", HashMap::from([
      ("foo", 1),
      ("foo", 2)
    ]));
    {"foo": 2}

Haskell:

    > Data.Map.fromList [ ("foo", 1), ("foo", 2) ]
    fromList [("foo",2)]

Change-Id: Ife9593956f4718e5e720f4f348c227e4f3a71e2d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5108
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: Profpatsch <mail@profpatsch.de>
2022-02-14 14:12:19 +00:00
Vincent Ambo
3d8ee62087 style(rust): Format all Rust code with rustfmt
Change-Id: Iab7e00cc26a4f9727d3ab98691ef379921a33052
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5240
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: tazjin <tazjin@tvl.su>
2022-02-08 12:06:39 +00:00
Vincent Ambo
aa122cbae7 style: format entire depot with nixpkgs-fmt
This CL can be used to compare the style of nixpkgs-fmt against other
formatters (nixpkgs, alejandra).

Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: wpcarro <wpcarro@gmail.com>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: cynthia <cynthia@tvl.fyi>
Reviewed-by: edef <edef@edef.eu>
Reviewed-by: eta <tvl@eta.st>
Reviewed-by: grfn <grfn@gws.fyi>
2022-01-31 16:11:53 +00:00
Profpatsch
546251678a fix(users/Profpatsch/blog): fix path check assoc
It would left-associate in some nix version, this way it’s clear that
you want to join a path segment.

Change-Id: I82a00de720187d1faf908c842e396301ea435a97
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4886
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2022-01-16 13:51:19 +00:00