rycee changed the topic of #home-manager to: Support and discussion around the Home Manager project (https://github.com/rycee/home-manager) | Logs: https://logs.nix.samueldr.com/home-manager
quinn_ has joined #home-manager
quinn has quit [Ping timeout: 256 seconds]
onsails has quit [Quit: Leaving.]
onsails has joined #home-manager
onsails has quit [Client Quit]
onsails has joined #home-manager
onsails has quit [Client Quit]
onsails has joined #home-manager
<colemickens> Does anyone use neovim + nvim-lsp by chance?
<colemickens> I'm trying to go minimal and use neovim 0.5-rc + nvim-lsp but I'm wondering if I'm better off just going with COC instead
<aterius> colemickens: I do
<colemickens> mjlbach: can you link your setup? When I do what I think I should, neovim just blows up at me, won't even load the editor.
<aterius> Sure, I'm not managing my neovim plugins via nix though
<colemickens> Oh ok
<aterius> I'm just using a nightly overlay for neovim combined with vim-plug, and then installing language servers via nix
andi- has quit [Ping timeout: 272 seconds]
liff has joined #home-manager
andi- has joined #home-manager
cole-h has quit [Quit: Goodbye]
romanofski_ has joined #home-manager
quinn_ has quit [Quit: ZNC 1.7.5 - https://znc.in]
charmonium95 has joined #home-manager
<charmonium95> Any insight on this problem with Oh-my-zsh theme?
<charmonium95> My shell says this when I start it up:
<charmonium95> oh-my-zsh.sh: no such file or directory oh-my-zsh/themes/${THEME}.theme
dermetfan has joined #home-manager
__monty__ has joined #home-manager
asymptotically has joined #home-manager
charmonium95 has quit [Ping timeout: 245 seconds]
KarlJoad has joined #home-manager
<KarlJoad> Is there a way to add arbitrary configuration to a portion of a file with home-manager? For example, using an extraConfig-like option?
<KarlJoad> Namely, I am trying to get multiple channels grouped together in my `.mbsyncrc` file. Right now, home-manager has no configuration for that (https://github.com/rycee/home-manager/issues/747). But GMail is stupid, and the only way to use mbsync and gmail properly is to use multiple channels grouped together.
<{^_^}> #747 (by znewman01, 50 weeks ago, open): mbsync: multiple channels per account
energizer2 has joined #home-manager
<__monty__> KarlJoad: If no extraConfig was defined then you're out of luck.
<energizer2> does hm refuse to recreate symlinks if there is already a link in the location? i expected hm to make my ~/.zshrc link but there is already one there, it just points to a nonexistent location in the store
<energizer2> how can i recreate all the links
<__monty__> Take a look at fixing the module? If you solve the problem you can PR it, if you kludge up a solution, at least you have a solution for now : )
<__monty__> energizer2: How do you manage your zshrc? If it's with the module I think you're right, HM should update it. Maybe you touched the link or something and HM doesn't want to cause loss of data?
<KarlJoad> __monty__: Well, the problem is not that there is no extraConfig option, but rather, I cannot include arbitrary code. I need to use mbsync-defined options as an attribute set in the extraConfig.account option set.
<KarlJoad> Plus, I have no idea on where to start fixing this module. I would like to package a regular program into home-manager before attempting to fix something that is already there.
<energizer2> hmm no that's not it, i deleted the link and hm still wont put it back
<__monty__> energizer2: Do you have programs.zsh.enable = true?
<energizer2> yes
<__monty__> And no warnings?
<energizer2> right
<__monty__> KarlJoad: I don't understand the problem, "I cannot include arbitrary code?" What code?
<KarlJoad> __monty__: In the config, I would like to specify channels and their grouping using the double single-quote syntax, to just "insert" the provided configuration. However, the type of that option set is "attribute set of string or signed integer or booleans"
teto has quit [Ping timeout: 260 seconds]
energizer2 has quit [Ping timeout: 256 seconds]
<KarlJoad> Has anyone managed to get home-manager's mbsync module and Gmail to play well together?
<__monty__> KarlJoad: If you just want something that works you could simply have a configuration file symlinked in place in an activation block.
<KarlJoad> I know. That just feels a bit "hacky" to me. I would prefer to have a single set of inter-related Nix files to build my user environment, rather than having to symlink things into place.
<__monty__> You could embed the contents in your configuration using home.files.
<KarlJoad> True. That might be what I have to end up doing, but I'd prefer not to.
<KarlJoad> It seems like the only way for me to get what I want is to edit the module myself.
<__monty__> Then I'd take a look at the module, yeah. It might not be complicated.
<KarlJoad> The issue request seems to indicate otherwise (https://github.com/rycee/home-manager/issues/747). Which is why I want to create a module for another package I use before attempting to edit the existing one.
<{^_^}> #747 (by znewman01, 50 weeks ago, open): mbsync: multiple channels per account
teto has joined #home-manager
<__monty__> Ah, but that's taking into account compatibility with other mail softwares. We're talking kludge here ; )
<KarlJoad> That's the thing I'm confused about. What issues should there be? mbsync is meant to download the mail in the way dictated by the config. The mail reading software should use the hierarchy created by mbsync and read from that.
<__monty__> I think the problem is other mbsync-equivalents might not be able to deal with multiple channels per account.
<KarlJoad> Unless I am misunderstanding, other mail retrieval tools should not care how mbsync downloads its mail, but should only care how that tool downloads its mail. So imapsync and mbsync should not care how each other downloads mail.
<__monty__> That's irrelevant. If the declarative configuration allows you to specify multiple channels per account it's reasonable to assume that configuration will work regardless of the software you choose.
<KarlJoad> Should it? Because mbsync is the only imap-email-downloader that uses the channel/group scheme as far as I can tell.
<KarlJoad> The configuration here is package-dependent and account-dependent, since you can configure different accounts to use different channels.
<__monty__> I'm not familiar enough to really say. Maybe rycee or teto can chime in?
<KarlJoad> Hopefully. I am quite confused why this set of configurations is reliant on conforming with other tools' configurations.
onsails has quit [Quit: Leaving.]
<KarlJoad> Is there a good way to setup Emacs for Nix/home-manager development? Right now, I am only using nix-mode, but are there other tools that I could be using to make my life a little easier?
<KarlJoad> theduke: I am having a similar issue with my attempted clone.
<KarlJoad> Except, I have not tried to use the command-line argument. The nex tthing to test, I guess.
<KarlJoad> Just realized I'm stupid. My issue was different. Sorry.
<rschulman> If I add the unstable channel to my nixos configuration, can I then use those packages in my `home.nix`?
<rschulman> Or would it be better to put the unstable channel in my `home.nix` so that its portable across systems?
<KarlJoad> rschulman: It depends on how you add the unstable channel.
<KarlJoad> I fought with that type of problem for a long time. I have come to realize that it is typically easier to run everything off a stable channel, and only use the unstable for the few things that need it, until stable "catches up".
<KarlJoad> rycee: How should I test a new module for different systems? Do you have a preferred method to ensure things are compatible?
<nicolas[m]> If I am not mistaken, the "programs.home-manager.path" option lets you override the home-manager module to use (for development purposes for instance) without playing with NIX_PATH or the usual "-I" switch
<nicolas[m]> At least, that's how I used it when developing a new HM module
<KarlJoad> nicolas[m]: I have done that. However, the contribution manual also states that I should attempt to check for people not using NixOS and macOS. I have limited resources available, so I want to know if there is a good way to test the other platforms.
<rschulman> KarlJoad: Thanks, that's helpful insight.
<rschulman> KarlJoad: When you say "use unstable for just the few things that need it," are you doing so via `nix-env -iA`?
<KarlJoad> No. What I am only using unstable for the mu package on NixOS 20.03. So, I am using a one-liner in my system-wide config that imports the unstable channel and installs the mu package. However, I imagine it can be slightly modified for working with home-manager.
<KarlJoad> The problem I was running into was that I wanted to declaratively add channels, which Nix doesn't really like doing.
<KarlJoad> So, I have modified `nix.nixPath` in `/etc/nixos/configuration.nix` to have nixpkgs point at the nixexprs.tar.gz for the 20.03 channel.
<KarlJoad> The one-liner I use is: (import (fetchTarball "channel:nixos-unstable") {config = config.nixpkgs.config;}).mu
<KarlJoad> rycee: If a new module is added that does NOT write a config file, is a test needed?
voyd has joined #home-manager
quinn has joined #home-manager
johnw has joined #home-manager
<KarlJoad> What options are required in `services.emacs.*` for it to run on a systemd system? Just enable, or is socketActivation also required?
<voyd> Hi folks, I've been using nix+home-manager on my macbook for a while, and since I've started to regularly use my arch desktop too, I'd like to unify my home-manager configs (it's already using nix for some stuff). I tried to figure out how to use the same config file for both machines for 4 hours now. I'm using mkMerge and mkIf based on this post
<voyd> (https://www.reddit.com/r/NixOS/comments/8xxvcy/if_blocks_based_on_hostname_in_configurationnix/) but I don't have the networking option (`home-manager build` says "attribute 'networking' missing" ). Can someone point me in the right direction please? :(
cole-h has joined #home-manager
<KarlJoad> voyd: I do not see a networking attribute in home-manager's documentation.
voyd has quit [Remote host closed the connection]
voyd has joined #home-manager
<voyd> I didn't either. A good part of that time was spent figuring out where that "config" parameter was coming from, and the only resource I found was https://nixos.wiki/wiki/NixOS:config_argument and the writing modules nix docs. I thus assumed home.nix is a nix module. the man-page for home-configuration.nix is very long, and my searches for
<voyd> host-something or device-something didn't turn something up, so now I'm stuck, which is why I'm here.I also couldn't think of a way to inspect the config, since it's passed in as a parameter by, for my understanding, magic. I just need something to identify the machine by.
<voyd> Or do I really need to manually drop a file with an identifier?
<voyd> This has to be a common use case, right? I cannot be the only one who's forced to use MacOS at work?
<KarlJoad> The config parameter should be from within home-manager itself, I think. Thus, config.* is actually referring to home-manager's config attribute sets.
<KarlJoad> I'm looking around now.
voyd has quit [Remote host closed the connection]
<KarlJoad> You could try using a `nix repl` and, load the home-manager default.nix file, then `builtins.getEnv "MYENV"`
voyd has joined #home-manager
<voyd> I did that, but I don't understand what for tbh. I guess I could use `mkIf (builtins.getEnv "FOO" == "machine-specific-foo-that-I-set-somewhere") ...`, but then I wouldn't know where to best set this. I guess I could always go `mkIf (import ~/.voyds-machine-id == "macbook") ..`
<voyd> I've been using a hostname-based approach for some time with my homegrown bash-ruby-dotfiles-setup, so I've been looking for something similar
voyd has quit [Remote host closed the connection]
<KarlJoad> Yeah, I'm not sure how to help on that one.
voyd has joined #home-manager
<voyd> Don't worry, just talking to someone helped. I'll just manually drop the ~/.machine-name and be done with it :)
<voyd> Thank you
<KarlJoad> Of course, no problem.
<KarlJoad> What options are required in `services.emacs.*` for it to run on a systemd system? Just enable, or is socketActivation also required?
evanjs has quit [Read error: Connection reset by peer]
toraritte45 has joined #home-manager
evanjs has joined #home-manager
toraritte45 is now known as toraritte_x
<toraritte_x> hi, just tried to add yankring to the vim plugins, but it doesn't work (with either of its aliases), and there is also a newer version (from 2019) that hasn't been added yet. Just to make sure, these issues should be fixed in the nixpkgs repo, right? home-manager is just an extra layer
toraritte_x has quit [Remote host closed the connection]
toraritte_x has joined #home-manager
voyd has quit [Remote host closed the connection]
KarlJoad has quit [Quit: Konversation terminated!]
stephank has joined #home-manager
energizer_ has joined #home-manager
energizer_ is now known as energizer
KarlJoad has joined #home-manager
malSet has quit [Read error: Connection reset by peer]
malSet has joined #home-manager
<rycee> toraritte_x: I don't know much about the vim infrastructure in HM but I think it just pulls the plugins from Nixpkgs. You can always check the generated configuration and see if you find anything odd.
<rycee> If you don't find anything odd then the issue might be in Nixpkgs.
<rycee> KarlJoad: socketActivation is not required, I think it should be enough to set enable to true.
<KarlJoad> rycee: I'll double-check after I'm finished debugging something else.
<KarlJoad> rycee: Is there a list of all the places that symlinks end up? I have already found and removed the .nix-profile for a user, the user's home directory, their `/nix/var/nix/profiles/per-user/user` and their `/nix/var/nix/gcroots/per-user/user` directories. Yet, I still have a package sitting around from that user.
<rycee> KarlJoad: Does anything show up when you run `nix-store --gc --print-roots | egrep -v '^(/proc|/nix/var|/run/\w+-system|\{memory|\{temp|.*/\.cache/lorri)'`?
<rycee> Generally it should be enough to remove the dirs in profiles and gcroots.
<rycee> And then do a GC.
<KarlJoad> Ok. I think I'm starting to figure out the nature of the problem. I installed mu v1.2 while working on my home-manager pull request. However, 1.2 is too old, and is massively incompatible with v1.4, which is what I need to run. 1.2 is on the stable channel, 1.4 is only on unstable. So, I think home-manager is grabbing that version, which is why I can't seem to GC it.
<KarlJoad> Yep. That was my problem. When I refer to ${pkgs.mu} in a home-manager file, I get the mu v1.2, because I have no way to specify mu v1.4 in a nix-y way.
<rycee> Seems mu in 20.03 is 1.2 and unstable has 1.4.
<KarlJoad> Exactly. Both are incompatible with each other. I packaged mu v1.2 for home-manager today, which is why I had the wrong version sitting around. Worked around it by using `/run/current-system/...`
<rycee> Ah, you already said that :-)
<rycee> If you are using the master branch of Home Manager then it is assumed to work with the unstable branch of Nixpkgs.
<KarlJoad> Well, the method of packaging mu into a home-manager module is irrelevant, because there is no configuration file for the program. The module just installs mu into the user environment. All configuration must be done on the initial Maildir indexing
<KarlJoad> So, the version shouldn't matter.
KarlJoad has quit [Quit: Konversation terminated!]
KarlJoad has joined #home-manager
KarlJoad has quit [Quit: Konversation terminated!]
asymptotically has quit [Quit: Leaving]
toraritte_x has quit [Ping timeout: 245 seconds]
KarlJoad has joined #home-manager
<KarlJoad> Is there any reason the Emacs systemd daemon would not be able to load my mu4e config, but the system-wide emacs daemon can?
<KarlJoad> Sorry, I mean the systemd unit that is created by home-manager cannot load my configuration, but the /etc/nixos/configuration.nix systemd unit can.
KarlJoad has quit [Remote host closed the connection]
KarlJoad has joined #home-manager
__monty__ has quit [Quit: leaving]
<rycee> KarlJoad: Probably has something to do with PATH. You can try experimenting with the Environment value in the Emacs service module.
<rycee> I'm going to bed. Best of luck 😃
KarlJoad has quit [Quit: Konversation terminated!]
dermetfan has quit [Ping timeout: 272 seconds]