Don't let agenix put files directly into the home dir
All checks were successful
Cachix / build (elendel) (push) Successful in 5m47s
Cachix / build (kholinar) (push) Successful in 8m55s
Cachix / build (marabethia) (push) Successful in 5m19s

This commit is contained in:
Charlotte Van Petegem 2025-06-29 16:47:02 +02:00
parent 9bcbf5add2
commit 82976b0b61
Signed by: chvp
SSH key fingerprint: SHA256:s9rb8jBVfdahqWHuBAcHCBP1wmj4eYQXZfqgz4H3E9E

View file

@ -217,7 +217,7 @@ in
];
};
};
home-manager.users.charlotte = { ... }: {
home-manager.users.charlotte = { lib, ... }: {
accounts.email = {
maildirBasePath = "/home/charlotte/mail";
accounts = {
@ -283,7 +283,15 @@ in
};
};
};
home.packages = [ pkgs.oauth2ms ];
home = {
# We can't just use agenix' `.path` option, since agenix creates the necessary directories as root
# This leaves root-owned directories in the home directory, messing up the rest of the boot sequence
activation.linkOauth2msConfig = lib.hm.dag.entryAfter ["writeBoundary"] ''
run mkdir -p $VERBOSE_ARG $HOME/.config/oauth2ms
run ln -s $VERBOSE_ARG ${config.age.secrets."files/programs/oauth2ms".path} $HOME/.config/oauth2ms/config.json
'';
packages = [ pkgs.oauth2ms ];
};
programs = {
mbsync.enable = true;
msmtp.enable = true;
@ -329,7 +337,6 @@ in
age.secrets."files/programs/oauth2ms" = {
file = ../../../../secrets/files/programs/oauth2ms.age;
owner = "charlotte";
path = "/home/charlotte/.config/oauth2ms/config.json";
};
};
}