Files
home-manager/tests/modules/programs/openstackclient/openstackclient.nix
Austin Horstman efa3ccb4c3 openstackclient: expose whole-file settings
The old cloud-only mappings cannot express root-level cache and client
settings. Expose complete YAML documents while preserving existing
configurations through standard rename aliases.
2026-09-15 09:27:35 -05:00

56 lines
1.3 KiB
Nix

{ lib, ... }:
{
imports = [
{ programs.openstackclient.cloudsSettings.cache.expiration_time = 300; }
];
programs.openstackclient = {
enable = true;
package = null;
cloudsSettings.cache.auth = true;
cloudsSettings.client.force_ipv4 = true;
cloudsSettings.custom = {
credentials = [
"application"
42
null
];
enabled = true;
optional = null;
retries = 3;
timeout = 1.5;
"yaml-1.1-string" = "yes";
};
cloudsSettings.clouds = {
my-infra = {
cloud = "example-cloud";
auth = {
project_id = "0123456789abcdef0123456789abcdef";
username = "openstack";
};
region_name = "XXX";
interface = "internal";
};
};
cloudsPublicSettings = lib.mkDefault {
public-clouds = {
example-cloud = {
auth = {
auth_url = "https://identity.cloud.example.com/v2.0";
};
};
};
};
};
nmt.script = ''
assertFileExists home-files/.config/openstack/clouds.yaml
assertFileContent home-files/.config/openstack/clouds.yaml \
${./clouds.yaml}
assertFileExists home-files/.config/openstack/clouds-public.yaml
assertFileContent home-files/.config/openstack/clouds-public.yaml \
${./clouds-public.yaml}
'';
}