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
wohanley has quit [Remote host closed the connection]
woiemfwo has joined #home-manager
woiemfwo has quit [Remote host closed the connection]
kloenk has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
kloenk has joined #home-manager
cjpbirkbeck has quit [Quit: cjpbirkbeck]
malSet has quit [Quit: Quit.]
malSet has joined #home-manager
<dutchie> ugh ms teams
<dutchie> it keeps modifying my ~/.config/mimeapps.list so home-manager won't run properly without me manually deleting it all the time
__monty__ has joined #home-manager
asymptotically has joined #home-manager
<maralorn> I was actually playing with an activationscript that would copy to my home-dir instead of symlinking. (Needed it in a context where the /nix/store was only available in a chroot.) There the mode option could work.
<maralorn> On the other hand that would pretty much cheat `aerc` in regard to the security it trys to enforce …
kenran_ has joined #home-manager
<kenran_> Hello, how can I execute a command after all the files (`home.file."some-file".source = ...`) have been symlinked into my home directory? On my NixOS system I used `dagEntryAfter [ "writeBoundary" ]` and that seemed to work, but on this macOS system I get `/Users/me/.ssh/id_rsa: No such file or directory`
<maralorn> kenran_: Not an expert. But have you confirmed that that file is actually created at the end of the activation, when not using your special command?
dermetfan has joined #home-manager
<kenran_> maralorn: Yes. it's there, as well as the .pub file and the config. The command I want to execute is an `ssh-add`, so it might in the end be better to just use the `onChange` option I just learned about. Though I don't know whether that triggers when the file is added initially
<maralorn> kenran_: Pretty sure it is.
<kenran_> But now the `home-manager switch` (after removing the command temporarily) is stuck at `Activating onFilesChange`
<kenran_> Hum. I would actually expect the `ssh-add` not to work, judging from the output, as the `home.activation.` stuff I set is all done before I see `Creating home file links in $HOME`
<maralorn> kenran_: onFilesChange is meant for stuff like restart systemd units. So that definitely has to happen after those new files got deployed.
<kenran_> maralorn: perfect, thanks! It works fine with onChange now and I get it to run to the end. Now I see I have to fix permissions on my private key file. Would onChange be an OK place to put the chmod as well or is there another way to ensure the files have the correct permissions. Do they perhaps carry over from how they're committed?
<maralorn> kenran_: Ase woeifjsl just experiencd yesterday, that is more complicated. You have placed your private key file into the nix-store which makes it world readable on your system. The file at ~/.ssh/id_rsa is just a symlink and symlinks can‘t change permissions. For files in the nix-store you also can‘t change permission.
<maralorn> So my way to deal with this is not to track private-keys declaratively.
<kenran_> maralorn: Hum, then I might do it the same way I manage my mutable .emacs.d submodule and create a hacky symlink to the file in my config without copying it to the nix store
<kenran_> Or is there something about this I'm not seeing?
<maralorn> kenran_: What you could do in theory is overwriting the symlink with a real copy of the file in anActivation script. But a) then you would be lying to ssh regarding the security of your key, since there would still be a world readable copy in your nix-store. and b) it‘s a bit hairy to get right. e.g. home-manager trys to not override existing files on activation, you will need to circumvent that protection (and
<maralorn> therefore loosing it.)
<maralorn> kenran_: Yeah, that sounds like a good solution.
<kenran_> what did you mean with "Ase woeifjsl" btw
<maralorn> kenran_: I meant "as woeifjsl" where woeifjsl is a nick in this channel. ;-)
<maralorn> Sorry for my clumsy typing …
* maralorn considers using a type checker …
kenran_ has quit [Remote host closed the connection]
kenran_ has joined #home-manager
dermetfan has quit [Ping timeout: 260 seconds]
dermetfan has joined #home-manager
dermetfan has quit [Ping timeout: 260 seconds]
dermetfan has joined #home-manager
dermetfan has quit [Ping timeout: 246 seconds]
hpfr[m] has quit [Quit: killed]
jonge[m] has quit [Quit: killed]
Ox4A6F has quit [Quit: killed]
dash has quit [Quit: killed]
NobbZ[m] has quit [Quit: killed]
philipp[m] has quit [Quit: killed]
freeman42x[m] has quit [Quit: killed]
ohhaimark[m] has quit [Quit: killed]
rschulman has quit [Quit: killed]
benkolera has quit [Quit: killed]
allisonf has quit [Quit: killed]
AsbjrnOlling[m] has quit [Quit: killed]
DamienCassou has quit [Quit: killed]
jschievink has quit [Quit: killed]
Dandellion has quit [Quit: killed]
maralorn has quit [Quit: killed]
JJJollyjim has quit [Quit: killed]
g[m]3 has quit [Quit: killed]
Ericson2314 has quit [Quit: killed]
spinlock[m] has quit [Quit: killed]
rycee has quit [Quit: killed]
enick_919 has quit [Quit: killed]
alexarice[m] has quit [Quit: killed]
theduke has quit [Quit: killed]
ZerataX has quit [Quit: killed]
toraritte has quit [Quit: killed]
colemickens has quit [Quit: killed]
sparogy has quit [Quit: killed]
aterius has quit [Quit: killed]
Notkea[m] has quit [Quit: killed]
nicolas[m] has quit [Quit: killed]
siraben has quit [Quit: killed]
khassanov[m] has quit [Quit: killed]
<KarlJoad`> So, home-manager sets an environment variable when setting up MSMTP, and I can echo it from the command line, but Emacs cannot see it. Is this proper behavior?
benkolera has joined #home-manager
<__monty__> Are you starting emacs in your environment or as a service?
<KarlJoad`> Right now, I am using a little of both, and neither is seeing the environment variable.
<KarlJoad`> I have an old emacs instance running that was started manually, which did have the environment variable set at that time.
<KarlJoad`> I also have a server instance running that I restarted recently (last night), and the environment variable should have been se then.
<KarlJoad`> The server instance's systemd unit was created by NixOS, not home-manager.
DamienCassou has joined #home-manager
freeman42x[m] has joined #home-manager
dash has joined #home-manager
maralorn has joined #home-manager
colemickens has joined #home-manager
jonge[m] has joined #home-manager
toraritte has joined #home-manager
ohhaimark[m] has joined #home-manager
NobbZ[m] has joined #home-manager
Notkea[m] has joined #home-manager
Ox4A6F has joined #home-manager
aterius has joined #home-manager
jschievink has joined #home-manager
rschulman has joined #home-manager
Dandellion has joined #home-manager
ZerataX has joined #home-manager
JJJollyjim has joined #home-manager
g[m] has joined #home-manager
Ericson2314 has joined #home-manager
siraben has joined #home-manager
theduke has joined #home-manager
hpfr[m] has joined #home-manager
sparogy has joined #home-manager
rycee has joined #home-manager
khassanov[m] has joined #home-manager
AsbjrnOlling[m] has joined #home-manager
spinlock[m] has joined #home-manager
Philipp[m]1 has joined #home-manager
alexarice[m] has joined #home-manager
enick_806 has joined #home-manager
allisonf has joined #home-manager
nicolas[m] has joined #home-manager
<__monty__> A system service wouldn't have access to your user environment.
<KarlJoad`> And that makes sense. But why wouldn't my manually started versions of emacs not see the variable?
<__monty__> Do they use the server?
<KarlJoad`> No, those were manually started processes that did not connect to the running server, but generate their own.
<KarlJoad`> But, I just figured out the problem. I haven't logged out and logged in since I actually set those environment variables a few days ago.
<KarlJoad`> Just tried opening a new emacs instance, not connected to the server, on TTY1, and it grabbed the environment variable just fine.
dermetfan has joined #home-manager
KarlJoad` has left #home-manager ["ERC (IRC client for Emacs 26.3)"]
kenran_ has quit [Remote host closed the connection]
KarlJoad has joined #home-manager
<KarlJoad> So... I'm looking through MSMTP's nix file right now, and I noticed the `home.sessionVariables` being set.
<KarlJoad> The environment variables are properly set, but MSMTP will never use them, because the scripts for queuing mail have not been modified to use the environment variables.
cole-h has joined #home-manager
dermetfan has quit [Ping timeout: 260 seconds]
<dutchie> I have a nix-shell script (starting with #! /usr/bin/env nix-shell and #! nix-shell -i python3 -p "python3.withPackages (p: [ p.requests ])") which is triggered by a timer with Persistent=yes
<dutchie> if I log in and it's due to have been triggered, it fails with "/usr/bin/env: ‘nix-shell’: No such file or directory"
<dutchie> if I run it with `systemctl --user start` then it works fine, and if it gets triggered at its regular time then it works too
<dutchie> what could be going on there?
<immae> dutchie: do you have something that does "systemctl set-environment ..." somewhere late in your startup scripts? (and that sets something like PATH or so)
<immae> (by "you" it could be something done by nixos by degault too)
<immae> default*
<dutchie> immae: i haven't set anything like that up, but could be
<immae> that the only hint that comes to mind (aka race condition)
spinlock[m] has quit [Quit: Idle for 30+ days]
asymptotically has quit [Quit: Leaving]
dermetfan has joined #home-manager
kenran has joined #home-manager
<kenran> Can and/or should I set my user's shell via home-manager? So far I've opted for setting my shell to "${pkgs.zsh}/bin/zsh" in tmux and my terminal, but wonder whether I did that correctly and if I didn't miss something else
<dutchie> kenran: you should probably set your shell in configuration.nix through users.users.<name>.shell
<kenran> dutchie: hum yeah, I can do that ofc, but that would have no effect on my macOS system which I run at work
<__monty__> I like to keep all my user config out of configuration.nix and in home.nix
<kenran> __monty__: that's what I'd like to do with the shell part at least. But how/where can I define it in home.nix, if at all possible?
<__monty__> I'm actually not sure. I do have programs.fish enabled but I set my shell in configuration.nix for both nixos and nix-darwin.
cole-h has quit [Quit: Goodbye]
asymptotically has joined #home-manager
kenran has quit [Quit: leaving]
__monty__ has quit [Quit: leaving]
asymptotically has quit [Quit: Leaving]
quinn_ has quit [Ping timeout: 240 seconds]
dermetfan has quit [Ping timeout: 246 seconds]
quinn has joined #home-manager
<colemickens> Is it possible to merge bqv-flakes and master? Does HM not want to merge it while it's unstable or still in RFC?
<colemickens> My secret goal is to the get the same system output with my own home-rolled pinning solution and flakes. Right now I can't because of diffs in HM between branches.
<colemickens> (Where as nixpkgs has flakes merged into master so the rest of the system is identical)