mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 03:43:45 +00:00
Merge pull request #328130 from Enzime/add/regreet-themes
regreet: add options for controlling theming
This commit is contained in:
commit
ed2202e9e6
@ -58,9 +58,96 @@ in
|
||||
modifiable properties.
|
||||
'';
|
||||
};
|
||||
|
||||
theme = {
|
||||
package = lib.mkPackageOption pkgs "gnome-themes-extra" { } // {
|
||||
description = ''
|
||||
The package that provides the theme given in the name option.
|
||||
'';
|
||||
};
|
||||
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Adwaita";
|
||||
description = ''
|
||||
Name of the theme to use for regreet.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = lib.mkPackageOption pkgs "adwaita-icon-theme" { } // {
|
||||
description = ''
|
||||
The package that provides the icon theme given in the name option.
|
||||
'';
|
||||
};
|
||||
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Adwaita";
|
||||
description = ''
|
||||
Name of the icon theme to use for regreet.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
font = {
|
||||
package = lib.mkPackageOption pkgs "cantarell-fonts" { } // {
|
||||
description = ''
|
||||
The package that provides the font given in the name option.
|
||||
'';
|
||||
};
|
||||
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Cantarell";
|
||||
description = ''
|
||||
Name of the font to use for regreet.
|
||||
'';
|
||||
};
|
||||
|
||||
size = lib.mkOption {
|
||||
type = lib.types.ints.positive;
|
||||
default = 16;
|
||||
description = ''
|
||||
Size of the font to use for regreet.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
package = lib.mkPackageOption pkgs "adwaita-icon-theme" { } // {
|
||||
description = ''
|
||||
The package that provides the cursor theme given in the name option.
|
||||
'';
|
||||
};
|
||||
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "Adwaita";
|
||||
description = ''
|
||||
Name of the cursor theme to use for regreet.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
cfg.theme.package
|
||||
cfg.iconTheme.package
|
||||
cfg.cursorTheme.package
|
||||
];
|
||||
|
||||
fonts.packages = [ cfg.font.package ];
|
||||
|
||||
programs.regreet.settings = {
|
||||
cursor_theme_name = cfg.cursorTheme.name;
|
||||
font_name = "${cfg.font.name} ${toString cfg.font.size}";
|
||||
icon_theme_name = cfg.iconTheme.name;
|
||||
theme_name = cfg.theme.name;
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
enable = lib.mkDefault true;
|
||||
settings.default_session.command = lib.mkDefault "${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package}";
|
||||
|
Loading…
Reference in New Issue
Block a user