ldlework has quit [Remote host closed the connection]
ChanServ has quit [*.net *.split]
ChanServ has joined #nix-darwin
ChanServ has quit [*.net *.split]
gleber_ has quit [*.net *.split]
nikivi has quit [*.net *.split]
mightybyte has quit [*.net *.split]
carlosdagos has quit [*.net *.split]
johnw has quit [*.net *.split]
sphalerite has quit [*.net *.split]
dustinm has quit [*.net *.split]
LnL has quit [*.net *.split]
pikajude has quit [*.net *.split]
cbarrett has quit [*.net *.split]
acowley has quit [*.net *.split]
disasm has quit [*.net *.split]
copumpkin has quit [*.net *.split]
cransom has quit [*.net *.split]
wildsebastian has quit [*.net *.split]
Enzime has quit [*.net *.split]
dhess has quit [*.net *.split]
flokli has quit [*.net *.split]
ejpcmac has quit [*.net *.split]
mpickering has quit [*.net *.split]
adulteratedjedi has quit [*.net *.split]
jtojnar has quit [*.net *.split]
jcrben has quit [*.net *.split]
gchristensen has quit [*.net *.split]
angerman has quit [*.net *.split]
elvishjerricco has quit [*.net *.split]
{^_^} has quit [*.net *.split]
ambrosia has quit [*.net *.split]
qyliss^work has quit [*.net *.split]
thefloweringash has quit [*.net *.split]
yastero has quit [*.net *.split]
eacameron has quit [*.net *.split]
justinweiss has quit [*.net *.split]
manveru has quit [*.net *.split]
zimbatm has quit [*.net *.split]
carter has quit [*.net *.split]
kaychaks has quit [*.net *.split]
niksnut has quit [*.net *.split]
clever has quit [*.net *.split]
szicari has quit [*.net *.split]
adelbertc has quit [*.net *.split]
carter has joined #nix-darwin
qyliss^work has joined #nix-darwin
zimbatm has joined #nix-darwin
clever has joined #nix-darwin
kaychaks has joined #nix-darwin
niksnut has joined #nix-darwin
pikajude has joined #nix-darwin
mpickering has joined #nix-darwin
adulteratedjedi has joined #nix-darwin
eacameron has joined #nix-darwin
disasm has joined #nix-darwin
carlosdagos has joined #nix-darwin
mightybyte has joined #nix-darwin
johnw has joined #nix-darwin
adelbertc has joined #nix-darwin
{^_^} has joined #nix-darwin
manveru has joined #nix-darwin
jcrben has joined #nix-darwin
cbarrett has joined #nix-darwin
elvishjerricco has joined #nix-darwin
copumpkin has joined #nix-darwin
dhess has joined #nix-darwin
gchristensen has joined #nix-darwin
acowley has joined #nix-darwin
thefloweringash has joined #nix-darwin
cransom has joined #nix-darwin
nikivi has joined #nix-darwin
jtojnar has joined #nix-darwin
ChanServ has joined #nix-darwin
ejpcmac has joined #nix-darwin
LnL has joined #nix-darwin
dustinm has joined #nix-darwin
szicari has joined #nix-darwin
justinweiss has joined #nix-darwin
Enzime has joined #nix-darwin
wildsebastian has joined #nix-darwin
angerman has joined #nix-darwin
sphalerite has joined #nix-darwin
ambrosia has joined #nix-darwin
flokli has joined #nix-darwin
gleber_ has joined #nix-darwin
yastero has joined #nix-darwin
pikajude has quit [*.net *.split]
cbarrett has quit [*.net *.split]
acowley has quit [*.net *.split]
dustinm has quit [*.net *.split]
LnL has quit [*.net *.split]
gleber_ has quit [*.net *.split]
nikivi has quit [*.net *.split]
mightybyte has quit [*.net *.split]
carlosdagos has quit [*.net *.split]
johnw has quit [*.net *.split]
sphalerite has quit [*.net *.split]
gleber_ has joined #nix-darwin
nikivi has joined #nix-darwin
mightybyte has joined #nix-darwin
johnw has joined #nix-darwin
carlosdagos has joined #nix-darwin
sphalerite has joined #nix-darwin
philr has joined #nix-darwin
trcc has joined #nix-darwin
trcc has quit [Ping timeout: 252 seconds]
Lisanna has joined #nix-darwin
pikajude has joined #nix-darwin
trcc has joined #nix-darwin
trcc has quit [Remote host closed the connection]
trcc has joined #nix-darwin
Guest1773 has joined #nix-darwin
Guest1773 is now known as LnL
__Sander__ has joined #nix-darwin
carlosdagos has quit [Quit: Connection closed for inactivity]
nikivi has quit [Read error: Connection reset by peer]
nikivi has joined #nix-darwin
trcc has quit [Remote host closed the connection]
trcc has joined #nix-darwin
trcc has quit [Ping timeout: 252 seconds]
trcc has joined #nix-darwin
jtojnar has quit [Remote host closed the connection]
jtojnar has joined #nix-darwin
philr has quit [Ping timeout: 252 seconds]
trcc has quit [Remote host closed the connection]
trcc has joined #nix-darwin
trcc has quit [Ping timeout: 268 seconds]
alexteves has joined #nix-darwin
<nikivi> how can I get it running on mac w/o brew
<nikivi> couldnt find it on nixpkgs
jtojnar has quit [Quit: jtojnar]
<qyliss^work> I use echunkwm
<nikivi> how did you get it runing?
<qyliss^work> one sec
jtojnar has joined #nix-darwin
<qyliss^work> there's a derivation somewhere
<qyliss^work> there's also a module in nix-darwin, but you need to pass it the package, since it's not in nixpkgs
<nikivi> so these are nix pkgs I can install made by other users that are not on nixpkgs?
<nikivi> nur-packages I mean
<nikivi> why not add it to nixpkgs
<nikivi> will try set up nix-darwin today
<qyliss^work> I'm not sure
<qyliss^work> I think maybe because it's impure?
<nikivi> The NUR was created to share new packages from the community in a faster and more decentralized way
<nikivi> makes sense
<nikivi> I will try get chunkwm working with nix-darwing tho
<qyliss^work> You'll still need the package from there
<qyliss^work> nix-darwin only gives you the module, with no default package.
<LnL> yeah, chunkwm uses some newer frameworks so you need to make an impure build :(
<nikivi> installed nix-darwin 🎊
<nikivi> I am curious, why do people have separate repos for nix and dotfiles
<nikivi> it seems for LnL this is all his dotfiles https://github.com/LnL7/dotfiles
<nikivi> which contains all of his nix stuff too I suppose
<nikivi> its safe to move `~/.nixpkgs/darwin-configuration.nix to ~/.dotfiles/nix right?
<nikivi> and have symlink in nixkpgs
<nikivi> Don't forget to start a new shell or source /etc/static/bashrc
<nikivi> it seems nix-darwin is focused on users using bash not zsh
<qyliss^work> nikivi: you can set darwin-config in NIX_PATH to wherever you want the config file to be
<nikivi> if I just want to use nix-darwin to install chunkwm for now
<nikivi> what would I write?
<qyliss^work> Well, as I said before, nix-darwin doesn't give you a chunkwm package
<qyliss^work> It just gives you a module to configure it
<qyliss^work> You have to bring your own package
<qyliss^work> eg from the link I posted before
<LnL> yeah, you can't build it without Xcode/CLT at the moment
<nikivi> any guide on how I can bring a package to nix-darwin
<LnL> as for the separate repo, that's stuff which doesn't depend on the module system
<LnL> I use that on both darwin and nixos
<nikivi> qyliss^work
<nikivi> you can set darwin-config in NIX_PATH to wherever you want the config file to be
<nikivi> where do I et that?
<nikivi> not too familiar with NIX_PATH
<LnL> but simlinks also work fine
<nikivi> I am a bit confused though where should I write that
<nikivi> in ~/.nixpkgs/darwin-configuration.nix?
<nikivi> I just wanted to have everything in ~/.dotfiles
<nikivi> so was thinking ~/.dotfiles/nix/configuration.nix
<nikivi> and edit that
<LnL> yeah that works
<nikivi> but how do I make nix-darwin know of this new location
<nikivi> so it reads that file and not one in .nixpkgs
<LnL> but you have to run darwin-rebuild switch -I darwin-config=~/.dotfiles/nix/configuration.nix once to bootstrap the new location
<nikivi> oh okay
<nikivi> and I can then safely remove ~/.nixpkgs/configuration.nix?
<LnL> yeah
<nikivi> can I remove ~/.nixpkgs dir too?
<nikivi> its empty
<LnL> and you'll probably have to start a new shell afterwards to reload the environment variable
<nikivi> I dont have `darwin-rebuild` command
<LnL> sure, nothing depends on that, it's just the default location
<LnL> the default install only configures bash if that's what you mean
<nikivi> which darwin-rebuild
<nikivi> darwin-rebuild not found
<nikivi> I am on zsh
<nikivi> I said no to add something to .bashrc
<nikivi> so I suppose thats why
<nikivi> not sure what it was supposed to add
<nikivi> or I have to install darwin-rebuild from nixpkgs
<qyliss^work> No darwin-rebuild comes with nix-darwin
<gchristensen> eh?
<LnL> enable zsh in your config and try /run/current-system/sw/bin/darwin-rebuild switch -I darwin-config=~/.dotfiles/nix/configuration.nix
<LnL> you can also (re)bootstrap by running a nix-build like mentioned in the manual install section
<nikivi> is that a command? '/run/current-system/sw/bin/darwin-rebuild switch -I darwin-config=~/.dotfiles/nix/configuration.nix
<nikivi> I basically did nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
<nikivi> it created result folder and I run the darwin installer as per instructions
<nikivi> I wonder why not use curl for that but just have the thing be on a web page so you can inspect the code. this way I dont have to remove run dir after
<LnL> bootstrapping the install using the same logic instead of reimplementing it was much nicer
<LnL> there shouldn't be much of a difference between 'install' and switching to a configuraiton
<LnL> it also allows editing the config first, so you could eg. enable zsh before running the installer
<nikivi> so I am a bit confused still now what I should do to get it working
<LnL> but I guess that's not very clear
<nikivi> i now moved darwin-configuration to ~/.dotfiles/nix/
<nikivi> I want to let nix-darwin know of its location
<nikivi> but I dont have darwin-rebuild cmd
<LnL> ok so 2 things
<LnL> 1. nix-darwin is installed now, just isn't in PATH because the zsh module was not enabled
<LnL> 2. you want to move the config for which you'll want to update nix.nixPath in your config and run switch with -I darwin-config=/path/to/config once to override the default
<LnL> you have /run/current-system/sw/bin/darwin-rebuild right?
<nikivi> I do
<nikivi> oh thats what you meant
<nikivi> ❯ /run/current-system/sw/bin/darwin-rebuild switch -I darwin-config=~/.dotfiles/nix/configuration.nix
<nikivi> error: file 'darwin' was not found in the Nix search path (add it using $NIX_PATH or -I)
<nikivi> building the system configuration...
<LnL> what did you skip Would you like to manage <darwin> with nix-channel?
<nikivi> I said yes to that
<LnL> hmm, it should work then
<LnL> nix-instantiate --eval -E '<darwin>'
<nikivi> ❯ nix-instantiate --eval -E '<darwin>'
<nikivi> error: file 'darwin' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:1
__Sander__ has quit [Quit: Konversation terminated!]
<LnL> ah wait, export NIX_PATH=$HOME/.nix-defexpr/channels:$NIX_PATH
<LnL> that's not getting loaded yet either
<nikivi> now it works
<nikivi> ❯ /run/current-system/sw/bin/darwin-rebuild switch -I darwin-config=~/.dotfiles/nix/configuration.nix
<nikivi> warning: Nix search path entry '~/.dotfiles/nix/configuration.nix' does not exist, ignoring
<nikivi> error: file 'darwin-config' was not found in the Nix search path (add it using $NIX_PATH or -I), at /nix/store/f3pl3vj8k02pgb71xgcni0j6na3lj0l2-darwin/darwin/default.nix:1:40
<nikivi> building the system configuration...
<nikivi> (use '--show-trace' to show detailed location information)
<nikivi> well nix-instantiate did
philr has joined #nix-darwin
<nikivi> thats odd it doesnt exist
<clever> nikivi: echo darwin-config=~/.dotfiles/nix/configuration.nix
<nikivi> I put it there
<LnL> right, only works at the start
<LnL> -I darwin-config=$HOME/.dotfiles/nix/configuration.nix
<clever> yeah
<clever> bash cant expand the ~ when its against an =, and nix doesnt expand ~ at all in cli args
<nikivi> echo just puts stuff in stdout
<nikivi> im confused
<nikivi> Should I do: darwin-config=$HOME/.dotfiles/nix/configuration.nix
<clever> with -I yes
<nikivi> -l is not a command
<nikivi> zsh: command not found: -I
<clever> /run/current-system/sw/bin/darwin-rebuild switch -I darwin-config=$HOME/.dotfiles/nix/configuration.nix
* LnL thinks about how to make the installer better...
<clever> warning: Nix search path entry '/Users/nikivi/.nixpkgs/darwin-configuration.nix' does not exist, ignoring
<nikivi> well I did move it
<nikivi> should I cp configuration.nix back to original place?
<LnL> ok so now the commandis correct, but your configuration.nix points to something that doesn't exist
<nikivi> is what is in my ~/.dotfiles/nix/configuration.nix
<nikivi> also pastebin is so bad fml
<nikivi> and https://hastebin.com is buggy
<LnL> I don't see a nix.nixPath entry in there
<LnL> add what the check suggested
<nikivi> if I understood it right
<nikivi> ohh
<nikivi> I see what you mean my bad
<nikivi> still get error
<nikivi> I added the line https://pastebin.com/PhXtnBdw
<LnL> that looks good, assuming *** is a path
<nikivi> I added
<nikivi> nix.nixPath = [ "darwin-config='~/.dotfiles/nix/configuration.nix"];
<nikivi> still fails
<nikivi> or should it be different path
<nikivi> perhaps I made a mistake moving original config
<LnL> you also have to use $HOME there
<nikivi> nix.nixPath = [ "darwin-config='$HOME/dotfiles/nix/configuration.nix"];
<nikivi> like this?
<nikivi> sorry I am not too familiar with that syntax
<LnL> without the single quote
<LnL> but yeah, that should be good
<nikivi> still error
<nikivi> without single quote even
<LnL> :(
<nikivi> ohh
<nikivi> im bad it has to be dot before dotfiles
<nikivi> pls work
<nikivi> andd it didnt
<LnL> it's supposed to tell you exactly what to put there
<LnL> :/
<nikivi> nix.nixPath = [ "darwin=/Users/nikivi/.nix-defexpr/channels/darwin" ];
<nikivi> it tells me to put this
<nikivi> but thats tied to my user
<nikivi> I thought nix-darwin shouldnt have user in config
<nikivi> should be relative
<nikivi> nix.nixPath = [ "darwin=$HOME/.nix-defexpr/channels/darwin" ];
<nikivi> I put this and try
<nikivi> I am actually not too sure what is happening when I am running rebuild
<LnL> oh. that's not darwin-config anymore
<nikivi> I suppose name matters?
<nikivi> should I prefix name with darwin-?
<nikivi> Im so confused :|
<LnL> yeah, channel vs config. you beed both
<nikivi> so what do I do
<LnL> did you look at my config
<nikivi> the large one yeah
<nikivi> well not all
<nikivi> its pretty big and hard to parse
<nikivi> in that I am not familiar with some syntax
<nikivi> basically I ran installer and moved darwin-configuration.nix to ~/.dotfiles/nix/configuration.nix
<LnL> give me 15min
<LnL> back
<nikivi> im down to solve this
<nikivi> as I want cunkwm to work :D
<nikivi> and I dont want to have brew on my system
<nikivi> chunkwm*
<nikivi> so I put that in
<nikivi> and run `/run/current-system/sw/bin/darwin-rebuild switch -I darwin-config=$HOME/.dotfiles/nix/configuration.nix`
<nikivi> right?
<LnL> yeah
<nikivi> got few warnings
<nikivi> but it finished
<LnL> about existing files?
<nikivi> warning: not linking environment.etc."bashrc" because /etc/bashrc exists, skipping...
<nikivi> warning: not linking environment.etc."nix/nix.conf" because /etc/nix/nix.conf exists, skipping...
<nikivi> warning: not linking environment.etc."zshrc" because /etc/zshrc exists, skipping...
<nikivi> warning: not linking environment.etc."zprofile" because /etc/zprofile exists, skipping...
<nikivi> yep
<nikivi> do you have that snippet of what I need to put to get chunkwm running on macOSiz
<nikivi> to configuration.nix right?
<nikivi> it basically only symlinks files now
<LnL> so either move those original files out of the way or source them explicitly in the system variants
<nikivi> out of the way of what
<nikivi> I thought zshrc lived in ~/.zshrc
<nikivi> not /etc
<LnL> like, mv /etc/zshrc /etc/zshrc.orig
<nikivi> I suppose any new person installing nix-darwin will get those errors
<nikivi> wouldnt it make sense for nix-darwin to do that automatically
<LnL> maybe, but I explicitly didn't to avoid breaking something https://github.com/LnL7/nix-darwin#install
<nikivi> can I just remove them
<nikivi> and have nix-darwin generate them
<nikivi> i dont want to keep .orig files
<nikivi> I wont be using
<nikivi> or its a bad idea
<LnL> sure
<nikivi> so assuming I remove them now
<nikivi> how do I generate them
<nikivi> nix-channel --update darwin
<nikivi> ?
<LnL> run the switch again
<nikivi> I can just run: darwin-rebuild switch
<nikivi> or I have to do the whole thing again
<nikivi> which darwin-rebuild switch
<nikivi> still nothing :(
<LnL> I think you need the full thing one last time
<nikivi> one last time?
<nikivi> what makes this one different from before
<LnL> I should make install flexible enough so you can use it multiple times, then you don't need to worry about magical darwin-rebuild invocations
<nikivi> i dont have persmission to remove /etc/bashrc
<nikivi> but I can with sudo
<nikivi> just want to make sure i dont break something
<LnL> once zshrc is owned by nix-darwin it will configure everything for you
<nikivi> ❯ sudo mv /etc/etc/zprofile ~/.Trash
<nikivi> mv: rename /etc/etc/zprofile to /Users/nikivi/.Trash/zprofile: No such file or directory
<nikivi> yet I got this error
<nikivi> warning: not linking environment.etc."zprofile" because /etc/zprofile exists, skipping...
<gchristensen> etc/etc
<nikivi> oh fml
<nikivi> copy pasting lol
<nikivi> I think thats success
<nikivi> darwin-rebuild still not in my path tho
<LnL> yes that looks perfect, start a new shelll
<nikivi> got /Users/nikivi/.dotfiles/zsh/env.zsh:19: command not found: go
<nikivi> mm
<nikivi> doesnt sound good
<nikivi> my env.zsh
<LnL> where did the magical go come from?
<nikivi> official installer
<nikivi> I used it because nixpkgs was outdated
<nikivi> and I am bad at nix epxressions
<LnL> outdated?
<nikivi> few versions behind when I checked
<LnL> hmm so it must have installed to a nonstandard path
peel has joined #nix-darwin
<nikivi> perhaps I should run go uninstaller
<nikivi> and then install from nixpkgs
<nikivi> and try do everything from nixpkgs going forward
<LnL> does /usr/libexec/path_helper -s include anything go related?
<nikivi> it does
<nikivi> PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin
<LnL> yeah, nix-darwin overrides PATH by default so the entry from /etc/paths.d won't get added
<nikivi> I only have go and MacGPG2 there
<nikivi> /usr/local/MacGPG2/bin
<LnL> see darwin-option environment.systemPath
<nikivi> environment.systemPath = [ "/usr/local/go/bin:/usr/local/MacGPG2/bin" ];
<nikivi> If i add this
<nikivi> would it do what I think it will do
<nikivi> this file is not well commented
<nikivi> actually there are nearly no comments :(
<nikivi> I want to extend my path
<LnL> darwin-option includes the actual value
<LnL> I'm pretty sure it appends
<nikivi> darwin-option includes the actual value
<nikivi> I dont get what you mean
<LnL> yeah it appends
<nikivi> didnt work
<nikivi> im not sure what the workflow of updating configuration.nix is
<LnL> your shell won't reload automatically
<nikivi> edit it then run 'darwin-rebuild switch'darwin-rebuild switch
<nikivi> # Update nix-darwin configuration
<nikivi> un(){
<nikivi> exec zsh
<nikivi> darwin-rebuild switch
<nikivi> }
<nikivi> added that zsh function
<nikivi> /Users/nikivi/.dotfiles/zsh/env.zsh:19: command not found: go
<nikivi> didnt work
<LnL> it only runs once per shell to avoid duplicate entries
<nikivi> what do you mean runs once per shell
<nikivi> oh okay in new tab it finds go
<nikivi> so why exec zsh is not working?
<LnL> other wise you'd end up with $HOME/.nix-profile/bin:/run/current-system/sw/bin:$HOME/.nix-profile/bin:/run/current-system/sw/bin:$HOME/.nix-profile/bin:/run/current-system/sw/bin:$HOME/.nix-profile/bin:/run/current-system/sw/bin
<nikivi> i basically want to change config on the fly
<LnL> after a few execs
<nikivi> not open new tabs
<nikivi> typeset -U PATH
<nikivi> I thought ^ prevented that
<LnL> __ETC_ZSHENV_SOURCED= exec zsh
<LnL> that only works in zsh
<nikivi> should I add that to configuration.nix
<LnL> if you put that in your reload alias it should work
<LnL> managing shell stuff is so hard...
<nikivi> this right?
<LnL> yeah
<nikivi> I'm still not sold on configuring everything in nix
<nikivi> perhaps I reach some lightbulb moment
<nikivi> currently I just like UX of nix-env strangely enough more than brew
<nikivi> can I prevent it asking my password every time I run my alias
<nikivi> There is a comment in default config: Create /etc/bashrc that loads the nix-darwin environment
<nikivi> should I really do that?
<nikivi> I use Zsh, not bash
<LnL> yeah that's what the installer did
<LnL> if you don't care about nix in bash you can remove it
<nikivi> sysctl -n hw.ncpu gives me 12
<nikivi> is it good idea to put 12 on both maxJobs and buildCores
<nikivi> or I should put 10 or smth
<nikivi> I am also curious why doesnt nix installer prepopulate these fields from output of that command automatically
<nikivi> why default to 1
<LnL> because I was lazy? :p
<nikivi> :D
<gchristensen> I always set buildCores to 1 because I don't like builds running parallel make
<gchristensen> maxJobs I happily set to the value of ncpus
<nikivi> is there something bad about parallel builds?
<gchristensen> it _can_ cause instability in builds (doesn't always) especially if you have a high core count
<gchristensen> not a major risk, just a personal preference
<nikivi> so what do I add for chunkwm LnL
<nikivi> Textual erased history and cant find your link
<nikivi> I remember you sent the code for it
<LnL> the person who added the chunkwm module wrote this https://github.com/peel/nur-packages/tree/master/pkgs/os-specific/darwin/chunkwm
<nikivi> how can I use that from inside configuration.nix?
<nikivi> terribleiz
<nikivi> ?
<nikivi> because impure?
<LnL> yeah
<nikivi> I cant just drop this block inside my config
<nikivi> it seems
<nikivi> not sure whats lnl = super.lnl
<LnL> namespacing, you don't need it
<nikivi> this is okay right?
<nikivi> so assuming I run my update alias I get chunckwm installed to my /Applications
<nikivi> any way to avoid filling in password
<nikivi> super annoying
<nikivi> get this, no errors
<nikivi> but also no chunkwm in /Applications
<nikivi> my config https://paste.ee/p/ifDbt
<LnL> nix-darwin needs root for some stuff
<LnL> guess you could add a sudoers entry if you really wanted
<nikivi> its just if I do go the nix way
<nikivi> I plan to tweak configuration.nix very very often
<nikivi> so I want fast iteration time
<nikivi> any way to debug what went wrong and why chunkwm wasn't installed?
<nikivi> or it's not actually .app
<LnL> no, it's just a binary
<nikivi> I just thought my mac would change or something
<nikivi> :D
<nikivi> with borders
<LnL> and if you use my think you need to run make && make -C src/chunkc/ && make make -C src/plugins/tiling, etc. first
<LnL> thing*
<nikivi> ❯ which chunkwm ~
<nikivi> chunkwm not found
<nikivi> where do I run 'make && make -C src/chunkc/ && make make -C src/plugins/tiling'
<nikivi> should I clone the repo?
<LnL> yeah, peel's thing is much nicer
<nikivi> I am a bit confused, I thought nix handles all of that
<nikivi> building the thing
<LnL> indeed, that's why it's terrible like I mentioned before
<nikivi> so where do I run make in
<nikivi> im confused as to why do I need the nix derivation there
<nikivi> if I am going to be building the thing from makefile
<nikivi> from source
<nikivi> and cloning the repo
<LnL> hold on, let me see if I can make this reasonable
<nikivi> afk 10 min :)
<nikivi> thanks very much for your help btw LnL
<nikivi> really appreciate it
<peel> nikivi: The problem here is chunkwm uses darwin libraries that are not available within nix. Therefore we need to rely on all sorts of impurities. Either the way LnL did it or the way I did it. With my solution you can either follow https://github.com/nix-community/NUR/blob/master/README.md#installation and install it as nur.repos.peel.chunkwm.core or use my nur repo as an overlay that it provides.
<nikivi> will try that, thanks peel
<LnL> I've only been using it on one computer so it's kind of bad right now
<LnL> (my config)
<johnw> LnL: btw, I'm stilling *loving* nix-darwin. It makes setting up a new darwin machine soooo much easier than it ever was
<johnw> just this past week I bootstrapped a new iMac Pro and a new MacBook Pro, and it took <hour to get to a point where the new machine was a semblance of the original
<LnL> that's bad...
<gchristensen> (re: #nixos, launchctl print) LnL: whoa!
<LnL> do you recall what you ran into?
<LnL> gchristensen: it's nice to check the binary/keepalive of the actually loaded service, not a random plist file that could be totally unrelated
<gchristensen> yeah, so good
<gchristensen> also cool seeing the persistent crashing / penalty box stuff
<LnL> systemd has the same problem outside of nixos, editing files without daemon-reload results in confusion :)
<LnL> btw about the daemon, I've been using socket activation for a while now
<LnL> it doesn't always work tho, initial connections that trigger the daemon to start sometimes get stuck
<gchristensen> launchd supports socket activation?
<gchristensen> nice
<gchristensen> oh I need to erase and reinstall my mac this weekend
<gchristensen> nice!
<LnL> maybe SockType or SockPassive are wrong, causing the connectivity weirdness
<LnL> wow, somebody already found the new vim-nix feature I added a few days ago
<gchristensen> oh?
<LnL> run vim '+NixEdit hello' in a nixpkgs repo
<gchristensen> :o
<gchristensen> ok
<gchristensen> well actually I don't have vim + vim nix
<LnL> vim-dispatch will also run nix-build with the correct arguments for you
<gchristensen> :o
<LnL> that together with kitty is really nice for tofu
<gchristensen> http://technologeeks.com/docs/launchd.pdf has some data about SockPassive
<LnL> oh hmmm, just realized I shouldn't be messing around in the user's home for LaunchAgents
<LnL> yeah so I mostlyunderstand the options, but I'm not sure about the interaction with unix sockets
<LnL> johnw: any feedback/ideas to get that better, what did you run into?
<johnw> LnL: I really didn't run into any problems, but then I've spent a lot of time honing my darwin.nix file
<LnL> oh drift, I thought that was a "but"
<LnL> making eg. known defaults strict might help with that, but I'm afraid people might find that obnoxious
<johnw> the only thing I'm presently unhappy with is how distributed builds happen
<johnw> again I had to just turn them off
<LnL> what's pkgs.OpenZFSonOSX :D
<johnw> believe it or not
<johnw> it's OpenZFS on OS X
<johnw> i use ZFS on all of my external drives (even thumb drives)
<LnL> I know that, but they distribute an installer
<johnw> oh, right
<johnw> so it ends up that you have to install with their installer
<johnw> then rm -fr /usr/local
<johnw> and then let nix-darwin install the binaries
<johnw> it's gross
<LnL> lol
<LnL> but that's only for the spl/zfs kext then no?
<{^_^}> nix-darwin#91 (by lukeadams, 3 weeks ago, open): [WIP] Ability to load kernel modules
<johnw> the intaller installs the kexts
<johnw> i use nix-darwin to manage both the binaries and the LaunchDaemons
<LnL> there's that
<johnw> so the old ones need to be removed from /Library/LaunchDaemons too
<LnL> btw. I want to rewrite nix-darwin with configurations even tho I don't like the angle brackets
philr has quit [Ping timeout: 272 seconds]
<nikivi> hey LnL I am curious, when I run that configuration.nix with that chunkwm block you shared
<nikivi> since it seems to have done nothing, is there any way to quickly reverse whatever it did
<nikivi> It seems to have created some /out dir and 3 symlinks
<nikivi> but not sure where
<LnL> remove or comment it and switch again
<LnL> and yes it creates a package with only symlinks (no content)
<nikivi> how do I add nix-darwin to sudoers?
<nikivi> so I dont have to enter password every time?
<nikivi> and can this backfire on me?
<nikivi> seems I just have to add 'darwin-rebuild switch' to /etc/sudoers
<LnL> it's a potential security hole
<johnw> LnL: what are "configurations"?
<LnL> but adding something like this to /etc/sudoers.d/nix-darwin should work
<LnL> lnl ALL=(ALL:ALL) NOPASSWD: /run/current-system/sw/bin/darwin-rebuild
<johnw> also, I'm experiencing something weird right now; my store verifies fine with --check-contents --verify, yet when I try to copy the current user closure to my laptop, it fails saying that a file in the store is truncated
<nikivi> LnL just adding an empty file at this path?
<nikivi> 'touch /etc/sudoers.d/nix-darwin'?
<LnL> no with the content I posted
<LnL> oh and I think the problem is worse because you're using exec
<LnL> otherwise you'd only have to enter sudo every so often
<LnL> johnw: truncated, don't think I've seen that before
<johnw> i'll copy the error in just a moment
<nikivi> sweet, that worked, thanks LnL
<johnw> verifying one more time
<nikivi> hope I dont get hacked now :P
<johnw> i'm not understanding yet how that's different from an attr set
<LnL> an attribute set where fields are strict, have a type and merge behaviour
<johnw> feels hacky
<LnL> and unlike the module system there's a hierarchy
<johnw> ^-- the strange errors I'm getting from copy
<johnw> dunno what unknown serve command 9 is about
<johnw> also, it says interrupted by the user, but I'm not doing anything
<LnL> cmdAddToStoreNar
<johnw> so, copying to this machine worked yesterday
<johnw> did this break due to a nix update?
<johnw> old machine is pre6338
<johnw> new machine is pre6377
cbarrett has joined #nix-darwin
<LnL> I'm thinking maybe yes, it's the last added command
<johnw> ok
<LnL> 3 aug, so if the receiver is older it might get a command it doesn't understand
<LnL> johnw: why do you say hacky? I think the syntax for unifying modules/packages is a big deal
<LnL> or is this more the syntax looks weird and I don't like it
<johnw> it feels like an ad hoc reaction to concrete problems
<johnw> rather than a thought out design that might integrate better with the existing language
<johnw> like, having strictness annotations for existing attrsets, and a mechanism for inheritance
<johnw> sadly, now my laptop has to build 4000+ packages instead of copying from the desktop
<johnw> i hear fans :)
<LnL> :o
<johnw> oh, maybe I can do this manually
<LnL> can't you sync the nix versions first?
<johnw> well
<johnw> that's buried inside my darwin.nix
<johnw> and darwin.nix has 4000+ dependencies in its tree now
<johnw> i forget how to make a nar file
<LnL> nix-store --export
<johnw> ah, thanks
<LnL> that's a closure, but probably what you want
<johnw> nix-store --export dies with "argument list too long"
<LnL> nice
<LnL> it might be annoying for development, but I wonder if maybe the daemon protocol should be formalised and versioned properly
<johnw> yse
<LnL> compatibility between versions has more impact than you might initially think
<johnw> ok, I'm doing this:
<johnw> nix-store --query --requisites --include-outputs $(readlink -f ~/.nix-profile) $(readlink -f /run/current-system) | parallel -j1 'nix-store --export {} | ssh hermes nix-store --import'
<nikivi> if I want to change configuration.nix to darwin.nix
<nikivi> I run /run/current-system/sw/bin/darwin-rebuild switch -I darwin-config=$HOME/.dotfiles/nix/darwin.nix
<nikivi> but it doesnt stick
<nikivi> next time I run: darwin-rebuild switch. I get error
<nikivi> I change path in nix.nixPath
{^_^} has quit [Remote host closed the connection]
{^_^} has joined #nix-darwin
<nikivi> so that code block with chuckwm now works without those make commands?
<LnL> yeah, still impure since it requires the CommandLineTools but it's an actual build
<nikivi> awesome
<nikivi> will try build now once I figure out how to point nix-darwin to renamed file
<nikivi> for some reason it didn't work
<nikivi> I renamed configuration.nix to darwin.nix, changed the path inside darwin.nix and run the command
<LnL> I've still been using kwm on this machine because I didn't want to copy binaries :p
<nikivi> '/run/current-system/sw/bin/darwin-rebuild switch -I darwin-config=$HOME/.dotfiles/nix/darwin.nix'
<LnL> hmm, what's the error?
<nikivi> no error
<nikivi> but darwin-rebuild switch fails
<nikivi> oh actually it doesnt fail in new shell
<nikivi> nvm
<nikivi> forgot I have to start new shell I guess
<nikivi> however it still asks my password now
<nikivi> even though I added the sudoers file
<nikivi> with lnl ALL=(ALL:ALL) NOPASSWD: /run/current-system/sw/bin/darwin-rebuild inside
<nikivi> actually it doesn't ask it on consecutive runs, so I guess its fine. just not sure what the time limit is between passwords
<nikivi> I am using my zsh function to reload config
<gchristensen> you need to replace "lnl" with our username
<LnL> use user your own username for that to work :)
<nikivi> ohh
<nikivi> lol
<nikivi> I was actually going to ask about that
<nikivi> do I need to run update on nix-darwin to get the new chunkwm derivation you made @LnL
<nikivi> still asks for my password
<nikivi> ❯ un ~
<nikivi> building the system configuration...
<nikivi> Password:
<nikivi> nikivi ALL=(ALL:ALL) NOPASSWD: /run/current-system/sw/bin/darwin-rebuild
<nikivi> what I put in `/etc/sudoers.d/nix-darwin`
<nikivi> started new shell too
<clever> nikivi: what does `sudo --list` report?
<LnL> you probably also want to configure skhd, but that's all in nixpkgs so that should be straightforward
<nikivi> User nikivi may run the following commands on nikivi:
<nikivi> (ALL) ALL
<nikivi> (ALL : ALL) NOPASSWD: /run/current-system/sw/bin/darwin-rebuild
<nikivi> and some stuff on the top but I think this part is relevant
<nikivi> configure skhd for the build to succeed?
<nikivi> its another tool
<clever> `sudo -k` to make sudo forget you recently used it, then `sudo /run/current-system/sw/bin/darwin-rebuild` and what happens?
<nikivi> do you need skhd for the tiling wm to work?
<LnL> no, but the window manager itself doesn't support keybindings
<nikivi> ❯ sudo /run/current-system/sw/bin/darwin-rebuild ~/.dotfiles/nix
<nikivi> darwin-rebuild [--help] {edit | build | switch | check | changelog}
<nikivi> [{--switch-generation | -G} generation] [--verbose...] [-v...]
<nikivi> [--list-generations] [{--profile-name | -p} name] [--rollback]
<nikivi> [-Q] [{--max-jobs | -j} number] [--cores number] [--dry-run]
<nikivi> [--keep-going] [-k] [--keep-failed] [-K] [--fallback] [--show-trace]
<nikivi> [-I path] [--option name value] [--arg name value] [--argstr name value]
<nikivi> No manual entry for darwin-rebuild
<nikivi> oops, should of used pastee
<nikivi> oh okay, it seems that now it works
<nikivi> after sudo -k
<nikivi> by nixpkgs you mean its in nix-darwin config LnL ?
<nikivi> I get an error though
<LnL> no but it will get configured automatically so all you have to do is give it your config
<LnL> do you have the CLT installed?
<nikivi> if you mean Xcode ones, yes I do
<LnL> /Library/Developer/CommandLineTools/usr/bin/c++ --version
<nikivi> okay apparently not
<nikivi> I thought they come with Xcode
<nikivi> I remember it asked me if I wanted to install it
<LnL> hrm :/
<nikivi> I do have Xcode.app installed
<LnL> replace /Library/Developer/CommandLineTools with the path you get from xcode-select -p
peel has quit [Quit: Connection closed for inactivity]
<nikivi> replace?
<nikivi> why is it different on your and mine machine
<nikivi> I get `/Applications/Xcode.app/Contents/Developer`
<LnL> yeah, Xcode stuff will be there
<nikivi> export PATH="/Applications/Xcode/Contents/:$PATH"
<nikivi> I put this
<nikivi> still error
<LnL> probably still need the /usr/bin part, not sure if the layout of the xcode prefix is the same but I'd assume so
<nikivi> didnt work
<nikivi> going to look in Contents and see
<nikivi> I realized my typo but even that it fails
<nikivi> export PATH="/Applications/Xcode.app/Contents/usr/bin:$PATH"
<nikivi> there is no dir usrr in Contents
<nikivi> _CodeSignature _MASReceipt Applications Developer Frameworks Info.plist Library MacOS OtherFrameworks PkgInfo PlugIns Resources SharedFrameworks version.plist XPCServices
<nikivi> is whats inside
<LnL> find /Applications/Xcode.app/Contents -path '*/bin/c++'
<nikivi> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
<{^_^}> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c's karma got increased to 1
<LnL> rolf
<nikivi> get another error
<nikivi> my config https://paste.ee/p/2J5MX
<LnL> eh, why wouldn't it find that
<LnL> this kind of stuff is exactly why we don't use CLT/Xcode in nix -_-
<nikivi> I am also curious, assuming we do get this thing to build
<nikivi> the next times I run my 'un' alias, it won't be building all the things again and again right?
<LnL> not if it succeeded
<nikivi> * wonders if I can just build chunkwm from source
<LnL> does this do anything? xcode-select --install
<nikivi> installing software
<nikivi> yay
<nikivi> no errors
<nikivi> but 'which chunk' doesnt find anything
<nikivi> I thought Id get that cmd
<nikivi> chunkwm*
<nikivi> it seems to have built
<LnL> well look at that!
<LnL> once you allow the accessibility stuff, this can't be automated anymore :((, it should start managing windows
<nikivi> but dont I need a cli tool
<nikivi> I was reading
<nikivi> i.e. chunkwm --config /opt/local/etc/chunkwm/chunkwmrc
<nikivi> also what do I give accessibility to
<nikivi> there is no app
<LnL> the binary, you'll see a dialog box when it startts
<nikivi> how do I start it?
<LnL> the service starts it for you
<nikivi> no dialogue box seen then
<nikivi> what do I do
<LnL> ah hold on, I added a small thing after you copied it
<nikivi> should I run `darwin-rebuild switch` again?
<nikivi> i am curious if it is smart enough to know to rebuild the thing
<nikivi> and not keep using what it built already
<nikivi> okay I tried it, and it built nothing
<nikivi> also it asked me for my password again :(
<nikivi> I thought I did the sudoers thing
alexteves has quit [Remote host closed the connection]
<nikivi> perhaps there is a flag I have to pass
<nikivi> undefined variable 'mkForce' at /Users/nikivi/.dotfiles/nix/darwin.nix:50:30
<LnL> it's the plugins that is important
<LnL> you can drop those
* nikivi my config https://paste.ee/p/9EdaO
<nikivi> The option `services.chunkwm.package' is used but not defined.
<LnL> just the mkForce
<LnL> not the entire line
<nikivi> services.chunkwm.enable = true;
<nikivi> services.chunkwm.plugins.list = [ "border" "ffm" "tiling" ];
<nikivi> #services.chunkwm.plugins.dir = mkForce "${lib.getOutput "out" pkgs.chunkwm}/lib/chunkwm/plugins";
<nikivi> #services.chunkwm.package = mkForce pkgs.chunkwm;
<nikivi> i basically commented them 2 out
<nikivi> and get above errro
<LnL> updated the gist
<nikivi> not sure if built it
<nikivi> because it was fast
<nikivi> but I get no dialogue prompt either way
<LnL> ah! you need to update the channel
<nikivi> nix-channel --update
<nikivi> right?
<nikivi> probably should add that to my 'un' alias
<LnL> yeah, I made a small change in the service
<nikivi> omg that worked
<nikivi> but now I cant use a mac all my bindings for wm from bettertouchtool are gone
<nikivi> need to set up that skh tool
<nikivi> how do I temporarily pause it?
<LnL> simplest is probably to set enabled to false
<nikivi> one thing I am probably still going to do I think
<LnL> that basically disables everything related to the module
<nikivi> is still do my configuration for things in the tradtional way, not through nix
<nikivi> nix just adds overhead I see no reason to have it
Lisanna has quit [Ping timeout: 252 seconds]
<nikivi> and use nix as a kind of glue between things
<nikivi> but it seems that in this way of installing chunkwm
<nikivi> I can't go the traditional route
<nikivi> i.e. in here, I can't run `chunkwm --config ..` because I dont have that tool
<nikivi> it seems I am basically forced to configure it through nix
<nikivi> or I misinstalled something
<LnL> it's separate, since you don't really need it in PATH, but yeah for getting started it's useful
<LnL> add pkgs.chunkwm.out to systemPackages
<nikivi> what does .out stand for?
<LnL> the outputs, there's bin which has chunkc (client) and out which as chunkwm (daemon) and the plugins
<nikivi> will try setup https://github.com/koekeishiya/skhd tomorrow
<nikivi> and hopefully get this wm to a working state
<nikivi> thanks so much for your time and help LnL