pxc1 has joined #nix-darwin
pxc1 has quit [Ping timeout: 252 seconds]
Sonarpulse has quit [Ping timeout: 245 seconds]
contrapumpkin has joined #nix-darwin
pxc1 has joined #nix-darwin
pxc1 has quit [Ping timeout: 245 seconds]
pxc1 has joined #nix-darwin
pxc1 has quit [Ping timeout: 256 seconds]
pxc1 has joined #nix-darwin
pxc1 has quit [Ping timeout: 245 seconds]
philr has joined #nix-darwin
pxc has joined #nix-darwin
pxc1 has joined #nix-darwin
pxc1 has quit [Ping timeout: 260 seconds]
pxc has quit [Ping timeout: 245 seconds]
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
periklis has joined #nix-darwin
hamishmack has joined #nix-darwin
pxc1 has joined #nix-darwin
pxc1 has quit [Ping timeout: 245 seconds]
periklis has quit [Ping timeout: 252 seconds]
pxc1 has joined #nix-darwin
pxc1 has quit [Ping timeout: 260 seconds]
__Sander__ has joined #nix-darwin
philr has quit [Quit: WeeChat 2.1]
jtojnar has joined #nix-darwin
pxc1 has joined #nix-darwin
pxc1 has quit [Ping timeout: 256 seconds]
__Sander___ has joined #nix-darwin
__Sander__ has quit [Ping timeout: 245 seconds]
__Sander___ has quit [Client Quit]
__Sander___ has joined #nix-darwin
__Sander___ has quit [Client Quit]
__Sander__ has joined #nix-darwin
pxc1 has joined #nix-darwin
pxc1 has quit [Ping timeout: 252 seconds]
periklis has joined #nix-darwin
nD5Xjz has quit [Ping timeout: 276 seconds]
nD5Xjz has joined #nix-darwin
periklis has quit [Ping timeout: 260 seconds]
alexteve_ has joined #nix-darwin
alexteves has quit [Read error: Connection reset by peer]
alexteve_ has quit [Ping timeout: 245 seconds]
alexteves has joined #nix-darwin
__Sander__ has quit [Quit: Konversation terminated!]
<nikivi> Anyone here installed Git with Nix?
<nikivi> I get a really annoying error when I try to `git push` to GitHub from another app
<nikivi> SSL: can't load CA certificate file /bin/curl-ca-bundle.crt
<nikivi> But I don't have curl-ca-bundle.crt inside /bin/
<nikivi> The reason I think the issue is with Nix is because when I had git installed with brew, it worked
<nikivi> So not sure, perhaps I have to pass some environment variable to make it work now?
cransom has left #nix-darwin ["WeeChat 2.0"]
<nikivi> I have this env variable set: NIX_SSL_CERT_FILE=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
<nikivi> So I tried to symlink it with: `sudo ln -s /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /bin/curl-ca-bundle.crt`
<nikivi> But I can't do that apparently
pxc has joined #nix-darwin
disasm has quit [Quit: WeeChat 2.0]
pxc has quit [Ping timeout: 245 seconds]
<LnL> wut /bin/cur-cabundle.crt?
<LnL> why in the world is it looking there
<nikivi> I have no ia
<nikivi> idea*
<nikivi> Apparently curl is looking for certificate there
<nikivi> Since Git offloads this to curl
<mitchty> are you running nix git? aka what does type git point to
<nikivi> mitchty which git -> /Users/nikivi/.nix-profile/bin/git
<nikivi> which curl -> /usr/bin/curl
<nikivi> I installed curl from Nix though now but it still uses /usr/bin/curl
<mitchty> run rehash
<LnL> what about nix-shell --pure -p cacert -p git --run 'git ls-remote ...'
<nikivi> mitchty how do I run rehash?
<LnL> well yes, with a https git url :)
<mitchty> type rehash in your terminal
<mitchty> i presume you're using zsh with that behavior
<nikivi> mitchty I am using zsh yes
<nikivi> which zsh -> /Users/nikivi/.nix-profile/bin/zsh
<mitchty> so the reason curl is still /usr/bin/curl, thats where it was originally, if you installed curl in nix just run rehash and it should pick it up there now
<nikivi> The thing is that I can run `git push` with no problems inside iTerm. But I issue `git push` inside Hazel app, this error occurs
<mitchty> what git is that using
<nikivi> mitchty not really sure and nowhere I can check it
<nikivi> only thing I know though is that it worked when I used homebrew
<nikivi> It might be because I also use 2FA on GitHub but I checked without it too and error happens still
<mitchty> is hazel this? https://www.noodlesoft.com
<nikivi> mitchty It is
<nikivi> The full log of error in Hazel
<nikivi> The issue is with that certificate
<mitchty> out of curiosity, try closing hazel and running open -a hazel from within a working terminal session
<nikivi> mitchty Hazel is not a typical macOS application. It sits inside System Preferences
<nikivi> `open -a Hazel` fails
<mitchty> well then i'm out of easy ideas, thats a hack way to validate if the issue is simply environment related, which I presume it is
<mitchty> i'll admit i've never tried to run anything in nix from any gui environment except emacs, but that has an easy fix
<nikivi> The bundle is located here: /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
<nikivi> But I can't move it nor make a symlink to it
<nikivi> I wanted to symlink /bin/ca-bundle.crt to it
<mitchty> sip would prevent that
<nikivi> Can I generate this ca-bundle.crt somehow
<nikivi> found this but I am wary of using it
<nikivi> I ran `which git/curl` inside Hazel to debug and got these
<nikivi> /usr/bin/git & /usr/bin/curl
<nikivi> so maybe thats the issue
<nikivi> I am not actually sure why I installed Git with Nix tbh
<nikivi> and `which nix` in Hazel returns nix not found
<nikivi> I don't know why or how I can make Hazel see /nix
disasm has joined #nix-darwin
<mitchty> might try what the installer adds https://gist.github.com/mitchty/ad83e473db6f6f45424d97d96514a71c
<nikivi> I ran that script inside Hazel and `which nix` after it
<nikivi> now there is no SSL error but this error: fatal: unable to access 'https://github.com/learn-anything/reddit.git/': Couldn't connect to server
<nikivi> I have internet connection
<mitchty> seemingly USER isn't setup by hazel
<mitchty> try export USER=yourusername
<nikivi> Still `fatal: unable to access 'https://github.com/learn-anything/reddit.git/': Couldn't connect to server`
<nikivi> The script I run
<mitchty> can hit that same uri via curl ok?
<nikivi> no you can't
<mitchty> also that export should come before the source
<nikivi> the .git should go away to curl it
<mitchty> that nix-daemon.sh script uses USER
<mitchty> example export NIX_USER_PROFILE_DIR="/nix/var/nix/profiles/per-user/$USER"
<mitchty> those errors you saw relate to no USER env variable
<nikivi> okay nix errors went away
<mitchty> actually, just run set in hazel
<nikivi> but curl still can't reach URL
<nikivi> or well Git can't
<nikivi> run set in Hazel?
<mitchty> yep
<nikivi> what set
<mitchty> set
<nikivi> before nix thing?
<nikivi> or doesn't matter
<mitchty> no just alone
<mitchty> that way you can diff the environment
<mitchty> aka run set with nothing to say /tmp/hazelenv
<mitchty> then after sourcing the nix-daemon.sh
<mitchty> and also compare that to set in a normal terminal
<nikivi> are there any sensetive stuff?
<nikivi> I can post the output here
<nikivi> how do you diff two outputs?
<mitchty> only if you store passwords or other silly things that shouldn't be in the environment
<mitchty> pipe them to a file and diff the files
<mitchty> it kinda sounds like hazel does sandboxing and sets up a minimal environment
<nikivi> thats a huge diff
<nikivi> thats the diff
<nikivi> It has GitHub TOKEN in there but thats not working
<nikivi> I have no idea how it got there and where I can unset it, looked everwhere :|
<nikivi> same about HOMEBREW_GITHUB_API_TOKEN
<nikivi> never set it, still there
<nikivi> So something is blocking curl to reaching the URL
<nikivi> Is running the nix if check expensive?
<mitchty> its a stat() on the filename
<nikivi> Just thinking in hopes we do solve it and I would have to put it in front of all my shell scripts
<nikivi> inside Hazel that s
<nikivi> oh then its fine
<nikivi> I am not sure what can block curl from reaching the URL
<mitchty> run curl -v url
<nikivi> Host is down
<nikivi> fml
<mitchty> do you use little snitch?
<nikivi> I think I know the issue for curl
<nikivi> yeah
<mitchty> double check its not interfering
<nikivi> I love you mitchty
<nikivi> That solved it
<nikivi> So I'll just change all my shell scripts of Hazel to do the nix thing
<nikivi> Thank you very much for the help
<nikivi> I automate tons of stuff with Hazel:D
<mitchty> np, glad it worked
<mitchty> i just use shell scripts and cron, i'm lazy
<nikivi> It's strange though still that /usr/bin/git tried to search for that certificate
<nikivi> but nix git doesn't
<nikivi> or well maybe it searches for certificate inside /nix and finds it
<mitchty> likely an env variable that caused it to look there
<nikivi> I really want a clean system I fully understand
<nikivi> Is there any way to get nice man pages on macOS
<nikivi> for example `man set` gives nothing of value
<nikivi> I want an actual man page for set
<nikivi> same for many other utils
<nikivi> I read that Linux and BSD have those
<mitchty> man set sends me to the builtin(1) manpage
<nikivi> me too but that's useless
<nikivi> it doesn't say what set does there
<mitchty> well its a shell builtin, type set
<mitchty> in a nutshell though, typing set shows you your current environment
<nikivi> I thought env did that
<nikivi> or env only listed env variables
<mitchty> difference being /usr/bin/env is a totally different beast
<mitchty> no need to exec() anything to get your environment, also it doesn't show everything
<mitchty> anyway getting offish topic for the channel and i need lunch, good luck nikivi
<nikivi> have you guys read the original thesis on Nix? a/bib/2006/dolstra-thesis.pdf
Sonarpulse has joined #nix-darwin
pxc has joined #nix-darwin
<gchristensen> I'm getting "Undefined symbols for architecture x86_64 "_CFURLResourceIsReachable"" any ideas? I've put CoreFoundation and CoreServices in to the buildInputs of the nix-shell, this is from running `cargo install cargo-watch` http://ix.io/1b5d
<LnL> probably because of the CF from 10.10
pxc1 has joined #nix-darwin
<LnL> try preConfigure = '' export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE" '';
<gchristensen> hmm
<gchristensen> is Foundation different from CoreFoundation?
<LnL> yes
<LnL> but CF is part of the stdenv so in some cases you need to shuffle the -F flags around like that
pxc has quit [Ping timeout: 245 seconds]
pxc has joined #nix-darwin
Sonarpulse has quit [Ping timeout: 260 seconds]
<gchristensen> hmm no luck LnL. this error is coming from within clang-wrapper after compiling some rust sttuff
<gchristensen> ooo
<LnL> uh, I didn't fix the frameworks reference :/
<gchristensen> http://ix.io/1b5z this is what I have, `nix-shell` reproduces
philr has joined #nix-darwin
<LnL> maybe ldflags?
Sonarpulse has joined #nix-darwin
jtojnar has quit [Remote host closed the connection]
philr has quit [Ping timeout: 245 seconds]
jtojnar has joined #nix-darwin
pxc has quit [Quit: WeeChat 2.1]
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jtojnar has quit [Read error: Connection reset by peer]
jtojnar_ has joined #nix-darwin
jtojnar_ is now known as jtojnar
jtojnar_ has joined #nix-darwin
jtojnar has quit [Quit: jtojnar]
jtojnar_ is now known as jtojnar
hamishmack has joined #nix-darwin
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nix-darwin
pxc1 has quit [Ping timeout: 240 seconds]