!9IQChSjwSHXPPWTa:lix.systems

Lix

1099 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms292 Servers

Load older messages


SenderMessageTime
30 Nov 2025
@jlamur:matrix.orgJules Lamurwhat do you mean by allowing unshare? user namespaces are allowed by default in podman rootless containers so unshare should work out of the box21:48:43
@raitobezarius:matrix.orgraitobezariusI was pretty sure the default seccomp policy forbids the unshare syscall21:49:08
@jlamur:matrix.orgJules Lamur(that does not solve my problem though because of the procfs mask)21:49:13
@raitobezarius:matrix.orgraitobezariusSo maybe the question is: if you try to allow the mount syscall for procfs, does it work?21:49:35
@raitobezarius:matrix.orgraitobezariusWithout any cap or proc unmasking21:49:41
@jlamur:matrix.orgJules Lamur

If I try to run with only the unmask, then I get that:

$ podman run --security-opt unmask=/proc/* --rm -it foo unshare -r nix-build
error: changing ownership of path '/nix/store': Invalid argument
21:52:54
@jlamur:matrix.orgJules Lamur mhh I think that's because /nix/store is root:nogroup in the new user ns 21:55:10
@raitobezarius:matrix.orgraitobezariusThat's very weird to have EINVAL on chown? Do you have a clean mount namespace?21:55:12
@raitobezarius:matrix.orgraitobezarius
In reply to @jlamur:matrix.org
mhh I think that's because /nix/store is root:nogroup in the new user ns
So subuid delegation
21:55:24
@weethet:catgirl.cloudWeetHetWYM?21:56:57
@raitobezarius:matrix.orgraitobezarius
In reply to @weethet:catgirl.cloud
WYM?
The surface of API calls used for nix-doc is extremely low and trivial
21:57:48
@raitobezarius:matrix.orgraitobezariusIt's absolutely not representative of general purpose FFI for CLI alas21:58:05
@weethet:catgirl.cloudWeetHetAutocxx doesn't support exceptions 😞21:59:46
@weethet:catgirl.cloudWeetHet* Autocxx doesn't support exceptions 21:59:53
@weethet:catgirl.cloudWeetHetBut there's a PR: https://github.com/google/autocxx/pull/142622:00:05
@raitobezarius:matrix.orgraitobezariusSeems too old :p22:31:42
@raitobezarius:matrix.orgraitobezariusEven if C++ exceptions were tackled, not sure how to interpp C++ coroutines and Rust async coroutine transformations22:32:39
@anouk:kif.rocks@anouk:kif.rocks left the room.23:28:51
@niko:nrab.lolniko ⚡️ and this is even more unexpected: nix-building a file like this { __functor = self: <derivation>; }, which obviously isn't "valid" nix code (technically valid, but for the sake of brevity let's just say it's invalid), actually builds the derivation... what? Surely this is not expected, that's not how functors work 23:51:11
@niko:nrab.lolniko ⚡️

Some more cursed observations. Given file:

# foo.nix
{
  foo = "hi from outside";
  __functor = _: {
    foo = "hi from inside";
  };
}

We can observe:

$ nix-instantiate --eval foo.nix
{ __functor = <CODE>; foo = "hi from outside"; }
$ nix-instantiate --eval foo.nix -A foo
"hi from inside"
23:57:39
1 Dec 2025
@niko:nrab.lolniko ⚡️

I guess this is kinda expected given how nix-build works, but still. I don't like this. And better yet:

# foo.nix
{
  __functor = _: {
    foo = "hi from inside";
  };
}
# bar.nix
{
  __functor = _: {}: {
    foo = "hi from inside";
  };
}
# baz.nix
{
  __functor = _: _: {
    foo = "hi from inside";
  };
}
$ nix-instantiate --eval foo.nix -A foo
"hi from inside"
$ nix-instantiate --eval bar.nix -A foo
"hi from inside"
$ nix-instantiate --eval baz.nix -A foo
error: the value being indexed in the selection path 'foo' at '' should be a set but is a function: «lambda __functor @ baz.nix:2:18»
00:02:11
@raitobezarius:matrix.orgraitobezarius
In reply to @niko:nrab.lol
and this is even more unexpected: nix-building a file like this { __functor = self: <derivation>; }, which obviously isn't "valid" nix code (technically valid, but for the sake of brevity let's just say it's invalid), actually builds the derivation... what? Surely this is not expected, that's not how functors work
Auto call semantics mindfucking again?
00:21:20
@raitobezarius:matrix.orgraitobezarius(yes all my homies hate *deep* auto calls.)00:21:36
@niko:nrab.lolniko ⚡️ Like, how does that even work in the first place? __functor has to always at least be a function which returns a function? At least in normal nix code, then how the hell does nix-instantiate apply that 00:23:12
@raitobezarius:matrix.orgraitobezariusWhere does it say that functors has to return a function?00:46:48
@raitobezarius:matrix.orgraitobezariusIIRC, functors have definitely been abused to make attrsets callables returning new non functional results00:47:12
@niko:nrab.lolniko ⚡️ Well, trying to call { __functor = x: 1; } will always error in normal nix code with integer is not a function 00:51:39
@niko:nrab.lolniko ⚡️ So while not strictly invalid nix code, since you can still do { __functor = x: 1; }.__functor {} and get a valid result, it's not a valid functor per se 00:52:54
@georgyo:nycr.chat@georgyo:nycr.chat left the room.02:57:38
@weethet:catgirl.cloudWeetHet For CLI I think a blocking API should be enough? On that note, it could also be noexcept as well I guess 06:29:31

Show newer messages


Back to Room ListRoom Version: 10