gdm: apply icon theme (#970)
Link: https://github.com/nix-community/stylix/pull/970 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: Daniel Thwaites <danth@danth.me> Tested-by: Daniel Thwaites <danth@danth.me>
This commit is contained in:
parent
82242e0f9b
commit
05ac1c7074
2 changed files with 44 additions and 14 deletions
|
|
@ -9,6 +9,10 @@ let
|
|||
inherit (config.lib.stylix) colors;
|
||||
inherit (config.stylix) inputs;
|
||||
};
|
||||
cursorCfg = config.stylix.cursor;
|
||||
iconCfg = config.stylix.icons;
|
||||
inherit (config.stylix) polarity;
|
||||
|
||||
in
|
||||
{
|
||||
options.stylix.targets.gnome.enable =
|
||||
|
|
@ -51,21 +55,46 @@ in
|
|||
})
|
||||
];
|
||||
|
||||
# Cursor settings are usually applied via Home Manager,
|
||||
# Cursor and icon settings are usually applied via Home Manager,
|
||||
# but the login screen uses a separate database.
|
||||
environment.systemPackages = lib.mkIf (config.stylix.cursor != null) [
|
||||
config.stylix.cursor.package
|
||||
services.displayManager.environment.XDG_DATA_DIRS = lib.mkIf (iconCfg != null) (
|
||||
(lib.makeSearchPath "share" [
|
||||
iconCfg.package
|
||||
])
|
||||
+ ":"
|
||||
);
|
||||
environment.systemPackages = lib.mkIf (cursorCfg != null) [
|
||||
cursorCfg.package
|
||||
];
|
||||
programs.dconf.profiles.gdm.databases = lib.mkMerge [
|
||||
(lib.mkIf (cursorCfg != null) [
|
||||
{
|
||||
lockAll = true;
|
||||
settings."org/gnome/desktop/interface" = {
|
||||
cursor-theme = cursorCfg.name;
|
||||
cursor-size = lib.gvariant.mkInt32 cursorCfg.size;
|
||||
};
|
||||
}
|
||||
])
|
||||
(lib.mkIf iconCfg.enable [
|
||||
{
|
||||
lockAll = true;
|
||||
settings."org/gnome/desktop/interface" = {
|
||||
icon-theme = builtins.head (
|
||||
lib.filter (x: null != x) [
|
||||
(
|
||||
{
|
||||
inherit (iconCfg) dark light;
|
||||
}
|
||||
."${polarity}" or null
|
||||
)
|
||||
iconCfg.dark
|
||||
iconCfg.light
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
])
|
||||
];
|
||||
programs.dconf.profiles.gdm.databases =
|
||||
lib.mkIf (config.stylix.cursor != null)
|
||||
[
|
||||
{
|
||||
lockAll = true;
|
||||
settings."org/gnome/desktop/interface" = {
|
||||
cursor-theme = config.stylix.cursor.name;
|
||||
cursor-size = lib.gvariant.mkInt32 config.stylix.cursor.size;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ in
|
|||
../home-manager-integration.nix
|
||||
../opacity.nix
|
||||
../palette.nix
|
||||
../icons.nix
|
||||
../pixel.nix
|
||||
../target.nix
|
||||
../release.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue