<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'.`
<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>
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>
(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`?