<johnw> LnL: how do I use nix-shell to load some darwin.pkgs.foo?
<LnL> you mean like this? nix-shell '<darwin>' -A pkgs.hello
<johnw> yeah
<johnw> what about https://github.com/NixOS/nix/issues/459, should that be closed then?
<johnw> if I have a buildEnv, how do I enter a nix-shell so that the *dependencies* of that build env are in scope?
<LnL> well -p behaves differently
<johnw> yeah, I need -p
<LnL> either you use something like nix-shell -I nixpkgs=/path/to/nixpkgs -p foo
<johnw> yeah, gross
<johnw> I'll just go back to myEnvFun for now
<johnw> nix-shell -I nixpkgs=$HOME/src/nix/darwin -p pkgs.ghc82Env does not work
<LnL> ah right, it expects <nixpkgs> to be an actual nixpkgs repo :)
<johnw> well, myEnvFun works really well, so I'd prefer if it just received some love, rather than being given all these messy and incomplete workarounds
<LnL> I tried to implement the functionality using nix-shell a while back
<LnL> it worked but nix would gc stuff even tho I had a reference to a drv
Sonarpulse has joined #nix-darwin
<johnw> nix still gc's all of my tarballs
<johnw> even though I have every option on to keep as much as possible
<johnw> the only real solution is just to not gc
<dhess> johnw: pong
<johnw> dhess: I just posted on github, never mind ehre
<dhess> johnw: do those overlapping attrs evaluate to the same derivation or will they conflict?
<johnw> actually, I think the overlap was a problem in my build recipe
<johnw> that somehow myEnvFun never runs into
munch has joined #nix-darwin
pxc has joined #nix-darwin
the has joined #nix-darwin
pjan_ has joined #nix-darwin
pxc has quit [Ping timeout: 256 seconds]
the has quit [Ping timeout: 276 seconds]
pjan_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pjan_ has joined #nix-darwin
pxc has joined #nix-darwin
pxc has quit [Ping timeout: 256 seconds]
angerman has joined #nix-darwin
pjan_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
glenn_ has quit [Remote host closed the connection]
glenn_ has joined #nix-darwin
glenn_ has quit [Ping timeout: 256 seconds]
glenn_ has joined #nix-darwin
zzamboni has joined #nix-darwin
glenn_ has quit [Ping timeout: 255 seconds]
glenn_ has joined #nix-darwin
pjan_ has joined #nix-darwin
pjan_ has quit [Quit: Textual IRC Client: www.textualapp.com]
glenn_ has quit [Ping timeout: 255 seconds]
glenn_ has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
glenn_ has quit [Ping timeout: 276 seconds]
glenn_ has joined #nix-darwin
zzamboni has joined #nix-darwin
glenn_ has quit [Ping timeout: 255 seconds]
glenn_ has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
<angerman> anyone who could lend me a hand with nix-docker?
<angerman> I keep hitting: error: a ‘x86_64-linux’ is required to build ‘/nix/store/ql6frh48fw1l7clqlpva9yxzn5ji8nwi-hello-2.10.drv’, but I am a ‘x86_64-darwin’
<LnL> that usually happens when rebuild-remote isn't working
<angerman> LnL: how would I debug that?
<LnL> it's a bit finicky since there are a lot of variables that influence what you need to do
<LnL> what's the output of nix-info?
zzamboni has joined #nix-darwin
glenn_ has quit [Ping timeout: 255 seconds]
zzamboni has quit [Client Quit]
glenn_ has joined #nix-darwin
<angerman> LnL: sorry had to help a tiny human shower.
<angerman> LnL: so I've basically done the following: `curl https://nixos.org/nix/install | sh`, `bash <(curl https://raw.githubusercontent.com/LnL7/nix-darwin/master/bootstrap.sh)` and then installed `nix-docker` (I can ssh into nix-docker as $user and root).
<LnL> ok so you have nix-darwin? what about darwin-option services.nix-daemon.enable
<angerman> however
<LnL> yeah I noticed that with nix-info
<angerman> there are two *nix* launchDaemons
<LnL> yeah that looks fine
<LnL> by default I don't manage the nix-daemon service, in case something was already configured there, etc.
<angerman> https://gist.github.com/fb1eb94a77b47a549163317663e0761d that's what my `~/.nixpkgs/darwin-configuration.nix` looks like.
<angerman> dhess said I'd need the distributedBuilds and buildMachines part.
<LnL> but that means nix.distributedBuilds won't configure the daemon
<angerman> I noticed that that generates the `/etc/nix/machines` file, which looks almost identical to the `nix-docker/ssh/remote-systems.conf` file
<angerman> LnL: so that should not be in there?
<LnL> this is what a daemon plist should look like for distributed builds
<angerman> `remote-system.conf` has `nix-docker x86_64-linux /etc/nix/docker_rsa 4`, `/etc/nix/machines` has `root@nix-docker x86_64-linux /etc/nix/docker_rsa 8 1 big-parallel`
<LnL> notice the EnvironmentVariables part
<LnL> so either do that yourself or enable the services.nix-daemon.enable option in your config
<angerman> LnL: ok let me check.
<angerman> LnL: btw, maybe this is related "This will link the system profile to /run/current-system. You have to create /run or symlink it to private/var/run. If you use a symlink, you'll probably also want to add services.activate-system.enable = true; to your configuration." (from the nix-darwin README). So if /run is a symlink, I need to set services.active-system.enable = true; I supposes?
<LnL> yeah, but it's enabled by default
<angerman> hmm I don't have those env variables in my daemon config.
<angerman> ahh ok.
<nikivi> I have a question about Nix philosophy
<nikivi> `you use a Nix file (e.g. /etc/nixos/configuration.nix), and the Nix tools convert it to the proper config files`
<nikivi> How does this work in practice?
<angerman> LnL: hmm ok. so I've got that all now, but it's still claiming there is no `x86_64-linux` :-/
<nikivi> For example I have many .zsh files with aliases and functions for example
<nikivi> Do I have to write them inside nix config file instead?
<LnL> angerman: ok, the daemon will initiate ssh connections did you configure ~/.ssh/config and known_hosts for root?
<angerman> LnL:
<angerman> yes
<gchristensen> you don't _have_ to in many cases, no
<LnL> does ssh foo -- nix-store --version work as root?
<LnL> ok that's good then
<LnL> the daemon restarted when you enabled the option right?
<angerman> LnL: That's what the output said. I can try restarting it by hand once more.
zzamboni has joined #nix-darwin
<LnL> oh!
<LnL> this is in my notes:
<LnL> WARNING: don't use nix-build --check to verify if this is working correctly, it always builds locally.
<angerman> m(
<LnL> try something like nix-build -E 'with import <nixpkgs> {}; runCommand "foo" {} "uname -a"'
glenn_ has quit [Ping timeout: 276 seconds]
zzamboni has quit [Client Quit]
<LnL> err with system = "x86_64-linux"; ofcorse
<angerman> looks like I can't get that to work :-/
<gchristensen> LnL: where would the system = ... bit go?
<LnL> nix-build -E 'with import <nixpkgs> { system = "x86_64-linux"; }; runCommand "foo" {} "uname -a"'
<LnL> yeah!
<LnL> that looks good
<angerman> so...
<angerman> LnL: I'll likely send you a few more README patches, once I have this all down.
<LnL> please do :D
<LnL> that's an evaluation error
<LnL> I think it's trying to builds stuff for x86_64-darwin
<LnL> try nixops set-args --argstr system x86_64-linux
glenn_ has joined #nix-darwin
<angerman> that didn't make any change :/
<LnL> hmm, I thought that was supposed to work
zzamboni has joined #nix-darwin
<angerman> the assert that's firing is basically `32 assert stdenv.isLinux;`.
zzamboni has quit [Client Quit]
<angerman> maybe I just need to hard code the system into the nix expression.
<LnL> yeah, I'm not sure how to configure it then
<LnL> this is maybe a better way to test the builds
<LnL> nix-build -E 'with import <nixpkgs> { system = "x86_64-linux"; }; hello.overrideAttrs (drv: { rebuild = builtins.currentTime; })'
<angerman> yea!
<LnL> I spent like half a day confused before I realised --check is useless to test it
glenn_ has quit [Ping timeout: 255 seconds]
glenn_ has joined #nix-darwin
glenn_ has quit [Ping timeout: 255 seconds]
glenn_ has joined #nix-darwin
glenn_ has quit [Ping timeout: 256 seconds]
glenn_ has joined #nix-darwin
glenn_ has quit [Ping timeout: 276 seconds]
glenn_ has joined #nix-darwin
glenn_ has quit [Ping timeout: 276 seconds]
glenn_ has joined #nix-darwin
zzamboni has joined #nix-darwin
glenn_ has quit [Ping timeout: 276 seconds]
glenn_ has joined #nix-darwin
glenn_ has quit [Ping timeout: 255 seconds]
glenn_ has joined #nix-darwin
glenn_ has quit [Ping timeout: 256 seconds]
glenn_ has joined #nix-darwin
yastero has quit [Quit: EliteBNC - http://elitebnc.org (Auto-Removal: idle account/not being used)]
glenn_ has quit [Ping timeout: 276 seconds]
glenn_ has joined #nix-darwin
glenn_ has quit [Ping timeout: 276 seconds]
zzamboni has quit [Quit: Leaving.]
glenn_ has joined #nix-darwin
glenn_ has quit [Remote host closed the connection]
glenn_ has joined #nix-darwin
johnw has quit [Read error: Connection reset by peer]
johnw has joined #nix-darwin
glenn_ has quit [Remote host closed the connection]
glenn_ has joined #nix-darwin
glenn_ has quit [Ping timeout: 276 seconds]
clever has quit [Ping timeout: 255 seconds]
clever has joined #nix-darwin
clever has joined #nix-darwin
glenn_ has joined #nix-darwin
glenn_ has quit [Remote host closed the connection]
hamishmack has quit [Quit: hamishmack]
{^_^} has quit [Remote host closed the connection]
{^_^} has joined #nix-darwin
hamishmack has joined #nix-darwin
<pikajude> LnL: i don't think i have any nixbld users
<LnL> you won't with a single user install
<pikajude> okay
<pikajude> how do i kill nix-daemon jobs then
<LnL> hmm, you're using the daemon?
<pikajude> yes
<LnL> how did you enable it, darwin-rebuild is supposed to bail out if you try that
<pikajude> i used darwin-rebuild switch
<pikajude> okay so there's no way to kill nix-daemon jobs
<pikajude> got it
<LnL> you can unload the service
<pikajude> well killing nix-daemon doesn't stop the build jobs themselves
<pikajude> i actually don't remember why i enabled nix-daemon in the first place
<pikajude> and it provides no value to me whatsoever
<pikajude> so i'll just disable it
<LnL> huh, builds can't run without a build user
<LnL> what does this say? dscl . -read /Groups/nixbld GroupMembership
<LnL> I added that check 6 months ago so I'm assuming it's wrong somehow
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]