From fd0c92f3eb02910dd727a0fa0b3d7eed6f07ccf4 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 23 Feb 2025 18:44:59 -0500 Subject: [PATCH] Persist the gcloud config directory. --- nix/configuration/roles/gcloud/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nix/configuration/roles/gcloud/default.nix b/nix/configuration/roles/gcloud/default.nix index aa7a30b..06378c9 100644 --- a/nix/configuration/roles/gcloud/default.nix +++ b/nix/configuration/roles/gcloud/default.nix @@ -23,6 +23,20 @@ environment.systemPackages = with pkgs; [ google-cloud-sdk ]; + + environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) { + hideMounts = true; + users.talexander = { + directories = [ + { + directory = ".config/gcloud"; + user = "talexander"; + group = "talexander"; + mode = "0700"; + } + ]; + }; + }; } ] );