Use Catppuccin theme globally

This commit is contained in:
Mikael 2024-10-03 17:40:41 +02:00
parent e930241af7
commit fc4fc2523d
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0
11 changed files with 115 additions and 351 deletions

View file

@ -16,69 +16,34 @@
"type": "github" "type": "github"
} }
}, },
"base16": { "catppuccin": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": { "locked": {
"lastModified": 1708890466, "lastModified": 1727910534,
"narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", "narHash": "sha256-IjdGPDnBNk3r5h02kiPTKUOfn+UiKNWlhy/ozC0NgyQ=",
"owner": "SenchoPens", "owner": "catppuccin",
"repo": "base16.nix", "repo": "nix",
"rev": "665b3c6748534eb766c777298721cece9453fdae", "rev": "bad96d3fabf8d2e8f0bf0c2cb899a9fccf01ea03",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "SenchoPens", "owner": "catppuccin",
"repo": "base16.nix", "repo": "nix",
"type": "github" "type": "github"
} }
}, },
"base16-fish": { "catppuccin-palette": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1622559957, "lastModified": 1726892642,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", "narHash": "sha256-UJkNgvTCF/btQFIg5aqMXvDiC54iontbHJ5TEXdltE0=",
"owner": "tomyun", "owner": "catppuccin",
"repo": "base16-fish", "repo": "palette",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", "rev": "a52db8d9d675c4f1d3030f1b3c288a1934b019fd",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "tomyun", "owner": "catppuccin",
"repo": "base16-fish", "repo": "palette",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1725860795,
"narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "7f795bf75d38e0eea9fed287264067ca187b88a9",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1716150083,
"narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"type": "github" "type": "github"
} }
}, },
@ -189,22 +154,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@ -295,27 +244,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": {
"inputs": {
"systems": [
"stylix",
"systems"
]
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": { "flakey-profile": {
"locked": { "locked": {
"lastModified": 1712898590, "lastModified": 1712898590,
@ -331,22 +259,6 @@
"type": "github" "type": "github"
} }
}, },
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1689549921,
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -391,23 +303,6 @@
"type": "github" "type": "github"
} }
}, },
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1713702291,
"narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934",
"type": "github"
},
"original": {
"owner": "GNOME",
"ref": "46.1",
"repo": "gnome-shell",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -755,6 +650,8 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"catppuccin": "catppuccin",
"catppuccin-palette": "catppuccin-palette",
"colmena": "colmena", "colmena": "colmena",
"home-manager": "home-manager", "home-manager": "home-manager",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
@ -765,8 +662,7 @@
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nur": "nur", "nur": "nur",
"ripgrep-all": "ripgrep-all", "ripgrep-all": "ripgrep-all",
"rust-overlay": "rust-overlay", "rust-overlay": "rust-overlay"
"stylix": "stylix"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -805,40 +701,6 @@
"type": "github" "type": "github"
} }
}, },
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_4",
"gnome-shell": "gnome-shell",
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-tmux": "tinted-tmux"
},
"locked": {
"lastModified": 1727723275,
"narHash": "sha256-k4HrG8TJQ0RqDS1tlDz71kvWFBNQ7qZI9T5Z0qLR85Y=",
"owner": "danth",
"repo": "stylix",
"rev": "e7e97059776da7e34b739415a7bc8f80f606b803",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -869,69 +731,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1696725948,
"narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1665001328,
"narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1696725902,
"narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"xwayland-satellite-stable": { "xwayland-satellite-stable": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -27,10 +27,10 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
stylix = { catppuccin.url = "github:catppuccin/nix";
url = "github:danth/stylix"; catppuccin-palette = {
inputs.nixpkgs.follows = "nixpkgs"; url = "github:catppuccin/palette";
inputs.home-manager.follows = "home-manager"; flake = false;
}; };
nix-index-database = { nix-index-database = {

View file

@ -26,19 +26,18 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
sndioSupport = false; sndioSupport = false;
}; };
style = pkgs.writeText "waybar-style.css" style = ''
(with config.lib.stylix.colors.withHashtag; ''
* { * {
font: 600 12pt sans-serif; font: 600 12pt sans-serif;
} }
window, tooltip { window, tooltip {
background: ${base00}; background: @base;
color: ${base05}; color: @text;
} }
tooltip { tooltip {
border-color: ${base0D}; border-color: @blue;
} }
#tray, #taskbar, .modules-center, .modules-right { #tray, #taskbar, .modules-center, .modules-right {
@ -59,33 +58,33 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
} }
#battery.warning { #battery.warning {
color: ${yellow}; color: @yellow;
} }
#battery.critical { #battery.critical {
color: ${red}; color: @red;
} }
#temperature.critical { #temperature.critical {
color: ${red}; color: @red;
} }
#idle_inhibitor.activated { #idle_inhibitor.activated {
color: ${yellow}; color: @yellow;
} }
#pulseaudio.sink.muted { #pulseaudio.sink.muted {
color: ${base03}; color: @surface1;
} }
#pulseaudio.source { #pulseaudio.source {
color: ${yellow}; color: @yellow;
} }
#pulseaudio.source.source-muted { #pulseaudio.source.source-muted {
color: ${base03}; color: @surface1;
} }
'') |> lib.mkForce; '';
settings = { settings = {
main = { main = {

View file

@ -1,4 +1,4 @@
{ ... }: { config, lib, pkgs, ... }@args: { self, ... }: { config, lib, pkgs, ... }@args:
let let
osConfig = args.osConfig or { }; osConfig = args.osConfig or { };
@ -20,7 +20,6 @@ let
name = "fuzzel-askpass"; name = "fuzzel-askpass";
text = '' text = ''
exec ${fuzzel} \ exec ${fuzzel} \
--font=monospace \
--prompt="󰣀" \ --prompt="󰣀" \
--password \ --password \
--lines=0 \ --lines=0 \
@ -41,10 +40,20 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
simple-scan simple-scan
]; ];
gtk = {
enable = true;
catppuccin = {
enable = true;
gnomeShellTheme = true;
icon.enable = true;
};
};
programs.fuzzel = { programs.fuzzel = {
enable = true; enable = true;
settings = { settings = {
main = { main = {
font = "monospace:size=10";
prompt = ""; prompt = "";
}; };
}; };
@ -92,11 +101,11 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
width = 1; width = 1;
active = { active = {
color = config.lib.stylix.colors.withHashtag.base0D; color = self.lib.catppuccin.mocha.colors.blue.hex;
}; };
inactive = { inactive = {
color = config.lib.stylix.colors.withHashtag.base03; color = self.lib.catppuccin.mocha.colors.surface1.hex;
}; };
}; };

View file

@ -2,9 +2,8 @@
programs.helix = { programs.helix = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
catppuccin.useItalics = true;
settings = { settings = {
theme = lib.mkForce "catppuccin_mocha";
editor = { editor = {
rulers = [ 80 120 ]; rulers = [ 80 120 ];

View file

@ -1,6 +1,16 @@
{ self, ... }: { config, lib, pkgs, ... }@args: { self, ... }: { config, lib, pkgs, ... }@args:
let let
osConfig = args.osConfig or { }; osConfig = args.osConfig or { };
iosevka = pkgs.iosevka.override {
set = "-idiosyn-sans-term";
privateBuildPlan = import ./iosevka.nix // {
family = "idiosyn sans term";
spacing = "term";
};
};
nerdfonts = pkgs.nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; };
in lib.mkIf (osConfig.hardware.graphics.enable or false) { in lib.mkIf (osConfig.hardware.graphics.enable or false) {
fonts.fontconfig = { fonts.fontconfig = {
enable = true; enable = true;
@ -32,48 +42,15 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
home.packages = with pkgs; [ home.packages = with pkgs; [
fira-code fira-code
iosevka
julia-mono julia-mono
lato lato
mplus-outline-fonts.githubRelease mplus-outline-fonts.githubRelease
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) nerdfonts
noto-fonts noto-fonts
noto-fonts-color-emoji noto-fonts-color-emoji
unifont unifont
]; ];
stylix.fonts = {
sansSerif = {
package = pkgs.lato;
name = "sans-serif";
};
serif = {
package = pkgs.noto-fonts;
name = "serif";
};
monospace = {
package = pkgs.iosevka.override {
set = "-idiosyn-sans-term";
privateBuildPlan = import ./iosevka.nix // {
family = "idiosyn sans term";
spacing = "term";
};
};
name = "monospace";
};
emoji = {
package = pkgs.noto-fonts-color-emoji;
name = "emoji";
};
sizes = {
terminal = 11;
popups = 13;
};
};
xdg.configFile."fontconfig/conf.d/80-fira-code.conf".source = ./fira-code.xml; xdg.configFile."fontconfig/conf.d/80-fira-code.conf".source = ./fira-code.xml;
} }

View file

@ -1,4 +1,4 @@
{ self, nur, stylix, nix-index-database, niri, ripgrep-all, ... }: { config, lib, pkgs, ... }@args: { self, nur, catppuccin, nix-index-database, niri, ripgrep-all, ... }: { config, lib, pkgs, ... }@args:
let let
osConfig = args.osConfig or { }; osConfig = args.osConfig or { };
in { in {
@ -7,14 +7,11 @@ in {
self.homeModules.greedy self.homeModules.greedy
self.homeModules.locale-en_EU self.homeModules.locale-en_EU
nix-index-database.hmModules.nix-index nix-index-database.hmModules.nix-index
stylix.homeManagerModules.stylix catppuccin.homeManagerModules.catppuccin
niri.homeModules.config niri.homeModules.config
niri.homeModules.stylix
] ++ self.lib.mods [ ] ++ self.lib.mods [
./gammarelay.nix ./gammarelay.nix
./founts.nix ./founts.nix
./stylix.nix
./editor.nix ./editor.nix
./desktop.nix ./desktop.nix
./bar.nix ./bar.nix
@ -30,6 +27,11 @@ in {
home.stateVersion = "24.11"; home.stateVersion = "24.11";
home.enableNixpkgsReleaseCheck = false; home.enableNixpkgsReleaseCheck = false;
catppuccin = {
enable = true;
pointerCursor.enable = true;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
# Terminfo # Terminfo
kitty.terminfo kitty.terminfo
@ -111,30 +113,13 @@ in {
}; };
}; };
programs.bat = { programs.bat.enable = true;
enable = true;
config = {
theme = lib.mkForce "Catppuccin Mocha";
};
themes."Catppuccin Mocha" = {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "d3feec47b16a8e99eabb34cdfbaa115541d374fc";
hash = "sha256-s0CHTihXlBMCKmbBBb8dUhfgOOQu9PBCQ+uviy7o47w=";
};
file = "themes/Catppuccin Mocha.tmTheme";
};
};
programs.bottom = { programs.bottom = {
enable = true; enable = true;
settings.flags = { settings.flags = {
group = true; group = true;
battery = true; battery = true;
color = "gruvbox";
mem_as_value = true; mem_as_value = true;
network_use_binary_prefix = true; network_use_binary_prefix = true;
network_use_bytes = true; network_use_bytes = true;

View file

@ -1,12 +0,0 @@
{ ... }: { config, lib, pkgs, ... }@args:
let
osConfig = args.osConfig or { };
in {
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
image = config.lib.stylix.pixel "base00";
targets.gtk.enable = osConfig.hardware.graphics.enable or false;
};
}

View file

@ -10,7 +10,6 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
themeFile = "Catppuccin-Mocha";
settings = { settings = {
disable_ligatures = "cursor"; disable_ligatures = "cursor";

5
lib/catppuccin.nix Normal file
View file

@ -0,0 +1,5 @@
{ catppuccin-palette, ... }:
catppuccin-palette + /palette.json
|> builtins.readFile
|> builtins.fromJSON

View file

@ -1,5 +1,7 @@
{ self, ... }: { config, lib, pkgs, ... }: { { self, catppuccin, ... }: { config, lib, pkgs, ... }: {
imports = with self.nixosModules; [ imports = [
catppuccin.nixosModules.catppuccin
] ++ (with self.nixosModules; [
broken broken
btrfs btrfs
clusters clusters
@ -16,11 +18,13 @@
security security
users users
zram zram
]; ]);
#boot.initrd.systemd.enable = true; #boot.initrd.systemd.enable = true;
boot.tmp.useTmpfs = true; boot.tmp.useTmpfs = true;
catppuccin.enable = true;
documentation = { documentation = {
dev.enable = true; dev.enable = true;
doc.enable = false; doc.enable = false;