Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/xfce: use sessionPackages #78421

Merged
merged 1 commit into from Jan 25, 2020

Conversation

worldofpeace
Copy link
Contributor

Motivation for this change

Use upstream session in nixpkgs.
Required a little fixup in the package.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@worldofpeace
Copy link
Contributor Author

What problem does it solve?
As a disadvantage: it becomes difficult to understand the boot sequence and so less hackable

It's simply the canonical way to do things. I'm not sure how it makes the boot sequence difficult, in the end the display manager will have a session file.

Copy link
Contributor

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not review https://git.xfce.org/xfce/xfce4-session/tree/scripts/startxfce4.in?h=xfce-4.14.0 but we were running xinitrc before too.

@jtojnar
Copy link
Contributor

jtojnar commented Jan 24, 2020

@volth The main benefit is reducing the NixOS modules in favour of upstream solutions, just like we do with tmpfiles.d, systemd services and so on.

@davidak
Copy link
Member

davidak commented Jan 25, 2020

@volth i use Pantheon for some time now :)

Copy link
Contributor

@romildo romildo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@worldofpeace worldofpeace merged commit 4c81350 into NixOS:master Jan 25, 2020
@worldofpeace worldofpeace deleted the upstream-session-xfce branch January 25, 2020 23:10
@jtojnar jtojnar added this to the 20.03 milestone Feb 6, 2020
@worldofpeace
Copy link
Contributor Author

worldofpeace commented Feb 6, 2020

From IRC with @jtojnar

worldofpeace https://github.com/NixOS/nixpkgs/pull/78421 should probably be mentioned in release notes as it disallows using Xfce as a DE with a different WM

worldofpeace: We use it as such in the example `defaultSession = "xfce+icewm";` in the release highlights 🤣️

Jan Tojnar: oh no, that's actually no good. I know a lot of people in NixOS use xfce with a different wm and they totally wouldn't be happy with that

Ideally the Xfce session would use sessionPackages and users can still construct + wm sessions.
@jtojnar can we even do that? If not, I guess we can revert this on master and release.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 6, 2020

We could provide both upstream session and our old one but dm=xfce with wm=none would clash with it.

We could provide option for switching between the two but that would be ugly.

Finally, we could add new option desktopManager.mixNmatchableDesktops and have:

services.xserver.desktopManager.session = map (desktop: {
      name = "mm-${desktop}";
      bgSupport = true;
      start = ''
        ${pkgs.dex}/bin/dex "${desktop}" &
        waitPID=$!
      '';
    }) cfg.desktopManager.mixNmatchableDesktops;

and then add desktopManager.mixNmatchableDesktops = "xfce"; to this module.

@worldofpeace
Copy link
Contributor Author

We could provide both upstream session and our old one but dm=xfce with wm=none would clash with it.

We could provide option for switching between the two but that would be ugly.

Finally, we could add new option desktopManager.mixNmatchableDesktops and have:

services.xserver.desktopManager.session = map (desktop: {
      name = "mm-${desktop}";
      bgSupport = true;
      start = ''
        ${pkgs.dex}/bin/dex "${desktop}" &
        waitPID=$!
      '';
    }) cfg.desktopManager.mixNmatchableDesktops;

and then add desktopManager.mixNmatchableDesktops = "xfce"; to this module.

It seems we have more features to implement 😄
I'm going to revert this one for now.

worldofpeace added a commit that referenced this pull request Feb 7, 2020
@bobby285271 bobby285271 added this to Xfce 4.20 in Xfce Apr 25, 2024
@bobby285271 bobby285271 removed this from Xfce 4.20 in Xfce Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants