NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.14k forks source link

lightdm-slick-greeter breaks my nixosConfiguration #187561

Closed johnrichardrinehart closed 2 years ago

johnrichardrinehart commented 2 years ago

Steps To Reproduce

$ nix flake update ~/code/repos/mine/JohnOS && sudo nixos-rebuild switch --flake ~/code/repos/mine/JohnOS#framework-laptop
warning: Git tree '/home/john/code/repos/mine/JohnOS' is dirty
warning: updating lock file '/home/john/code/repos/mine/JohnOS/flake.lock':
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/99294df80861eddc88d4de246846aebbc444b11e' (2022-08-20)
  → 'github:nixos/nixpkgs/29cb1c877c4b03ec4375d64aac019e5fc35c8c77' (2022-08-20)
warning: Git tree '/home/john/code/repos/mine/JohnOS' is dirty
warning: Git tree '/home/john/code/repos/mine/JohnOS' is dirty
building the system configuration...
warning: Git tree '/home/john/code/repos/mine/JohnOS' is dirty
error: The option `services.xserver.displayManager.lightdm.greeter.package' is defined multiple times.

       Definition values:
       - In `/nix/store/wsfkx2nl2b27inghbyyq951h09q02kcg-source/nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix': <derivation /nix/store/a7179idhq1xk792cylhqld99658h99a4-lightdm-slick-greeter-xgreeters.drv>
       - In `/nix/store/wsfkx2nl2b27inghbyyq951h09q02kcg-source/nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix': <derivation /nix/store/6vdhvx8yk7lwwzgm282vhz8xw38n95y7-enso-os-greeter-xgreeters.drv>
(use '--show-trace' to show detailed location information)

Additional context

It seems this was introduced by @bobby285271 and @water-sucks in 29cb1c877c4b03ec4375d64aac019e5fc35c8c77 in adding lightdm-slick-greeter. Building from that commit's immediate parent on master succeeds.

Notify maintainers

@water-sucks

configuration.nix details

  # Configure keymap in X11
  services.xserver = {
    enable = true;
    exportConfiguration = true; # https://github.com/NixOS/nixpkgs/issues/19629#issuecomment-368051434
    displayManager = {
      # https://www.reddit.com/r/unixporn/comments/a7rg63/oc_a_tiny_riceable_lightdm_greeter/eckzt15?utm_source=share&utm_medium=web2x&context=3
      defaultSession = "default"; # TODO: figure out a way to use another string besides default
      lightdm.greeters.enso.enable = true;
      lightdm.extraConfig = ''
        logind-check-graphical = true
      '';
    };

    desktopManager.session = [
      {
        manage = "window";
        name = "default";
        start = ''
          ${pkgs.runtimeShell} $HOME/.hm-xsession &
          waitPID=$!
        '';
      }
    ];
  };
bobby285271 commented 2 years ago

Yes I updated the cinnamon module to use slick greeter as default (since it is the default in mint, previously the module does not specify one and you will be default to the gtk-greeter in most case). If you already manually specified a greeter, we won't do any choice for you, so:

This is also the behavior if you use Pantheon that we will not silently disable any greeter for you if you explicitly specified one.


Edited: Sorry I relied too fast, but it is still worth to mention that for cinnamon users the default is changed and you can follow the above steps if you see a conflict (and to use gtk greeter again just disable the slick greeter). For other lightdm users if you see a greeter change (or a conflict) it is my fault and it is not expected, https://github.com/NixOS/nixpkgs/pull/187564 should be the fix.

johnrichardrinehart commented 2 years ago

https://github.com/NixOS/nixpkgs/pull/187564

bobby285271 commented 2 years ago

Ah I know what you mean, sorry for that! (I started the work from the gtk-greeter module and forget that services.xserver.displayManager.lightdm.greeters.gtk.enable is enabled by default).

bobby285271 commented 2 years ago

I pinned the issue, will unpin when the fix goes into nixos-unstable for a while. I am really sorry for the trouble here

johnrichardrinehart commented 2 years ago

@bobby285271 Not a big deal. I just pinned nixpkgs to my fork. Thanks for the prompt support!

johnrichardrinehart commented 2 years ago

@bobby285271 It looks like nixos-unstable doesn't have https://github.com/NixOS/nixpkgs/commit/29cb1c877c4b03ec4375d64aac019e5fc35c8c77, yet. So, when master goes to nixos-unstable then probably that breaking commit and https://github.com/NixOS/nixpkgs/commit/392c83491dcc21d17ab8ea1f809f8f7bd567a5a3 will land at the same time (atomically). I don't know if anyone else will experience my problem.

bobby285271 commented 2 years ago

It looks like 29cb1c877c4b03ec4375d64aac019e5fc35c8c77 stops nixosTests.pantheon from building with the same error, and since nixosTests.pantheon is a channel blocker for nixos-unstable this will not affect nixos-unstable users if you don't use cinnamon.

bobby285271 commented 2 years ago

nixos-unstable has updated twice since https://github.com/NixOS/nixpkgs/pull/187564 merged, I wish users that uses commits between https://github.com/NixOS/nixpkgs/compare/nixos-unstable...master do updated their system frequent and I wish we are safe to close this :sweat_drops: