32 lines
682 B
Nix
32 lines
682 B
Nix
{
|
|
user ? throw "user argument is required",
|
|
home ? throw "home argument is required",
|
|
}:
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
hmConfig = config.home-manager.users.${user};
|
|
in
|
|
{
|
|
home-manager.users.${user}.sops = {
|
|
secrets."registry/cr.sas.com".sopsFile = ../../../../../../../secrets/sas/secrets.yaml;
|
|
|
|
templates."containers-auth.json" = {
|
|
content = builtins.readFile (
|
|
(pkgs.formats.json { }).generate "auth.json" {
|
|
auths = {
|
|
"cr.sas.com" = {
|
|
auth = hmConfig.sops.placeholder."registry/cr.sas.com";
|
|
};
|
|
};
|
|
}
|
|
);
|
|
path = "${home}/.config/containers/auth.json";
|
|
};
|
|
};
|
|
}
|