From 7caf92174604c04c4fe71b47bb6593889ef29088 Mon Sep 17 00:00:00 2001 From: servius Date: Wed, 4 Mar 2026 17:43:52 +0530 Subject: [PATCH] feat: Generate completions for fish and sync khal properly --- flake.lock | 6 +++--- home/accounts/fastmail.nix | 4 ++++ home/apps/zen.nix | 30 ++++++++++++++++++++++++++++++ home/programs/calendar.nix | 1 + home/programs/fish.nix | 16 ++++++++-------- nixos/ryu/programs/default.nix | 1 + nixos/ryu/programs/fish.nix | 6 ++++++ 7 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 nixos/ryu/programs/fish.nix diff --git a/flake.lock b/flake.lock index e41c1c73..6e22514a 100644 --- a/flake.lock +++ b/flake.lock @@ -1765,11 +1765,11 @@ "rust-overlay": "rust-overlay_6" }, "locked": { - "lastModified": 1771950770, - "narHash": "sha256-c1AQ5sMPbXHe68u+W8gNqetAu9+jzyrOtvKOfAnFRx4=", + "lastModified": 1772623144, + "narHash": "sha256-twm2v0cmLEmad0pVs2xF1o0e+M/SxoZkVnLXbb7BTDU=", "owner": "uttarayan21", "repo": "nixify", - "rev": "4f4aad61bc0ef774adb87192de0aa09116eb8dfe", + "rev": "513221f2d4f2ab195c27cb35d1e8904969a748e7", "type": "github" }, "original": { diff --git a/home/accounts/fastmail.nix b/home/accounts/fastmail.nix index 64460a18..caa112bb 100644 --- a/home/accounts/fastmail.nix +++ b/home/accounts/fastmail.nix @@ -52,9 +52,13 @@ khal = { enable = true; addresses = ["email@uttarayan.me"]; + type = "discover"; }; vdirsyncer = { enable = true; + conflictResolution = "remote wins"; + collections = ["from a"]; + metadata = ["color" "displayname"]; }; }; }; diff --git a/home/apps/zen.nix b/home/apps/zen.nix index 498a14a6..c60f3072 100644 --- a/home/apps/zen.nix +++ b/home/apps/zen.nix @@ -86,6 +86,36 @@ icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = ["@nx"]; # Keep in mind that aliases defined here only work if they start with "@" }; + hm = { + name = "Home Manager Options"; + urls = [ + { + template = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master"; + params = [ + { + name = "query"; + value = "searchTerms"; + } + ]; + } + ]; + definedAliases = ["@hm"]; + }; + nv = { + name = "NixVim"; + urls = [ + { + template = "https://nix-community.github.io/nixvim/search/?query={searchTerms}"; + params = [ + { + name = "query"; + value = "searchTerms"; + } + ]; + } + ]; + definedAliases = ["@nv"]; + }; }; }; pins = { diff --git a/home/programs/calendar.nix b/home/programs/calendar.nix index 150449df..d5e1c23c 100644 --- a/home/programs/calendar.nix +++ b/home/programs/calendar.nix @@ -2,5 +2,6 @@ programs.khal.enable = true; programs.qcal.enable = true; programs.vdirsyncer.enable = true; + services.vdirsyncer.enable = true; accounts.calendar.accounts.fastmail.qcal.enable = true; } diff --git a/home/programs/fish.nix b/home/programs/fish.nix index 79210695..15749d78 100644 --- a/home/programs/fish.nix +++ b/home/programs/fish.nix @@ -46,14 +46,14 @@ }; home.shell.enableFishIntegration = true; - programs.bash = { - enable = true; - initExtra = '' - if [[ $- == *i* && -z "$FISH_VERSION" ]]; then - exec ${lib.getExe pkgs.fish} - fi - ''; - }; + # programs.bash = { + # enable = true; + # initExtra = '' + # if [[ $- == *i* && -z "$FISH_VERSION" ]]; then + # ${lib.getExe pkgs.fish} + # fi + # ''; + # }; } // lib.optionalAttrs (!(device.is "tsuba")) { stylix.targets.fish.enable = false; diff --git a/nixos/ryu/programs/default.nix b/nixos/ryu/programs/default.nix index 54b831b0..0ea7b3c2 100644 --- a/nixos/ryu/programs/default.nix +++ b/nixos/ryu/programs/default.nix @@ -22,5 +22,6 @@ ./foot.nix ./ddcutil.nix ./libnotify.nix + ./fish.nix ]; } diff --git a/nixos/ryu/programs/fish.nix b/nixos/ryu/programs/fish.nix new file mode 100644 index 00000000..baad4995 --- /dev/null +++ b/nixos/ryu/programs/fish.nix @@ -0,0 +1,6 @@ +{...}: { + programs.fish = { + enable = true; + generateCompletions = true; + }; +}