These are both enabled by default by services.xserver.desktopManager.gnome.enable = true; and I can confirm it works for me.
What variant of Firefox do you use and how did you install it? Firefox needs to be installed using environment.systemPackages to respect nixpkgs.config.firefox and it cannot be firefox-bin. And if you are instantiating Nixpkgs yourself (e.g. using import <nixpkgs> {}), Firefoxen from that package set will not see that option, unless you pass it in yourself as well:
Hi, thanks for your answer! I use the normal package (firefox) that is installed from the configuration.nix. Here is my complete file:
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, lib, pkgs, ... }:
{
imports =
[ <nixos-hardware/lenovo/thinkpad/p14s/amd/gen2>
./hardware-configuration.nix
];
system.stateVersion = "21.05";
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
hardware.enableRedistributableFirmware = true;
networking = {
hostName = "laptop-fdv";
networkmanager.enable = true;
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
useDHCP = false;
interfaces = {
enp2s0f0.useDHCP = true;
enp5s0.useDHCP = true;
enp7s0f3u2.useDHCP = true;
};
};
# Graphical interface.
services.xserver = {
enable = true; # Enable the X11 windowing system.
layout = "fr";
#xkbOptions = "eurosign:e";
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
libinput.enable = true; # Enable touchpad support (enabled default in most desktopManager).
#openssh.enable = true; # Enable the OpenSSH daemon.
};
services.dbus.packages = [ pkgs.gnome.dconf ];
services.udev.packages = [ pkgs.gnome.gnome-settings-daemon ];
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable fingerprint scanner
services.fprintd = {
enable = true;
tod.enable = true;
tod.driver = pkgs.libfprint-2-tod1-goodix;
};
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# support for bluetooth headsets
hardware.pulseaudio.package = pkgs.pulseaudioFull;
# Enable bluetooth
hardware.bluetooth.enable = true;
#############################################################################
## Virtualisation
#############################################################################
virtualisation = {
podman = {
enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
};
};
#############################################################################
## Locale
#############################################################################
# Locale.
i18n.defaultLocale = "en_US.UTF-8";
# Time zone.
services.timesyncd.enable = true;
time.timeZone = "Europe/Paris";
# Keyboard
console = {
font = "Lat2-Terminus16";
keyMap = "fr";
};
#############################################################################
## User accounts
#############################################################################
programs.zsh.enable = true;
users.users.felix = {
uid = 1000;
isNormalUser = true; # Not a system user.
group = "users";
extraGroups = [
"wheel" # Enable ‘sudo’ for the user.
"networkmanager"
];
initialPassword = "felix";
};
#############################################################################
## Package management
#############################################################################
nixpkgs.config.allowUnfree = true;
# Packages installed in system profile.
environment.systemPackages = with pkgs; [
vim
wget
firefox
tilix
git
brave
discord
podman
zsh
];
# Enable GNOME shell extensions management from Firefox.
nixpkgs.config.firefox.enableGnomeExtensions = true;
services.gnome.chrome-gnome-shell.enable = true;
}
AFAIK, I don’t do any of the non-standard things you are talking about. My installation is really vanilla, so I don’t really see where the issue can come from.
By the way, I can see in the system logs that the GNOME connector works when I try to activate an extension, but there is no further message explaining the failure.
Nothing relevant in the browser console, only some warnings about style issues. journalctl logs nothing but those lines to say everything is OK when activating an extension for the first time after the page has loaded:
Oct 29 10:02:39 laptop-fdv dbus-daemon[949647]: [session uid=1000 pid=949647] Activating service name='org.gnome.ChromeGnomeShell' requested by ':1.3922' (uid=1000 pid=1750626 comm="/nix/store/32q6ryrb860sksdi1al5djg3pgcpq92l-python" label="kernel")
Oct 29 10:02:39 laptop-fdv dbus-daemon[949647]: [session uid=1000 pid=949647] Successfully activated service 'org.gnome.ChromeGnomeShell'
Maybe there is another source of logs somewhere, but I cannot find this piece of information online.
Maybe try temporarily removing the enabled-extensions key from home-manager config, in case it requires changing the setting to finish installation. And check ~/.mozilla/native-messaging-hosts/ if there are not any stale files. Otherwise I am out of ideas.
It is expected that disable-user-extensions (under org.gnome.shell) is false if you want extensions enabled.
As for meshing of the two worlds, there are some rough edges but overall it works quite great (thanks to dconf profiles allowing to layer multiple dconf databases). Though in the case of home-manager’s dconf module, the only thing it does is that it replaces the settings keys from your configuration on activation – no locking is happening so should be able to activate new extensions still (and the changes will persist until the next activation).
Do you see the extensions you have installed in the Extensions app? What do you see on the pages installed by default, e.g User Themes - GNOME Shell Extensions? For me it is