iqubic has quit [Remote host closed the connection]
iqubic has joined #nixos-emacs
<iqubic> adisbladis: I'm running into errors. I just rebuilt my system with my new home manager config, and stuff isn't working.
<iqubic> Like I logged in and emacs was successfully run, but then emacs gave me some errors.
<iqubic> Warning (initialization): An error occurred while loading '/home/iqubic/.emacs':
<iqubic> File is missing: Cannot open load file, no such file or directory, exwm
nix-build has joined #nixos-emacs
nix-build has quit [Remote host closed the connection]
{^_^} has joined #nixos-emacs
gchristensen has joined #nixos-emacs
gchristensen has left #nixos-emacs ["WeeChat 2.4"]
{^_^} is now known as Guest96999
nix-build has joined #nixos-emacs
Guest96999 has quit [Ping timeout: 248 seconds]
nix-build has quit [Remote host closed the connection]
{^_^} has joined #nixos-emacs
<iqubic> jackdk: You wouldn't know much about adisbladis' exwm-overlay, would you?
<iqubic> I'm running into errors. I just rebuilt my system with my new home manager config, and stuff isn't working.
<iqubic> Like I logged in and emacs was run, but then emacs gave me some errors. Warning (initialization): An error occurred while loading '/home/iqubic/.emacs': File is missing: Cannot open load file, no such file or directory, exwm
<jackdk> I know nothing, sorry
fasd` has joined #nixos-emacs
fasd` has quit [Ping timeout: 272 seconds]
ChanServ changed the topic of #nixos-emacs to: https://github.com/NixOS/nixpkgs/issues/66303 | https://rms.sexy
<iqubic> adisbladis: This home-manager config I have isn't working.
<iqubic> It starts up emacs, but then EXWM isn't found.
<iqubic> And if comment out the import for emacs.nix, then emacs is never found.
<iqubic> Warning (initialization): An error occurred while loading '/home/iqubic/.emacs':
<iqubic> File is missing: Cannot open load file, no such file or directory, exwm
<iqubic> Those last two lines are the emacs errors I get when I don't comment out the import for emacs.nix
<adisbladis> I don't really know... It's hard to say without a lot more context
<iqubic> What more context would you need?
<adisbladis> Can you (require 'blah) anything you've installed through nix?
<iqubic> Let me test this out.
<iqubic> Yes I can
<iqubic> I can require several other things installed via nix..
<iqubic> It's just EXWM that fails
<iqubic> adisbladis: I can't seem to get this to work at all.
<adisbladis> I'd suggest at starting to look what the wrapper is doing
<adisbladis> cat $(which emacs)
<iqubic> Which wrapper?
<adisbladis> The emacs wrapper created by emacsWithPackages
<adisbladis> iqubic: cat $(which emacs)
<iqubic> I see
<adisbladis> You'll see a path like `/nix/store/94k05r6rh0dz5b39h4ms167rkbakgc9m-emacs-packages-deps/share/emacs/site-lisp/`
<adisbladis> That's your emacs load path, then `find /nix/store/94k05r6rh0dz5b39h4ms167rkbakgc9m-emacs-packages-deps/share/emacs/site-lisp/` and see what's inside the path :)
<iqubic> I don't think the third line of this looks right: http://www.termbin.com/xm5v
<iqubic> That's "cat $(which emacs)"
<adisbladis> That looks alright
<adisbladis> /nix/store/m9zsi2fx7980jghgnqnsx5afhcakh3k2-emacs-packages-deps/share/emacs/site-lisp is the interesting bit
<iqubic> Running find on that gave me a long list of files
<iqubic> I see the .el files for all the packages I want.
<iqubic> Everything execpt EXWM it looks like
<iqubic> GRRR
<iqubic> Could it be that exwm-overlay.nix overrides `emacsPackagesNgFor`, but then the use-lisp hack (elisp.nix) calls `emacsWithPackages`?
<iqubic> Could that be the issue?
<iqubic> adisbladis: I have no clue why this isn't working.
<iqubic> adisbladis: I feel like I'm overriding one function in exwm-overlay.nix, but then calling a different function in use-package.nix
<etu> hmm
<etu> iqubic: What's the exec-line of cat $(which emacs)
<etu> ?
<iqubic> Here's the whole output: http://dpaste.com/1MVARQN
<etu> ok, followup question, what's the output of cat /nix/store/577c4y2f5z8mdcmgxqha0jri614wlnj8-emacs-26.1/bin/emacs
<iqubic> It is here: http://dpaste.com/17H990Z
<iqubic> And everything works, except for EXWM
<etu> And... the output of $ /nix/store/577c4y2f5z8mdcmgxqha0jri614wlnj8-emacs-26.1/bin/.emacs-26.1-wrapped
<etu> should be a binary
<etu> "ELF 64-bit LSB executable" something
<etu> Because if it's not, I know what your issue is
<iqubic> What do you want me to check?
<etu> file /nix/store/577c4y2f5z8mdcmgxqha0jri614wlnj8-emacs-26.1/bin/.emacs-26.1-wrapped
<etu> forgot to write file :p
<iqubic> That tells me I have a symbolic link to emacs-26.1
<iqubic> etu: It returns this "/nix/store/577c4y2f5z8mdcmgxqha0jri614wlnj8-emacs-26.1/bin/emacs: symbolic link to emacs-26.1"
<etu> hmmm
<iqubic> etu: Do you know what my issue is, and how to fix it?
<etu> symbolic link confuses me
<iqubic> Why?
<etu> it wasn't neither of the outputs I expected
<etu> iqubic: I have had issues with exwm when I first set it up because I made a double wrapper
<etu> iqubic: So I expected it to be a binary or a shellscript
<etu> iqubic: And if it were a shellscript it would have been double wrapped and overwrite environment variables
<etu> I don't know why it is a symlink.
<etu> Because it's not on my system
<iqubic> So just for kicks, I ran `ls -la` on /nix/store/577c4y2f5z8mdcmgxqha0jri614wlnj8-emacs-26.1/bin/ and got this result: http://dpaste.com/1C67GTZ
<etu> no double wrappers there
<iqubic> And I just ran file on emacs-26.1 and got this http://dpaste.com/2Y0KN0N
<iqubic> Is there a way to force nix to re-download EXWM? Like just remove the files and start over?
<etu> that file is expected to be a shellscript
<iqubic> Ah I see.
<iqubic> So what should I try here?
<etu> because it's the wrapper for .emacs-26.1-wrapper
<etu> Do you have your entire config publicly?
<iqubic> Emacs is running, but it fails to find EXWM.
<iqubic> Well, I have everything except for emacs.el here: https://gist.github.com/IQubic/bc352548582ea6da30ed4e8e3d142f8b
<iqubic> * init.el
<iqubic> Would you like me to add my init.el to that gist?
<etu> Do you have exwm in use-package in your init.el?
<iqubic> No.
<adisbladis> Oh, then that's it ! :D
<adisbladis> Of course you'll need that too, that's how fromEmacsUsePackage knows what to pull in
<iqubic> Except now home-manager fails to build
<etu> You realize that use-package.nix parse your init.el to find out which packages you need by looking for use-package declarations and pull them in
<etu> ?
<iqubic> I do.
<etu> So if you don't have exwm as a use-package declaration in your init.el, it won't install exwm.
<etu> There is one way around that though
<iqubic> I'm now getting "error: opening file '/home/iqubic/.config/nixpkgs/repos/exwm.json': no such file or directory" when attempting to run "home-manager switch"
<iqubic> So... one problem leads to another.
<adisbladis> iqubic: It looks like you didn't pull down the whole overlay repo
<adisbladis> It's relying on some json files
<iqubic> Ah.
<iqubic> I only just grabbed the one file.
<adisbladis> These json files are what's actually generated
<adisbladis> This ^
<iqubic> Ah I see.
<adisbladis> I highly recommend not copying all the files over, you're gonna have to sync those very often
<etu> iqubic: This is my modified use-package elisp parser that has an additional option called extraEmacsPackages: https://github.com/etu/nixconfig/blob/master/modules/emacs-files/elisp.nix
<iqubic> Yeah. I was just about to run a `git clone`
<etu> iqubic: Here is where I supply extra packages that aren't in that main configuration by using that argument: https://github.com/etu/nixconfig/blob/master/modules/my-emacs.nix#L80
<adisbladis> etu: Would you mind pushing that to the overlay?
<etu> adisbladis: Sure
<iqubic> What does that do, exactly?
<etu> iqubic: The same way as the things you already have, but it allows you to add additional packages that you don't have use-package declarations of
<iqubic> Ah. I love that concept.
<iqubic> And are we sure this is pulling the latest version of EXWM from github?
<etu> yes
<iqubic> Also, why do you need the json files?
<etu> We have a bash-script that fetch the latest commits from a few repos from github
<iqubic> I saw.
<etu> and store the rev and hash in the json files
<iqubic> Ah.
<etu> then we parse those files with nix
<etu> easy format to write -- easy format to parse
<iqubic> Won't you need to update the json with each new commit to the EXWM repo?
<adisbladis> iqubic: We run travis-ci nightly to pull down the latest exwm repo
<iqubic> I'm going to log in to IRC on my laptop now. Be back soon.
iqubic has quit [Remote host closed the connection]
<adisbladis> When the overlay is move to nix-community I'll make sure that we have much better getting started docs
iqubic has joined #nixos-emacs
<adisbladis> iqubic: I just wrote `When the overlay is move to nix-community I'll make sure that we have much better getting started docs`
<adisbladis> Well, right now we don't have any docs :)
<iqubic> And back.
<etu> EXWM-updater comes by every day and update the repo
<iqubic> Well, the use-package hack works quite well.
<iqubic> Except for two strange issues.
<iqubic> Error (use-package): Failed to parse package exwm: use-package: Unrecognized keyword: ensure
<iqubic> Error (use-package): auctex/:catch: Loading file /home/iqubic/.emacs.d/elpa/auctex-12.1.2/auctex.elc failed to provide feature ‘auctex’
<adisbladis> iqubic: The nix expression happily ignores anything passed to use-package except the package name, so it's not related to the nix expression
<iqubic> But why would "ensure" be a bad keyword?
<iqubic> Oh, because I wrote this: "ensure :f)"
<iqubic> LOL
<adisbladis> ^_^
<iqubic> I feel like an idiot.
<iqubic> Now, time to debug the auctex erro.
<iqubic> Are we sure it's not a nix problem?
<adisbladis> iqubic: Looks like that package was not even provided by nix.
<adisbladis> I'd nuke ~/.emacs.d (make sure you don't have anything in there you'd like to keep first)
<etu> rename if unsure :p
<iqubic> adisbladis: You want me to nuke ~/.emacs.d?
<adisbladis> What etu said :)
<adisbladis> iqubic: It looks like you still have packages in ~/.emacs.d
<adisbladis> Which you shouldn't when nix provides them
<iqubic> Yeah, that's because I wrote (:ensure f) on all of my use-package blocks, which made use-package have to go fetch them.
<etu> :ensure should only be nil, t, or package name afaik
<iqubic> I know.
<iqubic> I screwed up.
<etu> and the use-package parser in nix doesn't read package names from :ensure
<etu> :(
<iqubic> I know it doesn't.
<iqubic> Want to add a PR for that?
<iqubic> Anyways, I'm going to relog. Be back soon.
iqubic has quit [Remote host closed the connection]
iqubic has joined #nixos-emacs
<iqubic> Well, I just deleted my .emacs.d
<iqubic> And now none of my packages are working
<iqubic> Do I need to run `home-manager switch` again to rebuild the packages?
<iqubic> Wait... Wait... Wait...
<etu> home-manager doesn't put your packages in .emacs.d
<iqubic> I just realized my error
<etu> that's something emacs does for you
<iqubic> I no longer have a config file in the place emacs expects it.
<iqubic> The packages are all installed.
<iqubic> I just don't have my config getting executed
<iqubic> I feel dumb
iqubic has quit [Remote host closed the connection]
iqubic has joined #nixos-emacs
<iqubic> If I want to update an emacs package, like, let's say, auctex, how would I do that?
<adisbladis> I recommend reading up on https://github.com/tazjin/nix-1p
<adisbladis> At the end of that you'll hopefully be able to figure it out
<iqubic> turns out auctex hasn't been updated in 2 years.
<iqubic> But good to know anyways.
<iqubic> My auctex issues are not solved by updating auctex, as nixpkgs is already using the latest version.
<iqubic> adisbladis: When are you going to pull in etu's extraPackages thing?
<adisbladis> He can push it himself
<iqubic> Does he have push access to your repo?
<etu> yes
<iqubic> Or are we pushing your entire emacs + use-package + exwm stuff to mainline nixpkgs?
<etu> iqubic: I'll do it later today, within 8 hours or so
<etu> I'm planning to start writing the docs tonight
<iqubic> Nice. Sounds good.
<iqubic> I don't want anyone to fall into the pitfalls I hit.
<iqubic> my issue was fairly stupid.
<iqubic> So, the use-package section tells nix to fetch EXWM, and the overlay forces it to get the latest version? Is that right?
<iqubic> Or am I misunderstanding the way this works?
<etu> the overlay takes your regular melpa packages from nixos
<etu> and then put exwm and some other stuff on top
<etu> so you get the absolute latest of those
<etu> and the elisp-use-package parser is just a wrapper to not have to declare the packages for your emacs by hand and have it in the config
<iqubic> technically it's not an overlay, but an import. But I get the idea.
<etu> so you can declare it just in the config and that the packages shows up
<etu> It is an overlay
<etu> since it overlays some packages
<iqubic> Right.
<iqubic> but the overlay alone won't work, as I just found out.
<iqubic> You need to pull in EXWM somehow.
<iqubic> And we have an overlay on EXWM.
<etu> yeah
<etu> by writing (use-package exwm) somewhere in your config
<etu> so the parser finds it
<etu> or using my solution to have a list of extra packages to pull in
<iqubic> or manually adding it to the extraPackages section
<etu> that isn't in the config
<iqubic> Yea.
<etu> both works
<iqubic> I keep forgetting that overlays just modify existing packages instead of automatically installing them.
<adisbladis> I noticed this morning that vterm has fixed most of the problems I've had with it
<adisbladis> Now vterm > urxvt for me :)
<adisbladis> \o/
<adisbladis> etu: ^
<adisbladis> I had issues resizing before, now it works flawlessly
<adisbladis> xantoz: ^
<adisbladis> It still doesn't do font resizing well though :/
<xantoz> hmm, I'll make sure to try it
<xantoz> for me it has issues when used from an emacs running in the terminal, though
<xantoz> but I have't tried the latest
<adisbladis> Never tried that, but I can imagine it not working properly
<adisbladis> Let me try
<xantoz> since I sometimes quickly pop into my emacs session in a terminal with ec -t
<adisbladis> xantoz: Seems like it's not working great
<xantoz> ya
<xantoz> I guess it's not so big of an issue when your emacs is your WM, though :p
<adisbladis> Nah :)
<xantoz> ec -> emacsclient, btw
<xantoz> must-have alias
<adisbladis> xantoz: I had the same alias before. I sort of just assumed everyone has the same. (I'm not using emacsclient directly much anymore)
<etu> So we have a bit of docs for the overlay, since the use-package parser isn't in there it wasn't worth mentioning: https://github.com/adisbladis/exwm-overlay
xantoz has quit [Quit: WeeChat 2.5]
xantoz has joined #nixos-emacs
<adisbladis> etu: I did plan to add it though :)
<adisbladis> But I'm not sure..
<adisbladis> Travis is running out of disk space generating melpa :/
* adisbladis is considering using gitlab-ci
<adisbladis> Seems to have been a temporary hiccup
<adisbladis> Anyway, I'd like a better CI
<iqubic> Travis is failing?
<adisbladis> iqubic: On generating the melpa package set
<adisbladis> It takes too long
<iqubic> How can we fix this?
<adisbladis> iqubic: I'm working to allocate some resources from nixos
<adisbladis> Or maybe my employer, we'll see which one
<iqubic> I'm still trying to debug auctex issues.
<iqubic> Turns out I'll need the extraPackages thing.