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
boomshroom has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
<linarcx> rycee: Hi. i move all changes to xsession.nix, but when i want to test it locally, i get an error: error: `The option `xsession.enable' in `/nix/store/p73f7jbkdjyb6yjg8mynx1fn8v6xxd9h-source/modules/xsession.nix' is already declared in `/home/linarcx/Development/home-manager/modules/xsession.nix'.`
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
<iceypoi> I've been trying to import home-manager automatically, so I don't have to manually define a channel for it, but somehow I can't get the syntax right. Could anyone please take a quick look?
<rycee> linarcx: If you want to replace an existing module then you need to also add the old module to `disabledModules`, otherwise they'll conflict as you've noticed.
<rycee> iceypoi: If you don't want to use a pinned version then you'll need to use `builtins.fetchGit` (or `builtins.fetchTarball`)
<rycee> iceypoi: E.g. `imports = [ "${builtins.fetchGit { url = https://github.com/rycee/home-manager; ref = "master"; }}/nixos" ]`.
<rycee> iceypoi: But this means that your system configuration may not be buildable if you are offline.
<iceypoi> that's pretty much fine, i've got a fixed internet connection
<iceypoi> ok... firstly, initially I tried doing that using fetchFromGitHub and it caused an infinite recursion, don't quite understand why
<iceypoi> with fetchGit it gets further, but it's complaining that home-manager.users is already defined
<iceypoi> so it's somehow not merging anymore, any idea?
<rycee> Probably because you need to use pkgs to access the fetchFromGitHub function but pkgs depends on the result of the imports.
<iceypoi> I see, and the 2nd problem was just a double import, thx. It seems to work now!
<rycee> Cool :-)
<iceypoi> rycee++
<rycee> There is no such bot in this channel :-)
<iceypoi> noticed :D
<linarcx> rycee: Ok, i fix it. But now another error: `error: The option `xsession.windowManager.command' is used but not defined.`
<linarcx> And this is first lines of home.nix: https://gist.github.com/LinArcX/47469b00e5b86c64f801a6727345d628
<rycee> Yeah, because you haven't defined a window manager using `xsession.windowManager.command` or one of the window manager modules.
<rycee> Hmm, I might have misunderstood the purpose of this module. From what I can tell you are defining an entirely new X session management system?
<rycee> I.e., it's not using the `.xsession` file?
<linarcx> rycee: Not at all. it just create .xinitrc file in home user directory.
<linarcx> Let me explain more. i want to use startx without any display manager. but i alse should create .xinitrc manually.
<linarcx> With this feature i'm working on it, users can create .xinitrc declaratively via home manager.
<rycee> Hmm, will this still support user services that rely on `graphical-session-pre.target` and `graphical-session.target`?
<linarcx> I don't know nothing about them :(
<rycee> Ok, I think for inclusion into the HM repo it would need to integrate with those services and the other options that affect the X session. Like cursor configuration and such. Otherwise I think it will become quite confusing for users.
<rycee> Like, they'll wonder why their cursor configuration isn't applied and write tickets about that :-)
<linarcx> How can i ensure that it need to integrate with other service?
<rycee> linarcx: About https://gist.github.com/LinArcX/7f10e6f3c0b195023a3a2ef5c6d5536f the line `numlockx &` should be `${pkgs.numlockx}/bin/numlockx &`. That is what I meant by referring directly to the derivation output.
<rycee> (ideally it should be a one-shot systemd service, though :-)
<iceypoi> rycee: I was trying to set it up using systemd only yesterday and it didn't want to work
<iceypoi> numlock in x11, that is
linarcx has quit [Ping timeout: 250 seconds]
<rycee> linarcx: I guess the default session should be the one run by `xsession.windowManager.command`, then the window manager modules should have an effect. You'd also need to include the code added to `xsession.initExtra`. Also to source `~/.xprofile`, if it hasn't been sourced already.
<rycee> linarcx: Those are the things I can think of right now :-)
linarcx has joined #home-manager
linarcx has quit [Client Quit]
linarcx has joined #home-manager
<iceypoi> rycee: the problem with running it as systemd, was that with the startx displaymanager (i.e. none), X11 wouldn't be alive yet and therefore numlockx is not happy
<iceypoi> you really need to run it in user context after the x server is alive
<rycee> Isn't X11 running when .xinitrc is run?
<iceypoi> yes it is
<iceypoi> but there's no service for x11
<iceypoi> so you can't set up the dependency correctly if you only run the x server using startx
<rycee> There is graphical-session-pre.target and graphical-session.target.
<iceypoi> are those run even when you trigger startx manually?
<rycee> No, you'll have to fix that in xinitrc.
<iceypoi> because I only see display-manager.service show up in my systemd dependcies
<iceypoi> and it's not active
linarcx has quit [Ping timeout: 245 seconds]
<rycee> Also to stop the graphical-session targets after the session ends.
<iceypoi> oh I see, you mean to start the graphical-session during xinitrc?
linarcx has joined #home-manager
linarcx has quit [Client Quit]
<rycee> Yes.
<rycee> Well, hm-graphical-session.target
linarcx has joined #home-manager
<iceypoi> so we'd put the "exec .xsession" into its own service?
<iceypoi> ah no, I see what you mean, home manager already is creating a service, right?
<rycee> I don't know. Does startkde or openbox-session manage the graphical-session target?
<rycee> I assume plain window managers, like awesome won't so for them you'd have to do it.
<iceypoi> my generated .xsession calls "systemctl --user start hm-graphical-session.target"
<iceypoi> so that means, we should be able to use that for the dependencies
<rycee> Sorry, I'm confusing your problem with the .xinitrc thing.
<linarcx> rycee: You mean when the user hit startx command, the `graphical-session.target` should be trigger. right?
<rycee> iceypoi: Yes, if you want to run a service for an X session then you need to set it as part of `graphical-session.target`.
<rycee> linarcx: Yeah. Well it should start `hm-graphical-session.target`, not `graphical-session.target`.
<linarcx> rycee: Why? what is the purpose of `hm-graphical-session.target`?
<rycee> linarcx: To start `graphical-session-pre.target` and `graphical-session.target`.
<rycee> It just binds to graphical-session.target and requires graphical-session-pre.target
<iceypoi> right, that should work for the numlock thing
linarcx has quit [Ping timeout: 250 seconds]
<iceypoi> rycee: https://pastebin.com/FUZ26DyZ -> numlockx service working ;-)
linarcx has joined #home-manager
<linarcx> rycee: For numlocks i use your snippet and for the rest of .xinitrc i use my snippet. right?
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
linarcx has quit [Ping timeout: 252 seconds]
linarcx has joined #home-manager
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
linarcx has quit [Client Quit]
linarcx has joined #home-manager
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
linarcx has quit [Client Quit]
iceypoi has quit [Quit: WeeChat 2.4]
iceypoi has joined #home-manager
linarcx has joined #home-manager
iceypoi has quit [Quit: WeeChat 2.4]
iceypoi has joined #home-manager
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #home-manager
linarcx has quit [Client Quit]
linarcx has joined #home-manager
iceypoi has quit [Quit: WeeChat 2.4]
iceypoi has joined #home-manager
linarcx has quit [Quit: WeeChat 2.4]
iceypoi has quit [Quit: WeeChat 2.4]
iceypoi has joined #home-manager
iceypoi has quit [Quit: WeeChat 2.4]
iceypoi has joined #home-manager
iceypoi has quit [Client Quit]
iceypoi has joined #home-manager