feat(nixos): init console module (#69)
This commit is contained in:
parent
948fe713ea
commit
18419d5a11
5 changed files with 76 additions and 0 deletions
|
@ -299,6 +299,26 @@
|
|||
},
|
||||
"version": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074"
|
||||
},
|
||||
"palette": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-01-02",
|
||||
"extract": null,
|
||||
"name": "palette",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
"deepClone": false,
|
||||
"fetchSubmodules": false,
|
||||
"leaveDotGit": false,
|
||||
"name": null,
|
||||
"owner": "catppuccin",
|
||||
"repo": "palette",
|
||||
"rev": "7f103c3e11f7f705ee1fb8ac430d90a798bbdfcb",
|
||||
"sha256": "sha256-W1Bj/407i2XT7CmCBoFe2PCe10MB8lmnEQsWXSrJ6zg=",
|
||||
"type": "github"
|
||||
},
|
||||
"version": "7f103c3e11f7f705ee1fb8ac430d90a798bbdfcb"
|
||||
},
|
||||
"polybar": {
|
||||
"cargoLocks": null,
|
||||
"date": "2022-10-05",
|
||||
|
|
|
@ -181,6 +181,18 @@
|
|||
};
|
||||
date = "2023-12-31";
|
||||
};
|
||||
palette = {
|
||||
pname = "palette";
|
||||
version = "7f103c3e11f7f705ee1fb8ac430d90a798bbdfcb";
|
||||
src = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "palette";
|
||||
rev = "7f103c3e11f7f705ee1fb8ac430d90a798bbdfcb";
|
||||
fetchSubmodules = false;
|
||||
sha256 = "sha256-W1Bj/407i2XT7CmCBoFe2PCe10MB8lmnEQsWXSrJ6zg=";
|
||||
};
|
||||
date = "2024-01-02";
|
||||
};
|
||||
polybar = {
|
||||
pname = "polybar";
|
||||
version = "9ee66f83335404186ce979bac32fcf3cd047396a";
|
||||
|
|
38
modules/nixos/console.nix
Normal file
38
modules/nixos/console.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ config
|
||||
, lib
|
||||
, sources
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.console.catppuccin;
|
||||
enable = cfg.enable && config.console.enable;
|
||||
palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors;
|
||||
in
|
||||
{
|
||||
options.console.catppuccin =
|
||||
lib.ctp.mkCatppuccinOpt "console";
|
||||
|
||||
config.console.colors = lib.mkIf enable (
|
||||
# Manually populate with colors from catppuccin/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"
|
||||
|
||||
"surface2"
|
||||
"red"
|
||||
"green"
|
||||
"yellow"
|
||||
"blue"
|
||||
"pink"
|
||||
"teal"
|
||||
"subtext0"
|
||||
]
|
||||
);
|
||||
}
|
|
@ -58,6 +58,10 @@ fetch.github = "catppuccin/micro"
|
|||
src.git = "https://github.com/catppuccin/nvim.git"
|
||||
fetch.github = "catppuccin/nvim"
|
||||
|
||||
[palette]
|
||||
src.git = "https://github.com/catppuccin/palette"
|
||||
fetch.github = "catppuccin/palette"
|
||||
|
||||
[polybar]
|
||||
src.git = "https://github.com/catppuccin/polybar.git"
|
||||
fetch.github = "catppuccin/polybar"
|
||||
|
|
2
test.nix
2
test.nix
|
@ -28,6 +28,8 @@ in
|
|||
|
||||
boot.loader.grub = ctpEnable;
|
||||
|
||||
console = ctpEnable;
|
||||
|
||||
programs.dconf.enable = true; # required for gtk
|
||||
|
||||
virtualisation = {
|
||||
|
|
Loading…
Reference in a new issue