Skip to content

Commit

Permalink
feat(home-manager): init hyprland module (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anomalocaridid authored Nov 3, 2023
1 parent f616c3c commit 88376af
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 0 deletions.
20 changes: 20 additions & 0 deletions _sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 12 additions & 0 deletions _sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
1 change: 1 addition & 0 deletions modules/home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ in
./lazygit.nix
./starship.nix
./helix.nix
./hyprland.nix
./glamour.nix
./gtk.nix
./mako.nix
Expand Down
19 changes: 19 additions & 0 deletions modules/home-manager/hyprland.nix
Original file line number Diff line number Diff line change
@@ -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));
}
4 changes: 4 additions & 0 deletions nvfetcher.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ in
};

wayland.windowManager.sway = ctpEnable;
wayland.windowManager.hyprland = ctpEnable;
};
};

Expand Down

0 comments on commit 88376af

Please sign in to comment.