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
<devalot> pumpy: Does `nix-channel --list' show a home-manager channel?
<pumpy> ya, it's th eonly 1 devalot
<devalot> And what is your $NIX_PATH environment variable set to?
<pumpy> it's /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 devalot
<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.
drakonis has quit [Quit: ZNC 1.8.2 - https://znc.in]
drakonis has joined #home-manager
kenran has joined #home-manager
kenran has quit [Ping timeout: 246 seconds]
la-jesystani has joined #home-manager
<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?
<cole-h> ,paste
<{^_^}> Use a website such as [ https://gist.github.com/ http://ix.io/ https://hastebin.com/ http://sprunge.us/ https://paste.ee/ ] or similar services to share anything that's longer than a couple lines.
<la-jesystani> one sec let me edit out the secret
<cole-h> (Just FYI: all your secrets will be world-readable in the Nix store if it's anywhere in the flake)
<la-jesystani> i know, im doing it locally for now until I can get it working, then im fixing all of that
<la-jesystani> here are the files: https://regularflolloping.com/flake.nix
<la-jesystani> also for iwakura.nix, root.nix, thorn.nix and thorn-home.nix which are referenced
stephank has quit [Quit: stephank]
stephank has joined #home-manager
<cole-h> And could you also paste the error, please?
<la-jesystani> one sec ill get it with trace
<cole-h> (You might need to `--update-input` your nixpkgs and home-manager inputs, maybe)
<cole-h> la-jesystani: Unrelated, but your `system.stateVersion` setting is malformed -- it should just be `20.03`
<la-jesystani> oh thanks i didnt realise
<cole-h> Note the `with python2Packages;`
<cole-h> la-jesystani: You could make an override for `python2Packages.urwid` which sets `disabled = false;`
<cole-h> Which should fix this
<cole-h> Unless it was disabled for a reason.
<la-jesystani> thank you :)
<cole-h> (If networking doesn't work with that override, you may need to switch away from wicd)
la-jesystani has quit [Remote host closed the connection]
kenran has joined #home-manager
kenran has quit [Ping timeout: 265 seconds]
kalbasit_ has joined #home-manager
alexbakker has quit [Quit: Dikke doei]
alexbakker has joined #home-manager
hmpffff has joined #home-manager
hmpffff has quit [Client Quit]
kenran has joined #home-manager
kenran has quit [Ping timeout: 246 seconds]
hmpffff has joined #home-manager
cole-h has quit [Ping timeout: 272 seconds]
kenran has joined #home-manager
kenran has quit [Ping timeout: 240 seconds]
__monty__ has joined #home-manager
Notkea[m] has quit [Quit: killed]
colemickens has quit [Quit: killed]
pinage404[m] has quit [Quit: killed]
Ox4A6F has quit [Quit: killed]
jonge[m] has quit [Quit: killed]
Ericson2314 has quit [Quit: killed]
philipp[m] has quit [Quit: killed]
NobbZ[m] has quit [Quit: killed]
nicolas[m] has quit [Quit: killed]
aterius has quit [Quit: killed]
maralorn has quit [Quit: killed]
DamienCassou has quit [Quit: killed]
jschievink has quit [Quit: killed]
bbigras has quit [Quit: killed]
SumnerEvans[m] has quit [Quit: killed]
humancalico[m] has quit [Quit: killed]
aaronjanse has quit [Quit: killed]
rycee has quit [Quit: killed]
khassanov[m] has quit [Quit: killed]
hpfr has quit [Quit: killed]
ZerataX has quit [Quit: killed]
Asbjrn[m] has quit [Quit: killed]
benkolera has quit [Quit: killed]
Ke has quit [Quit: killed]
Jezhehim[m] has quit [Quit: killed]
siraben has quit [Quit: killed]
alexarice[m] has quit [Quit: killed]
JJJollyjim has quit [Quit: killed]
theduke has quit [Quit: killed]
lukebfox[m] has quit [Quit: killed]
Dandellion has quit [Quit: killed]
dash has quit [Quit: killed]
tristan[m] has quit [Quit: killed]
ks2048[m] has quit [Quit: killed]
enick_232 has quit [Quit: killed]
kenran has joined #home-manager
khassanov[m] has joined #home-manager
humancalico[m] has joined #home-manager
siraben has joined #home-manager
bbigras has joined #home-manager
colemickens has joined #home-manager
NobbZ[m] has joined #home-manager
pinage404[m] has joined #home-manager
Ke has joined #home-manager
philipp[m] has joined #home-manager
jonge[m] has joined #home-manager
Ox4A6F has joined #home-manager
jschievink has joined #home-manager
hpfr has joined #home-manager
theduke has joined #home-manager
benkolera has joined #home-manager
rycee has joined #home-manager
JJJollyjim has joined #home-manager
aterius has joined #home-manager
Dandellion has joined #home-manager
maralorn has joined #home-manager
Ericson2314 has joined #home-manager
Notkea[m] has joined #home-manager
DamienCassou has joined #home-manager
dash has joined #home-manager
enick_967 has joined #home-manager
alexarice[m] has joined #home-manager
Jezhehim[m] has joined #home-manager
tristan[m] has joined #home-manager
nicolas[m] has joined #home-manager
SumnerEvans[m] has joined #home-manager
ks2048[m] has joined #home-manager
aaronjanse has joined #home-manager
ZerataX has joined #home-manager
lukebfox[m] has joined #home-manager
CptCaptain has joined #home-manager
<CptCaptain> In regular nix, you can easily create timer's like this:
<CptCaptain> systemd.services.my-timer = { startAt = "8:00"; script = "foo"; };
<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
romanofski has quit [Quit: ZNC 1.7.4 - https://znc.in]
<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
<pumpy> does nixos use ~/.login_conf?
<pumpy> does/can
<pumpy> sorry i should ask that in its channel
<cole-h> I've never seen that, so probably not.
<cole-h> `rg '\.login_conf' ~/workspace/vcs/nixpkgs/master; echo $status` -> 1
<cole-h> So, doesn't seem like it
<pumpy> ty
<pumpy> cole-h++
<{^_^}> cole-h's karma got increased to 98
<pumpy> do you have reward bot in here?
<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
<cole-h> in your `shell: command` thing
<pumpy> karma ya, that here?
<pumpy> work firewall doesn't let me go there
<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?
<cole-h> Correct.
<cole-h> There's also `man home-configuration.nix`
<pumpy> it's really tough to navigate because it's so long
<cole-h> Good thing you can search with `/` ;)
<pumpy> a thing like https://search.nixos.org/options?channel=20.03&query= would help a lot
<pumpy> im a new user giving you feedback. im not looking to start an argument
<pumpy> does home manager have a way to manage authorized_keys of ~/.ssh?
<cole-h> `home.file.".ssh/authorized_keys".text = "........";`
<__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 !
pinpox has quit [Quit: The Lounge - https://thelounge.chat]
pinpox has joined #home-manager
pinpox has quit [Client Quit]
pinpox has joined #home-manager
<pumpy> cole-h "Which is probably why it's not done" what isn't done?
<__monty__> Managing authorized_keys with home-manager.
<cole-h> Managing authorized_keys declaratively
<pumpy> why not do it? it seems smart
<pumpy> if you want a declarative reproducible config, you won't do things like manual ssh key adding no?
<__monty__> You'll have to every time something about the host you connect to changes.
<cole-h> Wait monty, maybe you're thinking about known_hosts
<cole-h> s/you're/we're/
<__monty__> Oh, right.
pinpox has quit [Client Quit]
<__monty__> Yep, that's exactly what I was thinking of.
<cole-h> :x
<cole-h> x) *
pinpox has joined #home-manager
<cole-h> So yeah, you'd just use `home.file.".ssh/authorized_keys".text = "ssh-rsa fdsajklfjdsklfjlda host";`
evanjs has quit [Quit: ZNC 1.8.1 - https://znc.in]
evanjs has joined #home-manager
<__monty__> Surely you mean ssh-ed25519? ; )
pinpox has quit [Client Quit]
<cole-h> Yes, but that's much longer to type :D
pinpox has joined #home-manager
pinpox has quit [Client Quit]
pinpox has joined #home-manager
pinpox has quit [Client Quit]
<pumpy> hehe
pinpox has joined #home-manager
<pumpy> is bash a special case or something? because my home.nix doesn't specify any shell at all yet i can still login
<cole-h> Your shell is specified by the system in /etc/passwd
<cole-h> On NixOS, it's specified by `users.users.<name>.shell`
romanofski has quit [Quit: ZNC 1.7.4 - https://znc.in]
romanofski has joined #home-manager
<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…]