From ba4b1b2c30d6cbbd20b9700414bdf812e3e651b6 Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Thu, 21 Nov 2024 22:45:21 +0700 Subject: [PATCH] gcalcli: now uses symlinkJoin to symlink gcalcli and gcalcliExec --- home/modules/hyprland/eww.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/home/modules/hyprland/eww.nix b/home/modules/hyprland/eww.nix index 1f3a306..7954935 100644 --- a/home/modules/hyprland/eww.nix +++ b/home/modules/hyprland/eww.nix @@ -7,6 +7,13 @@ let cfg = config.profile.hyprland; inherit (lib) mkIf; + gcalcliExec = ( + pkgs.writeShellScriptBin "gcalcli" '' + client_id=$(cat ${config.sops.secrets."gcalcli/client/id".path}) + client_secret=$(cat ${config.sops.secrets."gcalcli/client/secret".path}) + ${pkgs.gcalcli}/bin/gcalcli --client-id=$client_id --client-secret=$client_secret "$@" + '' + ); in { config = mkIf cfg.enable { @@ -25,11 +32,16 @@ in home.packages = with pkgs; [ eww - (writeShellScriptBin "gcalcli" '' - client_id=$(cat ${config.sops.secrets."gcalcli/client/id".path}) - client_secret=$(cat ${config.sops.secrets."gcalcli/client/secret".path}) - ${gcalcli}/bin/gcalcli --client-id=$client_id --client-secret=$client_secret "$@" - '') + ags + bun + typescript + (symlinkJoin { + name = "gcalcli"; + paths = [ + gcalcliExec + gcalcli + ]; + }) ]; home.file.".config/gcalcli/config.toml".source = (pkgs.formats.toml { }).generate "config.toml" {