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
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 248 seconds]
mexisme has joined #home-manager
hmpffff has joined #home-manager
mexisme has quit [Ping timeout: 264 seconds]
<davidtwco> Do I need to do anything special to make "disabledModules" work when I'm importing home-manager as a NixOS module? I've tried "modules/programs/ssh.nix", "programs/ssh.nix" and "${homeManagerPath}/modules/programs/ssh.nix", none of them seem to work unfortunately.
<rycee> davidtwco: Try "programs/ssh.nix"
<rycee> Ah, sorry, you tried that.
<davidtwco> Yeah, unfortunately that doesn't work. It prints the path to what "${homeManagerPath}/modules/programs/ssh.nix" works out as, and the path to the module I'm importing from my fork.
<rycee> `disabledModules = [ "programs/ssh.nix" ];` seems to work for me.
<rycee> Yeah, I'm also able to import a replacement `programs.ssh` module.
<davidtwco> Huh. I wonder what's different w/ my configuration.
hmpffff has quit [Quit: Bye…]
<davidtwco> Does it matter that I import home-manager by adding 'imports = ["${homeManager}/nixos"];' to NixOS?
<rycee> Hmm, your config seems a bit odd. Which error are you actually getting?
<davidtwco> "error: The option `home-manager.users.david.programs.ssh.enable' in `/nix/store/cb2ww2rzm9yd9fi99c9vbks9p18ssrvb-source/modules/programs/ssh.nix' is already declared in `/nix/store/6qzd9n7nm7yv78w9lldp5a530idjchc8-source/modules/programs/ssh.nix'."
<rycee> I don't see you defining the programs.ssh options.
<davidtwco> It's in the "./ssh.nix" import.
<rycee> Ah, ok. You're using it in NixOS.
<rycee> I would think the disabledModules then need to be at the system level.
<davidtwco> I was hoping that I'd be able to use the same home-manager configuration on non-NixOS systems too by adding a home.nix to the root of the repository which just imports "user/david/home". I've only just started switching my dotfiles over to use home-manager.
<davidtwco> Wouldn't adding "programs/ssh.nix" to NixOS' "disabledModules" disable the programs.ssh from nixpkgs?
<rycee> Doesn't look very straight forward in `modules.nix` to disable modules that were imported from elsewhere.
<rycee> Not sure I understand it fully but from what I can tell `modules.nix` would need some changes and also the HM NixOS module would need to set some form of suitable key on the modules it imports.
<rycee> davidtwco: If you want some simpler solution I would recommend changing the name of your module to something else, if possible.
<davidtwco> rycee: I could do that, I intend to send a PR in with my changes once I've confirmed it works, but renaming the import would work for now.
<davidtwco> s/import/module
<davidtwco> Thanks for the help.
<rycee> Np. Good luck!
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 250 seconds]
pie_ has joined #home-manager
<davidtwco> rycee: are there stability guarantees w/ home-manager options? I'm trying to generalize the "localForwards" option in programs/ssh so that it supports socket paths too (which are valid but not mentioned in the manpage for ssh_config strangely), and to add support for remoteForwards and dynamicForwards (which only have one argument). Not sure how to support this nicely w/out breaking the current interface.
<rycee> Yes, please don't break people's configurations.
<rycee> Usually it's possible to figure out something backwards compatible if you think sufficiently long and hard.
<davidtwco> Alright, I'll keep at it then.
<rycee> It's also good to add test cases to avoid regressions. Some options are not very well tested so it can be a good idea to add tests for the old implementation before adding new features.
<davidtwco> Sure thing, thanks.
<davidtwco> Thanks for all the help, I've submitted https://github.com/rycee/home-manager/pull/813 with my changes, but I assume it will need some work.
aveltras has quit [Quit: Connection closed for inactivity]
pie_ has quit [Ping timeout: 252 seconds]
manveru has quit [Ping timeout: 250 seconds]
manveru has joined #home-manager
vdemeester has quit [Ping timeout: 250 seconds]
vdemeester has joined #home-manager
__monty__ has joined #home-manager
judson has joined #home-manager
judson_ has joined #home-manager
__monty__ has quit [Ping timeout: 248 seconds]
__monty__ has joined #home-manager
pie_ has joined #home-manager
pie_ has quit [Ping timeout: 250 seconds]
pie_ has joined #home-manager
__monty__ has quit [Quit: leaving]
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 250 seconds]
mexisme has joined #home-manager
maralorn has joined #home-manager