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

Package the (Pop!_OS) COSMIC Desktop Environment #144411

Closed
wants to merge 7 commits into from

Conversation

Enzime
Copy link
Member

@Enzime Enzime commented Nov 3, 2021

Motivation for this change

Currently not all the packages work on GNOME 41 so I've based this off 21.05 which has GNOME 40.

This is a combination of #104160 and #102150 and closes #92769.

Some inspiration from https://gitlab.manjaro.org/packages/community/gnome/cosmic :)

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages 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/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Nov 3, 2021
@Enzime Enzime requested a review from a team November 3, 2021 10:34
@Enzime Enzime changed the base branch from nixos-21.05 to release-21.05 November 3, 2021 10:34
@Enzime
Copy link
Member Author

Enzime commented Nov 3, 2021

@ofborg eval

pkgs/desktops/gnome/extensions/pop-shell/default.nix Outdated Show resolved Hide resolved
pkgs/desktops/gnome/extensions/pop-cosmic/default.nix Outdated Show resolved Hide resolved
pkgs/desktops/gnome/extensions/cosmic-dock/default.nix Outdated Show resolved Hide resolved
pkgs/desktops/gnome/core/pop-desktop-widget/default.nix Outdated Show resolved Hide resolved
sha256 = "sha256-QBQBtBSj+J87yAQhYMOrJTUCee3ebJhVc4Y/7EyBDes=";
};

