johnw has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs has quit [Ping timeout: 268 seconds]
jrolfs__ has quit [Ping timeout: 268 seconds]
pjan_ has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 240 seconds]
jrolfs has quit [Ping timeout: 260 seconds]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs has quit [Ping timeout: 260 seconds]
jrolfs__ has quit [Ping timeout: 260 seconds]
johnw has quit [Quit: ZNC - http://znc.in]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 268 seconds]
jrolfs has quit [Ping timeout: 260 seconds]
johnw has joined #nix-darwin
<johnw> what's the 1.12 nix build equivalent of nix-env -u --leq?
<johnw> i'd like to have the sexy new output when rebuilding a zillion outputs
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
<johnw> or, if darwin-rebuild switch could do it
<LnL> there's no new cli for nix-env yet, but *-rebuild doesn't use nix-env to build stuff so it could
jrolfs has quit [Ping timeout: 260 seconds]
jrolfs__ has quit [Ping timeout: 252 seconds]
Sonarpulse has quit [Ping timeout: 248 seconds]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
pjan_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrolfs__ has quit [Ping timeout: 240 seconds]
jrolfs has quit [Ping timeout: 260 seconds]
pxc has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 268 seconds]
jrolfs has quit [Ping timeout: 268 seconds]
johnw_ has joined #nix-darwin
philipcristiano_ has joined #nix-darwin
savanni_ has joined #nix-darwin
mightyby1e has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
smj has joined #nix-darwin
shlevy_ has joined #nix-darwin
johnw has quit [*.net *.split]
clever has quit [*.net *.split]
mightybyte has quit [*.net *.split]
shlevy has quit [*.net *.split]
savanni has quit [*.net *.split]
philipcristiano has quit [*.net *.split]
sjourdois has quit [*.net *.split]
philipcristiano_ is now known as philipcristiano
savanni_ is now known as savanni
jrolfs__ has quit [Ping timeout: 260 seconds]
clever has joined #nix-darwin
clever has quit [Changing host]
clever has joined #nix-darwin
jrolfs has quit [Ping timeout: 248 seconds]
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 248 seconds]
jrolfs has quit [Ping timeout: 255 seconds]
pxc has quit [Ping timeout: 255 seconds]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
{^_^} has quit [Excess Flood]
{^_^} has joined #nix-darwin
{^_^} has quit [Excess Flood]
{^_^} has joined #nix-darwin
{^_^} has joined #nix-darwin
jrolfs has quit [Ping timeout: 264 seconds]
jrolfs__ has quit [Ping timeout: 265 seconds]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 265 seconds]
jrolfs has quit [Ping timeout: 260 seconds]
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 265 seconds]
<johnw_> in 1.12, is there no more equivalent to -Q?
<johnw_> I'm not really interesting in what's happening, just the overview
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 240 seconds]
jrolfs__ has quit [Ping timeout: 264 seconds]
<johnw_> LnL: the change to get darwin-rebuild to use "nix build" was a 2-liner, if you're interested
johnw_ is now known as johnw
johnw has quit [Changing host]
johnw has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
the-kenny has quit [Ping timeout: 248 seconds]
the-kenny has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 240 seconds]
jrolfs has quit [Ping timeout: 248 seconds]
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 248 seconds]
jrolfs has quit [Ping timeout: 240 seconds]
jrolfs__ has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 240 seconds]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 248 seconds]
jrolfs has quit [Ping timeout: 256 seconds]
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 260 seconds]
jrolfs has quit [Ping timeout: 248 seconds]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 268 seconds]
jrolfs has quit [Ping timeout: 268 seconds]
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
pjan_ has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 265 seconds]
jrolfs has quit [Ping timeout: 256 seconds]
pjan_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
<LnL> as long as it’s configurable
jrolfs__ has quit [Ping timeout: 260 seconds]
jrolfs has quit [Ping timeout: 268 seconds]
jtojnar has joined #nix-darwin
<jtojnar> why would a derivation find webkit when it is not in buildInputs?
<jtojnar> could it leak from the user environment somehow?
<LnL> that's definitively possible, it's not uncommon for builds to find stuff installed with homebrew etc.
<jtojnar> also is there a community darwin box?
<LnL> no, ofborg is the closest thing. but I'm happy to create a jobset on my hydra if that helps
hamishmack has joined #nix-darwin
<LnL> gchristensen: did you enable sandboxing on your builder?
<jtojnar> It would be nice to have something less back-and-forth
zzamboni has joined #nix-darwin
<jtojnar> do you have a log for /nix/store/3absac5kfz7aa82zw1bjiznqh29h5wvf-libproxy-0.4.15.drv?
<jtojnar> I want to check if it lists webkit in MODULES TO BUILD
<jtojnar> aargh, it still fails on ofborg
<LnL> that looks like a missing framework
<LnL> darwin.apple_sdk.frameworks.JavaScriptCore
<jtojnar> well the webkit module should not be built in the first place
<hamishmack> Would it cause a problem if we did use JaavaSciptCore framework?
zzamboni has quit [Ping timeout: 265 seconds]
<jtojnar> is it possible that Darwin has WebKit (JavaScriptCore) built-in causing the find_library to detect it?
<jtojnar> that would explain why libproxy does not allow to disable building the webkit module on Darwin
<jtojnar> that actually makes sense since Safari needs it
<jtojnar> in that case adding JavaScriptCore should indeed work hamishmack
<jtojnar> though I would still like to hear from someone actually familiar with the platform instead of just me guessing
<hamishmack> Yes macOS comes with WebKit and JavaScriptCore
<hamishmack> But I am a little worried that macports does not seem to use it in libproxy
<hamishmack> It might cause problems if there webkitgtk tries to load two JavaScriptCore versions into the same process
<jtojnar> hamishmack: maybe we could use some upstreamable patch like https://paste.gnome.org/pz2hn0d8k
<hamishmack> Yeah that seems much nicer
hamishmack has quit [Quit: hamishmack]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
<gchristensen> LnL: no, if I do that today can you help?
<LnL> sure, later today
pjan_ has joined #nix-darwin
jrolfs has quit [Ping timeout: 248 seconds]
jrolfs__ has quit [Ping timeout: 265 seconds]
peacememories has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
bobbypriambodo has joined #nix-darwin
bobbypriambodo has left #nix-darwin [#nix-darwin]
<gchristensen> expert macos people, is there a way I can do something like PXE-boot my mac from a known state so I can let people SSH to it and also easily reset its state?
<gchristensen> without suffering through long reinstalls every so often
pjan_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrolfs__ has quit [Ping timeout: 246 seconds]
jrolfs has quit [Ping timeout: 260 seconds]
jtojnar has quit [Ping timeout: 256 seconds]
{^_^} has quit [Remote host closed the connection]
{^_^} has joined #nix-darwin
{^_^} has quit [Changing host]
{^_^} has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jtojnar has joined #nix-darwin
<LnL> there's some netboot stuff, but I've never used that https://support.apple.com/en-us/HT202770
<gchristensen> WOW! cool!
{^_^} has quit [Remote host closed the connection]
{^_^} has joined #nix-darwin
{^_^} has quit [Remote host closed the connection]
{^_^} has joined #nix-darwin
{^_^} has joined #nix-darwin
jrolfs has quit [Ping timeout: 248 seconds]
jrolfs__ has quit [Ping timeout: 248 seconds]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs has quit [Ping timeout: 240 seconds]
jrolfs__ has quit [Ping timeout: 264 seconds]
pxc has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
pxc has quit [Ping timeout: 265 seconds]
jrolfs__ has quit [Ping timeout: 240 seconds]
jrolfs has quit [Ping timeout: 252 seconds]
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
jrolfs__ has quit [Ping timeout: 240 seconds]
jrolfs has quit [Ping timeout: 264 seconds]
pxc has joined #nix-darwin
nikivi has joined #nix-darwin
nikivi has left #nix-darwin ["Textual IRC Client: www.textualapp.com"]
nikivi has joined #nix-darwin
<nikivi> Hey all :)
<nikivi> Is there a guide anywhere I can use on how to get started with nix on macOS?
<nikivi> Ideally how to work with both homebrew and nix at the same time if possible
<gchristensen> it'll work side by side just fine
<nikivi> So I just install nix normally and try use it
<nikivi> And over `brew install` do `nix install`
<gchristensen> yep!
<nikivi> Or the nix equivalent
<gchristensen> sort o
<gchristensen> yep!
<nikivi> Where does it store things I am curious
<gchristensen> /nix/store :)
<nikivi> Will it already be in my PATH?
<gchristensen> no, it will modify /etc/profile and a few others to put it in your PATH. it is easy to undo, if you choose to uninstall Nix
<nikivi> Sweet
<nikivi> I will try it :)
<gchristensen> great!
<nikivi> Really excited about it as the talks on nix were fascinating
<nikivi> The nix command seems super powerful
<nikivi> One thing where homebrew focuses on is UX
<gchristensen> Nix's UX is ... less good ...
<nikivi> Is it because its newer and less people maintain it?
<gchristensen> I'm not sure :)
<gchristensen> but it is something we have a hard time with
<LnL> git’s ux is also terrible, but the technology is great, I thin nix is kind of similar in that regard :)
<gchristensen> hmm yeah :)
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
<LnL> I'm around now, if you want to look at sandboxing
<gchristensen> oh, sure!
<LnL> so
<LnL> 1. switch to nixUnstable (including the daemon)
<LnL> 2. enable sandboxing
<LnL> 3. ???
<LnL> :D
<gchristensen> ok, and just build from master?
<LnL> yeah, you can run nix-build '<nixpkgs>' -A hello --check or something
<gchristensen> I mean build nix from darwin :)
<LnL> let me check what revision it's at now
<gchristensen> oops
<gchristensen> /nix/store/chl6llrafsyfqyf7q199b6smc4fv9abk-nix-unstable-1.12pre5810_5d5b931f
<LnL> yeah 17.09 and master are both recent enough
<gchristensen> ok
peacememories has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<LnL> oh and runCommand "test" {} "ls /Users" is an easy way to check if it's working
<gchristensen> ndndx:~ root# nix --version
<gchristensen> nix (Nix) 1.12pre5810_5d5b931f
<gchristensen> cool
<gchristensen> ls: cannot access '/Users': Operation not permitted
<gchristensen> :)
<LnL> great!
<gchristensen> thanks!
<LnL> oh one more thing
<LnL> make sure you don't have "pre-build-hook =" in your nix.conf
<gchristensen> ok
<LnL> that was needed for hydra at some point
<nikivi> I just ran `curl https://nixos.org/nix/install | sh`on my mac
<nikivi> It finished the install but `which nix` returns nothing
<nikivi> nor does `which nix-shell`
<LnL> did you start a new shell afterwards?
<nikivi> Or actually there is nix-shell but no nix
<LnL> oh, the 'nix' command only exists on 1.12
<nikivi> What are some steps you can reccomend to do to get more in touch with nix
<nikivi> How do I install a package for example
<nikivi> Also I am on 10.11.6
<nikivi> Because some software I need doesn't run on Sierra :(
<nikivi> I hope nix works well on this version
<LnL> that's fine
<LnL> you don't want "pre-build-hook ="
<gchristensen> oh ok
<LnL> we need to pre hook to find system dependencies :)
<LnL> looks great otherwise
<gchristensen> updated
<nikivi> I don't see a nix folder in ~/
<nikivi> Is this normal?
<LnL> it's ~/.nix-profile and nix-env is the command that you can use to install/uninstall packages there
<gchristensen> thanks, LnL! are there plans to backport changes to 17.09 as well?
<LnL> for example: nix-env -iA nixpkgs.hello
<gchristensen> the sb that is
<LnL> I don't thing there have been any major changes that would make it hard to backport
<nikivi> Or I guess it will be created after
<LnL> but I should really fix the resolving first so it works on hydra
jrolfs__ has quit [Ping timeout: 246 seconds]
<gchristensen> if 17.09 is built without the sandboxing stuff backported, what will happen?
jrolfs has quit [Ping timeout: 248 seconds]
<LnL> some kind of error about things that are only allowed in 'relaxed' sandboxing mode
<gchristensen> ah
<gchristensen> back later :)
<gchristensen> thank you a lot!
<nikivi> I read that you can conigure nix with nix language
<nikivi> Where do I do that
<nikivi> Reading through --help of nix-shell now
<LnL> the nix pills are a good introduction https://nixos.org/nixos/nix-pills/index.html
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 240 seconds]
jtojnar has quit [Read error: Connection reset by peer]
joshuaks has joined #nix-darwin
<joshuaks> Hi all, I'm working on pill 8.3
<joshuaks> I get this error 'line 8: tar: No such file or directory', however the tar definitely exists. I can echo the src variable just fine the line above the tar cmd.
<joshuaks> What would cause this?
jrolfs__ has joined #nix-darwin
<johnw> I've gotten myself into a bizarre place where 'ssh hermes echo \$PATH' prints an absurdly small value; it appears to be ignoring ~/.bashrc
<johnw> I have no idea which change caused this over the past few days
jrolfs has joined #nix-darwin
hamishmack has joined #nix-darwin
<johnw> LnL: how do I get the nix builder to prefer my local machine when using distributed builds? It seems to always want to use my other machines first
<johnw> even for building a single quick derivation like the darwin config itself
<LnL> hmm, maybe I'm missing a preferLocalBuild somewhere then
<johnw> can you expose that as a variable?
<johnw> I'd want it off on my main machine, but on on my laptop
zarel has joined #nix-darwin
<johnw> also, it would be cool if darwin-option could return only the value with -s or -q
<LnL> it's a drv attribute, it tells nix that it's probably not worth doing a remote build
<johnw> what does it mean "it's a drv attribute"?
<LnL> things like buildEnv have that by default
<johnw> oh
<johnw> so would I set this is my packageOverrides or something?
<LnL> I mean that it's on a per derivation basis
<johnw> do you have any thoughts as to why ssh isn't sourcing ~/.bashrc anymore?
<LnL> other then that I don't know of a way to build locally except for --builders ''
<johnw> ssh hermes echo \$PATH -> /usr/bin:/bin:/usr/sbin:/sbin
<LnL> hmm, not really
<LnL> do you have something like ssh or bash from nix?
<johnw> hmm
<johnw> something else is wrong I think
<johnw> ssh hermes '. ~/.bashrc; echo $PATH' -> /usr/bin:/bin:/usr/sbin:/sbin
<johnw> oh
<johnw> haha
<johnw> home-manager starts out .bashrc like this:
<johnw> # Skip if not running interactively.
<johnw> [ -z "$PS1" ] && return
<LnL> isn't .profile for interactive stuff
<johnw> yes
<johnw> there's no reason for this check
<LnL> do you know what drv is building remotely that probably shouldn't?
<johnw> darwin-rebuild
<LnL> oh, indeed
<LnL> but that only changes with a mass-rebuild right?
<johnw> it changes any time I've modified anything in darwin-configuration.nix
<johnw> even if nothing else needs to rebuild
zzamboni has joined #nix-darwin
<LnL> toplevel hash preferLocalBuild and so do most of the stuff from nixpkgs like writeText
<johnw> i'm not sure I fully understand what you meant by that sentence
jrolfs__ has quit [Ping timeout: 265 seconds]
jrolfs has quit [Ping timeout: 240 seconds]
<LnL> just don't get why it's not building locally then
<johnw> me either
<LnL> or rather what part is
<johnw> is there a way to add the local machine to nix.buildMachines, so it's first in the list of "remote" builders?
<johnw> I tried adding hostName = "/nix/store";, but it had weird sandboxing issues
<johnw> oh, and how would I set distributedBuilds = true only on a particular machine?
<johnw> is there a nix variable that contains my hostname?
<LnL> heh, nested sandboxes?
<johnw> yeah
<LnL> that's to prevent setuid
<johnw> i just would like more control over which builder is chosen and when
<johnw> *ideally*, it should use the iMac if the load average is low, but use the laptop when the load average is high
<johnw> because when the iMac is largely idle, I prefer to build here
<LnL> that's not possible AFAIK
<johnw> yeah, but really no reason it couldn't be possible
<johnw> somewhere there's a builder selection algorithm
<johnw> can I learn the current hostname in Nix?
<LnL> well sure, I mean not implemented :)
<LnL> not that I know of
<johnw> can I shell out while evaluating a Nix expression?
<LnL> there are only a few impure eval time things like builtins.getEnv
zzamboni has quit [Quit: Leaving.]
<johnw> guess I need to use m4 ;)
<johnw> well, I can just turn this monster into a function I guess
<LnL> you could do networking.hostName = builtins.readFile "/etc/hostname"; environment.etc."hostname".text = config.networking.hostName;
<LnL> but then you have a bootstrapping problem :p
joshuaks has quit [Ping timeout: 240 seconds]
joshuaks has joined #nix-darwin
<johnw> is there an easy way to change the nix-env -q output to show attr names instead of package names?
<johnw> -P just adds a number of columns
<gchristensen> -qA ?
<johnw> no, that complains about A needing an argument
<johnw> i just want to know the list of attributes I'd need to pass to nix build, in order to ensure that everything in my environment is built
<LnL> the profile manifest doesn't know anything about attributes
<gchristensen> ck
<johnw> :(
<johnw> i can get all the store paths with nix-store -q --references $(readlink ~/.nix-profile)
<johnw> but that doesn't help me
<LnL> sec
<johnw> what I want here is to see the cool new nix build status line, rather than what happens with nix-env -u --l-eq
<johnw> things are somewhat schizo in Nix rigth now
zzamboni has joined #nix-darwin
<johnw> different commands that do really similar-but-not-quite-the-same things
zzamboni has quit [Client Quit]
<LnL> gchristensen: ^ that's the thingy I was talking about earlier
<gchristensen> --binding ... cool
<johnw> LnL: what arguments does this want?
<LnL> euh..., been a while since I used this
<LnL> the things you want to find dependencies of, works similar to nix-shell -p
joshuaks has quit [Ping timeout: 255 seconds]
<LnL> looks like I didn't fix skipping empty lines :p
zzamboni has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
<johnw> so, readlink ~/.nix-profile?
<johnw> i just see zillions of blank lines
<LnL> yeah...
<johnw> screw it, I'll just use nix-env
jrolfs has quit [Ping timeout: 268 seconds]
<johnw> if "nix" is the new command, how do you install things with it?
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 240 seconds]
jrolfs__ has quit [Ping timeout: 265 seconds]
<johnw> LnL: this commit breaks "darwin-rebuild build" for me: https://github.com/NixOS/nixpkgs/commit/e4beb97b9c9a31fd9eb1b6d4e8b5ecebc7e8bb5d
<johnw> I get: cycle detected in the references of '/nix/store/86akmiiwg75fbzcgwkc3cr9kdnb7avd5-brotli-1.0.2-lib' from '/nix/store/dzl8azl2f6vhscd494zm5jzxq7jn8xw'
<LnL> I fixed that a few days ago
<johnw> in nix-darwin, or nixpkgs?
<LnL> nixpkgs
<johnw> k
<johnw> i'm not on master anymore, so I'll just revert this commit until the fix appears
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
<johnw> i guess the only thing I'd really want now is overlays in nix-darwin
<LnL> I unblocked nixpkgs-unstable today so it should update soon
<johnw> nice
<johnw> right now my overrides.nix is pretty monolithic; I think this would clean things up nicely
jrolfs__ has quit [Ping timeout: 265 seconds]
jrolfs has quit [Ping timeout: 265 seconds]
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
jrolfs has quit [Ping timeout: 248 seconds]
jrolfs__ has quit [Ping timeout: 265 seconds]
jrolfs has joined #nix-darwin
<nikivi> Is there a nix equivalent of `nixos-rebuild` command?
<johnw> nikivi: do you mean, is there an equivalent command for using Nix on Darwin machines?
<nikivi> johnw yeah
<johnw> yes, there's a nix-darwin project
<LnL> that's nixos specific, but I wrote https://github.com/LnL7/nix-darwin
<johnw> I'm using it, and it works great here
<nikivi> What's the goal of nix-darwin?
<johnw> to answer the question you asked :)
<nikivi> Can darwin not use https://github.com/NixOS/nixpkgs
<johnw> nixpkgs define packages that can be installed
jrolfs has quit [Ping timeout: 240 seconds]
<johnw> nix-darwin defines modules and services for configuring your darwin machine
<LnL> it can, but we can't use the nixpkgs/nixos part
<johnw> ah, I see what he's asking
<LnL> uh
<nikivi> Basically I am thinking can I somehow declare my configuration on macOS in nix?
<LnL> gchristensen: what's that? :D
<nikivi> So if I decide to wipe my macOS system, I can get all back with a command
<johnw> well, it's not quite 100% yet
<johnw> and of course you'd need to transfer your personal data-only directories
<nikivi> I have a question though
<nikivi> Why use nix for this kind of thing if I can use time machine
<nikivi> Which will get me to the exact state I was in
<johnw> nix is declarative
<johnw> a single file states what your environment should be
<gchristensen> LnL: a thing infinisil has been playing with, nixpkgs/pkgs/top-level/all-packages.nix
<johnw> using time machine, your system is an ever-changing ball of state
<johnw> LnL: sweet!!
<nikivi> johnw That's my big problem I want to solve really bad
<nikivi> With brew I treat things as black box
<nikivi> I just `brew install` and things `work`
<johnw> nikivi: then with nix-darwin and nixpkgs you can have something nearing a solution to that problem
<nikivi> But I want to have more `control` over my programs and where they live and how they are managed
<johnw> I'm working now on getting it so that all I have to backup is ~/src and ~/.config; the rest will be static and configured by nix-darwin
<nikivi> What about the various files that macOS has
<johnw> like?
<nikivi> Like Library
<nikivi> or ~/Documents
<johnw> it mostly leaves /Library alone
<johnw> it offers nothing in the way of managing App Store-installed applications, either
<johnw> ~/Documents is left to you
<nikivi> I am reading through this now https://nixos.org/nixos/nix-pills/index.html
<nikivi> But I find the whole nix thing a bit intimidating
<johnw> yes, at first it most certainly is
<nikivi> There is an entire language you need to understand it seems
<johnw> and the docs can be terrible
<johnw> yes
<johnw> you do
<johnw> especially if you want to venture into the experimental waters of nix-darwin
<johnw> I ask LnL maybe 100 questions a day
<nikivi> Is there any change things can go `wrong`
<nikivi> Like some files get deleted and lost
<nikivi> chance*
<johnw> it's fairly safe
<johnw> I don't think I've ever shot myself in the foot yet
<johnw> but have backups, just in case
<gchristensen> ^ sam
<gchristensen> e
<nikivi> I am curious though
<LnL> I try to be very safe, if you configure a file in /etc that already exists it won't overwrite it for example
<nikivi> Since macOS is fully proprietary and controlled end to end by Apple
<nikivi> Why can't they release an official package manager
<johnw> heh
<gchristensen> they did, you just don't like it
<nikivi> I mean you even have to install brew
<LnL> I think they called it "App Store" :p
<johnw> yep
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
<LnL> who needs a terminal when you can use a slow web ui
<gchristensen> or a terminal inside a slow web ui ;)
<nikivi> I love the logo for nix-darwin :D
<johnw> LnL: it works beautifully, thank you!
<gchristensen> I'm not sure what johnw is referring to specifically, but I generally agree
<johnw> i'm referring to the new overlays support
<nikivi> I am still not fully sure the purpose of nix-darwing
<nikivi> There is nix the package manager
<nikivi> There is nixpkgs which include packages you can install
<johnw> how do I refer to the "fully overlaid" package set from within darwin-configuration.nix? I'd like to reference a path within an overlaid package which was actually an addition to the environment
<nikivi> I guess nix-darwin includes packages that can only be built on darwin?
<johnw> nikivi: nix-darwin lets you create launchd daemons
<LnL> just pkgs.foo
<johnw> LnL: hmm.. it's claiming my doohickey is an unknown attribute
<johnw> does packageOverrides override overlays, or can they co-exist?
<LnL> wait maybe I'm not understanding the question correctly
<johnw> for example, I used to define a dovecot-plugins attribute in my overrides.nix, which is referenced by packageOverrides
<johnw> I've now moved it into overlays/dovecot-plugins.nix
<johnw> but when I do ${pkgs.dovecot-plugins}, nix-darwin complains that it doesn't know that attribute
jrolfs__ has quit [Ping timeout: 265 seconds]
jrolfs has quit [Ping timeout: 260 seconds]
<gchristensen> nikivi: nix-darwin is like what nixos is for linux
<nikivi> nixOS is a full distribution though
<gchristensen> hrm. this is harder to explain than I thought.
<johnw> LnL: also, instead of using /run/current-system/sw/lib/dovecot in my darwin-configuration.nix, is there an attribute that expands to such a path for that generation?
<gchristensen> nix-darwin brings service management and system configuration support to darwin, via Nix
<nikivi> This makes sense now :)
<johnw> hmm.. ${system.path}/lib?
<johnw> ${config.system.path}/lib
<johnw> funny that you can't install brew using nix
<johnw> I like having brew available for those quick things that sometimes Nix hasn't packaged yet
<johnw> and to see how they do things
jrolfs has joined #nix-darwin
jrolfs__ has joined #nix-darwin
<gchristensen> hmmmm install brew pkgs via a nix wrapper ... brew2nix ... *cries in advance*
<nikivi> Thing is that I actually am really happy with brew
<nikivi> In the sense that things `just work`
<nikivi> But I see the awesomeness of nix and do want to move to it
<nikivi> As it is a lot better and more robust
<johnw> LnL: ah, I see the problem
<gchristensen> you may need both, for different things
<johnw> I had defined nixpkgs.config.overlays, not nixpkgs.overlays
<johnw> LnL: however, your nixpkgs.overlays doesn't accept a directory; only a list of sets
<johnw> yeah, Nix is weak when you get into the ream of node.js and ruby packages
<johnw> it's all about what the volunteers have time to focus on and care abuot
<johnw> I spend a fair bit of time making as much of the Coq world packaged as I can manage
<nikivi> Can't you automate packaging
<nikivi> So packaging things is really really simple
<johnw> recently I added all of coq-contribs, which is 166 new packages
<johnw> it's fairly simple, and can be automated sometimes
<johnw> LnL: ah, here is where the directory support is coming from: https://github.com/NixOS/nixpkgs-channels/blob/unstable/pkgs/top-level/impure.nix#L50
<johnw> I should be able to just copy that into my darwin-configuration.nix
<nikivi> Oh I see now where nix lives
<nikivi> Its not in User dir but at rot dir
<nikivi> root*
<LnL> yeah, I thought that was supported on nixos now but I guess not
<johnw> LnL: now, I wonder how I access nix repl in a way that lets me see the overlayed package set
<johnw> if i just run "nix repl", I don't see anything provided by nixpkgs.overlays, which makes total sense
<LnL> nix-repl '<darwin>' and pkgs.<tab>
<johnw> pkgs.ghi says "ghi missing"
<johnw> oh, wait
<LnL> same with option/config btw
<johnw> yay!
<johnw> LnL: much nicer now
jrolfs__ has quit [Ping timeout: 240 seconds]
<johnw> nice, home-manager already supports nixpkgs.overlays
jrolfs has quit [Ping timeout: 248 seconds]
jrolfs__ has joined #nix-darwin
jrolfs has joined #nix-darwin
joshuaks has joined #nix-darwin
<nikivi> What do you use home-manager for
<johnw> so, nix-darwin configures my machine
<johnw> but having references to personal data in there feels wrong
<johnw> so I use home-manager, very much like nix-darwin, to configure things that only live under ~johnw
<johnw> like my .bashrc
<johnw> I configure shell aliases in nix-darwin that I consider to be "global", but I configure other shell aliases in home-manager that feel much more local
<johnw> like my .gitconfig file
<johnw> LnL uses /etc/per-user for some of this, but I prefer to divide the two
<johnw> you can see the two files in https://github.com/jwiegley/nix-config
joshuaks has quit [Ping timeout: 265 seconds]
jrolfs has quit [Ping timeout: 248 seconds]
jrolfs__ has quit [Ping timeout: 248 seconds]
<LnL> almost all of my local things are project specific and declared there
zzamboni has quit [Quit: Leaving.]