Commit 5fd02656ce5d
Changed files (1)
home
modules
home/modules/lazyworktree.nix
@@ -1,52 +1,17 @@
{
config,
lib,
- pkgs,
...
}:
let
inherit (lib) mkIf types;
cfg = config.programs.lazyworktree;
-
- yamlFormat = pkgs.formats.yaml { };
-
- configDir =
- if pkgs.stdenv.hostPlatform.isDarwin && !config.xdg.enable then
- "Library/Application Support"
- else
- config.xdg.configHome;
in
{
+ # Only declare options that the upstream home-manager module does NOT provide.
+ # Upstream (programs.lazyworktree) already declares: enable, package, settings.
options.programs.lazyworktree = {
- enable = lib.mkEnableOption "lazyworktree, a TUI for managing Git worktrees";
-
- package = lib.mkPackageOption pkgs "lazyworktree" { nullable = true; };
-
- settings = lib.mkOption {
- type = yamlFormat.type;
- default = { };
- defaultText = lib.literalExpression "{ }";
- example = lib.literalExpression ''
- {
- theme = "nord";
- icon_set = "nerd-font-v3";
- editor = "nvim";
- auto_fetch_prs = true;
- git_pager = "delta";
- }
- '';
- description = ''
- Configuration written to
- {file}`$XDG_CONFIG_HOME/lazyworktree/config.yaml`
- on Linux or on Darwin if [](#opt-xdg.enable) is set, otherwise
- {file}`~/Library/Application Support/lazyworktree/config.yaml`.
- See
- <https://github.com/chmouel/lazyworktree>
- for supported values.
- '';
- };
-
enableZshIntegration = lib.mkEnableOption "zsh integration" // {
default = true;
};
@@ -87,13 +52,6 @@ in
};
config = mkIf cfg.enable {
- home.packages = mkIf (cfg.package != null) [ cfg.package ];
-
- home.file."${configDir}/lazyworktree/config.yaml" = {
- enable = cfg.settings != { };
- source = yamlFormat.generate "lazyworktree-config" cfg.settings;
- };
-
programs =
let
# Source upstream shell functions from the package