{^_^} has quit [Remote host closed the connection]
{^_^} has joined #nix-darwin
{^_^} has quit [Changing host]
{^_^} has joined #nix-darwin
<ldlework> LnL at least any idea what this "nix" command is ? https://github.com/jwiegley/nix-config/blob/master/Makefile#L15
<LnL> it's the new cli from 2.x
<ldlework> Yeah exactly
<ldlework> how does that work exactly?
<ldlework> How come he can set nixpkgs settings there?
<LnL> ah, it's a nix-darwin option
<ldlework> Really? He uses it in his home manager build too
<LnL> both projects support overlays I think
<ldlework> Are we sure the projects are supporting this nixpkgs object?
<ldlework> Is it just part of the module system?
<ldlework> I mean you wrote nix-darwin :|
<LnL> :p
<ldlework> Like I understand that home-manager uses the home option family and nix-darwin uses the system family among other things
<ldlework> Is nixpkgs option built in maybe?
<LnL> no, but pretty sure it works the same way in both projects
<ldlework> LnL how do I install Nix 2 on OSX? The curl script gives me 1.11.16
<LnL> just for the client you can use nix-env -f '<nixpkgs>' -iA nixUnstable
<ldlework> I get unrecognized option --argstr
<ldlework> Strange given that the old cli has it
<ldlework> LnL was that stuff maybe recently removed?
<ldlework> Interesting, confPath "$(HOME_MANAGER_CONFIG)"
<ldlework> It looks like he's... calling the nix file?
<ldlework> wtf
<pikajude> wtf are overlays
<LnL> fixpoints!
<pikajude> oh
<pikajude> it's like packageOverrides
<pikajude> but
<pikajude> better??
<ldlework> In his Darwin setup he does, HOME_MANAGER_CONFIG = "${home_directory}/src/nix/config/home.nix";
<ldlework> but then does nix build -f ~/src/nix/home-manager/home-manager/home-manager.nix --argstr confPath "$(HOME_MANAGER_CONFIG)" --argstr confAttr "" activationPackage
<pikajude> why use overlays instead of packageOverrides
<ldlework> How does that make any sense
<LnL> it's a list so you can define multiple and you don't need to go through pkgs.pkgs to get to the final set because it has a second argument
<pikajude> why would you define multiple packageOverrides
<LnL> you can download an overlay file and put it in a directory
<pikajude> what's the usecase for that
<LnL> it's useful for things like the rust nightly package set from mozilla
<pikajude> oh
<pikajude> is there an overlay file for that?
<LnL> yeah
<pikajude> when did that happen
<LnL> around the time overlays where created since the same guy did that :)
<ldlework> LnL lol impart you wisdom to meee
<ldlework> Oh maybe makefile is interpolating it first...?
<LnL> ah yeah that's probably a makefile variable and not bash
<ldlework> OK when I just put my filename in directly I get: error: file 'home-manager' was not found in the Nix search path
<ldlework> gar
<ldlework> I'm doing: nix-build --argstr confPath "/Users/dustinlacewell/.home-manager/config/osx.nix" --argstr confAttr "" --out-link "activationPackage" ~/.home-manager/home-manager/home-manager/home-manager.nix
<ldlework> I'm not using the same command as him since I don't understand why my nix build 2.0 command doesn't have --argstr
<ldlework> I see, its because in my own main config file I'm doing import <home-manager>
<ldlework> Since that's how you use home-manager normally...
<ldlework> wait no
<ldlework> Home manager itself, does env = import <home-manager> {
<pikajude> okay wait
<pikajude> so if I set nixpkgs.overlays in my darwin-configuration
<ldlework> in home-manager.nix
<pikajude> will that apply to all nix evaluations on my system?
<ldlework> God this is so confusing
<pikajude> or do I have to add something else to my .nixpkg/config.nix for the overlays to apply there
<ldlework> I think it just applies to your Darwin build
<pikajude> ugh
<ldlework> For global overlays for everything you put them in ~/.config/nixpkgs/overlays
<ldlework> or something...
<ldlework> Nix is confuuuuuusing
<pikajude> oh, i forgot to symlink it
<pikajude> and i got the path wrong too, lol
<pikajude> why on earth is it in ~/.config
<pikajude> instead of ~/.nixpkgs
<ldlework> aha, another thing he sets in his Darwin build
<ldlework> I think that works too?
<ldlework> Also ~/.config is the future
<ldlework> so you should prefer that
<pikajude> yeah
<pikajude> but ~/.nixpkgs is the current convention
<ldlework> LnL nix.nixpath is a nix-darwin feature right?
<ldlework> Err nix.nixPath and I see that it is
<LnL> yes
<stqism> well that's odd, now nix-channel throws me a error: setting uid: Operation not permitted error
philr has joined #nix-darwin
<dhess> pikajude: overlays are composable, which is beautiful.
philr has quit [Quit: WeeChat 2.0.1]
<johnw> ldlework: hi
<ldlework> johnw you are like a computer configuration savant
<johnw> lol, I'm just a Jim Jomes level cargo culter
<ldlework> johnw can we talk a little bit about home.nix that you have? It seems that you call nix build directly against it, by-passing the home-manager binary all together
<ldlework> And in this file, you seem to fill out the entire "home" option namespace in its entirety
<johnw> you want to call me on the phone?
<ldlework> Heh, its too late in the night for that, but that would be so much easier I bet
<johnw> my fingers are worn out
<johnw> my workday is reaching 12 hours today
<johnw> i'm excited to talk about nix, but not type it all
<ldlework> haha
<johnw> i'm waiting on Z3 right now, so it's a good time for a break
<ldlework> Well one small question I have is, when you run nix build against home-manager, you set the "installable" to "activationPackage"
<ldlework> Is this the overall "package" built when you do home-manager build ?
<ldlework> And the thing that needs to be built before "home-manager switch" works without doing its own build?
<ldlework> johnw ^
<johnw> i think so, i just looked at his code
<ldlework> johnw another thing you do is define a "nix" set in your home.nix where you set things like allowUnfree and the overlays. How does this work? Is this a built in feature of Nix itself? That those options are always defined? Or does both nix-darwin and home-manager declare those options? I saw you do this both in darwin.nix and home.nix
<johnw> both nix-darwin and home-manager declare them
<ldlework> I see.
<ldlework> johnw do you actually install your stuff on machines where there are other users who don't use Nix, or at least your personal home stuff? I'm wondering about your decision to use both tools
<ldlework> I suppose I should wait until tomorrow and call you and perform a formal interview
<ldlework> lmao
<ldlework> Sacha would be proud.
<johnw> haha
<johnw> if you really want to do that, wait until wednesday
<johnw> i'm the only user
<johnw> home-manager is more natural at modifying files in ~
<johnw> the projects have too much overlap, though
<johnw> but it's hard to just say "merge them", because nix-darwin is about darwin, and home-manager works on NixOS and darwin
<ldlework> Yeah I was hoping LnL would have replied that, since that was my thinking when I asked the question.
<johnw> others have asked the same on github too
<ldlework> johnw I'm trying to determine whether to abandon home-manager-helper and just include some basic scripts in my dot files repo like you
<ldlework> But home-manager-helper was nice because I could get my coworkers and stuff to try home-manager relatively easy after some evangelism
<ldlework> But really it only adds some things to the NIX_PATH and sources my secret environment variables
<ldlework> I wish instead of your overlays, you'd help me maintain hmpkgs, and then we wouldn't have to duplicate codes for that kind of thing
<johnw> helping you with hmpkgs would be too much inertia
<johnw> my local config changes radically, on a whim
<ldlework> johnw even for things like those OSX apps?
<ldlework> Also, I'd obviously give you full control of merging whatever you wanted whenever
<johnw> how would we share that?
<johnw> you just want the expressions for those versions?
<ldlework> John, with a simple nix package repo
<ldlework> I simplified hmpkgs, its a single repo now
<johnw> i'd be happy if we factored out those definitions into separate files and kept them in a directory under hmpkgs where I could reference them
<johnw> but I don't know that I want to use all of hmpkgs yet
<ldlework> Its practically your "overlays" folder, just in its own git repo :)
<johnw> i see :)
<johnw> yeah, that's cool
<johnw> so, if you grab the definitions from me, then maybe I'll make hmpkgs a dependency
<johnw> but I can't do that work, not anytime soon
<ldlework> Heh interesting ok
<ldlework> johnw I think I will do that - however can you fill in a bit of a gap in my Nix skills. Given what you see at that repo, where would I add your osx installer helper function such that all of the other expressions could actually utilize it?
<johnw> make a lib/ directory and add lib/applications.nix. Put the function in there, and then include it at hmpkgs top level as installApp or whatever you want to name it. Then create a callPackage that makes your top level attributes available to all children, so that they can putt in installApp as an argument
<johnw> i hope that made some sense...
<johnw> or, follow what mkDerivation does
<johnw> by being an attribute off of stdenv
<johnw> you could have a hmpkgs value that gets passed down to everything, with an installApp attribute
<ldlework> Ah make them all functions and just pass in whatever?
<ldlework> I see.
<johnw> yeah
<johnw> always make them functions, gives you freedom later :)
<pikajude> okay i just found out an actual use for overlay composability
<pikajude> it makes it real easy to make one only apply inside nix-shell
<pikajude> genius
<ldlework> pikajude mind sharing a summary of your thoughts?
hamishmack has quit [Quit: hamishmack]
philr has joined #nix-darwin
<ldlework> johnw am I correct in understanding that your current OSX app installer does not perform any alias/symlinking into your actual Application's folder?
<ldlework> At least, I can't see anything doing it
<ldlework> Nice I got it working
<ldlework> woo
<ldlework> But yeah it doesn't seem like you do the linking
<ldlework> I'm going to add that.
<ldlework> Getting sleepy though
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
philr has quit [Ping timeout: 256 seconds]
zzamboni1 has joined #nix-darwin
zzamboni has quit [Ping timeout: 240 seconds]
zzamboni1 has quit [Client Quit]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Client Quit]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
genesis has quit [Ping timeout: 256 seconds]
genesis has joined #nix-darwin
<johnw> ldlework: it links into ~/Applications
<johnw> nix-darwin does this
<ldlework> I don't see that happening
<ldlework> Ah
<ldlework> I'm running this from home-manager of course
<johnw> i just put it in $out/Applications
<johnw> yeah, I don't install stuff using home-manager
<johnw> i use nix-env
<johnw> so that updating home-manager can always happen quickly
genesis has quit [Ping timeout: 240 seconds]
<ldlework> Yeah it seems that home-manager is not creating links for things in ~/.nix-profile/Applications
<ldlework> strange
<johnw> i thought that home-manager just installs them into your user environment
<johnw> i.e., just what nix-env -i would do
<johnw> ldlework: once my deadline is done next week, I'd love to talk in more depth about this stuff with you
<ldlework> I have a feeling you're going to drag me into nix-darwin :)
<johnw> are you on a Mac?
<ldlework> yeah
<johnw> well, if you want Nix to manage your launchdaemons, then nix-darwin is the way to go
<ldlework> I need to rebuild a new laptop by Monday though, so I will probably make some compromises and try to stick with HM for now
<johnw> understandable
<johnw> once this deadline is done, I'm going to upgrade to High Sierra
<ldlework> But I am indeed, ready to collaborate on a more final solution!
<johnw> cool
<ldlework> Yeah I'm on High Sierra as of this new laptop too
<johnw> i couldn't risk destabilizing my environment
<ldlework> Looks like Nix works on High Sierra now
<johnw> and I can't even try it out in a VM first, because I haven't paid the stupid upgrade fee for VMware
<ldlework> I moved over my existing Nix stuff and it was up and running in about 10 minutes
<ldlework> Its all the crap I don't have in Nix which is the laborious problem
<johnw> yep
<johnw> i want everything that's not pure data under nix
<johnw> or at the very least, leaving pure config that's not under nix entirely under ~/.config
<johnw> so that I only have to rsync a few key directories, plus run nix-darwin rebuild
<ldlework> John I just hope we can come up with a system that allows me to adopt what we make piecemeal. You configuration is vast. I just have Emacs, and a few OSX applications.
<ldlework> OKOK here's the question I feel asleep with
<johnw> oh sure, I'm all for modularity
<johnw> what I have here has simply grown organically on a by-need basis
<ldlework> What motivated you to avoid the home-manager script entirely and engage the home-manager expressions directly?
<johnw> I haven't thought about abstraction properly yet
<johnw> ldlework: I also use the home-manager script, don't I?
<johnw> i use "home-manager switch"
<ldlework> To do the switch yeah
<johnw> oh
<johnw> it's because I want the Nix 1.12 build status
<ldlework> But why do the build directly?
<ldlework> I see..
<johnw> home-manager doesn't even pass -Q
<johnw> so a build with lots of dependencies produces a MASSIVE log
<johnw> so do my own build to get everything out of the way first
<ldlework> I see.
<johnw> then do the switch
<ldlework> John, the neat thing about hmpkgs is that they can be where we store all of our complexity
<ldlework> And offer those abstractions to ourselves in our config
<ldlework> And that allows us to share those abstractions and maybe a third person will come along..
<johnw> but then why do that in hmpkgs, and not just in nixpkgs?
<ldlework> Because they will never be merged
<johnw> all we're doing is creating a secondary nixpkgsthat isn't hooked up to Hydra
<johnw> why wouldn't they be?
<ldlework> Well have you looked at any of them?
<ldlework> They're not exactly standard
<ldlework> I use hmpkgs in two ways: 1 as modules that declare options
<ldlework> 2: to inject overlays into pkgs, like helper functions
<ldlework> For example, the Viscosity hmpkg offers a nix module that installs viscosity
<ldlework> But the org-export one simply provides an overlay that provides a function for exporting an org-mode file to a GitHub pages repo
<ldlework> That's super useful - but also maybe an artifact of my inexperience as well
<johnw> I want to think about all this stuff properly before committing to anything
<ldlework> Like
<ldlework> The Viscosity module
<ldlework> It offers abstractions for defining the actual VPN configurations
<ldlework> Which then get put in your home directory through an activation script
<ldlework> That would never fly in nixpkgs?
<ldlework> Since those are suppose to be packages for installing packages right? Not config files.
<johnw> dunno
<johnw> i don't have answers this weekend :)
<ldlework> Well sure, but at least I can implant them into your subconscious
<ldlework> hehe
<johnw> I'm very much wanting to avoid depending on 4 separate things for the my Nix configuration though
<johnw> already using both nix-darwin and home-manager feels like too much
<ldlework> Maybe Nix needs the Wiegley touch :)
<johnw> lol
<ldlework> I mean, hmpkgs wouldn't really be another tool per se
<ldlework> It would just be a way for us to not duplicate our "home management" efforts.
<ldlework> But I agree that a single tool that did all this stuff, at least for OSX, would be nice.
<johnw> there was recently work down to allow home-manager to be used directly from a NixOS configuration
<johnw> it happened like 3 days ago
<johnw> so I think we could port that to nix-darwin
<johnw> then HM would just be an external module within nix-darwin, no more home-manager scripts
<ldlework> So I take it nix-darwin is fully "activation script" capable then
<ldlework> And can in theory do everything HM currently does
<johnw> yes, it could
<johnw> it just needs user management, ala NixOS
<ldlework> I mean
<ldlework> Even without that
<ldlework> Couldn't we just build that support from within nix-darwin
<ldlework> They're both projects that are outside of Nix in its current state - home manager exists and does the thing, so theoretically nix-darwin is in the same boat
<ldlework> Lets just give nix-darwin hm's powers
<ldlework> Whatever those are
<johnw> well, but why duplicate that much?
<johnw> HM works on any Nix-using OS
<johnw> nix-darwin is only on darwin
<johnw> better to go the other way around
<johnw> and offer the darwin-specific bits of nix-darwin to HM
<johnw> or maintain it separately as it does now
<ldlework> What exactly ties nix-darwin to Darwin exactly?
<johnw> I'd hate to see nix-darwin duplicate too much, for LnL's sake
<johnw> several things that nix-darwin manages only exist on darwin
<johnw> HM has a split personality
<johnw> it mostly thinks only of systemd, but also does a few darwin specific things
<ldlework> As I'm not a user of NixOS I have to say, I'm only partially amenable to the concerns in that direction
<ldlework> But I will probably use linux again in the future
<ldlework> ugh
<johnw> i hope to use NixOS more
<johnw> I run it in a VM right now, and I build my Docker images both using it, and with NixOS inside
<johnw> i'm getting closer and closer to not depending on my Mac applications
zzamboni has joined #nix-darwin
<ldlework> Yeah there are things for work which I'll be bound to
<LnL> nix-darwin started around the same time as home-manager, my goal was to bring nixos to the mac
<LnL> the nixos + home-manager story is similar afaik
<johnw> LnL: and I love you for it thus far :)
zzamboni has quit [Quit: Leaving.]
zzamboni has joined #nix-darwin
zzamboni has quit [Quit: Leaving.]
LangeOortjes has quit [*.net *.split]
{^_^} has quit [*.net *.split]
joepie91 has quit [*.net *.split]
cbarrett has quit [*.net *.split]
angerman has quit [*.net *.split]
manveru has quit [*.net *.split]
philipcristiano has quit [*.net *.split]
benley has quit [*.net *.split]
clever has quit [*.net *.split]
ChanServ has quit [*.net *.split]
pikajude has quit [Ping timeout: 240 seconds]
manveru has joined #nix-darwin
ChanServ has joined #nix-darwin
clever has joined #nix-darwin
philipcristiano has joined #nix-darwin
benley has joined #nix-darwin
pikajude has joined #nix-darwin
pikajude has joined #nix-darwin
pikajude has quit [Changing host]
{^_^} has joined #nix-darwin
LangeOortjes has joined #nix-darwin
joepie91 has joined #nix-darwin
angerman has joined #nix-darwin
cbarrett has joined #nix-darwin
puffnfresh has quit [Ping timeout: 240 seconds]
zzamboni has joined #nix-darwin
dtz has quit [Ping timeout: 256 seconds]
copumpkin has quit [Ping timeout: 255 seconds]
sphalerite has quit [Ping timeout: 260 seconds]
angerman has quit [Max SendQ exceeded]
angerman has joined #nix-darwin
angerman has joined #nix-darwin
angerman has quit [Changing host]
LangeOortjes has quit [Ping timeout: 248 seconds]
LangeOortjes has joined #nix-darwin
<pikajude> LnL, how do we define custom launchd services
<LnL> like your own service?
<pikajude> yes
<pikajude> my own
<LnL> take a look at some of the existing implementations, all of the plist options have an description
<LnL> launchd.daemons.foo.command = "..." is enough for a basic service I think
<pikajude> ok
<pikajude> launchd is such a baffling service
<pikajude> no logging by default
<pikajude> you have to specify it in the service config specifically
<pikajude> and logging often still doesn't happen
<LnL> yeah, there is something weird to stream it to your terminal temporeraly
<pikajude> there is
<pikajude> but of course it works fine when i do that
<pikajude> yep
<pikajude> just did that
zzamboni has quit [Quit: Leaving.]
copumpkin has joined #nix-darwin
dtz has joined #nix-darwin
puffnfresh has joined #nix-darwin
sphalerite has joined #nix-darwin