WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 9399578

Browse files
feat(home-manager): add support for COSMIC
1 parent d75e3fe commit 9399578

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

modules/home-manager/all-modules.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
./btop.nix
99
./cava.nix
1010
./chrome.nix
11+
./cosmic.nix
1112
./cursors.nix
1213
./delta.nix
1314
./dunst.nix

modules/home-manager/cosmic.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{ catppuccinLib }:
2+
{ config, lib, ... }:
3+
{
4+
options.catppuccin = {
5+
cosmic = catppuccinLib.mkCatppuccinOption {
6+
accentSupport = true;
7+
name = "cosmic";
8+
};
9+
10+
cosmic-term = catppuccinLib.mkCatppuccinOption { name = "cosmic-term"; };
11+
};
12+
13+
config =
14+
let
15+
cfg = config.catppuccin;
16+
version = 1;
17+
in
18+
lib.mkMerge [
19+
(lib.mkIf cfg.cosmic.enable {
20+
wayland.desktopManager.cosmic.components.config = {
21+
"com.system76.CosmicTheme.${if cfg.cosmic.flavor == "latte" then "Light" else "Dark"}.Builder" = {
22+
inherit version;
23+
entries = lib.ron.importRON "${config.catppuccin.sources.cosmic-desktop}/cosmic-settings/catppuccin-${cfg.cosmic.flavor}-${cfg.cosmic.accent}+round.ron";
24+
};
25+
26+
"com.system76.CosmicTheme.Mode" = {
27+
inherit version;
28+
entries.is_dark = cfg.cosmic.flavor != "latte";
29+
};
30+
};
31+
})
32+
33+
(lib.mkIf cfg.cosmic-term.enable
34+
{
35+
# TODO
36+
}
37+
)
38+
];
39+
}

pkgs/sources.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
"lastModified": "2024-09-03",
3535
"rev": "0746f77974330338ee2e1e4d1ef9872eba57eb26"
3636
},
37+
"cosmic-desktop": {
38+
"hash": "sha256-NAQnHS+XrMJ/rPgSS5nEQOMBhQtF6mP1i/0QP5arQ64=",
39+
"lastModified": "2025-04-22",
40+
"rev": "95e81098042dd2102f0b258f6990f886c5759692"
41+
},
3742
"cursors": {
3843
"hash": "sha256-qis6p+/m7+DdRDYzLq9yB2eZGpfZe5z5xRsa/1HoIG4=",
3944
"lastModified": "2025-02-22",

0 commit comments

Comments
 (0)