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/gnome3: split up #67466

Merged
merged 3 commits into from Aug 26, 2019

Conversation

@worldofpeace
Copy link
Member

worldofpeace commented Aug 25, 2019

This introduces the following options under the services.gnome3 namespace:

  • core-os-services.enable
  • core-shell.enable
  • core-utilities.enable
  • games.enable

The first three are all default enabled by gnome3.enable
and their purpose is to make gnome3 more flexable for users
usecases. In the case of core-utilities and games, it allows
users to easily switch on the default gnome3 applications
and games packages. Previously we had lists in gnome-3/default.nix
but they weren't visible to the user. By having options we have
generated documentation and an interface.

Motivation for this change

I "split it up" though I decided to intersect them.
If you dislike that approach feel free to suggest an alternate.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.
Notify maintainers

cc @

core-os-services.enable = mkEnableOption "essential services for GNOME3";
core-shell.enable = mkEnableOption "GNOME Shell services";
core-utilities.enable = mkEnableOption "GNOME core utilities";
games.enable = mkEnableOption "GNOME games";

This comment has been minimized.

Copy link
@worldofpeace

worldofpeace Aug 25, 2019

Author Member

I wanted to document what packages get enabled with relatedPackages but I need some sort of hack like

It would also be nice in the case of core-utilities if there's a convenient way to show what programs options get enabled.

@worldofpeace worldofpeace requested a review from jtojnar Aug 25, 2019
@worldofpeace worldofpeace force-pushed the worldofpeace:gnome3-defaults-cleanup branch from 0f2b8e4 to c33670b Aug 25, 2019
@worldofpeace

This comment has been minimized.

Copy link
Member Author

worldofpeace commented Aug 25, 2019

This shouldn't bring any breaking changes yet like changing defaults.
I'll do that after this, since it'll look a lot clearer.

Copy link
Contributor

jtojnar left a comment

Very nice work!

environment.variables.XDG_DATA_DIRS = [ "${mimeAppsList}/share" ];

# Override GSettings schemas
environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";

This comment has been minimized.

Copy link
@jtojnar

jtojnar Aug 25, 2019

Contributor

Just unrelated brain storm:

Suggested change
environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/${nixos-gsettings-desktop-schemas.name}/glib-2.0/schemas";

or

Suggested change
environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = glib.getSchemaPath nixos-gsettings-desktop-schemas;

and in glib

passthru.getSchemaPath = pkg: "${pkg}/share/gsettings-schemas/${pkg.name}/glib-2.0/schemas";

This comment has been minimized.

Copy link
@worldofpeace

worldofpeace Aug 26, 2019

Author Member

Ah, the function in glib is good. Will add that outside this pr.

environment.variables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";

# If gnome3 is installed, build vim for gtk3 too.
nixpkgs.config.vim.gui = "gtk3";

This comment has been minimized.

Copy link
@jtojnar

jtojnar Aug 25, 2019

Contributor

Maybe we could move this into a setting common for GTK desktop environments.

(mkIf serviceCfg.core-shell.enable {
services.colord.enable = mkDefault true;
services.gnome3.glib-networking.enable = true;
services.gnome3.gnome-keyring.enable = true;

This comment has been minimized.

Copy link
@jtojnar

jtojnar Aug 25, 2019

Contributor

⚠️ Weird that keyring is here but goa or e-d-s, which rely on it, are in core-os.

This comment has been minimized.

Copy link
@worldofpeace

worldofpeace Aug 26, 2019

Author Member

Partial translation of https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/master/elements/core/meta-gnome-core-shell.bst#L14

I think they only expressed the need for

services.gnome3.evolution-data-server.enable
services.gnome3.gnome-online-accounts.enable
services.gnome3.gnome-online-miners.enable
services.gnome3.tracker-miners.enable
services.gnome3.tracker.enable

as core-deps of their respective applications.

I'll promote it.

This comment has been minimized.

Copy link
@jtojnar

jtojnar Aug 26, 2019

Contributor

Maybe add a comment explaining the discrepancy.

services.upower.enable = config.powerManagement.enable;
services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center

xdg.portal.enable = true;

This comment has been minimized.

Copy link
@jtojnar

jtojnar Aug 25, 2019

Contributor

This might be mkDefault.

@jtojnar

This comment has been minimized.

Copy link
Contributor

jtojnar commented Aug 26, 2019

Otherwise, I would say add release notes and it will be ready for merge.

This introduces the following options under the services.gnome3 namespace:

* core-os-services.enable
* core-shell.enable
* core-utilities.enable
* games.enable

The first three are all default enabled by gnome3.enable
and their purpose is to make gnome3 more flexable for users
usecases. In the case of core-utilities and games, it allows
users to easily switch on the default gnome3 applications
and games packages. Previously we had lists in gnome-3/default.nix
but they weren't visible to the user. By having options we have
generated documentation and an interface.
@worldofpeace worldofpeace force-pushed the worldofpeace:gnome3-defaults-cleanup branch from c6c8266 to 88d1a8d Aug 26, 2019
@worldofpeace

This comment has been minimized.

Copy link
Member Author

worldofpeace commented Aug 26, 2019

Otherwise, I would say add release notes and it will be ready for merge.

I think it would be convenient for me to do this once I harmonize the defaults immediately following this.
Currently core-utilities is just the optional packages from before, and needs to split into the actual core and something like extra-packages.

@worldofpeace worldofpeace force-pushed the worldofpeace:gnome3-defaults-cleanup branch from 88d1a8d to bf7bdcd Aug 26, 2019
@worldofpeace worldofpeace referenced this pull request Aug 26, 2019
0 of 10 tasks complete
@worldofpeace worldofpeace merged commit 450a180 into NixOS:master Aug 26, 2019
12 checks passed
12 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@worldofpeace worldofpeace deleted the worldofpeace:gnome3-defaults-cleanup branch Aug 26, 2019
@worldofpeace

This comment has been minimized.

Copy link
Member Author

worldofpeace commented Aug 26, 2019

Thanks for a thorough review @jtojnar 🥇

@worldofpeace worldofpeace referenced this pull request Sep 4, 2019
1 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.