2024-11-20 20:39:05 +07:00
|
|
|
{
|
2024-11-23 18:53:26 +07:00
|
|
|
inputs,
|
2024-11-20 20:39:05 +07:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
cfg = config.profile.hyprland;
|
|
|
|
inherit (lib) mkIf;
|
2024-11-21 22:45:21 +07:00
|
|
|
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 "$@"
|
|
|
|
''
|
|
|
|
);
|
2024-11-20 20:39:05 +07:00
|
|
|
in
|
|
|
|
{
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
sops.secrets =
|
|
|
|
let
|
|
|
|
sopsFile = ../../../secrets/gcalcli.yaml;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
"gcalcli/client/id" = {
|
|
|
|
inherit sopsFile;
|
|
|
|
};
|
|
|
|
"gcalcli/client/secret" = {
|
|
|
|
inherit sopsFile;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
home.packages = with pkgs; [
|
|
|
|
eww
|
2024-11-21 22:45:21 +07:00
|
|
|
ags
|
|
|
|
bun
|
2024-11-24 09:49:06 +07:00
|
|
|
ags-agenda
|
2024-11-21 22:45:21 +07:00
|
|
|
typescript
|
|
|
|
(symlinkJoin {
|
|
|
|
name = "gcalcli";
|
|
|
|
paths = [
|
|
|
|
gcalcliExec
|
|
|
|
gcalcli
|
|
|
|
];
|
|
|
|
})
|
2024-11-20 20:39:05 +07:00
|
|
|
];
|
|
|
|
|
2024-11-24 09:49:06 +07:00
|
|
|
wayland.windowManager.hyprland.settings.exec-once = [ "ags-agenda" ];
|
2024-11-23 18:53:26 +07:00
|
|
|
|
2024-11-20 20:39:05 +07:00
|
|
|
home.file.".config/gcalcli/config.toml".source = (pkgs.formats.toml { }).generate "config.toml" {
|
|
|
|
calendars = {
|
|
|
|
default-calendars = [
|
|
|
|
"tigor.hutasuhut@bareksa.com"
|
|
|
|
"Holidays in Indonesia"
|
|
|
|
"Engineering Team"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
output = {
|
|
|
|
week-start = "monday";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|