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
dbyte has quit [Read error: Connection reset by peer]
dbyte has joined #home-manager
mexisme has joined #home-manager
mexisme has quit [Read error: Connection reset by peer]
hmpffff_ has joined #home-manager
hmpffff has quit [Ping timeout: 276 seconds]
mexisme has joined #home-manager
andi- has quit [Remote host closed the connection]
andi- has joined #home-manager
mexisme has quit [Read error: Connection reset by peer]
dbyte has quit [Read error: Connection reset by peer]
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 258 seconds]
tdeo has quit [Quit: Quit]
tdeo has joined #home-manager
tdeo has joined #home-manager
tdeo has quit [Changing host]
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 268 seconds]
pie_ has quit [Ping timeout: 245 seconds]
maralorn has quit [Quit: WeeChat 2.4]
maralorn has joined #home-manager
mexisme has joined #home-manager
hyperfekt has joined #home-manager
__monty__ has joined #home-manager
mexisme has quit [Ping timeout: 245 seconds]
evanjs- has joined #home-manager
evanjs- has quit [Client Quit]
evanjs- has joined #home-manager
evanjs- has quit [Quit: ZNC 1.7.4 - https://znc.in]
evanjs- has joined #home-manager
MmeQuignon has joined #home-manager
<MmeQuignon> Hi ! I have a problem with mpd configuration, I think I do something wrong but I wanted to be sure. The path specified in "services.mpd.musicDirectory" references the folder where my music is stored. But when I load the configuration, I get this warning : "warning: dumping very large path (> 256 MiB); this may run out of memory" and a few seconds later this error : "error: Nix daemon out of memory".
<MmeQuignon> I would like to know what I'm doing wrong and how to solve it.
<alexarice[m]> MmeQuignon: looking at the source, all it does with the musicDirectory is copy it as a string into an mpd config file, so this shouldn't cause any problems
<alexarice[m]> could you post the full configuration?
<MmeQuignon> yes
<MmeQuignon> The mpd configuration is at the bottom
<alexarice[m]> and you don't get the problem with mpd disabled
<MmeQuignon> yes
<MmeQuignon> I mean, no I don't
<MmeQuignon> ^^'
<alexarice[m]> what if the musicDirectory is set to an empty folder
<MmeQuignon> Everything is ok
<MmeQuignon> (just re-tested)
<alexarice[m]> I'm not sure if this is the issue, but I wasn't aware nix paths accepted `~`. Can you try with the full path
<MmeQuignon> Same problem with the absolute path
<alexarice[m]> that's strange, it really seems like it's trying to copy your music directory
<MmeQuignon> If I let the default value ($HOME/music)
<alexarice[m]> or at least hash it to tell if it has changed
<MmeQuignon> I mv my folder
<MmeQuignon> It works
<MmeQuignon> Oh, is this a problem If this folder is a symlink ?
<alexarice[m]> I'm not sure tbh
<alexarice[m]> This is a silly idea but what happens if you pass in the path as a string
<alexarice[m]> as in the one you want
<MmeQuignon> type error
<MmeQuignon> (tried yesterday)
<alexarice[m]> huh, the default is a string
<alexarice[m]> try "${config.home.homeDirectory}/Musique" instead of "~/Musique"?
<alexarice[m]> The check for paths just converts to string and checks if the first character is a "/"
<__monty__> I think `$HOME` works.
<alexarice[m]> I admit I'm kind of making stuff up at this point
<alexarice[m]> The only thing I can think of is that nix checks the whole directory you link to see if it needs to rebuild the derivation
<MmeQuignon> It works
<alexarice[m]> it works with the string?
<MmeQuignon> Yes
<alexarice[m]> I didn't think that would actually work, that's ridiculous
<MmeQuignon> musicDirectory = "${config.home.homeDirectory}/music";
<alexarice[m]> does it work with the directory you wanted?
<MmeQuignon> Yes
<alexarice[m]> my only guess is that it's down to low level nix behaviour
<MmeQuignon> $HOME/Music was a symbolinc link to a backed up folder
<MmeQuignon> So the path referenced this symlink
<MmeQuignon> I don't know if this is a problem.
<MmeQuignon> was referencing*
<alexarice[m]> I have no idea, but I'm glad it's working now
<MmeQuignon> Yes !
<MmeQuignon> I have something to ask : Why home-manager isn't officially supported by nix ?
<__monty__> I guess because most people just use configuration.nix instead?
<alexarice[m]> also what would it mean for it to be officially supported?
<MmeQuignon> Well, an extra option in the configuration.nix to enable it
<MmeQuignon> for example.
<alexarice[m]> I suppose the nixos module could be moved into nixpkgs
<__monty__> Maybe it's not stable enough yet?
<alexarice[m]> I am under the impression it is all separate as it would be harder to maintain if all commits had to be pushed into nixpkgs
<__monty__> If it just works though, is any "official" status even useful?
pie_ has joined #home-manager
shyim has joined #home-manager
<MmeQuignon> It's not about the status, but about the ways we have to use it.
<alexarice[m]> the nixos module which is part of home-manager is only a couple of extra steps
<MmeQuignon> Yes, it's not complicated
<MmeQuignon> But I'm just asking myself this is not a builtin feature. That's all.
<MmeQuignon> +why
<alexarice[m]> Perhaps no one has asked for it to be a builtin feature?
<__monty__> The reason it's not more integrated is just time afaik.
<MmeQuignon> That's just a feature I would like to have ^^
<alexarice[m]> I'd be surprised if a pr to add home-manager nixos module to nixpkgs was rejected
<__monty__> Nix is pretty new, HM is much newer. Maybe not everyone agrees HM is the best/right way to manage a home directory using nix, or whether that's a good idea in the first place?
<MmeQuignon> Maybe
<shyim> Hey, is there any page where can i see all options from home manager? :D
<MmeQuignon> oops
<shyim> Thanks :D
<__monty__> Ftfy : )
<__monty__> I agree that link is not too easily found. It's hidden in the readme.
emiller88 has joined #home-manager
evanjs- has quit [Quit: ZNC 1.7.4 - https://znc.in]
evanjs- has joined #home-manager
emiller88 has quit [Ping timeout: 245 seconds]
gjabell has quit [Quit: ZNC - https://znc.in]
gjabell has joined #home-manager
mexisme has joined #home-manager
emiller88 has joined #home-manager
mexisme has quit [Ping timeout: 250 seconds]
evanjs- has quit [Quit: ZNC 1.7.4 - https://znc.in]
evanjs- has joined #home-manager
hax404 has quit [Ping timeout: 264 seconds]
hax404 has joined #home-manager
emiller88 is now known as Emiller88
<rycee> MmeQuignon: The problem with `musicDirectory = ~/Musique;` is that paths pointed out by path literals will be copied to the Nix store when they are interpolated into a string.
<MmeQuignon> rycee: Thank you ! It was quiet confusing :')
<rycee> Yeah, it's not entirely obvious sometimes why things are moved to the Nix store but generally it boils down to this.
<alexarice[m]> rycee: MmeQuignon feel it would be useful to have a "string path" type or something to avoid situations like this
<infinisil> It's possible to use `apply = toString` in an options definition to make sure it's never copied to the store
<rycee> infinisil: Yeah, that's a good idea.
<rycee> Bleh, got myself a yubikey and now I have to run to find my keychain whenever I want to do something with ssh or gpg :-)
<infinisil> Hehe
<infinisil> rycee: Just wrote this type which works too, maybe this should be in nixpkgs: https://paste.infinisil.com/mFZ2RXaaOE
* infinisil is also just noticing that the encoding in his pastes are messed up for some reason
<rycee> Yeah, such a type would be handy to have some times, like now.
<rycee> An alternative name might be `impurePath`.
<rycee> Or something else, it's not immediately obvious what `runtimePath` or `impurePath` does :-)
<infinisil> rycee: But then also, those names aren't correct if you set the option to `builtins.path { url = ./foo/bar; }`, which forces it into the stor
<infinisil> e
<infinisil> Although, runtimePath would still be correct actually, because the store path will then be present at runtime
<rycee> Aye. Or `"${~/blah}"`.
<infinisil> Ah yeah
<infinisil> rycee: Maybe the type should straight up disallow store paths, unless you set it with some special lib.importSecretIntoStore
<rycee> `wontCopyToNixStoreUnlessYouDoSoExplicitlyPath` …
<infinisil> Very catchy, I like it
<alexarice[m]> Even putting a note in descriptions could be useful
<rycee> Yeah, was just thinking the same. Types like `storePath` and `nonStorePath`, respectively might be handy.
<rycee> I'm not certain how to produce an error before the file is actually copied to the Nix store, though.
<infinisil> builtins.getContext :D
<rycee> Perhaps by checking if the string has a context…
<infinisil> (can probably not be used in nixpkgs because of the minimum nix version)
<rycee> In HM I use `builtins.hasContext` when checking whether a store safe file name should be set: https://github.com/rycee/home-manager/blob/e347e932afb1fe3b3c545c4ac7a4d90cd2072fde/modules/files.nix#L17-L24
<infinisil> Ah yeah I saw that recently
<infinisil> That should work, forgot about hasContext
<rycee> I should submit `storeFileName` for inclusion in Nixpkgs at some point, it's quite convenient.
Emiller88 has quit [Ping timeout: 245 seconds]
<rycee> infinisil: The `apply = toString` trick seems to work fine, made a PR: https://github.com/rycee/home-manager/pull/843
<infinisil> Nice
mexisme has joined #home-manager
hmpffff_ has quit [Quit: nchrrrr…]
evanjs- has quit [Quit: ZNC 1.7.4 - https://znc.in]
evanjs- has joined #home-manager
mexisme has quit [Quit: WeeChat 2.5]
<infinisil> rycee: Would be cool if you could expose https://github.com/rycee/home-manager/tree/master/modules/lib in your nur packages
<rycee> infinisil: Ah, yeah I could give that a try.
<rycee> But I suspect it won't work since it would cause a download of HM from github and the NUR travis doesn't like that :-/
evanjs- has quit [Quit: ZNC 1.7.4 - https://znc.in]
<infinisil> Ah hm yeah
<infinisil> Maybe it would be possible to move the lib parts over to the nur repo
<infinisil> And then pass it to home-manager through that
<rycee> I might duplicate the most interesting parts like the dag thingy. Not sure it would be nice to cause a dependency on my NUR from HM.
<rycee> I'm heading to bed, might have time to look at it tomorrow evening.
evanjs- has joined #home-manager
<infinisil> Cool, good night :)
evanjs- has quit [Ping timeout: 258 seconds]
__monty__ has quit [Quit: leaving]
mexisme has joined #home-manager
mexisme has quit [Client Quit]
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 245 seconds]
{^_^} has quit [Remote host closed the connection]
{^_^} has joined #home-manager
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 258 seconds]
judson has quit [Ping timeout: 246 seconds]