ChanServ changed the topic of #home-manager to: Support and discussion around the Home Manager project (https://github.com/nix-community/home-manager) | Logs: https://logs.nix.samueldr.com/home-manager
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
joesventek has quit [Quit: Quit]
rajivr has joined #home-manager
joesventek has joined #home-manager
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
<aterius> Is there a convenient way to get a list of all symlinks created by home-manager? I'd like to create a deny list for borg backups
joesventek has quit [Quit: Quit]
<mtr> builtins.map (x: home.file.${x}.target or x) (builtins.attrNames home.file)
<mtr> aterius: I didn't try that code but it looks about right?
<aterius> Ah thanks, I'll give that a shot :)
<mtr> just trying to remember if `or` is actually a thing in nix haha
<cole-h> It is
<mtr> good good, ty
<cole-h> Used for when the attr doesn't exist
<cole-h> or might not exist
<aterius> hmm how does HM expose home, I'm using the lower level homeManagerConfiguration function from hm lib
<aterius> (looking now)
<cole-h> home is an option
<cole-h> so you probably want `builtins.attrNames config.home.file`
<cole-h> (options.home.file is the definition, config.home.file is the final value)
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
<aterius> Works :) Now just need to get around the infinite recursion error to write it out
<cole-h> Yeah, if you want to write it to a file with home.file, you're gonna get inf recursion...
<cole-h> I don't remember if the xdg file options are implemented in terms of home.file or not. If they aren't, you could probably write to there.
<cole-h> otherwise, you'll probably just want to `builtins.trace`
joesventek has quit [Client Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
<mtr> I had not considered the recursion, oh dear
<mtr> could filter out the name of the file you're outputting to?
<aterius> Maybe that will work
<mtr> so the last argument to map would become `(builtins.filter (y: y != "all-symlinks.txt") (builtins.attrNames config.home.file))`
<mtr> bit of a mess :s
<mtr> I'm off to bed but I hope you get it working!
<aterius> No, I think nix is too smart
<aterius> ` home.file."test" = builtins.map (x: x.file.${x}.target or x) (builtins.filter (match: match != "test") (builtins.attrNames config.home.file));
<aterius> `
<aterius> Still throws an infinite recursion error :/
<aterius> Thanks for the help!
<aterius> Oh this is actually way easier
<aterius> the activation script has a directory with all of the symlinks
kalbasit has joined #home-manager
kalbasit has quit [Quit: kalbasit]
kalbasit has joined #home-manager
kalbasit has quit [Quit: WeeChat 2.9]
srk has quit [Remote host closed the connection]
srk has joined #home-manager
Nickelfront has joined #home-manager
kalbasit has joined #home-manager
kalbasit has quit [Quit: WeeChat 2.9]
Nickelfront has quit [Quit: Connection closed]
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
kalbasit has joined #home-manager
joesventek has joined #home-manager
joesventek has quit [Client Quit]
kalbasit has quit [Quit: brb]
joesventek has joined #home-manager
kalbasit has joined #home-manager
kalbasit has quit [Client Quit]
joesventek has quit [Client Quit]
cole-h has quit [Quit: zzz]
joesventek has joined #home-manager
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
sorki has joined #home-manager
srk has quit [Ping timeout: 240 seconds]
sorki is now known as srk
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
__monty__ has joined #home-manager
aveltras has joined #home-manager
joesventek has quit [Quit: Quit]
<aveltras> isn't the ".nix-profile/etc/profile.d/hm-session-vars.sh" script supposed to contain something more than the following ?
<aveltras> is there a way to disable the "# -*- mode: sh -*-" in generated .profile script ? this breaks when im trying to source $HOME/.nix-profile/etc/profile.d/nix.sh
<piegames> aveltras: Only if you configure some environment variables
<aveltras> piegames: do you have an example ?
<piegames> aveltras: If you enable the XDG module, it will set `XDG_CACHE_HOME`, `XDG_CONFIG_HOME`, etc. in there. If you enable the option for non-NixOS support, it will also source `.nix-profile/etc/profile.d/nix.sh`.
<aveltras> piegames: what do you mean by enabling the option for non nixos support ?
joesventek has joined #home-manager
<aveltras> piegames: found it ! https://nix-community.github.io/home-manager/options.html#opt-targets.genericLinux.enable
<aveltras> piegames: thanks for your help, been banging my head against this for 2 hours
<aveltras> it works fine now
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
joesventek has quit [Quit: Quit]
aveltras has quit [Quit: Connection closed for inactivity]
joesventek has joined #home-manager
EncodePanda has joined #home-manager
<EncodePanda> hi, I have a quick question
<EncodePanda> I've recently have set up my new machine using home-manager and I LOVE it
<EncodePanda> but :)
<EncodePanda> when I enter nix-shell of some nix based project (and I don't use --pure) I don't have access to the software that I have configured with home-manager
<EncodePanda> is there any workaround to that?
<EncodePanda> I use zsh (default on MacOS Catalina), nix-shell enters Bash - not sure if this is relevant but maybe
<simpson> It's a little relevant, yes; Darwin's not NixOS, so the remedy might be different.
<simpson> I'm not a Darwin pro, but I imagine that direnv might smooth over some of this. https://github.com/direnv/direnv/wiki/Nix The idea is that direnv hooks into zsh, nix-shell still runs bash, but direnv takes the exported values from bash and puts them in zsh.
<simpson> The fact that --pure matters is strange and I don't understand why that would be the case.
<EncodePanda> I know about direnv, and i use nix-direnv, so thank you simpson for that one - it is the workaround I use for now :)
<EncodePanda> but sometimes I want to enter nix-shell even to exepriment with some tools
<EncodePanda> and suddenly missing my command line tools is unpleasent :)
<simpson> Right. And while I agree with you that it sounds like shell-to-shell frictions, I don't know the solution.
<EncodePanda> I mean here's the deal. Before home-manager (when installing stuff via nix-env) I was able to have all my tools with me on nix-shell
<EncodePanda> it's only whith home manager that I'm having issues, but it is all symbolic links at the end of the day, so I wonder what makes it different
<EncodePanda> but thank you simpson for direnv link, i think more ppl should know about it
<simpson> No worries. Best of luck.
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Read error: Connection reset by peer]
joesventek has joined #home-manager
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
<__monty__> EncodePanda: Hmm, I don't think I get that behavior. Maybe you have a bashrc which overrides PATH or something?
<EncodePanda> I have a fix
<EncodePanda> from colleague
<EncodePanda> "I bet it's profile related. I recommend making a shell alias for nix-shell --run zsh anyway, since that's what you want most of the time"
<EncodePanda> and worked like a charm
<__monty__> Because afaik even shells should inherit the environment.
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
kalbasit has joined #home-manager
joesventek has quit [Client Quit]
Slen has joined #home-manager
Slen has quit [Client Quit]
S-len has joined #home-manager
joesventek has joined #home-manager
joesventek has quit [Client Quit]
<S-len> Quick question, should I put my i3 setup stuff in my OS-wide or home manager config? Is there even any difference between the two on a single user pc?
rajivr has quit [Quit: Connection closed for inactivity]
cole-h has joined #home-manager
superherointj has joined #home-manager
<superherointj> Hello.
<superherointj> I have created a Home-Manager module for HexChat and it works but I'm struggling with one thing. Home-manager requires HexChat config file (~/.config/hexchat/hexchat.conf) to be non-existent, which makes sense as protective measure. But the problem is, even if I manually remove the file, on closing HexChat it will save config to it blocking Home-Manager from being able to manage configuration. Any suggestion on how
<superherointj> I should be dealing with it?
<superherointj> Home-Manager users that have enabled HexChat configuration actually want Home-Manager to manage the HexChat configuration. Replacing this file is not a big deal. I want to figure out how I should be handling this case.
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
<mtr> superherointj: I've done this recently for weechat: I had the files managed by HM point to a temporary location, then copied it into the right place using the onChange attr; pretty messy solution but it seems to be working
<superherointj> mtr, thanks for reporting your experience! I will give it a try.
<superherointj> And I agree, there should be a better solution than this.
<mtr> superherointj: there might very well be a nice solution; I'm by no means an authority on this stuff haha
cole-h has quit [Quit: Goodbye]
cole-h has joined #home-manager
<piegames> S-len: Tough question, with many different opinions. I personally configure as much as possible per user and thus in home-manager. I've seen people do everything in their NixOS config and then create ad-hoc home-manager modules within that config where needed.
<piegames> superherointj: Maybe https://github.com/nix-community/home-manager/pull/1250 solves your use case?
<{^_^}> nix-community/home-manager#1250 (by piegamesde, 34 weeks ago, open): files: Don't create conflict for existing, but identical files
<piegames> The linked issues contain some more discussion of alternative solutions and workarounds
EncodePanda has quit [Quit: Connection closed]
<superherointj> Thanks for link piegames. The files are not equal.
veleiro has joined #home-manager
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
S-len has quit [Quit: Connection closed]
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
joesventek has quit [Quit: Quit]
thibm has joined #home-manager
EncodePanda has joined #home-manager
EncodePanda has quit [Client Quit]
joesventek has joined #home-manager
EncodePanda has joined #home-manager
joesventek has quit [Client Quit]
joesventek has joined #home-manager
testelo has joined #home-manager
joesventek has quit [Client Quit]
testelo has quit [Client Quit]
joesventek has joined #home-manager
EncodePanda has quit [Ping timeout: 272 seconds]
joesventek has quit [Quit: Quit]
joesventek has joined #home-manager
joesventek has quit [Client Quit]
EncodePanda has joined #home-manager
EncodePanda has quit [Ping timeout: 264 seconds]
__monty__ has quit [Quit: leaving]
joesventek has joined #home-manager