cargoDeps = rustPlatform.fetchCargoTarball {
Copy link
Member

Choose a reason for hiding this comment

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

Why are you not using the rustPlatform mkDerivation?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is because pop-desktop-widget uses a Makefile execute Cargo

Copy link
Member

Choose a reason for hiding this comment

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

That most likely won't work with nix and we need to replicate that in the right rustPlaform function.

Copy link
Member

Choose a reason for hiding this comment

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

We have plenty of packages that use Make or Ninja to run cargo, and they work fine. Is there a specific problem you've noticed here?

Comment on lines +16 to +27
# "${patchDir}/pop/pop-allow-sound-above-100.patch"
"${patchDir}/pop/pop-mouse-accel.patch"
"${patchDir}/pop/pop-shop.patch"
# "${patchDir}/pop/pop-upgrade.patch"
# "${patchDir}/pop/pop-hidpi.patch"
# "${patchDir}/pop/system76-firmware.patch"
"${patchDir}/pop/pop-alert-sound.patch"
"${patchDir}/pop/remove-diagnostics.patch"
# "${patchDir}/pop/gsettings-desktop-schemas-version.patch"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# "${patchDir}/pop/pop-allow-sound-above-100.patch"
"${patchDir}/pop/pop-mouse-accel.patch"
"${patchDir}/pop/pop-shop.patch"
# "${patchDir}/pop/pop-upgrade.patch"
# "${patchDir}/pop/pop-hidpi.patch"
# "${patchDir}/pop/system76-firmware.patch"
"${patchDir}/pop/pop-alert-sound.patch"
"${patchDir}/pop/remove-diagnostics.patch"
# "${patchDir}/pop/gsettings-desktop-schemas-version.patch"
"${patchDir}/pop/pop-mouse-accel.patch"
"${patchDir}/pop/pop-shop.patch"
"${patchDir}/pop/pop-alert-sound.patch"
"${patchDir}/pop/remove-diagnostics.patch"

@SuperSandro2000
Copy link
Member

Currently not all the packages work on GNOME 41 so I've based this off 21.05 which has GNOME 40.

That has one problem: New package should first appear to master and then be backported. Also support for 21.05 will be ended soon.

@Enzime
Copy link
Member Author

Enzime commented Nov 9, 2021

Should I change my branch to master then and mark this PR for backporting to 21.05?

@alyssais
Copy link
Member

Should I change my branch to master then and mark this PR for backporting to 21.05?

Yes, although 21.05 only has a month and a half of support left, so aiming to get this into 21.05 (as opposed to 21.11) might be a bit optimistic.

New packages that don't work on master aren't usually accepted, even if they'd work on stable, but let's keep going for now and hope that upstream can make it work with GNOME 41 soon while we're working out other bits of this PR.

@Enzime
Copy link
Member Author

Enzime commented Dec 12, 2021

This might be a problem with my configuration, but pop-launcher doesn't seem to work properly (using this PR)
Kooha-12-12-2021-13-47-33.mov

Yeah, I never got pop-launcher working, not too sure what's wrong, I'll have to do more investigation another time

@infinisil
Copy link
Member

I believe this was fully implemented with the merge of #147542. Feel free to reopen/comment if that's not the case!

@infinisil infinisil closed this Feb 28, 2022
@infinisil
Copy link
Member

Actually, @Enzime pushed new commits to this PR after the merge of the above one, so I'm really not sure

@Enzime
Copy link
Member Author

Enzime commented Mar 1, 2022

That PR only added the pop-shell package whereas this one includes a couple more packages for the COSMIC desktop environment

@sandangel
Copy link

sandangel commented May 23, 2022

hi, may I ask for the status of this PR? I'm using the pop-shell package but pop-shortcuts and pop-launcher does not work. In this PR could we include the gsettings schema? I tried to add the schema so we I configure in dconf but it didn't work.

    extraGSettingsOverridePackages = [
      pkgs.gsettings-desktop-schemas
      pkgs.gnome.gnome-shell
      pkgs.gnomeExtensions.pop-shell
    ];

@Enzime
Copy link
Member Author

Enzime commented May 24, 2022

@sandangel As I'm no longer interested in working on this PR, I'll close the PR now. For anyone interested in packaging COSMIC, feel free to take any of the code in my branch.

I suspect the easiest way to get pop-launcher working would be to run Pop_OS! and investigate what's missing on the NixOS side.

@zoedsoupe
Copy link

I would like to continue packaging COSMIC. Although I can't right now. As soon as I have time I'll continue if anyone else start before me

@nurelin
Copy link

nurelin commented Aug 28, 2022

Hello,

I have updated the PR on my own branch.

Everything mostly works except for the dock.

Sadly, I will not push further because this DE has the same problem as GNOME
with regards to workspaces and multiple screens
.

If anyone wants to try it, I used this configuration:

  # nixos conf
  
  environment.systemPackages = with pkgs; [
      pop-desktop-widget
      pop-control-center
      pop-launcher
      pop-shell-shortcuts
    ];

  services.xserver = {
    enable = true;
    displayManager.gdm.enable = true;
    displayManager.gdm.wayland = true;
    desktopManager.gnome.enable = true;
  };
  
  gnome.core-utilities.enable = true;
  # HomeManager conf

  home.packages = with pkgs; [
    gnome.nautilus
    gnome.gnome-shell-extensions
    gnomeExtensions.appindicator
    gnomeExtensions.pop-shell
    gnomeExtensions.cosmic-dock
    gnomeExtensions.cosmic-workspaces
    gnomeExtensions.pop-cosmic
  ];


    dconf = {
    enable = true;
    settings = {
      "org/gnome/shell" = {
        disable-user-extensions = false;
        enabled-extensions = [
          # cosmic-dock needs dash-to-dock
          "dash-to-dock@micxgx.gmail.com"
          #"cosmic-dock@system76.com"

          "native-window-placement@gnome-shell-extensions.gcampax.github.com"

          #"user-theme@gnome-shell-extensions.gcampax.github.com"
          #"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
          "appindicatorsupport@rgcjonas.gmail.com"
          "pop-shell@system76.com"
          "cosmic-workspaces@system76.com"
          "pop-cosmic@system76.com"
        ];
      };

      # disable incompatible shortcuts
      "org/gnome/mutter/wayland/keybindings" = {
        # restore the keyboard shortcuts: disable <super>escape
        restore-shortcuts = [];
      };
      "org/gnome/desktop/wm/keybindings" = {
        # hide window: disable <super>h
        minimize = [ "<super>comma" ];
        # switch to workspace left: disable <super>left
        switch-to-workspace-left = [];
        # switch to workspace right: disable <super>right
        switch-to-workspace-right = [];
        # maximize window: disable <super>up
        maximize = [];
        # restore window: disable <super>down
        unmaximize = [];
        # move to monitor up: disable <super><shift>up
        move-to-monitor-up = [];
        # move to monitor down: disable <super><shift>down
        move-to-monitor-down = [];
        # super + direction keys, move window left and right monitors, or up and down workspaces
        # move window one monitor to the left
        move-to-monitor-left = [];
        # move window one workspace down
        move-to-workspace-down = [];
        # move window one workspace up
        move-to-workspace-up = [];
        # move window one monitor to the right
        move-to-monitor-right = [];
        # super + ctrl + direction keys, change workspaces, move focus between monitors
        # move to workspace below
        switch-to-workspace-down = [ "<primary><super>down" "<primary><super>j" ];
        # move to workspace above
        switch-to-workspace-up = [ "<primary><super>up" "<primary><super>k" ];
        # toggle maximization state
        toggle-maximized = [ "<super>m" ];
        # close window
        close = [ "<super>q" "<alt>f4" ];
      };
      "org/gnome/shell/keybindings" = {
        open-application-menu = [];
        # toggle message tray: disable <super>m
        toggle-message-tray = [ "<super>v" ];
        # show the activities overview: disable <super>s
        toggle-overview = [];
      };
      "org/gnome/mutter/keybindings" = {
        # disable tiling to left / right of screen
        toggle-tiled-left = [];
        toggle-tiled-right = [];
      };
      "org/gnome/settings-daemon/plugins/media-keys" = {
        # lock screen
        screensaver = [ "<super>escape" ];
        # home folder
        home = [ "<super>f" ];
        # launch email client
        email = [ "<super>e" ];
        # launch web browser
        www = [ "<super>b" ];
        # launch terminal
        terminal = [ "<super>t" ];
        # rotate video lock
        rotate-video-lock-static = [];
      };
      "org/gnome/mutter" = {
        workspaces-only-on-primary = false;
      };
    };
  };

@nyabinary
Copy link
Contributor

If anyone is interested, I have a tracking issue of how close we are to COSMIC support: #259641

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.

Package request: Pop shell (Pop!_OS's tiling windows manager extension for GNOME shell)