gcalcli: added gcalcli to hyprland

This commit is contained in:
Tigor Hutasuhut 2024-11-20 20:39:05 +07:00
parent d1d798bede
commit 95b7149a58
3 changed files with 74 additions and 6 deletions

View file

@ -9,21 +9,16 @@ let
in in
{ {
imports = [ imports = [
# ./dunst.nix
./bitwarden.nix ./bitwarden.nix
./hypridle.nix ./hypridle.nix
./hyprland.nix ./hyprland.nix
./hyprlock.nix ./hyprlock.nix
# ./hyprshot.nix
# hyprpaper seems to be broken with out of memory and failure to swap wallpapers correctly.
# Use swww for now until the application is stable.
# ./hyprpaper.nix
./pyprland.nix ./pyprland.nix
./rofi.nix ./rofi.nix
./waybar.nix ./waybar.nix
./wlogout.nix ./wlogout.nix
./grimblast.nix ./grimblast.nix
# ./swappy.nix ./eww.nix
./alacritty.nix ./alacritty.nix
./swayosd.nix ./swayosd.nix
./swaync.nix ./swaync.nix

View file

@ -0,0 +1,49 @@
{
config,
pkgs,
lib,
...
}:
let
cfg = config.profile.hyprland;
inherit (lib) mkIf;
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
(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 "$@"
'')
];
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";
};
};
};
}

24
secrets/gcalcli.yaml Normal file
View file

@ -0,0 +1,24 @@
gcalcli:
client:
id: ENC[AES256_GCM,data:ywRDXNYa93uI3QL5ETPspShX6ye/7p9a48l3wpdsQjRmOQr+xZ+UpitbRVh4VXrLIadiKiyhe//wC2FcHmeRXStn8FpTfk0E,iv:bbM3a2Sfzmq6Lxa8tKjKIUwxNjQNE4g7cUKJluSuIiI=,tag:KV2BPKucCldEWQpn//mX8w==,type:str]
secret: ENC[AES256_GCM,data:nA3YL7t4p/iNEUtnQfmEB8GLq6pibzjW/yMYWpz50co0zg8=,iv:ZVO60kMSAh/jeOjH/jxus8FtBSZ+qu90cYUc3WR5mpk=,tag:7CwEKgiWpNvfB1z0lpW/aA==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1kruum2varzua7w5n6n52vhwyek2arc685rhcwt0u7k2jf5mecsjslkl9ll
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIQ3ZPSVpFMUpsbjljd1pp
Y3FPTXlSWmExZ2QxZTFnU2hWcWtDc3JzbTJJClBmeGtyMlV1WVd4T3NnMTB5WUo3
MVNJdjYxSjBNbjYvMFp1cHlSUlh1N2sKLS0tIHlhQXhDUHBxeW14T2FGbWhpeTRP
Wm8rUktjY21EY0RodUpzc0I3NHIrN0kKTn8Jzlgp3nPQdVl8VQYPwQvGjXpAq9vP
09PzQmOfabD1h3rY2exg4D2oLhtTNzVvGu2exPNwmRlHVqbGB4SPJA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-11-20T12:57:09Z"
mac: ENC[AES256_GCM,data:BiyRdcYvb4CjGEafN7M0sgXJ8k6vdxiiJOvIYyr1ENExfxNuoDinlHOuSAGG9GtQj8icVAzDZ1AZ2rzn4uVD+KLG744M3u6Z3yAAo/eDxz3PzOiUfl/Wf7ivG/WtGT1rPVX8iZcmxnb6rRym3ZuyD41B68x1zB3DvfRSVryvdco=,iv:eIAfyBLEUv8GcZLxYu+cQVWVoHj3qgLddjoCwny/ris=,tag:UsSKGIJuzNXak9X5FtIoqw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1