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/xmonad: Fix behavior of config opt #95122

Merged
merged 1 commit into from Aug 21, 2020
Merged

Conversation

rudolph9
Copy link
Contributor

Prior to this change, the config option (which allows you define the
haskell configuration for xmonad in your configuration.nix instead of
needing something in the home directory) prevents desktop manager
resources from starting. This can be demonstrated by configuring the
following:

  services.xserver = {
    displayManager.defaultSession = "xfce+xmonad";
    displayManager.lightdm.enable = true;

    desktopManager.xterm.enable = false;
    desktopManager.xfce.enable = true;
    desktopManager.xfce.enableXfwm = false;
    desktopManager.xfce.noDesktop = true;

    windowManager.xmonad = {
      enable = true;
      enableContribAndExtras = true;
      extraPackages = haskellPackages: [
        haskellPackages.xmonad-contrib
        haskellPackages.xmonad-extras
        haskellPackages.xmonad
      ];
      config = ''
        import XMonad
        import XMonad.Config.Xfce
        main = xmonad xfceConfig
               { terminal = "terminator"
               , modMask = mod4Mask }
      '';
    };
  };

and after user log in, search for xfce processes ps aux | grep xfce.
You will not find xfce processes running until after the xmonad process is killed.

The prevents utilities included with the desktopManager,
(e.g. powerManagement, session logout, etc.)
from working as expected.

Motivation for this change
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.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

See below comment

Prior to this change, the `config` option (which allows you define the
haskell configuration for xmonad in your configuration.nix instead of
needing something in the home directory) prevents desktop manager
resources from starting. This can be demonstrated by configuring the
following:

```
  services.xserver = {
    displayManager.defaultSession = "xfce+xmonad";
    displayManager.lightdm.enable = true;

    desktopManager.xterm.enable = false;
    desktopManager.xfce.enable = true;
    desktopManager.xfce.enableXfwm = false;
    desktopManager.xfce.noDesktop = true;

    windowManager.xmonad = {
      enable = true;
      enableContribAndExtras = true;
      extraPackages = haskellPackages: [
        haskellPackages.xmonad-contrib
        haskellPackages.xmonad-extras
        haskellPackages.xmonad
      ];
      config = ''
        import XMonad
        import XMonad.Config.Xfce
        main = xmonad xfceConfig
               { terminal = "terminator"
               , modMask = mod4Mask }
      '';
    };
  };
```

and after user log in, search for xfce processes `ps aux | grep xfce`.
You will not find xfce processes running until after the xmonad process is killed.

The bug prevents utilities included with the desktopManager,
(e.g. powerManagement, session logout, etc.)
from working as expected.
@worldofpeace
Copy link
Contributor

@ofborg test xmonad

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

3 participants