Commit graph

9306 commits

Author SHA1 Message Date
Kevin Eifinger
ed87b8d1de
Add missing "self." to calculate_crc16 uses (#344) 2020-04-19 08:49:55 +02:00
Vincent Ambo
590e1e1048 feat(tools/emacs): Add screen layouts for nugget to EXWM config 2020-04-18 15:27:56 +01:00
Vincent Ambo
820b1bb0c9 feat(tools/emacs): Refactor monitor layout setup in EXWM
vauxhall (my laptop) now has an additional screen connected at home,
but sometimes I use that screen for my desktop computer (nugget).

This refactors the randr configuration for EXWM to support somewhat
more dynamic, multi-monitor layouts and adds key bindings to toggle
between some of the different configurations I want.
2020-04-17 13:13:59 +01:00
Vincent Ambo
066d34b50e feat(ops/nixos/nugget): Add chromium with VAAPI patches
These patches enable hardware-accelerated video decoding, which is
useful for Stadia.

The main issue with this is that Hydra doesn't currently cache
Chromium with these patches, which means that it is built from scratch
which takes in the order of 5 hours on an otherwise unused nugget.
2020-04-17 12:43:25 +01:00
Daniel Høyer Iversen
2f1ac5c9d3
0.13.1 2020-04-16 17:01:30 +02:00
Felipe Martins Diel
548aa05da0
Extend support to RM4 Pro (0x6026) (#340) 2020-04-15 09:04:01 +02:00
Matthew Garrett
af99f92721
Merge pull request #339 from felipediel/patch-3
Fix padding algorithm for CBC mode
2020-04-13 17:40:48 -07:00
Felipe Martins Diel
a5925063f9
Fix padding algorithm for CBC mode
Due to the lack of a parenthesis, the packets were getting 16 bytes larger than necessary.
2020-04-13 17:42:51 -03:00
Vincent Ambo
b4bf0b37b0 chore(ops/nixos/nugget): Install steam again 2020-04-11 13:31:17 +01:00
Eelco Dolstra
90b3b31dc2
Bump version 2020-04-10 15:05:30 +02:00
Greg Price
f5941e14e0
installer: Fix terminal colors.
The install-multi-user script uses blue, green, and red colors, as
well as bold and underline, to add helpful formatting that helps
structure its rather voluminous output.

Unfortunately, the terminal escape sequences it uses are not quite
well-formed.  The relevant information is all there, just obscured
by some extra noise, a leading parameter `38`.  Empirically, the
result is:

 * On macOS, in both Terminal.app and iTerm2, the spurious `38` is
   ignored, the rest of the escape sequence is applied, and the colors
   show up as intended.

 * On Linux, in at least gnome-terminal and xterm, the spurious `38`
   and the next parameter after it are ignored, and what's left is
   applied.  So in the sequence `38;4;32`, the 4 (underline) is
   ignored but the 32 (green) takes effect; in a more typical sequence
   like `38;34`, the 34 (blue) is ignored and nothing happens.

These codes are all unchanged since this script's origins as a
Darwin-only script -- so the fact that they work fine in common macOS
terminals goes some way to explain how the bug arose.

Happily, we can make the colors work as intended by just deleting the
extra `38;`.  Tested in all four terminals mentioned above; the new
codes work correctly on all of them, and on the two macOS terminals
they work exactly the same as before.

---

In a bit more technical detail -- perhaps more than anyone, me
included, ever wanted to know, but now that I've gone and learned it
I'll write it down anyway :) -- here's what's happening in these codes:

An ECMA-48 "control sequence" begins with `\033[` aka "CSI", contains
any number of parameters as semicolon-separated decimal numbers (plus
sometimes other wrinkles), and ends with a byte from 0x40..0x7e.  In
our case, with `m` aka "SGR", "Select Graphic Rendition".

An SGR control sequence `\033[...m` sets colors, fonts, text styles,
etc.  In particular a parameter `31` means red, `32` green, `34` blue,
`4` underline, and `0` means reset to normal.  Those are all we use.

There is also a `38`.  This is used for setting colors too... but it
needs arguments.  `38;5;nn` is color nn from a 256-color palette, and
`38;2;rr;gg;bb` has the given RGB values.

There is no meaning defined for `38;1` or `38;34` etc.  On seeing a
parameter `38` followed by an unrecognized argument for it, apparently
some implementations (as seen on macOS) discard only the `38` and
others (as seen on Linux) discard the argument too before resuming.

(cherry picked from commit 7313aa267b5be1e5264e4577e7bc3daec2fef282)
2020-04-10 10:49:33 +02:00
Tobias Möst
a25214a2bc
Fix PR_SET_PDEATHSIG results in Broken pipe (#2395)
The ssh client is lazily started by the first worker thread, that
requires a ssh connection. To avoid the ssh client to be killed, when
the worker process is stopped, do not set PR_SET_PDEATHSIG.

(cherry picked from commit 3e347220c82d1537723f49aa03a93a6f9d294417)
2020-04-10 10:45:45 +02:00
Eelco Dolstra
6d01e9a623
Simplify
(cherry picked from commit d1b238ec3cd74d652af46f577f992c9a44ac8e32)
2020-04-10 10:45:40 +02:00
Profpatsch
7afd8321ed
libstore/ssh: Improve error message on failing execvp
If the `throw` is reached, this means that execvp into `ssh` wasn’t
successful. We can hint at a usual problem, which is a missing `ssh`
executable.

Test with:

```
env PATH= ./result/bin/nix-copy-closure --builders '' unusedhost
```

and the bash version with

```
env PATH= ./result/bin/nix-copy-closure --builders '' localhost
```

(cherry picked from commit 38b29fb72ca4a07afbec1fd5067f59ca7d7f0fab)
2020-04-10 10:45:34 +02:00
mlatus
2007b4a89b fix placeholder not substituted in passAsFile
(cherry picked from commit 12556e570924315eb25ad6057b6c2c5162955e4f)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-04-10 10:39:35 +02:00
Daiderd Jordan
eba0892d08 libexpr: show expression in assertion errors
Includes the expression of the condition in the assertion message if
the assertion failed, making assertions much easier to debug. eg.

    error: assertion (withPython -> (python2Packages != null)) failed at pkgs/tools/security/nmap/default.nix:11:1

(cherry picked from commit 307bcb9a8e7a16bfc451e055a620b766df9d3f7d)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-04-10 10:39:35 +02:00
Cole Helbling
7fee49ef37 Don't retry on "unsupported protocol" error
When encountering an unsupported protocol, there's no need to retry.
Chances are, it won't suddenly be supported between retry attempts;
error instead. Otherwise, you see something like the following:

    $ nix-env -i -f git://git@github.com/foo/bar
    warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 335 ms
    warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 604 ms
    warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 1340 ms
    warning: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1); retrying in 2685 ms

With this change, you now see:

    $ nix-env -i -f git://git@github.com/foo/bar
    error: unable to download 'git://git@github.com/foo/bar': Unsupported protocol (1)

(cherry picked from commit c976cb0b8ab5d0f2c4ab8c9826fc7db56e2f1b3e)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-04-10 10:39:35 +02:00
Eelco Dolstra
e914cfb06f Downloader: Only write data to the sink on a 200 response
Hopefully fixes #3278.

(cherry picked from commit 1ab8d6ac1861e9405ae34af3deb681020c03e82d)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-04-10 10:39:35 +02:00
tiagofreire-pt
3a6d89aff2
Adding new supported devices (#325) 2020-04-10 09:23:37 +02:00
majuss
a6827caaf7
Removed PyCRC as dependency; implemented CRC16 directly (#327)
* Removed PyCRC as dependency; implemented CRC16 directly

* replace crc16 with integrated function

* Added self to calculate crc
2020-04-10 09:23:15 +02:00
Vincent Ambo
afc729c419 feat(tools/emacs): Install polymode & protobuf-mode
... how did I not have protobuf-mode installed? What?
2020-04-06 23:19:52 +01:00
csabavirag
2bc7b06c69
Adding support for LB1 (RGB Light Bulb - 0x60e8) (#332) 2020-04-05 19:14:47 +02:00
Felipe Martins Diel
26a4565e58
Add support for RM4 0x62bc (#331)
* Add support for RM4 0x62bc

* Fix device name
2020-04-05 19:14:09 +02:00
Vincent Ambo
e3864f3b85 feat(tools/emacs): Title the TVL window correctly 2020-04-04 22:27:06 +01:00
Vincent Ambo
e90e3153f8 chore(ops/nixos/camden): Enable HSTS headers on *.tazj.in 2020-04-04 21:49:03 +01:00
Vincent Ambo
f9063bc75d chore(third_party): Bump telega version 2020-04-04 21:34:05 +01:00
Vincent Ambo
e9aa5ae463 fix(tools/emacs): Include date in scrot screenshot names 2020-04-04 20:05:32 +01:00
Vincent Ambo
f43294cd90 chore(ops/nixos/camden): Use upstream tailscale module 2020-04-04 13:17:18 +01:00
Vincent Ambo
de81e087d4 chore(ops/nixos/nugget): Use upstream tailscale module 2020-04-04 13:16:39 +01:00
Vincent Ambo
0f3d11f541 chore(third_party): Remove Tailscale derivation
This is now part of nixpkgs itself.
2020-04-04 13:02:57 +01:00
Vincent Ambo
a0cb4703e8 chore(third_party/default): Bump NixOS channel to nixos-20.03 2020-04-04 13:01:42 +01:00
Vincent Ambo
24151f06dd chore(fun/tvl): Increase framerate to 60fps & limit queue size
The queue size setting will drop frames if the encoding starts to lag
behind, which should prevent delay from being introduced on the
serving side.

Maybe.
2020-04-04 02:54:49 +01:00
Vincent Ambo
9caf09a244 feat(ops/nixos/camden): Enable RTMP support in nginx
This makes it possible to live-stream various things at rtmp://tazj.in/tvl
2020-04-04 01:39:37 +00:00
Vincent Ambo
c3de37f54d fix(ops/nixos/nugget): Point camden host at new internal IP
This changed due to the router replacement.
2020-04-04 02:36:20 +01:00
Vincent Ambo
a89d22eb75 chore(ops/nixos/nugget): Install ffmpeg (including libnpp support) 2020-04-04 02:36:20 +01:00
Vincent Ambo
d2d7385833 feat(ops/nixos/nugget): Add module for v4l2loopback support
This kernel module creates a fake video input device to which I can
stream various things, such as screen grabs or qyliss' video stream
for TVL.
2020-04-04 02:36:20 +01:00
Vincent Ambo
0473307f87 feat(third_party/ffmpeg): Add "libnpp" support to ffmpeg
Builds ffmpeg with CUDA Toolkit as a dependency, which includes a
library called "libnpp" that provides something related to hardware
accelerated video stream resizing.

v0v
2020-04-04 02:36:20 +01:00
Vincent Ambo
bcfa11599d feat(fun/tvl): Implement hardware-accelerated stream rescaling
By randomly copy & pasting options that are impenetrable to mere
mortals from NVIDIA's developer blog and a bunch of gists scattered
throughout the internet, Andi and I managed to "get this to work".

The idea is that the x11grab stream should be resized into 720p (which
is the maximum supported by Google Meet), but with hardware
acceleration.
2020-04-04 02:36:20 +01:00
Vincent Ambo
f8703d12da feat(fun/tvl): Initial working ffmpeg -> nginx stream command 2020-04-04 02:36:20 +01:00
Vincent Ambo
9b606e2c4e feat(ops/nixos/nugget): Install clang & friends system-wide 2020-04-04 02:36:20 +01:00
Vincent Ambo
a7342448bb chore(third_party): Remove ormolu 2020-04-02 22:04:39 +01:00
Vincent Ambo
f99fc009fc fix(tools/emacs): Fix notmuch-show-open-or-close-subthread
Accidentally dropped a key parameter, also restored interactive
functionality via prefix arguments..
2020-04-02 21:59:18 +01:00
Vincent Ambo
40d13cc87f feat(tools/emacs): Bindings for (un)collapsing notmuch subthreads
Modifies notmuch-show-open-or-close-subthread to take a parameter
instead of using prefix to toggle the argument, and binds that
function to C-, and C-. in notmuch-show-mode-map to enable convenient
collapsing/uncollapsing of subthreads from point.
2020-04-02 01:35:16 +01:00
Vincent Ambo
5aaeaa406a feat(tools/emacs): Implement 'notmuch-show-open-or-close-subthread'
Does what it says on the tin.
2020-04-01 22:28:23 +01:00
Vincent Ambo
db74ffb4b1 fix(nix/buildGo): Remove absolute references to GOROOT from binaries
Setting the GOROOT_FINAL environment variables replaces the absolute
location of the Go standard library sources in the final build
artefacts with a fake location (in this case starting with
go/src/...).

This is despite the documentation for 'trimpath' (in 'go tool
compile') stating that it would affect all source paths: That's only
true for user code!

I figured this out by reading through the implementation of the other
'trimpath' (in 'gob build'):

https://go-review.googlesource.com/c/go/+/173345
2020-03-31 01:29:35 +01:00
Vincent Ambo
eab4f0e9c0 style(web/homepage): Shorten description for TWiV 2020-03-29 22:36:00 +01:00
Vincent Ambo
2776474686 feat(web/homepage): Link to TWiV 2020-03-29 22:34:10 +01:00
Vincent Ambo
049a13562c feat(tools/emacs): Install eglot & dependencies 2020-03-29 22:31:32 +01:00
Daniel Høyer Iversen
0bd58c6f59
0.13.0 2020-03-24 16:09:53 +01:00
Felipe Martins Diel
446496cc24
Obtain device name and cloud byte from HELLO_RESPONSE (#322) 2020-03-24 16:09:31 +01:00