Currently I am trying to create a basic configuration for my NixOS 23.05 installation with the XFCE Desktop and Window Manager. My approach is to use home-manager in standalone-mode to configure the XFCE Theme etc. on a per-user basis, which is inspired by a gist by nat-418.
My configuration looks as follows:
#~/.config/home-manager/home.nix
{ config, pkgs, ... }:
{
imports = [
./xfce/xfce-home.nix
];
home.username = USERNAME;
home.homeDirectory = PATH/TO/HOME/DIR;
home.stateVersion = "23.05"; # Please read the comment before changing.
home.packages = [
# installing icon themes
pkgs.matcha-gtk-theme
pkgs.zuki-themes
pkgs.elementary-xfce-icon-theme
pkgs.xfce.xfce4-icon-theme
];
programs.home-manager.enable = true;
}
#~/.config/home-manager/xfce/xfce-home.nix
{ config, pkgs, lib, ... }:
{
gtk = {
enable = true;
iconTheme = {
name = "xfce4-icon-theme";
package = pkgs.xfce.xfce4-icon-theme;
};
theme = {
name = "matcha-dark-sea";
package = pkgs.matcha-gtk-theme;
};
gtk3.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
gtk4.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
};
programs.gpg.enable = true;
services.gpg-agent.enable = true;
}
My programs.xfconf.enable = true; is already set in my configuration.nix and would throw an error if I would set it again in my home-manager configuration.
However, non of the changes are applied after running home-manager switch (or any of the other applicable commands). There are no errors, and the output claims that the changes are applied. But neither a log-out nor a reboot would result in visible changes in the (icon) theme, wallpaper etc. (sometimes there might occur glitches like switching from dark theme to light theme, even though this is configured nowhere).
The majority of the sources say that not many options exist besides basic things like setting the wallpaper, startup commands or general options
services.xserver.desktopManager.xfce.enableScreensaver
services.xserver.desktopManager.xfce.enable
services.xserver.desktopManager.xfce.noDesktop
programs.thunar.enable
programs.xfconf.enable
programs.gnupg.agent.pinentryFlavor
sound.mediaKeys.enable
services.xserver.desktopManager.xfce.enableXfwm
#source: https://search.nixos.org/options?channel=23.05&from=0&size=50&sort=relevance&type=packages&query=xfce
Questions:
- Did I miss something (like additional commands to enable
xfconfproperly also forhome-manager?) - Since
nixis a functional language, I would not expect so, but: Do I have to move some package installation logic to other thanhome-managerfiles? - Is there a way with
home-managerto do any detailed XFCE configuration changes (like task bar position) after having build the default NixOS XFCE? - Is it easily possible to make the configuration changes already during building the default NixOS XFCE? And if so, in an easy way with little to no additional scripting/settings that have to be applied manually by the user?