nix/modules/home/theming/stylix.nix

55 lines
1.2 KiB
Nix
Raw Normal View History

2024-12-25 23:55:11 +01:00
{ config, lib, inputs, pkgs, ... }:
with lib;
let
cfg = config.settings.theming.stylix;
in {
options = {
settings.theming.stylix.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable stylix configuration
'';
};
2025-01-09 17:14:10 +01:00
settings.theming.stylix.wallpaper = lib.mkOption {
2025-01-09 17:30:17 +01:00
type = lib.types.enum ["wallpaper-2.png" "kiiwy.png"];
2025-01-09 17:14:10 +01:00
description = ''
Choose wallpaper
'';
};
settings.theming.stylix.theme = lib.mkOption {
type = lib.types.string;
description = ''
Choose theme name. Use "theme" to use them based on wallpaper generation
'';
};
2024-12-25 23:55:11 +01:00
};
imports = [
inputs.stylix.homeManagerModules.stylix
];
config = mkIf cfg.enable {
stylix.enable = true;
2025-01-09 17:14:10 +01:00
stylix.image = ../../../assets/${cfg.wallpaper};
2024-12-25 23:55:11 +01:00
stylix.polarity = "dark";
2025-01-09 17:14:10 +01:00
stylix.base16Scheme = lib.mkIf (cfg.theme != "theme") "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml";
2024-12-25 23:55:11 +01:00
stylix.autoEnable = true;
stylix.cursor = {
package = pkgs.phinger-cursors;
name = "phinger-cursors-dark";
size = 24;
};
stylix.fonts.sizes.applications = 10;
};
}