symlink gcloud file

This commit is contained in:
Harivansh Rathi 2026-04-04 20:16:05 +00:00
parent 829c5dcd8e
commit b8b3876ceb

View file

@ -1,11 +1,13 @@
{ lib, ... }: { lib, ... }:
{ {
xdg.configFile."gcloud/active_config".text = "default\n"; # Write gcloud config as mutable files (not Nix store symlinks) so that
# gcloud auth / gws auth can update them at runtime.
home.activation.gcloudConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
install -Dm644 /dev/null "$HOME/.config/gcloud/active_config"
printf 'default' > "$HOME/.config/gcloud/active_config"
xdg.configFile."gcloud/configurations/config_default".text = lib.generators.toINI { } { install -Dm644 /dev/null "$HOME/.config/gcloud/configurations/config_default"
core = { printf '[core]\naccount=rathiharivansh@gmail.com\nproject=hari-gc\n' \
account = "rathiharivansh@gmail.com"; > "$HOME/.config/gcloud/configurations/config_default"
project = "hari-gc"; '';
};
};
} }