Compare commits
12 commits
9947d603d0
...
f89d1c0f41
Author | SHA1 | Date | |
---|---|---|---|
f89d1c0f41 | |||
f9fc888913 | |||
0345af8328 | |||
05711392f8 | |||
c622a669d8 | |||
3849b61657 | |||
48ac6bc7f6 | |||
1995683357 | |||
31ec365509 | |||
6c4555e06d | |||
782ae10718 | |||
ed50c2cbd7 |
15 changed files with 173 additions and 304 deletions
|
@ -100,13 +100,13 @@
|
|||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "catppuccin",
|
||||
"owner": "rose-pine",
|
||||
"repo": "grub"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "b8e617076daed2b38292af9e14c0a22e2c2bd659",
|
||||
"url": "https://github.com/catppuccin/grub/archive/b8e617076daed2b38292af9e14c0a22e2c2bd659.tar.gz",
|
||||
"hash": "0sx08xc9zd3ys9bgy7z57gngamgh8gm2623s3xbx87d46ami9z36"
|
||||
"revision": "4a26bd253f4aecb6343e70a98da2e12043739f5a",
|
||||
"url": "https://github.com/rose-pine/grub/archive/4a26bd253f4aecb6343e70a98da2e12043739f5a.tar.gz",
|
||||
"hash": "0virkip3zw6z8r05d7767iymyrs7nl7acznskfgivkqgzmzl1ql4"
|
||||
},
|
||||
"helix": {
|
||||
"type": "Git",
|
||||
|
@ -216,18 +216,6 @@
|
|||
"url": "https://github.com/catppuccin/nvim/archive/63685e1562ef53873c9764b483d7ac5c7a608922.tar.gz",
|
||||
"hash": "1b283i43p1i49mql84s6njfnf4mdf9csknp9hdkjjagwfi509wgm"
|
||||
},
|
||||
"obs": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "catppuccin",
|
||||
"repo": "obs"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "b17939991545bdd6232e688ec5004b6dfae46f69",
|
||||
"url": "https://github.com/catppuccin/obs/archive/b17939991545bdd6232e688ec5004b6dfae46f69.tar.gz",
|
||||
"hash": "15ndpcy8a37997vd14z08arlv3zk5ldlmb7s7i63dz15yxqnaaym"
|
||||
},
|
||||
"palette": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
@ -312,6 +300,18 @@
|
|||
"url": "https://github.com/d2718nis/rose-pine-swaylock/archive/8a2aefbc9996941535bb10f0df5357687c43c06a.tar.gz",
|
||||
"hash": "15inlf8j6vn5k9d71lzmxsrqn55qha1idmpxbk4v1ji0sywrw1f6"
|
||||
},
|
||||
"sddm-rose-pine": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "lwndhrst",
|
||||
"repo": "sddm-rose-pine"
|
||||
},
|
||||
"branch": "master",
|
||||
"revision": "e8735051bf4a418efaf076f52cb3d7873ccd1509",
|
||||
"url": "https://github.com/lwndhrst/sddm-rose-pine/archive/e8735051bf4a418efaf076f52cb3d7873ccd1509.tar.gz",
|
||||
"hash": "1vdmxjkacv5il8gpdxgw7zbmy442b9wrv47az3yw1wwwd8wr6pzl"
|
||||
},
|
||||
"starship": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
@ -360,67 +360,42 @@
|
|||
"url": "https://github.com/rose-pine/tm-theme/archive/c4235f9a65fd180ac0f5e4396e3a86e21a0884ec.tar.gz",
|
||||
"hash": "19k0r1mrhqhlf1xfzvd1q8ihpic86f84kbmgy0m314w3w9cbqf4f"
|
||||
},
|
||||
"tofi": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "catppuccin",
|
||||
"repo": "tofi"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "d6106461867c077a5e1d25236e02b7be7c83839e",
|
||||
"url": "https://github.com/catppuccin/tofi/archive/d6106461867c077a5e1d25236e02b7be7c83839e.tar.gz",
|
||||
"hash": "0hfa7jmr83h5m89mv5bzmd0wnq7819g5433wnj2ahyw2kg8yvfxs"
|
||||
},
|
||||
"waybar": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "catppuccin",
|
||||
"owner": "rose-pine",
|
||||
"repo": "waybar"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "ee8ed32b4f63e9c417249c109818dcc05a2e25da",
|
||||
"url": "https://github.com/catppuccin/waybar/archive/ee8ed32b4f63e9c417249c109818dcc05a2e25da.tar.gz",
|
||||
"hash": "0q4mzqx3w6cywfifs7ij8qzhzvj59dfdzpvqx76vpnhd2zm35bfd"
|
||||
},
|
||||
"yazi": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "catppuccin",
|
||||
"repo": "yazi"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "37dec9bf1f7e52e0d593c225827b9dbc71ce504c",
|
||||
"url": "https://github.com/catppuccin/yazi/archive/37dec9bf1f7e52e0d593c225827b9dbc71ce504c.tar.gz",
|
||||
"hash": "1dfakxd5fd1z17bf2l4a48wmal9pk9ybc0zxwnmvjaqj2gd3k6m0"
|
||||
"revision": "1b118bd60d1c5778dc8a82b919069eeb8a834604",
|
||||
"url": "https://github.com/rose-pine/waybar/archive/1b118bd60d1c5778dc8a82b919069eeb8a834604.tar.gz",
|
||||
"hash": "0yl8yjcdkq9442g31zl9ckkh99p9hnmq60ap3f91q7bwx5x5rg66"
|
||||
},
|
||||
"zathura": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "catppuccin",
|
||||
"owner": "edunfelt",
|
||||
"repo": "zathura"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "0adc53028d81bf047461bc61c43a484d11b15220",
|
||||
"url": "https://github.com/catppuccin/zathura/archive/0adc53028d81bf047461bc61c43a484d11b15220.tar.gz",
|
||||
"hash": "1cj1z2bh1qw1sbgqmk4i450yv7rgwcz06yhar23ccadsx22gzw7y"
|
||||
"revision": "d72c431f8207a1f63c138d9bc64d689947c55e8e",
|
||||
"url": "https://github.com/edunfelt/zathura/archive/d72c431f8207a1f63c138d9bc64d689947c55e8e.tar.gz",
|
||||
"hash": "07b5pqdpd0qnhc223gmgw0nxy0wjbrkw6a36jdd03lyxvvhhx86r"
|
||||
},
|
||||
"zsh-syntax-highlighting": {
|
||||
"zellij": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "catppuccin",
|
||||
"repo": "zsh-syntax-highlighting"
|
||||
"owner": "rose-pine",
|
||||
"repo": "zellij"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "7926c3d3e17d26b3779851a2255b95ee650bd928",
|
||||
"url": "https://github.com/catppuccin/zsh-syntax-highlighting/archive/7926c3d3e17d26b3779851a2255b95ee650bd928.tar.gz",
|
||||
"hash": "1yjgpd44hhyk2mpg5g1scf53dwpjbyqbi2i8zhv98qkk1as77awp"
|
||||
"revision": "53835422f965e6c88b9ad59e11d343ca4552bf6d",
|
||||
"url": "https://github.com/rose-pine/zellij/archive/53835422f965e6c88b9ad59e11d343ca4552bf6d.tar.gz",
|
||||
"hash": "0cj31kv7y05cyyg7v0pc1dh5a2mp46sql2ngxk52cbks1garvnjl"
|
||||
}
|
||||
},
|
||||
"version": 3
|
||||
}
|
||||
|
||||
}
|
|
@ -24,11 +24,7 @@
|
|||
./swaylock.nix
|
||||
./sway.nix
|
||||
./tmux.nix
|
||||
./tofi.nix
|
||||
./obs-studio.nix
|
||||
./waybar.nix
|
||||
./yazi.nix
|
||||
./zathura.nix
|
||||
./zellij.nix
|
||||
./zsh-syntax-highlighting.nix
|
||||
]
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (config.catppuccin) sources;
|
||||
cfg = config.programs.obs-studio.catppuccin;
|
||||
enable = cfg.enable && config.programs.obs-studio.enable;
|
||||
|
||||
themeName = "Catppuccin_${lib.ctp.mkUpper cfg.flavor}.ovt";
|
||||
in
|
||||
{
|
||||
options.programs.obs-studio.catppuccin = lib.ctp.mkCatppuccinOpt { name = "obs-studio"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
xdg.configFile."obs-studio/themes/Catppuccin.obt".source = "${sources.obs}/themes/Catppuccin.obt";
|
||||
xdg.configFile."obs-studio/themes/${themeName}".source = "${sources.obs}/themes/${themeName}";
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (config.catppuccin) sources;
|
||||
cfg = config.programs.tofi.catppuccin;
|
||||
enable = cfg.enable && config.programs.tofi.enable;
|
||||
in
|
||||
{
|
||||
options.programs.tofi.catppuccin = lib.ctp.mkCatppuccinOpt { name = "tofi"; };
|
||||
|
||||
config.programs.tofi = lib.mkIf enable {
|
||||
settings.include = sources.tofi + "/themes/catppuccin-${cfg.flavor}";
|
||||
};
|
||||
}
|
|
@ -1,26 +1,36 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (config.catppuccin) sources;
|
||||
cfg = config.programs.waybar.catppuccin;
|
||||
enable = cfg.enable && config.programs.waybar.enable;
|
||||
styleFile = "${sources.waybar}/themes/${cfg.flavor}.css";
|
||||
in
|
||||
{
|
||||
options.programs.waybar.catppuccin = lib.ctp.mkCatppuccinOpt { name = "waybar"; } // {
|
||||
mode = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"prependImport"
|
||||
"createLink"
|
||||
];
|
||||
default = "prependImport";
|
||||
description = ''
|
||||
Defines how to include the catppuccin theme css file:
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
- `prependImport`: Prepends the import statement, if `programs.waybar.style` is a string (with default override priority).
|
||||
- `createLink`: Creates a symbolic link `~/.config/waybar/catppuccin.css`, which needs to be included in the waybar stylesheet.
|
||||
'';
|
||||
cfg = config.programs.waybar.rose-pine;
|
||||
enable = cfg.enable && config.programs.waybar.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
styleFile = "${sources.waybar}/${themeName}.css";
|
||||
in {
|
||||
options.programs.waybar.rose-pine =
|
||||
lib.rp.mkRosePineOpt {name = "waybar";}
|
||||
// {
|
||||
mode = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"prependImport"
|
||||
"createLink"
|
||||
];
|
||||
default = "prependImport";
|
||||
description = ''
|
||||
Defines how to include the Rosé Pine theme css file:
|
||||
|
||||
- `prependImport`: Prepends the import statement, if `programs.waybar.style` is a string (with default override priority).
|
||||
- `createLink`: Creates a symbolic link `~/.config/waybar/rose-pine.css`, which needs to be included in the waybar stylesheet.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf enable (
|
||||
lib.mkMerge [
|
||||
|
@ -29,7 +39,9 @@ in
|
|||
@import "${styleFile}";
|
||||
'';
|
||||
})
|
||||
(lib.mkIf (cfg.mode == "createLink") { xdg.configFile."waybar/catppuccin.css".source = styleFile; })
|
||||
(lib.mkIf (cfg.mode == "createLink") {
|
||||
xdg.configFile."waybar/rose-pine.css".source = styleFile;
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (config.catppuccin) sources;
|
||||
|
||||
cfg = config.programs.yazi.catppuccin;
|
||||
enable = cfg.enable && config.programs.yazi.enable;
|
||||
in
|
||||
{
|
||||
options.programs.yazi.catppuccin = lib.ctp.mkCatppuccinOpt { name = "yazi"; };
|
||||
|
||||
config = lib.mkIf enable {
|
||||
programs.yazi.theme = lib.importTOML "${sources.yazi}/themes/${cfg.flavor}.toml";
|
||||
xdg.configFile."yazi/Catppuccin-${cfg.flavor}.tmTheme".source = "${sources.bat}/themes/Catppuccin ${lib.ctp.mkUpper cfg.flavor}.tmTheme";
|
||||
};
|
||||
}
|
|
@ -1,13 +1,21 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (config.catppuccin) sources;
|
||||
cfg = config.programs.zathura.catppuccin;
|
||||
enable = cfg.enable && config.programs.zathura.enable;
|
||||
in
|
||||
{
|
||||
options.programs.zathura.catppuccin = lib.ctp.mkCatppuccinOpt { name = "zathura"; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.zathura.rose-pine;
|
||||
enable = cfg.enable && config.programs.zathura.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
in {
|
||||
options.programs.zathura.rose-pine = lib.rp.mkRosePineOpt {name = "zathura";};
|
||||
|
||||
config.programs.zathura.extraConfig = lib.mkIf enable ''
|
||||
include ${sources.zathura + "/src/catppuccin-${cfg.flavor}"}
|
||||
include ${sources.zathura + "/${themeName}"}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,13 +1,24 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.programs.zellij.catppuccin;
|
||||
enable = cfg.enable && config.programs.zellij.enable;
|
||||
themeName = "catppuccin-${cfg.flavor}";
|
||||
in
|
||||
{
|
||||
options.programs.zellij.catppuccin = lib.ctp.mkCatppuccinOpt { name = "zellij"; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
cfg = config.programs.zellij.rose-pine;
|
||||
enable = cfg.enable && config.programs.zellij.enable;
|
||||
|
||||
themeName =
|
||||
if (cfg.flavor == "main")
|
||||
then "rose-pine"
|
||||
else "rose-pine-${cfg.flavor}";
|
||||
theme = sources.zellij + "/dist/${themeName}.kdl";
|
||||
in {
|
||||
options.programs.zellij.rose-pine = lib.rp.mkRosePineOpt {name = "zellij";};
|
||||
|
||||
config = lib.mkIf enable {
|
||||
xdg.configFile."zellij/themes/${themeName}.kdl".source = theme;
|
||||
|
||||
programs.zellij.settings = {
|
||||
theme = themeName;
|
||||
};
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (config.catppuccin) sources;
|
||||
inherit (lib) ctp;
|
||||
cfg = config.programs.zsh.syntaxHighlighting.catppuccin;
|
||||
enable = cfg.enable && config.programs.zsh.syntaxHighlighting.enable;
|
||||
in
|
||||
{
|
||||
options.programs.zsh.syntaxHighlighting.catppuccin = ctp.mkCatppuccinOpt {
|
||||
name = "Zsh Syntax Highlighting";
|
||||
};
|
||||
|
||||
config.programs.zsh = lib.mkIf enable {
|
||||
initExtra = lib.mkBefore ''
|
||||
source '${sources.zsh-syntax-highlighting}/themes/catppuccin_${cfg.flavor}-zsh-syntax-highlighting.zsh'
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -2,6 +2,5 @@
|
|||
./console.nix
|
||||
./globals.nix
|
||||
./grub.nix
|
||||
./plymouth.nix
|
||||
./sddm.nix
|
||||
]
|
||||
|
|
|
@ -1,34 +1,36 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (config.catppuccin) sources;
|
||||
cfg = config.console.catppuccin;
|
||||
enable = cfg.enable && config.console.enable;
|
||||
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavor}.colors;
|
||||
in
|
||||
{
|
||||
options.console.catppuccin = lib.ctp.mkCatppuccinOpt { name = "console"; };
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.console.rose-pine;
|
||||
enable = cfg.enable && config.console.enable;
|
||||
|
||||
palette = (lib.importJSON "../../.sources/palette.json").${cfg.flavor}.colors;
|
||||
in {
|
||||
options.console.rose-pine = lib.rp.mkRosePineOpt {name = "console";};
|
||||
|
||||
config.console.colors = lib.mkIf enable (
|
||||
# Manually populate with colors from catppuccin/tty
|
||||
# Manually populate with colors from rose-pine/linux-tty
|
||||
# Make sure to strip initial # from hex codes
|
||||
map (color: (builtins.substring 1 6 palette.${color}.hex)) [
|
||||
"base"
|
||||
"red"
|
||||
"green"
|
||||
"yellow"
|
||||
"blue"
|
||||
"pink"
|
||||
"teal"
|
||||
"subtext1"
|
||||
"love"
|
||||
"foam"
|
||||
"gold"
|
||||
"pine"
|
||||
"iris"
|
||||
"rose"
|
||||
"text"
|
||||
|
||||
"surface2"
|
||||
"red"
|
||||
"green"
|
||||
"yellow"
|
||||
"blue"
|
||||
"pink"
|
||||
"teal"
|
||||
"subtext0"
|
||||
"overlay"
|
||||
"love"
|
||||
"foam"
|
||||
"gold"
|
||||
"pine"
|
||||
"iris"
|
||||
"rose"
|
||||
"text"
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,28 +1,26 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
{lib, ...}: {
|
||||
config = {
|
||||
assertions = [ (lib.ctp.assertMinimumVersion "24.05") ];
|
||||
assertions = [(lib.rp.assertMinimumVersion "24.05")];
|
||||
};
|
||||
|
||||
options.catppuccin = {
|
||||
enable = lib.mkEnableOption "Catppuccin globally";
|
||||
options.rose-pine = {
|
||||
enable = lib.mkEnableOption "Rosé Pine globally";
|
||||
|
||||
flavor = lib.mkOption {
|
||||
type = lib.ctp.types.flavorOption;
|
||||
default = "mocha";
|
||||
description = "Global Catppuccin flavor";
|
||||
type = lib.rp.types.flavorOption;
|
||||
default = "main";
|
||||
description = "Global Rosé Pine flavor";
|
||||
};
|
||||
|
||||
accent = lib.mkOption {
|
||||
type = lib.ctp.types.accentOption;
|
||||
default = "mauve";
|
||||
description = "Global Catppuccin accent";
|
||||
type = lib.rp.types.accentOption;
|
||||
default = "love";
|
||||
description = "Global Rosé Pine accent";
|
||||
};
|
||||
|
||||
sources =
|
||||
let
|
||||
defaultSources = import ../../.sources;
|
||||
in
|
||||
sources = let
|
||||
defaultSources = import ../../.sources;
|
||||
in
|
||||
lib.mkOption {
|
||||
type = lib.types.lazyAttrsOf lib.types.raw;
|
||||
default = defaultSources;
|
||||
|
|
|
@ -1,26 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (config.catppuccin) sources;
|
||||
cfg = config.boot.loader.grub.catppuccin;
|
||||
enable = cfg.enable && config.boot.loader.grub.enable;
|
||||
}: let
|
||||
inherit (config.rose-pine) sources;
|
||||
|
||||
# TODO @getchoo: upstream this in nixpkgs maybe? idk if they have grub themes
|
||||
theme = pkgs.runCommand "catppuccin-grub-theme" { } ''
|
||||
mkdir -p "$out"
|
||||
cp -r ${sources.grub}/src/catppuccin-${cfg.flavor}-grub-theme/* "$out"/
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.boot.loader.grub.catppuccin = lib.ctp.mkCatppuccinOpt { name = "grub"; };
|
||||
cfg = config.boot.loader.grub.rose-pine;
|
||||
enable = cfg.enable && config.boot.loader.grub.enable;
|
||||
in {
|
||||
options.boot.loader.grub.rose-pine = lib.rp.mkRosePineOpt {name = "grub";};
|
||||
|
||||
config.boot.loader.grub = lib.mkIf enable {
|
||||
font = "${theme}/font.pf2";
|
||||
splashImage = "${theme}/background.png";
|
||||
inherit theme;
|
||||
theme = sources.grub;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) ctp mkIf;
|
||||
cfg = config.boot.plymouth.catppuccin;
|
||||
enable = cfg.enable && config.boot.plymouth.enable;
|
||||
in
|
||||
{
|
||||
options.boot.plymouth.catppuccin = ctp.mkCatppuccinOpt { name = "plymouth"; };
|
||||
|
||||
config.boot.plymouth = mkIf enable {
|
||||
theme = "catppuccin-${cfg.flavor}";
|
||||
themePackages = [ (pkgs.catppuccin-plymouth.override { variant = cfg.flavor; }) ];
|
||||
};
|
||||
}
|
|
@ -1,81 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
ctp
|
||||
types
|
||||
mkOption
|
||||
;
|
||||
cfg = config.services.displayManager.sddm.catppuccin;
|
||||
}: let
|
||||
inherit (config.rose-pine) sources;
|
||||
cfg = config.services.displayManager.sddm.rose-pine;
|
||||
enable = cfg.enable && config.services.displayManager.sddm.enable;
|
||||
in
|
||||
in {
|
||||
options.services.displayManager.sddm.rose-pine = lib.rp.mkRosePineOpt {name = "sddm";};
|
||||
|
||||
{
|
||||
options.services.displayManager.sddm.catppuccin = ctp.mkCatppuccinOpt { name = "sddm"; } // {
|
||||
font = mkOption {
|
||||
type = types.str;
|
||||
default = "Noto Sans";
|
||||
description = "Font to use for the login screen";
|
||||
};
|
||||
|
||||
fontSize = mkOption {
|
||||
type = types.str;
|
||||
default = "9";
|
||||
description = "Font size to use for the login screen";
|
||||
};
|
||||
|
||||
background = mkOption {
|
||||
type = with types; (either path str);
|
||||
default = "";
|
||||
description = "Background image to use for the login screen";
|
||||
};
|
||||
|
||||
loginBackground = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Add an additional background layer to the login panel";
|
||||
};
|
||||
|
||||
assertQt6Sddm =
|
||||
lib.mkEnableOption ''
|
||||
checking if `services.displayManager.sddm.package` is the Qt 6 version.
|
||||
|
||||
This is to ensure the theme is applied properly, but may have false positives in the case of overridden packages for example
|
||||
''
|
||||
// {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf enable {
|
||||
assertions = lib.optional cfg.assertQt6Sddm {
|
||||
assertion = config.services.displayManager.sddm.package == pkgs.kdePackages.sddm;
|
||||
message = ''
|
||||
Only the Qt 6 version of SDDM is supported by this port!
|
||||
|
||||
In most cases this can be resolved by setting `services.displayManager.sddm.package`
|
||||
to `pkgs.kdePackages.sddm`. If you know what you're doing and wish to disable this check,
|
||||
please set `services.displayManager.sddm.catppuccin.assertQt6Sddm` to `false`
|
||||
'';
|
||||
};
|
||||
|
||||
services.displayManager.sddm.theme = "catppuccin-${cfg.flavor}";
|
||||
config = lib.mkIf enable {
|
||||
services.displayManager.sddm.theme = "rose-pine";
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.catppuccin-sddm.override {
|
||||
inherit (cfg)
|
||||
flavor
|
||||
font
|
||||
fontSize
|
||||
background
|
||||
loginBackground
|
||||
;
|
||||
})
|
||||
(
|
||||
{
|
||||
stdenvNoCC,
|
||||
libsForQt5,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "sddm-rose-pine-theme";
|
||||
version = "1.2";
|
||||
dontBuild = true;
|
||||
|
||||
propagatedUserEnvPkgs = [
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
];
|
||||
|
||||
src = sources.sddm;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/sddm/themes
|
||||
cp -aR $src $out/share/sddm/themes/rose-pine
|
||||
'';
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue