mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
awscli: only write config files when not empty
This commit is contained in:
parent
0e7cd64674
commit
d9297efd3a
1 changed files with 10 additions and 5 deletions
|
@ -57,11 +57,16 @@ in {
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
home.file."${config.home.homeDirectory}/.aws/config".source =
|
home.file."${config.home.homeDirectory}/.aws/config" =
|
||||||
iniFormat.generate "aws-config-${config.home.username}" cfg.settings;
|
lib.mkIf (cfg.settings != { }) {
|
||||||
|
source =
|
||||||
|
iniFormat.generate "aws-config-${config.home.username}" cfg.settings;
|
||||||
|
};
|
||||||
|
|
||||||
home.file."${config.home.homeDirectory}/.aws/credentials".source =
|
home.file."${config.home.homeDirectory}/.aws/credentials" =
|
||||||
iniFormat.generate "aws-credentials-${config.home.username}"
|
lib.mkIf (cfg.credentials != { }) {
|
||||||
cfg.credentials;
|
source = iniFormat.generate "aws-credentials-${config.home.username}"
|
||||||
|
cfg.credentials;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue