From 6ab5126dbe51e4967ff19cf6b916c32f24cdb172 Mon Sep 17 00:00:00 2001 From: Anomalocaridid <29845794+Anomalocaridid@users.noreply.github.com> Date: Sun, 7 Apr 2024 05:17:43 -0400 Subject: [PATCH] feat(home-manager): init swaylock module (#92) --- _sources/generated.json | 20 ++++++++++++++++++++ _sources/generated.nix | 12 ++++++++++++ modules/home-manager/swaylock.nix | 16 ++++++++++++++++ nvfetcher.toml | 4 ++++ test.nix | 1 + 5 files changed, 53 insertions(+) create mode 100644 modules/home-manager/swaylock.nix diff --git a/_sources/generated.json b/_sources/generated.json index be20eb9..44c9edd 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -399,6 +399,26 @@ }, "version": "c7e54561a2539024020837f23068f70c6d2ae424" }, + "swaylock": { + "cargoLocks": null, + "date": "2024-01-17", + "extract": null, + "name": "swaylock", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "catppuccin", + "repo": "swaylock", + "rev": "ac089b8b8ae7852816fa709f6d97659221b75e18", + "sha256": "sha256-e17JVWyj+ES9qII8Ukj6JxZh4bWUK+gOKsTvUIu3Qq4=", + "type": "github" + }, + "version": "ac089b8b8ae7852816fa709f6d97659221b75e18" + }, "tmux": { "cargoLocks": null, "date": "2024-03-13", diff --git a/_sources/generated.nix b/_sources/generated.nix index 6f67188..481b930 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -241,6 +241,18 @@ }; date = "2023-12-20"; }; + swaylock = { + pname = "swaylock"; + version = "ac089b8b8ae7852816fa709f6d97659221b75e18"; + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "swaylock"; + rev = "ac089b8b8ae7852816fa709f6d97659221b75e18"; + fetchSubmodules = false; + sha256 = "sha256-e17JVWyj+ES9qII8Ukj6JxZh4bWUK+gOKsTvUIu3Qq4="; + }; + date = "2024-01-17"; + }; tmux = { pname = "tmux"; version = "cece0c36772483d1343bcace2b1cedb007057c2e"; diff --git a/modules/home-manager/swaylock.nix b/modules/home-manager/swaylock.nix new file mode 100644 index 0000000..9fceec9 --- /dev/null +++ b/modules/home-manager/swaylock.nix @@ -0,0 +1,16 @@ +{ config +, lib +, sources +, ... +}: +let + cfg = config.programs.swaylock.catppuccin; + enable = cfg.enable && config.programs.swaylock.enable; +in +{ + options.programs.swaylock.catppuccin = + lib.ctp.mkCatppuccinOpt "swaylock"; + + config.programs.swaylock.settings = lib.mkIf enable + (lib.ctp.fromINI (sources.swaylock + /themes/${cfg.flavour}.conf)); +} diff --git a/nvfetcher.toml b/nvfetcher.toml index 1bbee7b..05c19c4 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -78,6 +78,10 @@ fetch.github = "catppuccin/starship" src.git = "https://github.com/catppuccin/sway.git" fetch.github = "catppuccin/sway" +[swaylock] +src.git = "https://github.com/catppuccin/swaylock.git" +fetch.github = "catppuccin/swaylock" + [tmux] src.git = "https://github.com/catppuccin/tmux.git" fetch.github = "catppuccin/tmux" diff --git a/test.nix b/test.nix index 3b01f97..abd8b82 100644 --- a/test.nix +++ b/test.nix @@ -69,6 +69,7 @@ in micro = ctpEnable; neovim = ctpEnable; starship = ctpEnable; + swaylock = ctpEnable; tmux = ctpEnable; zathura = ctpEnable; };