-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(home-manager): dont declare xdg.configFile when btop isn't enabled * refactor: use alternatives to `with` and `rec` --------- Co-authored-by: Sam Nystrom <[email protected]>
- Loading branch information
1 parent
9616836
commit 60a1d9b
Showing
17 changed files
with
306 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
{ config, pkgs, lib, ... }: | ||
let cfg = config.programs.alacritty.catppuccin; | ||
in { | ||
{ config | ||
, pkgs | ||
, lib | ||
, ... | ||
}: | ||
let | ||
inherit (lib) ctp; | ||
cfg = config.programs.alacritty.catppuccin; | ||
enable = cfg.enable && config.programs.alacritty.enable; | ||
in | ||
{ | ||
options.programs.alacritty.catppuccin = | ||
lib.ctp.mkCatppuccinOpt "alacritty" config; | ||
ctp.mkCatppuccinOpt "alacritty" config; | ||
|
||
config.programs.alacritty.settings = with builtins; | ||
with lib; | ||
with pkgs; | ||
config.programs.alacritty.settings = | ||
let | ||
file = fetchFromGitHub | ||
{ | ||
owner = "catppuccin"; | ||
repo = "alacritty"; | ||
rev = "3c808cbb4f9c87be43ba5241bc57373c793d2f17"; | ||
sha256 = "sha256-w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0="; | ||
} + "/catppuccin-${cfg.flavour}.yml"; | ||
|
||
file = | ||
pkgs.fetchFromGitHub | ||
{ | ||
owner = "catppuccin"; | ||
repo = "alacritty"; | ||
rev = "3c808cbb4f9c87be43ba5241bc57373c793d2f17"; | ||
sha256 = "sha256-w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0="; | ||
} | ||
+ "/catppuccin-${cfg.flavour}.yml"; | ||
in | ||
mkIf cfg.enable (ctp.fromYaml pkgs file); | ||
lib.mkIf enable (ctp.fromYaml pkgs file); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
{ config, pkgs, lib, ... }: | ||
let cfg = config.programs.bat.catppuccin; in | ||
{ config | ||
, pkgs | ||
, lib | ||
, ... | ||
}: | ||
let | ||
cfg = config.programs.bat.catppuccin; | ||
enable = cfg.enable && config.programs.bat.enable; | ||
in | ||
{ | ||
options.programs.bat.catppuccin = | ||
lib.ctp.mkCatppuccinOpt "bat" config; | ||
|
||
config = { | ||
programs.bat = lib.mkIf cfg.enable { | ||
programs.bat = lib.mkIf enable { | ||
config.theme = "Catppuccin-${cfg.flavour}"; | ||
themes."Catppuccin-${cfg.flavour}" = builtins.readFile (pkgs.fetchFromGitHub | ||
{ | ||
owner = "catppuccin"; | ||
repo = "bat"; | ||
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1"; | ||
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw="; | ||
} + /Catppuccin-${cfg.flavour}.tmTheme); | ||
} | ||
+ "/Catppuccin-${cfg.flavour}.tmTheme"); | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
{ config, pkgs, lib, ... }: | ||
let cfg = config.programs.bottom.catppuccin; | ||
in { | ||
{ config | ||
, pkgs | ||
, lib | ||
, ... | ||
}: | ||
let | ||
inherit (builtins) fromTOML readFile; | ||
cfg = config.programs.bottom.catppuccin; | ||
enable = cfg.enable && config.programs.bottom.enable; | ||
in | ||
{ | ||
options.programs.bottom.catppuccin = | ||
lib.ctp.mkCatppuccinOpt "bottom" config; | ||
|
||
config.programs.bottom.settings = with builtins; | ||
with lib; | ||
with pkgs; | ||
mkIf cfg.enable (fromTOML (readFile (fetchFromGitHub | ||
{ | ||
owner = "catppuccin"; | ||
repo = "bottom"; | ||
rev = "c0efe9025f62f618a407999d89b04a231ba99c92"; | ||
sha256 = "sha256-VaHX2I/Gn82wJWzybpWNqU3dPi3206xItOlt0iF6VVQ="; | ||
} + "/themes/${cfg.flavour}.toml"))); | ||
config.programs.bottom.settings = lib.mkIf enable (fromTOML (readFile (pkgs.fetchFromGitHub | ||
{ | ||
owner = "catppuccin"; | ||
repo = "bottom"; | ||
rev = "c0efe9025f62f618a407999d89b04a231ba99c92"; | ||
sha256 = "sha256-VaHX2I/Gn82wJWzybpWNqU3dPi3206xItOlt0iF6VVQ="; | ||
} | ||
+ "/themes/${cfg.flavour}.toml"))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,40 @@ | ||
{ config, pkgs, lib, ... }: | ||
let cfg = config.programs.helix.catppuccin; | ||
in { | ||
{ config | ||
, pkgs | ||
, lib | ||
, ... | ||
}: | ||
let | ||
inherit (builtins) fromTOML readFile; | ||
cfg = config.programs.helix.catppuccin; | ||
enable = cfg.enable && config.programs.helix.enable; | ||
in | ||
{ | ||
options.programs.helix.catppuccin = with lib; | ||
ctp.mkCatppuccinOpt "helix" config // { | ||
ctp.mkCatppuccinOpt "helix" config | ||
// { | ||
useItalics = mkEnableOption "Italics in Catppuccin theme for Helix"; | ||
}; | ||
|
||
config.programs.helix = with builtins; | ||
with lib; | ||
with pkgs; | ||
let subdir = if cfg.useItalics then "default" else "no_italics"; | ||
in mkIf cfg.enable { | ||
config.programs.helix = | ||
let | ||
subdir = | ||
if cfg.useItalics | ||
then "default" | ||
else "no_italics"; | ||
in | ||
lib.mkIf enable { | ||
settings = { | ||
theme = "catppuccin-${cfg.flavour}"; | ||
editor.color-modes = mkDefault true; | ||
editor.color-modes = lib.mkDefault true; | ||
}; | ||
themes."catppuccin-${cfg.flavour}" = fromTOML (readFile (fetchFromGitHub | ||
|
||
themes."catppuccin-${cfg.flavour}" = fromTOML (readFile (pkgs.fetchFromGitHub | ||
{ | ||
owner = "catppuccin"; | ||
repo = "helix"; | ||
rev = "5677c16dc95297a804caea9161072ff174018fdd"; | ||
sha256 = "sha256-aa8KZ7/1TXcBqaV/TYOZ8rpusOf5QeQ9i2Upnncbziw="; | ||
} + "/themes/${subdir}/catppuccin_${cfg.flavour}.toml")); | ||
} | ||
+ "/themes/${subdir}/catppuccin_${cfg.flavour}.toml")); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
{ config, lib, ... }: | ||
let cfg = config.programs.kitty.catppuccin; | ||
in { | ||
{ config | ||
, lib | ||
, ... | ||
}: | ||
let | ||
inherit (lib) ctp; | ||
cfg = config.programs.kitty.catppuccin; | ||
enable = cfg.enable && config.programs.kitty.enable; | ||
in | ||
{ | ||
options.programs.kitty.catppuccin = | ||
lib.ctp.mkCatppuccinOpt "kitty" config; | ||
ctp.mkCatppuccinOpt "kitty" config; | ||
|
||
config.programs.kitty = with lib; | ||
let flavourUpper = ctp.mkUpper cfg.flavour; | ||
in mkIf cfg.enable { theme = "Catppuccin-${flavourUpper}"; }; | ||
config.programs.kitty = | ||
lib.mkIf enable { theme = "Catppuccin-${ctp.mkUpper cfg.flavour}"; }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
{ config, pkgs, lib, ... }: | ||
let cfg = config.programs.lazygit.catppuccin; | ||
in { | ||
{ config | ||
, pkgs | ||
, lib | ||
, ... | ||
}: | ||
let | ||
cfg = config.programs.lazygit.catppuccin; | ||
enable = cfg.enable && config.programs.lazygit.enable; | ||
in | ||
{ | ||
options.programs.lazygit.catppuccin = | ||
lib.ctp.mkCatppuccinOpt "lazygit" config; | ||
|
||
config.programs.lazygit.settings = with builtins; | ||
with lib; | ||
with pkgs; | ||
config.programs.lazygit.settings = | ||
let | ||
file = fetchFromGitHub | ||
{ | ||
owner = "catppuccin"; | ||
repo = "lazygit"; | ||
rev = "f01edfd57fa2aa7cd69a92537a613bb3c91e65dd"; | ||
sha256 = "sha256-zjzDtXcGtUon4QbrZnlAPzngEyH56yy8TCyFv0rIbOA="; | ||
} + "/themes/${cfg.flavour}.yml"; | ||
|
||
file = | ||
pkgs.fetchFromGitHub | ||
{ | ||
owner = "catppuccin"; | ||
repo = "lazygit"; | ||
rev = "f01edfd57fa2aa7cd69a92537a613bb3c91e65dd"; | ||
sha256 = "sha256-zjzDtXcGtUon4QbrZnlAPzngEyH56yy8TCyFv0rIbOA="; | ||
} | ||
+ "/themes/${cfg.flavour}.yml"; | ||
in | ||
mkIf cfg.enable (ctp.fromYaml pkgs file); | ||
lib.mkIf enable (lib.ctp.fromYaml pkgs file); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
{ config, pkgs, lib, ... }: | ||
let cfg = config.services.polybar.catppuccin; | ||
in { | ||
{ config | ||
, pkgs | ||
, lib | ||
, ... | ||
}: | ||
let | ||
cfg = config.services.polybar.catppuccin; | ||
enable = cfg.enable && config.services.polybar.enable; | ||
in | ||
{ | ||
options.services.polybar.catppuccin = | ||
lib.ctp.mkCatppuccinOpt "polybar" config; | ||
|
||
config.services.polybar.extraConfig = with builtins; | ||
with lib; | ||
with pkgs; | ||
mkIf cfg.enable (readFile (fetchFromGitHub | ||
{ | ||
owner = "catppuccin"; | ||
repo = "polybar"; | ||
rev = "9ee66f83335404186ce979bac32fcf3cd047396a"; | ||
sha256 = "sha256-bUbSgMg/sa2faeEUZo80GNmhOX3wn2jLzfA9neF8ERA="; | ||
} + "/themes/${cfg.flavour}.ini")); | ||
config.services.polybar.extraConfig = lib.mkIf enable (builtins.readFile (pkgs.fetchFromGitHub | ||
{ | ||
owner = "catppuccin"; | ||
repo = "polybar"; | ||
rev = "9ee66f83335404186ce979bac32fcf3cd047396a"; | ||
sha256 = "sha256-bUbSgMg/sa2faeEUZo80GNmhOX3wn2jLzfA9neF8ERA="; | ||
} | ||
+ "/themes/${cfg.flavour}.ini")); | ||
} |
Oops, something went wrong.