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

Lomiri shell package, modules & tests: init #292872

Merged
merged 12 commits into from
Apr 14, 2024

Conversation

OPNA2608
Copy link
Contributor

@OPNA2608 OPNA2608 commented Mar 2, 2024

Description of changes

Working towards #99090.

Inits:

  • lomiri.lomiri, the Lomiri Shell
  • lomiri.lomiri-session, scripts & data files for starting a Lomiri session
  • A module for enabling the Lomiri DE
  • A test to check if
    • Lomiri launches
    • Basic app expectations work
    • Basic inter-app behaviour works
    • Ayatana Indicators are usable

And various fixes to Lomiri components, now that a test can be run for them.

Some pictures, after installing it on spare hardware

screenshot20240411_134047572
screenshot20240411_163943601

Checklist:

  • Submit some patches upstream
  • Decide if we should disable the first time wizard in general (i'm not sure if it's of much use for us)
    • Decision: Will just patch it out, it mostly just asks the stuff that should be set up by the system config already.
  • Decide where the nixos module should be put (there might be an ongoing effort to start moving those outside of services.xserver: nixos/plasma6: move out of x11 #292141)
    • Decision: For now, services.xserver.desktopManager.lomiri is prolly fine. If there's any developments on the linked PR, then I might change it to services.desktopManager.lomiri (although we'd also need a display technology agnostic services.displayManager.lightdm for the Wayland services.displayManager.lightdm.greeters.lomiri).
    • Decision: With nixos/sddm: allow running on wayland without xserver enabled  #291913 merged, names are now services.desktopManager.lomiri (no longer implying X11) and services.xserver.displayManager.lightdm.greeter.lomiri (lightdm is yet to be moved out of services.xserver)
  • Clean up the module, check what's really necessary, resolve leftover errors
    • Left some TODOs for myself when further stuff gets upstreamed, rest looks fine to me.
  • Apparently, Debian got the lomiri greeter working? Check if we can get that working too
    • Got the greeter working
  • Release notes entry about Lomiri availability
    • Entry has been written, sprinkling in some details about what it & our state of it is. Not sure if it's too much, happy about feedback on it.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 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.

Add a 👍 reaction to pull requests you find important.

@OPNA2608 OPNA2608 force-pushed the init/lomiri/lomiri branch 3 times, most recently from c833afb to 2853fa2 Compare March 9, 2024 13:49
@OPNA2608 OPNA2608 changed the title lomiri.lomiri{,-session},nixos/lomiri/nixos/tests/lomiri: init Lomiri shell package, modules & tests: init Mar 9, 2024
@SuperSandro2000
Copy link
Member

  • Decision: For now, services.xserver.desktopManager.lomiri is prolly fine. If there's any developments on the linked PR, then I might change it to services.desktopManager.lomiri (although we'd also need a display technology agnostic services.displayManager.lightdm for the Wayland services.displayManager.lightdm.greeters.lomiri).

FYI #291913

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Already looking pretty solid

pkgs/desktops/lomiri/applications/lomiri/default.nix Outdated Show resolved Hide resolved
nixos/modules/programs/lomiri.nix Outdated Show resolved Hide resolved
Comment on lines 73 to 76
hardware.opengl.enable = lib.mkDefault true;
fonts.enableDefaultPackages = lib.mkDefault true;
programs.dconf.enable = lib.mkDefault true;
programs.xwayland.enable = lib.mkDefault true;
Copy link
Member

Choose a reason for hiding this comment

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

I think those should become part of a shared module between xserver and wayland envs. After splitting out xserver this is on my todo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, will keep them copy-pasted here until then.

nixos/modules/programs/lomiri.nix Outdated Show resolved Hide resolved
nixos/modules/programs/lomiri.nix Outdated Show resolved Hide resolved
@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Apr 10, 2024

@ofborg build nixosTests.morph-browser nixosTests.lomiri

@OPNA2608
Copy link
Contributor Author

Hoping this is ready now.

@OPNA2608 OPNA2608 marked this pull request as ready for review April 11, 2024 14:52
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Didn't try myself but LGTM

};
};

config = lib.mkIf (ldmcfg.enable && cfg.enable) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note to self: I think this module is highly likely to be missing some stuff in case services.xserver.displayManager.lightdm.greeters.lomiri.enable && (!services.desktopManager.lomiri.enable), basically requiring some code duplication (since the shell is also the greeter).

IMO that's prolly not worth blocking this on? I'm fine with a DE-specific DM being abit broken when not using said DE, will just put it on my TODO list.

Because Lomiri App Launch parses it on Lomiri startup, and having a relative Icon entry somehow corrupts the search paths.
…path

The only part this really affects for us is Lomiri's First-Time-Launch Wizard, which uses the found & filtered
locale identifiers for a language selection & gets stuck unless at least 1 valid language has been found.

This makes the wizard process completable, in case we ever re-enable it.
The UserMetrics service expects AppArmor to be available, and its database access breaks when that's not the case.
Details: https://gitlab.com/ubports/development/core/libusermetrics/-/issues/8

We need to set an envvar for it to work AppArmor-less, but that requires system config knowledge.
Solve this by telling the D-Bus service to look for & launch a systemd service, which we will later create in the Lomiri module.
Not *great*, but a start.

MessagingMenu has a function for mapping an app to desktop file data. This relies on GLib to parse the desktop file,
which needs the binary from the 'Exec=' entry on PATH, otherwise it bails.

messaging_menu_app_set_desktop_id calls g_desktop_app_info_new:
https://github.com/AyatanaIndicators/ayatana-indicator-messages/blob/334668ad5ad33c6bd342f34b159dbcbed8c65df1/libmessaging-menu/messaging-menu-app.c#L245-L252

Which, after some jumps inbetween, ends up in g_desktop_app_info_load_from_keyfile and calls g_find_program_for_path:
https://github.com/GNOME/glib/blob/204a76669bd46c5eb656946e21bd746685c67174/gio/gdesktopappinfo.c#L1920-L1951

Which uses PATH:
https://github.com/GNOME/glib/blob/204a76669bd46c5eb656946e21bd746685c67174/glib/gutils.c#L371
@wegank wegank merged commit 3f9dfce into NixOS:master Apr 14, 2024
23 of 29 checks passed
@OPNA2608 OPNA2608 mentioned this pull request Jun 7, 2024
13 tasks
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.

4 participants