peacememories has joined #nix-darwin
clever has joined #nix-darwin
peacememories has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hamishmack has joined #nix-darwin
jtojnar has quit [Read error: Connection reset by peer]
jtojnar has joined #nix-darwin
abathur has joined #nix-darwin
hamishmack has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
abathur has quit [Quit: abathur]
hamishmack has joined #nix-darwin
carlosdagos has quit [Quit: Connection closed for inactivity]
philr has joined #nix-darwin
periklis has joined #nix-darwin
<dhess> LnL: around?
<LnL> hey, what's up?
<dhess> LnL: so I had a Mac running nix-darwin from sometime around September 2018. I just booted it back up, did nix-channel --update, darwin-rebuild switch. All that went fine
<dhess> Then at some point I ran darwin-rebuild switch again, and now I'm getting this:
<dhess> error: evaluation aborted with the following error message: ‘
<dhess> This version of Nixpkgs requires Nix >= 2.0, please upgrade:
<dhess> etc etc
<dhess> I was running nix 1.11 when I did the darwin-rebuild switch. I've since upgraded to nix 2.2 but I'm getting the same error
<LnL> yeah, nixpkgs requires 2.0 now
<dhess> nix-daemon is running 2.2 something
<dhess> yeah I'm running nix 2.2 now, still having this problem
<LnL> oh hold on
<dhess> seems like the system profile is pointing to a nix 1.11 profile or something? I'm confused about where it's coming from
<LnL> hmm nevermind, upgrading should work unless you're running into a specific problem like this https://github.com/LnL7/nix-darwin/issues/76
<{^_^}> nix-darwin#76 (by corps, 36 weeks ago, closed): Can't upgrade nix.package to nix20
<LnL> is nix.package configured? by default the default profile is used instead
<dhess> it was configured for nixUnstable. I removed that
<dhess> I probably shouldn't have :\
<dhess> I removed that then ran darwin-rebuild switch. But I think that nix was nix 1.11 at the time
<dhess> and now it seems like it's stuck
<dhess> any way to roll back darwin-rebuild?
<dhess> maybe hacking a symlink in /nix/var/nix/profiles? I could put it back to the old profile, then re-do the upgrade with nix.package = nixUnstable this time
<dhess> oh there is a --rollback
<dhess> let me try that
<dhess> ok I was able to roll back , set nix.package = pkgs.nixUnstable, darwin-rebuild switch
<dhess> now I'm up and running again. Thanks nix and nix-darwin!
<LnL> :D
<dhess> just one thing: when I remove nix.package = pkgs.nixUnstable, then darwin-rebuild switch breaks again
<dhess> small flood:
<dhess> $ darwin-rebuild switch
<dhess> /nix/store/144njwnj2jkrlm694ldxik58qa8qam0x-darwin-system-19.03pre-git/activate-user: line 101: nix-instantiate: command not found
<dhess> building the system configuration...
<dhess> error: Changed <darwin-config> but target does not exist, aborting activation
<dhess> Create /Users/dhess/.nixpkgs/darwin-configuration.nix or set environment.darwinConfig:
<dhess>
<dhess> environment.darwinConfig = "***";
<dhess>
<dhess> And rebuild using (only required once)
<dhess> $ darwin-rebuild switch -I "darwin-config=***"
<dhess>
<dhess> any idea why that is happening?
<LnL> hmm, what's the version of pkgs.nix?
<dhess> well, from my shell it's 2.2
<dhess> nix-daemon is running nix-2.2pre6600_85488a93
<dhess> I've never really understood how to upgrade the system nix/nix-daemon in nix-darwin.
<LnL> what about darwin-option nix.version
<dhess> "2.2pre6600_85488a93"
<dhess> I didn't now about darwin-option, cool
<LnL> and if you don't set nix.package?
<dhess> if I don't set nix.package in darwin-configuration.nix, then I get that error above as soon as I try to darwin-rebuild switch
<dhess> the "nix-instantiate: command not found" error
<LnL> you can run darwin-option before switching to inspect the resulting values
<LnL> it reports the values from configuration.nix not what's currently activated
<dhess> oh interesting
<dhess> well I just set it to pkgs.nixStable and now I'm running 2.2
<dhess> including the nix-daemon
<dhess> so that worked. I think I'm all set. Thanks!
<LnL> nixStable? what version of nixpkgs is this
<dhess> now I hope I don't run into this 2.2 issue :)
<dhess> it's the nixpkgs-unstable channel
<LnL> sounds like 17.09
<dhess> $ nix-channel --list
<dhess>
<dhess> this is a remote builder. I should probably be running one of the stable darwin channels
<LnL> oh nevermind, I was thinking of nix2
<dhess> ok now that I fixed all that, let's upgrade to Mojave :D
<LnL> that will introduce the fork issue
<dhess> h
<dhess> oh
<dhess> ok then I won't do that
<LnL> so I'd not do that or configure the workaround first
<LnL> otherwise you have to mess with starting the daemon yourself to recover
<dhess> I'll just leave it for now
<dhess> I think High Sierra has all the latest critical security fixes, no?
<LnL> yeah, even the meltdown/spectre fixes where eventually backported to Sierra (or whatever the previous release was at the time)
philr has quit [Ping timeout: 245 seconds]
periklis has quit [Remote host closed the connection]
periklis has joined #nix-darwin
<nikivi> I installed python with nix
<nikivi> and now I dont have pip
<nikivi> searching for pip in https://nixos.org/nixos/packages.html#pip returns no install of it
<nikivi> what do I do?
<nikivi> I thought pip comes bundled with python
<nikivi> i just need to install this tool via pip https://pypi.org/project/Reindent/0.1.1/
<nikivi> but its not yet on nixpkgs
matthewbauer has joined #nix-darwin
<nikivi> nvm got resolved on #nixos
<nikivi> this package doesn't compile on macOS?
jacereda has joined #nix-darwin
<LnL> nikivi: pythonPackages.pip but you probably want to use virtualenv instead
<matthewbauer> We should be using the impure SecurityTool for haskell... not sure why it is pulling that in
periklis has quit [Ping timeout: 264 seconds]
jacereda has quit [Ping timeout: 246 seconds]
<johnw> so, sandboxing isn't going to work at all on Darwin, right?
<johnw> /nix/store/n70vmq3kgmbjk7nj0vaa1q7ny1p25k2p-Libsystem-osx-10.11.6/lib/libSystem.B.dylib refers to files in /usr/lib/system
philr has joined #nix-darwin
<LnL> that's fine, but everything that uses frameworks at runtime will probably fail
<johnw> that's what is happening to me
<johnw> the Haskell compiler loads certain .dylib's during compilation
<johnw> what I really need is for a test to be able to bind port 4200 without conflicting with anyone else who has that same port bound
<johnw> on Linux sandboxing takes care of this
<LnL> ah, localhost binding is a special case
<LnL> we don't have network namespaces so it's something that has to be explicitly allowed
jacereda has joined #nix-darwin
jacereda has quit [Ping timeout: 245 seconds]
mbauer has joined #nix-darwin
<LnL> jeeze, "Security settings do not allow this Mac to use an external startup disk."
<johnw> ah
mjbauer has joined #nix-darwin
matthewbauer has quit [Ping timeout: 250 seconds]
mbauer has quit [Ping timeout: 245 seconds]
<LnL> wat, now it needs internet?
mjbauer has quit [Client Quit]
mjbauer has joined #nix-darwin
mjbauer has quit [Ping timeout: 240 seconds]
jacereda has joined #nix-darwin
<johnw> darwin, le sigh
jacereda has quit [Ping timeout: 245 seconds]
<dhess> LnL: arond?
<dhess> around
jacereda has joined #nix-darwin
<LnL> hi
<dhess> LnL: hi. Is there a way to add modules to nix-darwin without needing to fork?
<dhess> like there is with NixOS?
<LnL> ofcorse, the module system is the same
<dhess> oh really?
<dhess> I didn't know that
<dhess> so just add it to imports then?
<LnL> your configuration.nix is actually also a module so you're already doing that technically speaking
<LnL> yep
<dhess> oh cool
<dhess> you did a nice job with this
<dhess> assuming I get this ready for general use and I want to add it to nix-darwin, generally speaking, how are tests run? I assume they're run on the live system?
<LnL> only the installer, the tests in the repo are just nix unittest that do some sanity checking
<dhess> oh I see, so no services are activated, for example?
<LnL> yeah, to do proper testing you'd need a fully automated macos vm setup
<dhess> right
<LnL> but the tests can catch a bunch of stuff, like making sure the module evaluates properly
<dhess> thanks
<LnL> hmm, what's foo doing there
<LnL> that kind of looks like something I'd do to make sure the test actually fails
matthewbauer[m] has joined #nix-darwin