-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[WIP] nixos: add environment.gnome3.enableExtensions #46433
base: master
Are you sure you want to change the base?
Conversation
dconf settings are stored per user (under But something like running |
According to this, one should be able to create lock files that prevent users from doing modifications. In my last fixup commit you can see I try to use it, but it didn't work for me. Your "dconf reset ..." command sounds good. What setting in NixOS is best for running commands at user login time? (I'd like something shell agnostic.) |
Well, the commit that tries to create dconf lock files does not do the "dconf update" step. I did that manually. |
See also #54150 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/recommended-way-to-add-gnome-extensions/5589/3 |
This option takes a list of packages / GNOME extensions that will be (declaratively) enabled. The default value is null, meaning the extensions are managed imperatively (backwards compatible).
Try to add add a lock file, to prevent users from modifying / overriding the system (default) settings. However, it doesn't work.
661862f
to
966f3e2
Compare
Any progress on this? |
Not from my side. |
What is needed to move this PR forward? Does #54150 needs to be done first? |
Yep, that's what I'm thinking. |
I marked this as stale due to inactivity. → More info |
Any news on this? |
No, #54150 still needs to land first. |
You can use the dconf module now. |
Right, there was another PR (not linked here) that fixed it! Cool! I'll put this back on my TODO list. |
#54150 has ben merged. Anything else left before this one can land? |
How are you doing this via home-manager? I looked at your repo but I see it's been a while since that mirror got an update |
Using the dconf module. For example: { pkgs, lib, ... }:
let
# Make widgets smaller to not clip other widgets (default: 100).
graphWidth = 95;
in
{
dconf.settings."org/gnome/shell".enabled-extensions = [
pkgs.gnomeExtensions.system-monitor-next.extensionUuid
];
dconf.settings = {
"org/gnome/shell/extensions/system-monitor" = {
# Highlight IO wait with dark red
cpu-iowait-color = "#a40000ff";
disk-display = true;
# In the default color scheme it's impossible to separate reads and
# writes.
disk-read-color = "#00ff00ff"; # bright green
disk-write-color = "#ff0000ff"; # bright red
cpu-graph-width = graphWidth;
memory-graph-width = graphWidth;
net-graph-width = graphWidth;
disk-graph-width = graphWidth;
};
};
}
Yes, I intentionally stopped updating it. |
Motivation for this change
I'd like to enable/disable GNOME3 extensions from configuration.nix. However, when testing this I learned that services.xserver.desktopManager.gnome3.extraGSettingsOverrides, which this is built upon, only provides default values for the system. Users are still able to change settings. And once they have made a change, any change to the system default will be ignored. This is marked WIP since I'd like for this setting to be truly declarative. The first 4 commits would be nice to merge anyway, so one can play with this locally at least.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)