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
evalexpr has quit [Ping timeout: 265 seconds]
__monty__ has quit [Quit: leaving]
andi- has quit [Ping timeout: 240 seconds]
andi- has joined #home-manager
kalbasit has quit [Ping timeout: 256 seconds]
cole-h has joined #home-manager
<nicolas[m]> or you know, `builtins.readFile ../profiles/sway.conf`
kalbasit has joined #home-manager
kalbasit has quit [Ping timeout: 256 seconds]
<rogerr> i found a bug in nixos i need help fixing. https://termbin.com/ph65 has minimal reproducible config and details
stephank has quit [Quit: stephank]
stephank has joined #home-manager
sorki has quit [Remote host closed the connection]
sorki has joined #home-manager
justanotheruser has joined #home-manager
srk has quit [Quit: ZNC - http://znc.in]
sorki is now known as srk
ardumont has joined #home-manager
cole-h has quit [Quit: Goodbye]
__monty__ has joined #home-manager
thibm has joined #home-manager
justanotheruser has quit [Ping timeout: 240 seconds]
Reventlov has quit [Quit: WeeChat 2.3]
justanotheruser has joined #home-manager
<rogerr> i found a bug in nixos i need help fixing. https://termbin.com/agal has minimal reproducible config and details (updated config)
kalbasit has joined #home-manager
<rogerr> nvm im tired of being harassed by simpson when im trying to find the root cause of this issue to help nixos/home manager fix the bug. im gonna use a personal fix and nixos/home manager can stay buggy and get fuckd
DanielEbbert[m] has joined #home-manager
cole-h has joined #home-manager
<DanielEbbert[m]> Hello everybody. I just start out using NixOS and am currently getting to know Home Manager. What I would like to have is being able to manage my window manager (sway) using Home Manager. So I have `services.xserver.enable = true;` in my `configuration.nix` and `xsession.enable = true;` in the `home.nix`. However, I can't log in using the display manager. Am I missing something? Maybe because sway is wayland?
<__monty__> DanielEbbert[m]: Yeah, those are specific to X11 configurations. I'm not sure what you'd need to set in configuration.nix but in your home.nix you'd use the `wayland.windowManager.sway` options.
<DanielEbbert[m]> I have the sway options set
<DanielEbbert[m]> But yes, the question is what to set in the configuration.nix to start a wayland session that is configured using home-manager.
<rogerr> DanielEbbert[m] just be aware if you're gonna use nixos that the maintainers don't care about bugs. your nix config can mean something should work, but if there's bugs they won't care
<rogerr> i spent 5 days tracking down a bug and was told to modify the code rather than them fix it
<rogerr> not to mention abuse by ppl like simpson
<piegames1> DanielEbbert[m]: You set up your NixOS configuration to start a sway session. Then, you use the `wayland.windowManager.sway` of home-manager to create the sway configuration you want.
<__monty__> rogerr: What problem did you run into? This doesn't sound like the experience most people have with the nix community.
<DanielEbbert[m]> <piegames1 "Daniel Ebbert: You set up your N"> So that would be programs.sway.enable = true; ?
<rogerr> i found a bug in nixos i need help fixing. https://termbin.com/agal has minimal reproducible config and details. startwm.sh https://termbin.com/tpth, xprofile https://termbin.com/xbzi, hm-session-vars.sh https://termbin.com/ptuw1
<rogerr> that was as far as i got before being told off by gchristianson
<piegames1> DanielEbbert[m]: Sorry, I'm out on NixOS, as I'm still on Arch Linux.
<rogerr> gchristensen
<DanielEbbert[m]> <piegames1 "Daniel Ebbert: Sorry, I'm out on"> As am I 😀
<piegames1> DanielEbbert[m]: I'm confused. Whixh OS are you on? You said "I just start out using NixOS"
<__monty__> rogerr Well that's a whole heap of stuff. How'd you configure your PATH?
<rogerr> __monty__ well it's a reproducible case. i used home.sessionPath to add what i wanted
<rogerr> works in ssh, not in rdp
<DanielEbbert[m]> <piegames1 "Daniel Ebbert: I'm confused. Whi"> My current production system is Arch but I'm trying NixOS as I am thinking of switching. But until I have my configuration somewhat replicated on NixOS the NixOS is running in an VM.
<DanielEbbert[m]> That's one of the cool things that made me consider switching, I can work on the configuration I want in an VM and then switch once it's ready (enough).
<piegames1> DanielEbbert[m]: Even better: you can configure your Sway with home-manager while still being on Arch Linux.
<DanielEbbert[m]> <piegames1 "Daniel Ebbert: Even better: you "> Yeah, I read that somewhere but did not look into it.
<__monty__> Yeah, HM doesn't require NixOS, just Nix. But if you're looking to switch I'd stick with setting everything up in the VM.
c0c0 has quit [Quit: WeeChat 2.9]
<piegames1> __monty__: True. Once you set up HM on your Arch, you'll take years in that "wanting to switch to NixOS" state.
<DanielEbbert[m]> <DanielEbbert[m] "So that would be programs.sway.e"> Got it! That was it.
<DanielEbbert[m]> No on to the keyboard layout ... :D
<__monty__> rogerr: Maybe you're running into this issue? https://serverfault.com/questions/709777/xrdp-changing-path-environment-variable
<__monty__> Hmm, no, your startwm.sh doesn't have that code.
<__monty__> rogerr: Hmm, I'm not clear on how this would be a NixOS bug though? Sounds like xrdp is doing something funky? NixOS/home-manager can't be expected to workaround all quirky software. Have you tried raising this issue with the xrdp developers? To at least get a motivation for why they would clobber the environment?
<rogerr> because it's not even mentioned in the docs. so there's this hidden bug that wastes hours of nix user's time
<rogerr> if that's how nixos operates it's a joke
<rogerr> home.sessionPath should have a caveat that it doesn't work with services.xrdp
<rogerr> or SOMETHING
<rogerr> i can work around this issue on freebsd, so nixos could too if its maintainers cared
<piegames1> rogerr: I disagree on that. `home.sessionPath` sets the correct environment variables to work. If xrdp does not honour them and thus leads to faulty behaviour, that's a bug on their side.
kalbasit_ has joined #home-manager
kalbasit has quit [Ping timeout: 256 seconds]
<rogerr> wish i knew that before i tried to help nixos. ill be sure to never try to help nixos again
<rogerr> waste of time
pinpox is now known as |^_^|
|^_^| is now known as pinpox
<__monty__> rogerr: Did you try contacting the xrdp devs? Giving up on NixOS over a single issue would be too bad. Users who take the time to distill problems to a minimal reproduceable example are great to have as part of the community!
<nicolas[m]> rogerr: for the xrdp stuff, you can specify a custom package with `services.xrdp.package`. you would need to pass something like `pkgs.xrdp.overrideAttrs (old: { patches = old.patches or [ ] ++ [ ./your-patch.patch ]; })`
<nicolas[m]> the only solution to use the right PATH is to patch the C file
<__monty__> That does sound like the best workaround until the xrdp devs fix the problem.
<rogerr> i already set up a workaround but im not ever gonna contribute to nixos again
<rogerr> or *try
<__monty__> Well that's too bad. Your choice though, of course.
<DanielEbbert[m]> Damn, the more I use it the more I like it. Having everything in one config file is great.
<nicolas[m]> rogerr: I wonder whether setting `security.pam.services.xrdp-sesman.setEnvironment = true;` would be enough?
<rogerr> DanielEbbert[m] it is until you need to work around something but you can't because the config files are read only
<rogerr> nicolas[m] ill try
<nicolas[m]> oh nvm, it sets `readenv=0`
<rogerr> damn does it?
<rogerr> that was the last idea i had
<__monty__> Why would the config files be read-only? That sounds like a choice.
<rogerr> that's how nix and home manager does it
<nicolas[m]> that option will read variables from `environment.sessionVariables`, which won't work with home-manager environment variables
<nicolas[m]> home-manager and nixos are two different things really
<nicolas[m]> home-manager is user-centric, so it won't change anything outside of your home really
<__monty__> rogerr: You mean you're not supposed to edit the generated configuration files? That's because it's impossible to declaratively configure *and* allow for stateful changes.
<__monty__> Those two use cases are inherently at odds.
<rogerr> ya im just saying that when the 'ruled by config file' breaks down, it breaks down badly
pinpox is now known as |^_^|
<dash> not inherently, it's just impractical given typical unix behavior
<rogerr> i was able to work around this problem with xrdp on freebsd but can't on nixos
<nicolas[m]> and what did you do on freebsd?
<dash> yeah a lot of making nix/nixos usable is knowing how to shove terrible hacks in it instead of doing everything properly
<rogerr> in startwm.sh i changed exec i3 to exec env -U "$USER" i3 and it works
|^_^| is now known as pinpox
<rogerr> that injected my full env into i3's run
<nicolas[m]> can you define properly?
<rogerr> pardon?
<dash> nicolas: I mean knowing about how to use override, overrideAttrs, etc
<rogerr> oh, not me
<nicolas[m]> right, Nix introduces a lot of ideas and navigating through all of it is difficult at times
<rogerr> so my point is i could work around xrdp clobbering env in freebsd, but nixos i can't unless i modify sourcecode and stuff because the maintainers won't integrate the workaround into their module
<rogerr> total blowoff attitude
<__monty__> Did you open an issue?
<nicolas[m]> Do you have control over the nixos generated startwm.sh?
<dash> hmm, pretty sure you can throw it in there yourself
* dash looks at xrdp in nixpkgs
<rogerr> nicolas[m] no
<__monty__> Doesn't look like the module supports changing startwm.sh. You could add one in ~/startwm.sh though I think. Or maybe you can override `config.defaultWindowManager` just for the module as a hack.
<dash> oh, that's a bit nastier than it has to be :-[
<rogerr> __monty__ no i dont have github
<rogerr> i looked at man env and it doesn't have -U like freebsd has so i wouldn't even know what to do if i could modify startwm.sh
<__monty__> Yeah, I don't see similar functionality in coreutils env.
<__monty__> Have you tried contacting the xrdp devs? Ideally they'd fix the software or at least provide a patch you can use. Imo that'd be the most productive way forward.
<rogerr> dont know how. #xrdp is dead and i dont have github
<__monty__> Well, crap. If we came up with a workaround I'd be happy to post an issue or PR for the NixOS module. But as it stands it seems like nothing short of patching the software would fix the problem on linux distros.
<__monty__> Env missing the -U flag isn't unique to NixOS.
<rogerr> that's not setting it directly on i3 but might get it closer
<rogerr> is `export PATH=$PATH:~/foo` the right syntax to try right before i3 is exec?
<rogerr> no it wouldnt work
<__monty__> Pretty much, though that'd end up including the PWD in the PATH if PATH is unset when you run that export.
<rogerr> it wouldnt work anyway i just realized
<rogerr> https://termbin.com/tpth check the line right before i3 exec
<rogerr> $PATH is correct there
<__monty__> Yeah, but if env -U i3 works then PATH=blah i3 should work too.
<rogerr> hmmm
<rogerr> ill try that
<rogerr> like `PATH=$PATH:~/foo /nix/store/asdfasdfasdf/bin/i3`?
<rogerr> that didn't work
<__monty__> Yeah, and if that doesn't work, try env PATH=blah i3.
<rogerr> didn't work
<__monty__> Then something else is going on. Maybe the FreeBSD version of xrdp has been patched not to clobber the environment?
<rogerr> no it clobbered
<rogerr> btw why doesn't nixos have exec i3? just has i3
<rogerr> that's only difference i see
<__monty__> I don't know why. All exec does is make the new process replace the currently running process. Maybe that gets it to inherit the environment though, so try adding exec? (I'd be surprised.)
<rogerr> ya nope
<__monty__> Btw, rogerr, I totally forgot to say that if you want, you can just completely override a module using overlays. It's pretty easy. I didn't get around to saying this because we didn't find a way to make it work even with changes to startwm.sh but maybe it's an easier way for you to experiment?
<rogerr> ty but i've given up
<rogerr> is there a user dir we can put binaries in that will be picked up by path?
<__monty__> No, that's not how PATH works. Only binaries in directories on the PATH will be picked up.
<rogerr> that's what im asking
<rogerr> are there any hard coded user dirs, like in a user account
<rogerr> i see some in $PATH like ~/.nix-profile/bin
<rogerr> dunno if it's safe to use tho
<__monty__> rogerr: I don't understand the question. That's where nix ordinarily puts binaries yes. And it's added to the your PATH by a file sourced by your shell.
<rogerr> k ill try asking another way. are there any $PATH dirs in my home account i can put my own binaries?
<__monty__> Hmm, I'm afraid the answer is no. home.sessionPath would be the way to add such dirs.
<rogerr> ya too bad that doesn't work with the rdp config
<rogerr> nixos is such a piece of shit
<__monty__> NixOS can't be expected to cope with any and all quirky software.
<rogerr> then dont integrate it into the OS as a services module
<dash> no, it really can
<rogerr> ^
<__monty__> dash: Not out-of-the-box.
<dash> nixos is post-box software
<__monty__> You need to be prepared to put in some work. NixOS is far from a finished project.
<rogerr> i dont see it listed beta anywhere
<rogerr> it's more "fuck the users" software
<rycee> rogerr: Please mind your language.
<rogerr> and i did put in work. i wasted 4 days tracking down the source of the problem and nixos devs had nothing but "fix it yourself or fuck off" attitude
<rogerr> k
<piegames1> Would you mind either going back to topic (home-manager) or move the discussion into another channel?
<rycee> Also, this channel is not for discussions about NixOS.
<rogerr> it's important to warn ppl to not use nixos otherwise they'll be burned
<rogerr> the problem is just as much with home manager
<rogerr> same "culture"
<rycee> Please keep such discussions to #nixos or #nixos-chat for more general discussions.
<rogerr> home manager coulda found a way to work around the issue like i did in my freebsd account, but doesn't care just like nixos
<dash> rogerr: it's hard to care about everything to the same level
<rogerr> i was here providing issue reports and details. the atittude is very clearly "f the users"
<dash> fortunately you can fix this stuff yourself even if the version in nixpkgs/home-manager/etc doesn't suit you
<nicolas[m]> the users are also the maintainers
<rogerr> ya in order to use nixos/home manager i have to learn C and do custom packaging
<rogerr> not much good if you're a new user that can't even get a basic environment set up
<nicolas[m]> stuff in nixos/home-manager move by user initiative
<rogerr> it's not like it's a fringe thing, it's literally an RDP service in the base OS
<rogerr> i tried to affect positive movement and was told off
<rogerr> like i am now
<dash> let's take this over to the other channel
<rogerr> you don't see rycee digging into a solution do you? you only see "watch your language"
<rogerr> nah, waste of my time
<dash> nah it's just that this is a nixpkgs problem not a home-manager one
<rogerr> anything that might help nixos at this point i'm not engaging in
<rycee> rogerr: Unfortunately I'm at work at the moment.
<rycee> rogerr: I also do not know anything about RDP so I think I would not be of much help anyway.
<rycee> rogerr: I really wish I could spend more time fixing issues but my time is quite limited with a full-time work as well as family life. If you or anybody else are willing then I would be able to set up a consulting contract that would allow me to move some work time to HM time.
<rogerr> i understand. but also understand my side, i can't even get an initial basic working environment. im not going to support that. in fact im going to dissuade everyone i can from using nixos/home manager because of it
<rogerr> i've gone to contribute to software before, writing a new feature, and i clone the repo and can't even get a working build. if devs care that little about their software, new users aren't going to care more
<__monty__> rogerr: You're not making it at all pleasant to help you tbh.
<rogerr> imagine, rdp to i3 with a dir added to $PATH being too much for an OS in 2020
<rogerr> i understand but i've had it
<rogerr> ill just stop talking about it
<__monty__> Since you got stuck on xrdp, try simply dropping it from your config and coming back to it once you have a better understanding of NixOS.
<rogerr> but i wont stop dissuading ppl from using nixos/home manager. in fact i'm going to go out of my way on a permanent basis to that end
<rogerr> no
<thibm> I'm sorry, why are you still here then?
<__monty__> That's called being vindictive. And if that's your attitude I expect you'll be banned from any and all nix communities.
<rogerr> im going to put together logs of gchristiansen and simpson being abusive and dismissive about bugs in their OS and show ppl how shitty it is to be a user
<rogerr> it's called warning ppl so they dont waste the same time i did
<rogerr> if you want to ban ppl for that ill add that to my notes
<__monty__> At least two of us have spent over an hour trying to help you out...
<nicolas[m]> you should make a blog post about it while you are on it
<rycee> rogerr: Please move the discussion to #nixos-chat. The current topic is not very applicable for this channel.
<nicolas[m]> see if you get one or two person to read it
<rycee> Btw, now that I'm here. Anybody use HM on a headless system?
<Dandellion> I do
<__monty__> Kind of, I use a laptop as pretty much a headless system.
<rycee> I've been trying to switch over the systemd unit switching to the sd-switch binary instead of the old hacky solution(s): https://github.com/nix-community/home-manager/pull/1618
<dash> haven't really had a need to since all my headless systems are nixos
<{^_^}> nix-community/home-manager#1618 (by rycee, 1 week ago, open): systemd: use sd-switch
<rycee> But for some reason it doesn't seem to find the systemd dbus socket for misuzu.
<rycee> Nixpkgs unstable should be using a socket activated user dbus session since a number of weeks by now so I was curious if anybody has seen anything similar?
<rycee> Hopefully I'll get some time to set up a headless system in a VM on the weekend to do some experiments :-)
<piegames1> rycee: o/
<rycee> piegames1: You've seen something similar?
<rycee> Specifically, "D-Bus error: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 (org.freedesktop.DBus.Error.NotSupported))" on a system with socket activated dbus.
<piegames1> Nope, sorry. I haven't used my config for systemd services (yet)
<rycee> No worries. In any case, if anybody can think of a reason for getting "D-Bus error: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 (org.freedesktop.DBus.Error.NotSupported))" on a system where `DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus` then feel free to comment on the PR :-)
<rycee> I'll head to bed. Cya!
thibm has quit [Quit: WeeChat 2.6]
devalot has joined #home-manager
__monty__ has quit [Quit: leaving]
srk has quit [Ping timeout: 240 seconds]
srk has joined #home-manager
immae has quit [Quit: WeeChat 2.9]