feat(home-manager): init hyprland module (#56)

This commit is contained in:
Anomalocaridid 2023-11-03 15:55:17 +00:00 committed by GitHub
parent f616c3ce91
commit 88376af32e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 57 additions and 0 deletions

View file

@ -179,6 +179,26 @@
},
"version": "8313c7250fcbbb22c6680db332669073ec6b28c2"
},
"hyprland": {
"cargoLocks": null,
"date": "2023-05-03",
"extract": null,
"name": "hyprland",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "catppuccin",
"repo": "hyprland",
"rev": "99a88fd21fac270bd999d4a26cf0f4a4222c58be",
"sha256": "sha256-07B5QmQmsUKYf38oWU3+2C6KO4JvinuTwmW1Pfk8CT8=",
"type": "github"
},
"version": "99a88fd21fac270bd999d4a26cf0f4a4222c58be"
},
"kitty": {
"cargoLocks": null,
"date": "2023-06-09",

View file

@ -109,6 +109,18 @@
};
date = "2023-10-20";
};
hyprland = {
pname = "hyprland";
version = "99a88fd21fac270bd999d4a26cf0f4a4222c58be";
src = fetchFromGitHub {
owner = "catppuccin";
repo = "hyprland";
rev = "99a88fd21fac270bd999d4a26cf0f4a4222c58be";
fetchSubmodules = false;
sha256 = "sha256-07B5QmQmsUKYf38oWU3+2C6KO4JvinuTwmW1Pfk8CT8=";
};
date = "2023-05-03";
};
kitty = {
pname = "kitty";
version = "4820b3ef3f4968cf3084b2239ce7d1e99ea04dda";

View file

@ -16,6 +16,7 @@ in
./lazygit.nix
./starship.nix
./helix.nix
./hyprland.nix
./glamour.nix
./gtk.nix
./mako.nix

View file

@ -0,0 +1,19 @@
{ config
, lib
, sources
, ...
}:
let
cfg = config.wayland.windowManager.hyprland.catppuccin;
enable = cfg.enable && config.wayland.windowManager.hyprland.enable;
in
{
options.wayland.windowManager.hyprland.catppuccin =
lib.ctp.mkCatppuccinOpt "hyprland";
# Because of how nix merges options and hyprland interprets options, sourcing
# the file does not work. instead, parse the theme and put it in settings so
# the variables appear early enough in the file to be applied properly.
config.wayland.windowManager.hyprland.settings = lib.mkIf enable
(lib.ctp.fromINI (sources.hyprland + /themes/${cfg.flavour}.conf));
}

View file

@ -34,6 +34,10 @@ fetch.github = "catppuccin/gtk"
src.git = "https://github.com/catppuccin/helix.git"
fetch.github = "catppuccin/helix"
[hyprland]
src.git = "https://github.com/catppuccin/hyprland.git"
fetch.github = "catppuccin/hyprland"
[kitty]
src.git = "https://github.com/catppuccin/kitty.git"
fetch.github = "catppuccin/kitty"

View file

@ -80,6 +80,7 @@ in
};
wayland.windowManager.sway = ctpEnable;
wayland.windowManager.hyprland = ctpEnable;
};
};