<devalot>
It's been a really long time since I used channels, but IIRC there should be a home-manger directory in one of those `channels` directories pointed to by your NIX_PATH.
<devalot>
If that's missing then that could be your problem. If it's there, then maybe you need to add an entry to NIX_PATH? I forget, sorry.
<la-jesystani>
howdy, im trying to get home-manaegr working with my nix flakes config, as per the snippet on the git page, but when i import my home.nix as it shows, building fails with the error "attribute 'formats' missing" from the line format = pkgs.formats.toml {};, and im unsure how to go about fixing this, any ideas?
<la-jesystani>
the error is coming from pet.nix
<cole-h>
You need to be on nixos-unstable to use home-manager from master
<cole-h>
If you're on 20.09 or 20.03, there is a separate release branch that you have to choose to match.
<la-jesystani>
i cant build my config with unstable because urwid gives me a python2.7 error, but ive set home-managers flake input to follow nixos unstable and still get the same error, is that not enough?
<la-jesystani>
im on 20.03 for everything else
<cole-h>
Can you paste your entire flake.nix somewhere?
<CptCaptain>
Is there a way to do that for systemd user timers using home-manager?
<dutchie>
yep, there's a `systemd.user.timers` option
<CptCaptain>
But then user's would need root privileges to create user units
<CptCaptain>
Nvm, I see it now. But, there is no way to do it like in my example using only specifying startAt and script?
<dutchie>
i don't think so, you just have to replicate the attributes of a systemd timer unit
kenran has quit [Quit: leaving]
hmpffff has quit [Ping timeout: 272 seconds]
hmpffff has joined #home-manager
khassanov[m] has left #home-manager ["Kicked by @appservice-irc:matrix.org : Idle for 30+ days"]
genevino has quit [Quit: Great minds discuss ideas. Average minds discuss events. Small minds discuss people.]
<pumpy>
after i run `nix-channel --add ... \n nix-channel --update` i try to run `nix-shell '<home-manager>' -A install` i but it errors error: file 'home-manager' was not found in the Nix search path. `nix-channel --list' shows a home-manager channel. my $NIX_PATH is
<pumpy>
/home/pumpy/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels. i tried to source `$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh` like manual says but file not found what's wrong?
CptCaptain has quit [Quit: WeeChat 2.9]
ohhaimark[m] has joined #home-manager
pickfire has joined #home-manager
<pickfire>
home-manager seemed to have an issue using nixUnstable, it shows something incompatible.
<{^_^}>
nix-community/home-manager#1479 (by happysalada, 6 weeks ago, closed): On unstable channel, home manager can't be built anymore because of manual combined
romanofski_ has quit [Read error: Connection reset by peer]
romanofski has joined #home-manager
<devalot>
pumpy: Okay, I just went through the channel steps to remind myself of how it all works. What does `ls ~/.nix-defexpr/channels` produce on your machine?
<pumpy>
devalot tyvm. it lists home-manager and manifest.nix
<devalot>
pumpy: Okay, so far so good. Let's just double check nothing is corrupted, does this file exist? /home/pumpy/.nix-defexpr/channels/home-manager/default.nix
<pumpy>
devalot yep
<devalot>
pumpy: And does this command work? nix-shell -A install /home/pumpy/.nix-defexpr/channels/home-manager/default.nix
<pumpy>
yep
<devalot>
That means somehow your NIX_PATH isn't set the way you think it is. Or maybe the manifest.nix file is broken.
<devalot>
By going directly to the default.nix file we've bypassed NIX_PATH/nix-channel
<pumpy>
this is repeatable
<pumpy>
i have a fresh nixos zfs volume snapshotted and i can reliably roll back to it, start nixos, deploy system's configuration.nix, then try to run these commands. fails same way every time
<pumpy>
if i log out then back in nix-shell '<home-manager>' -A install runs fine
cole-h has joined #home-manager
<pumpy>
so it's definitely a pathing/env issue
<pumpy>
the instructions say "On NixOS you may need to log out and back in for the channel to become available. " but what about for an unattended install? how do you do that
<pumpy>
i could hardcode the command like you showed me `nix-shell -A install /home/pumpy/.nix-defexpr/channels/home-manager/default.nix` but that feels kinda hacky no?
<cole-h>
tbh, if you want an unattended install, you probably want to use it as a NixOS module, as that needs no interaction (since h-m generations are intertwined with NixOS generations in that case)
hmpffff has quit [Ping timeout: 272 seconds]
<pumpy>
separating user and system config is a decision i've made for good reasons. i don't wanna change that when there's no good reason
<pumpy>
i can get by with the hardcoded command it just feels like there should be a better way
hmpffff has joined #home-manager
<pumpy>
it says to run `export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH` for non nixOS systems and i run nixOS but if i run it will that work for me too?
<cole-h>
Yes
<pumpy>
ok ill do that then. the instructions should maybe be fixed up?
<cole-h>
Where's the inaccuracy?
<pumpy>
it's wordedlike if you run nixos your only option is to log out/in
<cole-h>
Feel free to send a PR. I don't think it's incorrect, though. For the majority of users, logging out and back in (or starting a new shell) is probably what they want to do anyways
<cole-h>
e.g., if they switch h-m generations and have modified their `sessionVariables`, those won't get updated until they do so
<pumpy>
hm weird. i had ansible run that export command and install still fails
<pumpy>
ill just use the damn hardcoded path this sucks
<cole-h>
Well, unless ansible runs the entire thing in the same script, exporting PATH is just like shouting into the void, no?
<cole-h>
(Disclaimer: I've never used ansible)
<pumpy>
well that's what i thought, but then if it doesn't do it that way shouldn't a subsequent shell: command have the new path updated? yet it doesn't
<pumpy>
so it seems like either way it's broken
romanofski has joined #home-manager
<cole-h>
I don't really get what you're saying, but `export PATH` is not permanent
<cole-h>
NIX_PATH, that is
<cole-h>
You'd need to add that to some configuration that gets sourced by the shell for it to be permanent
<cole-h>
I'm assuming that ansible just runs the commands sequentially in different processes, so running `echo $NIX_PATH`, then `export NIX_PATH=fjdksla`, then `echo $NIX_PATH` again, NIX_PATH will remain the same because they're different processes
<cole-h>
It's akin to running `1.sh`, `2.sh`, `3.sh` with the same contents. The export only affects that process's environment and not any other sibling (not child) environments
<pumpy>
ya i dont know internally how ansible handles subsequent shell invokations
<cole-h>
I can almost guarantee it's just spawning a new process for each shell invocation
<pumpy>
can't it do it inline? like `NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH nix-shell '<home-manager>' -A install`
<cole-h>
That would work, provided $HOME is defined.
<cole-h>
s/would/should/
<pumpy>
ok that worked. i guess that's not much better (if at all) than nix-shell -A install /home/pumpy/.nix-defexpr/channels/home-manager/default.nix i guess i'll just use that
<pumpy>
if the paths change in the future it'll just fail and i'll look into it
<cole-h>
Dunno what that is, unless you're talking about the karma above.
<cole-h>
btw, you could probably use `bash -ic "nix-shell '<home-manager>' -A install"` or some variation upon that to make bash source the env vars it needs
<pumpy>
instuctions say "Home Manager is only able to set session variables automatically if it manages your Bash or Z shell configuration." where in docs can i read how to use home manager for setting up session vars?
<cole-h>
`programs.bash.enable = true;` I'd guess
<cole-h>
And it's sibling options
<pumpy>
oh i thought home manager had a way to replace using files like .profile
<pumpy>
to set env
<cole-h>
Oh
<cole-h>
`home.sessionVariables`
<cole-h>
But this relies on `$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh` being sourced
<pumpy>
"If you do not plan on having Home Manager manage your shell configuration then you must source the" <- how does home manager manage shell configuration?
<pumpy>
is that `home.sessionVariables` too?
<pumpy>
like everything that i normally put in .profile can i put in home.nix?
<cole-h>
Yes and yes. h-m manages shell configuration when enabling one of the shells (like the `bash.enable` above)
<pumpy>
ty ill read about that
<pumpy>
cole-h if you didn't tell me about programs.bash.enable how could i have found it myself?
<__monty__>
Doesn't that mean you blow away any keys you manualy authorized every time you rebuild your home config?
MmeQuignon has joined #home-manager
<cole-h>
Yep. Which is probably why it's not done -- it's stateful (fortunately or not)
romanofski has quit [Ping timeout: 272 seconds]
romanofski has joined #home-manager
kalbasit_ has quit [Ping timeout: 272 seconds]
<MmeQuignon>
I switched my hm install from module to standallone. Since, the password command is not able to find my password store, even if programs.password-store.settings.PASSWORD_STORE_DIR is set. It seems that the mbsync service has no access to some environment variables. For instance, I had to specify ${pkgs.<WHATEVER>} almost everywhere. It was working before. Any bell ringing ?
<MmeQuignon>
Sorry, forgot my manners. Hi everyone !
<devalot>
pumpy: You may want to look at an alternative to nix-channel. I like to use niv to pin home manager to a specific commit. You can do the same thing manually in a .nix file, or you can use flakes. All of these methods decouple you from the state of the system (active channels, environment variables, etc.)
<pumpy>
looks like bash is the default
romanofski has quit [Ping timeout: 256 seconds]
romanofski_ has joined #home-manager
MmeQuignon has quit [Ping timeout: 246 seconds]
MmeQuignon has joined #home-manager
cyphase has quit [Ping timeout: 258 seconds]
cyphase has joined #home-manager
<pumpy>
ty devalot
<pumpy>
anyone use ansible to work with nixos? im trying to run `home-manager switch` as a user (using become: yes and become_user: targetuser) and on the ansible task i specify environment: NIX_PATH: '~/.nix-defexpr/channels:$NIX_PATH' but it errors that home-manager command not found
<MmeQuignon>
Hi again : why is programs.vim.package a readonly field ?
{`-`}_ is now known as {`-`}
<MmeQuignon>
vim configuration isn't applied to gvim
__monty__ has quit [Quit: leaving]
genevino has joined #home-manager
MmeQuignon has quit [Ping timeout: 272 seconds]
hmpffff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]