~ben

~dandel-rovbur

https://www.bsima.me

I’m a student of philosophy, biology, and mathematics.

Recent activity

[PATCH v3] wemux: init at 2021-04-16 2 hours ago

From Ben Sima to ~andir/nixpkgs-dev

The usual wemux.conf location is /usr/local/etc, but that directory doesn't
exist, so we patch the script to look in /etc.
---
I forgot I had manually created /usr/local/etc, but we can't assume the user
will know to do that. qyliss on #nixos said to put it in /etc.

Other comments were addressed.

 pkgs/tools/misc/wemux/default.nix | 36 +++++++++++++++++++++++++++++++
 pkgs/top-level/all-packages.nix   |  2 ++
 2 files changed, 38 insertions(+)
 create mode 100644 pkgs/tools/misc/wemux/default.nix

diff --git a/pkgs/tools/misc/wemux/default.nix b/pkgs/tools/misc/wemux/default.nix
[message trimmed]

[PATCH v2] wemux: init at 2021-04-16 a day ago

From Ben Sima to ~andir/nixpkgs-dev

---
Addressed comments and added the man page.

 pkgs/tools/misc/wemux/default.nix | 31 +++++++++++++++++++++++++++++++
 pkgs/top-level/all-packages.nix   |  2 ++
 2 files changed, 33 insertions(+)
 create mode 100644 pkgs/tools/misc/wemux/default.nix

diff --git a/pkgs/tools/misc/wemux/default.nix b/pkgs/tools/misc/wemux/default.nix
new file mode 100644
index 00000000000..0baf41940cb
--- /dev/null
+++ b/pkgs/tools/misc/wemux/default.nix
@@ -0,0 +1,31 @@
[message trimmed]

[PATCH] wemux: init at 2021-04-16 2 days ago

From Ben Sima to ~andir/nixpkgs-dev

---
This is a really cool shell script that allows for multi-user tmux, for pair
programming and such. It's not very fancy (install is just cp), but I'm adding
it for discoverability ('nix search' is awesome). It has a manpage but I'm not
sure how to generate that, should I use scdoc?

 pkgs/tools/misc/wemux/default.nix | 24 ++++++++++++++++++++++++
 pkgs/top-level/all-packages.nix   |  2 ++
 2 files changed, 26 insertions(+)
 create mode 100644 pkgs/tools/misc/wemux/default.nix

diff --git a/pkgs/tools/misc/wemux/default.nix b/pkgs/tools/misc/wemux/default.nix
new file mode 100644
index 00000000000..8efe361e88e
[message trimmed]

[PATCH v3] nixos/gmnisrv: init 2 days ago

From Ben Sima to ~andir/nixpkgs-dev

---
I think I addressed all comments in previous threads. This does not include the
change to lib.formats, but works around the limitation with a private cfgFormat
function. Given that the lib.formats patch is changing a somewhat corelib in
nixpkgs, I figure it will take a while to review and merge, so this patch is
available as an alternative in the meantime.

 nixos/modules/module-list.nix                 |  1 +
 .../modules/services/web-servers/gmnisrv.nix  | 70 +++++++++++++++++++
 2 files changed, 71 insertions(+)
 create mode 100644 nixos/modules/services/web-servers/gmnisrv.nix

diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 41cbb501323..54cda99c85f 100644
[message trimmed]

Re: [PATCH v2 1/2] nixos/gmnisrv: init 2 days ago

From Ben Sima to ~andir/nixpkgs-dev

sternenseemann <sternenseemann@systemli.org> writes:

> On 4/9/21 5:50 PM, Ben Sima wrote:
>> +      ":tls" = {
>> +        "store" = lib.mkDefault "${cfg.dataDir}/certs";
>
> Is this a value that always needs to be set? Does it require user
> intervention to generate the certs?
>
> Overall it'd be preferrable to have
>
>   default = {
>     ":tls" = {
>

Re: [PATCH v2 2/2] generators: support toplevel keys in toINI 5 days ago

From Ben Sima to ~andir/nixpkgs-dev

William Casarin <jb55@jb55.com> writes:

> are we blocked on this? is there another way to get the gmnisrv module into
> nixpkgs in the meantimne?

We could just copy the relevant generator functions into the module as
local let bindings. I'll try to get a v3 patch for this together soon
this week so we at least have it as an option.

[PATCH v2 2/2] generators: support toplevel keys in toINI 9 days ago

From Ben Sima to ~andir/nixpkgs-dev

This was ported from sternenseemann's code:

https://github.com/openlab-aux/vuizvui/blob/1576e1025d570851449f6668e0bda2b1b9b21e06/modules/programs/foot/default.nix#L15-L48
---
 lib/generators.nix        | 12 ++++++++++--
 lib/tests/misc.nix        | 14 ++++++++++++++
 pkgs/pkgs-lib/formats.nix |  2 +-
 3 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/lib/generators.nix b/lib/generators.nix
index c8144db50ac..63d188b0f01 100644
--- a/lib/generators.nix
+++ b/lib/generators.nix
@@ -92,10 +92,13 @@ rec {
[message trimmed]

[PATCH v2 1/2] nixos/gmnisrv: init 9 days ago

From Ben Sima to ~andir/nixpkgs-dev

---
 nixos/modules/module-list.nix                 |  1 +
 .../modules/services/web-servers/gmnisrv.nix  | 57 +++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 nixos/modules/services/web-servers/gmnisrv.nix

diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 509bccb1ec7..75de48e557c 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -944,6 +944,7 @@
  ./services/web-servers/caddy.nix
  ./services/web-servers/darkhttpd.nix
  ./services/web-servers/fcgiwrap.nix
[message trimmed]

Re: [PATCH] nixos/gmnisrv: init 10 days ago

From Ben Sima to ~andir/nixpkgs-dev

sternenseemann <sternenseemann@systemli.org> writes:

> On 4/7/21 8:55 PM, Ben Sima wrote:
>> +  # this 'writeText' is necessary because lib.generate.toINI does not support
>> +  # top-level, anonymous key-value pairs, but gmnisrv needs the anonymous
>> +  # "listen" key to know where to bind
>> +  cfgFile = pkgs.writeText "gmnisrv.ini" (''
>> +    listen = ${cfg.listen}
>> +  '' + builtins.readFile (cfgFormat.generate "gmnisrv.ini.partial" cfg.config));
>
> This won't work for nixpkgs, as import from derivation is prohibited
> there.

Okay, alternatively I could do like:

[PATCH] nixos/gmnisrv: init 11 days ago

From Ben Sima to ~andir/nixpkgs-dev

This is currently powering gemini://bsima.me, and renders with amfora and gmni.
The workaround to support anonymous key-vals in the ini file are a bit weird,
but I don't think it's too cryptic. Let me know if there is a better solution.

---
 nixos/modules/module-list.nix                 |  1 +
 .../modules/services/web-servers/gmnisrv.nix  | 56 +++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 nixos/modules/services/web-servers/gmnisrv.nix

diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 6f172720558..61df95a2d6f 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
[message trimmed]