<gchristensen>
is there a way to tell it not to print "RealName:\n " ?
<gchristensen>
best I can get to is: $ /usr/bin/dscl -plist . -read "/USers/nixbld3" RealName | plutil -extract dsAttrTypeStandard:RealName json -o - -
<gchristensen>
["Nix build user 3"]
<LnL>
not that I know of
<gchristensen>
ok well I can get "close enough"
<LnL>
there's also -raw or something but that also did something strange
<gchristensen>
if poly_user_note_get "$username" | grep -q "Nix build user $coreid" ]; then
<LnL>
I'd have to look at nix-darwin
philr has joined #nix-darwin
<gchristensen>
holy mother of mercy
<gchristensen>
~> Setting up the build user nixbld26
<gchristensen>
/Users/graham/nix-inst/oeu/nix-2.0pre0_0000000-x86_64-darwin/install-multi-user: line 456: [: : integer expression expected
<gchristensen>
if [ "$actual_uid" -ne "$uid" ]; then
<gchristensen>
on darwin, evidently, it is possible for a user to exist without a UniqueID
ryanartecona has quit [Quit: ryanartecona]
philr has quit [Ping timeout: 256 seconds]
<LnL>
huh
<dhess>
LnL: dumb question time. I've upgraded to Nix 2.0 on all of my systems, including my Macs. I am running nix-darwin and that is also using nix.package = nixUnstable. But when I nix-shell, things like nix-instantiate point to the default profile which is still nix-1.1x
<dhess>
and I can't figure out how to upgrade it
<dhess>
the only channel I have in my user account is nix-darwin. I use nixpkgs from a git checkout
<LnL>
darwin-option system.stateVersion
<dhess>
2
<LnL>
if you update you might want to bump that
<dhess>
bump it to what, 3?
<LnL>
yes, check the changelog
<dhess>
I have been treating that like the NixOS equivalent, which means I never touch it on threat of death :)
<LnL>
what about this: darwin-option nix.version
<dhess>
error: attribute 'version' missing, at (string):1:77
<dhess>
is there a way to see the changelog from the command line? The only time I see it is when I darwin-rebuild
<LnL>
oh, then you're not on the latest version
<dhess>
it's been a week or two
<LnL>
since when did it break?
<dhess>
As far as I know the default profile has been using nix 1.1x since I installed it
<dhess>
I only noticed when I started using the 2.0 builtins.fetchTarball stuff to pin dependencies
<LnL>
yes, but not if you set nix.package
<dhess>
and then when I would nix-shell, nix-instantiate complained that it didn't sexist
<dhess>
I do have nix.package set to nixUnstable
<dhess>
so that is what I see in my own environment. And "nix" works in a nix-shell. But nix-instantiate is 1.1x in a nix-shell
<LnL>
yeah, then it shouldn't use the default profile
<dhess>
ok so I think I have identified the issue. In my nix-shell, /run/current-system/sw/bin comes after /nix/var/nix/profiles/default
<dhess>
but in my normal shell, it comes *before* /nix/var/nix/profiles/default
<LnL>
yeah, question is why
<dhess>
what is in your ~/.nix-profile/etc/profile.d directory?
<dhess>
Mine has just command-not-found.sh
<dhess>
but my .bashrc (written long ago, before the new Nix installer for macOS) looks for ~/.nix-profile/etc/profile.d/nix.sh, which no longer exists
<dhess>
has that moved somewhere?
<LnL>
you should find those in the default profile
<dhess>
hmm ok
jtojnar has joined #nix-darwin
<LnL>
with multi-user nix is no longer installed in the user profile
<LnL>
but unless those are sourced explicitly somewhere they are not used
<dhess>
it was being sourced in my .bashrc
<dhess>
ok I'm pointing to the default profile for that now
<LnL>
aha
<dhess>
but it didn't fix this issue
<LnL>
that won't get skipped in nix-shell
<LnL>
unlike the darwin parts
<gchristensen>
LnL: can you help with a dscl question?
<dhess>
what is your NIX_PROFILES env variable? Mine is NIX_PROFILES=/nix/var/nix/profiles/default /run/current-system/sw /Users/dhess/.nix-profile
ryanartecona has joined #nix-darwin
<LnL>
gchristensen: eating, ping me in a bit
<dhess>
LnL: I'm pretty sure it's nix-daemon.sh that's putting /nix/var/nix/profiles/default ahead of /run/current-system/sw in my nix-shell.
<gchristensen>
I think my new installer is ready to go!
<gchristensen>
my favorite part about `vagrant up` a macos VM is how it absolutely crushes my IO
<dhess>
LnL: so any thoughts on this nix-daemon.sh ? Does it look like yours? Pretty sure this is where the injection of the default profile in front of /run/current-system/sw/bin in PATH is coming from. https://gist.github.com/dhess/373d6d4ca0284376be3b8501f7931120
<LnL>
removing the nix-daemon.sh lines from your bashrc should fix the problem
<dhess>
from the /etc/bashrc you mean?
<LnL>
yes
<dhess>
ok. So that was inserted by the Nix installer and is not needed by nix-darwin, if it's managing the nix-daemon?
<dhess>
sweet, that did the trick. Thanks!
<dhess>
I assume this is going to come up for lots of people who installed nix with the Nix installer and then installed nix-darwin after, once they've upgraded to Nix 2.0.
<gchristensen>
I thoughtnix-darwin handled it automatically
<LnL>
it's not needed in any case, both single and multi user installs work with the bashrc from nix-darwin
<dhess>
I never edited that file myself. This was just the result of running the multi-user Nix installer for macOS and then installing nix-darwin
<dhess>
and answering "yes" to the question of whether nix-darwin should manage the daemon.
<LnL>
yeah, the installer doesn't remove it explicitly
<dhess>
to be clear, nix-shell has always worked fine until I upgraded to Nix 2.0. nix-shell still worked after that, *but* the nix-* tools in the nix-shell were using the 1.1x version that was originally installed by the Nix installer, not the 2.0 versions, because of this path issue.
<LnL>
if you upgraded the default profile to 2.0 you wouldn't notice it :)
<dhess>
yes! But I did not know how to do that since (as I think people have advised with Nix on macOS) I did not have a root channel
<LnL>
yeah, I should probably add a warning
<dhess>
LnL: does the nix-daemon use the default profile? Or does it have its own?
<LnL>
it uses nix.package
<dhess>
ok cool
<dhess>
thanks for the help!
<dhess>
this has been driving me nuts
<gchristensen>
LnL: do you have ideas on ways to make the Nix installer nicer for darwin users?
<LnL>
provide some way to manage the system nix version and daemon
<gchristensen>
:$
<LnL>
also a lot of people don't like the fact that they need sudo to update the channel
<gchristensen>
that is very nasty
<gchristensen>
maybe having Linux users be multi-user will push this problem to the forefront of more people's heads, and will get us a nice solution?
<gchristensen>
well, that part didn't seem to work
<gchristensen>
I added the darwin channel manually then reran the installer and it worked nicely
<LnL>
there's nothing in there on my machines
ryanartecona has quit [Quit: ryanartecona]
<gchristensen>
hrm
<gchristensen>
I don't know, it is hard to look more right now, I have family visiting
<gchristensen>
I can dive in more tomorrow, _maybe_ tonight
yastero has quit [Ping timeout: 246 seconds]
<gchristensen>
LnL: I don't want to put more work on your plate, but it'd be really helpful to have a set of acceptance criteria for the installer to flesh out what should and shouldn't work out of the box
<LnL>
hmm, can you give an example?
<gchristensen>
like the thing about adding a channel as a user should let it work for nix-env and nix-build
<gchristensen>
my testing on each of those distros was super manual and a set of commands I ran and looked for normal behavior, but isn't written down anywhere, and it'd be neat to be able to write them down so future changes to the installer can be validated easier
<gchristensen>
and validated more consistently
yastero has joined #nix-darwin
pxc has joined #nix-darwin
<LnL>
oh, you're not talking about my nix-darwin installer
pxc has quit [Ping timeout: 256 seconds]
pxc has joined #nix-darwin
ryanartecona has joined #nix-darwin
<johnw>
shlevy: yeah, there are things I rely on that are marked broken :(
<johnw>
guess I have to wait for the libseccomp fix
<LnL>
doesn't that mean they are not broken?
<johnw>
hah
<johnw>
i guess not for me
<johnw>
dunno why they're marked that way
<johnw>
dovecot-pigeonhole is the one I can't do without
<LnL>
probably platforms = platforms.linux;
<johnw>
yep!
<johnw>
i'll fix that
<LnL>
:D
<johnw>
I wonder why git-status in my nixpkgs directory is SO SLOW
<johnw>
Magit takes over a full minute just to create a commit
<johnw>
ok, about 5 packages just needed linux -> unix, pushed that change to master
pxc has quit [Ping timeout: 248 seconds]
<LnL>
weird, try a git prune
<johnw>
a git peach is tastier
<johnw>
the problem is that I'm pulling the PR refspace
<johnw>
to make it easier to try out PRs
<johnw>
but there are just SO MANY
<johnw>
it leads to having 1+ million git objects
<LnL>
oh yeah I did that once but removed it pretty quickly afterwards
<johnw>
yeah, I'll proabbly ahve to also
<johnw>
there are 36,995 refs related to PRs
<LnL>
I just do a git fetch origin refs/pull/$pr/head:pr-$pr manually
pxc has joined #nix-darwin
ryanartecona has quit [Quit: ryanartecona]
pxc has quit [Ping timeout: 264 seconds]
ryanartecona has joined #nix-darwin
<johnw>
hey, there's an idea
ryanartecona has quit [Quit: ryanartecona]
jtojnar has quit [Remote host closed the connection]