<puffnfresh> I've passed that but a verbose build is saying "cannot find machines file '/etc/nix/machines'"
<puffnfresh> "got 0 remote builders"
<LnL> I think nix also honours SSH_OPTS but that would require a reload of the daemon
<LnL> hmm, maybe that needs to exist for the build hook get triggered?
<LnL> I've only used it on machines that already have distributed builds configured
<LnL> as for the manual, the release notes are kind of up to date https://hydra.nixos.org/build/69335529/download/1/manual/#ssec-relnotes-2.0
<LnL> be sure to look at the commits mentioned they usually contain a decent amount of context
<puffnfresh> thanks
<puffnfresh> I can't get --builder to parse any machines
<puffnfresh> always says "got 0 remote builders"
<LnL> oh!
<LnL> on master?
<puffnfresh> yes
<LnL> yeah dhess found a bug
<LnL> --builders 'ssh://user@host x86_64-linux ~/.ssh/id_rsa 4'
<puffnfresh> that doesn't work neither :(
<LnL> hrm
<puffnfresh> oh wait that does!
<puffnfresh> yay thanks LnL , I must have done something different
<puffnfresh> oh no I had --builders --builders 'ssh://something' :(
<puffnfresh> so Nix just did something different
<LnL> there's also ssh-ng, that almost works for build-remote with https://github.com/NixOS/nix/pull/1713
<LnL> that uses the remote store implementation so you get decent logging from it
<puffnfresh> I'm going to have to put some printlns into Nix :(
<puffnfresh> it'd be good if Nix abstracted away the ssh part
<puffnfresh> e.g. "give me a pipe"
<puffnfresh> pretty sure that's 90% of what it comes down to in the end, right?
<puffnfresh> ohhhhh the problem is the daemon doesn't know about the --builder
<puffnfresh> the setting comes from the daemon
<puffnfresh> LnL: looks like Nix 2.0 can't talk to Nix 1.11 remotes, is that true?
philr has joined #nix-darwin
philr has quit [Quit: WeeChat 2.0.1]
<prooftechnique> If I'm getting "file system sandbox blocked stat" for dylibs, is this related to the fixDarwinDylibs thing, or am I hitting something else? Seems to mainly be blowing up on CoreFoundation, which seems to be a bit of sore spot, though I'm not picking up much context from the issue threads I've been finding
jrolfs has quit [Ping timeout: 268 seconds]
philr has joined #nix-darwin
johnw has quit [Quit: ZNC - http://znc.in]
jrolfs has joined #nix-darwin
johnw has joined #nix-darwin
<LnL> did you enable sandboxing?
<LnL> puffnfresh: yeah, you’ll also need a 2.0 daemon
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
<puffnfresh> LnL: yeah bugger, this is being problematic
<puffnfresh> I wrote a script:// plugin
<puffnfresh> can specify a script to run for "remote" builds
<puffnfresh> can actually implement the SSH store using it
jrolfs has quit [Ping timeout: 256 seconds]
jrolfs has joined #nix-darwin
zzamboni has joined #nix-darwin
philr has quit [Ping timeout: 264 seconds]
dredozubov has quit [Ping timeout: 260 seconds]
dredozubov has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
sphalerite has left #nix-darwin ["User left"]
philr has joined #nix-darwin
cransom has quit [Quit: WeeChat 1.7]
<nikivi> What would be alternative to this command on mac?
<LnL> none of that is platform specific, but nix-install isn't a thing
philr has quit [Ping timeout: 248 seconds]
cransom has joined #nix-darwin
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
cransom has quit [Quit: WeeChat 2.0]
cransom has joined #nix-darwin
jrolfs has quit [Ping timeout: 268 seconds]
nnkd has joined #nix-darwin
<nnkd> hi all, does anyone have a short explanation of what the build users are for in a multi-user nix installation?
jrolfs has joined #nix-darwin
<LnL> nix will use those users when building a package locally
<LnL> in order to allow multiple potential untrusted users to build software nix needs an unprivileged user to run clang or whatever
<nnkd> is that so said untrusted users cannot put some arbitrary object they claim is the build output into the nix store?
<LnL> yes, one of the reasons
<LnL> on a single user install the build will run as your current user
<LnL> this is the same user that has write access to the store
<LnL> and ofcorse your home directory
jrolfs has quit [Ping timeout: 264 seconds]
<dhess> LnL: question for you. I have this overlay that adds some useful new types to lib.types: https://github.com/quixoftic/nixpkgs-lib-quixoftic/blob/master/overlays/lib/types.nix
<nnkd> neat, also out of curiosity why does it create a build user per core rather than a single build user?
<LnL> so even without sandboxing the build users can't just read your secrets from ~/.config etc.
<dhess> however the module system's "lib" argument doesn't see them, I think because it directly imports them from that "closed" closure in Nixpkgs
<dhess> I think I can override that with specialArgs, but I'm not exactly sure how to specify that when importing modules
<dhess> any ideas?
<LnL> the daemon will us a user per build, that has some advantages in terms of cleanup
<dhess> that's where the module system seems to import lib directly from the Nixpkgs tree rather than using pkgs
<nnkd> I see, cool thanks for the help!
<LnL> and again security, running everything as the same user would make it possible for something malicious the change another build that's running
<LnL> on linux there's some stuff that could be done by dynamically creating user namespaces, but there's not really an equivalent on darwin AFAIK
<LnL> dhess: yeah there's a difference between lib and pkgs.lib
<nnkd> I saw an issue saying cgroups could be used to track + cleanup a build's processes, but not really possible to do this without a separate user on darwin
<LnL> the first on is the vanilla nixpkgs used to evaluate the modules
<LnL> the second is the nixpkgs imported by the module system itself including overlays, etc.
<LnL> using pkgs.lib for the modules (eg. mkOption) would result in infinite recursion since nixpkgs.overlays is an option :)
<dhess> LnL: ok, maybe there's not much value in putting the new types in the overlay in that case. Regardless, I will need to override the lib passed to the module system. I think specialArgs is the way to do that, I'm just not clear on where I would do that
<dhess> LnL: yes and that is precisely what happens when I try to "with pkgs.lib" in a module :)
<dhess> I can hack it by referring to pkgs.lib.types.myNewType in the modules, but that's gross
<LnL> yeah, that's the correct way to use them
<dhess> with pkgs.lib.types... you mean? or by overriding specialArgs?
<LnL> no pkgs.lib.foo
<dhess> oh ok
<dhess> I think I ran into a problem with that as well. Let me see
<LnL> I think you can also put them in a module argument
<dhess> yeah I could do that. Right now I'm just passing in pkgs
<LnL> { config = _module.args.foo = ...; }
<LnL> then you can use { config, lib, foo, ... }: ... in modules
<dhess> huh that's a weird syntax
<LnL> but you can't extend lib.types somehow
<LnL> err with correct syntax that is :p
<dhess> LnL: I'm pretty sure you can with specialArgs. I do that in my tests for these new types. https://github.com/quixoftic/nixpkgs-lib-quixoftic/blob/70550d42ce8ab7c7cac577d7e011cb5dedf29322/tests/types/src/modules/default.nix#L12
<LnL> { config = { _module.args.foo = ...; }; }
<dhess> But I don't want to make users of these modules have to do that when they want to import them
<LnL> well yes, outside of the module system you can
<dhess> right
<dhess> I could provide a custom import function I guess
<dhess> anyway just referring to them with pkgs.lib.newType is fine
<dhess> eventually I will try to upstream them anyawy
<dhess> thanks for the help
<dhess> cool that is working
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Read error: Connection reset by peer]
zzamboni1 has joined #nix-darwin
zzamboni1 has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 240 seconds]
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
philr has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
jrolfs has joined #nix-darwin
nnkd has quit [Quit: Connection closed for inactivity]
jrolfs has quit [Ping timeout: 264 seconds]
jrolfs has joined #nix-darwin
bas_ has joined #nix-darwin
bas_ has left #nix-darwin [#nix-darwin]
jrolfs has quit [Ping timeout: 260 seconds]
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 248 seconds]
philr has quit [Quit: WeeChat 2.0.1]