refactor if statements

Co-authored-by: Robert Helgesson <robert@rycee.net>
This commit is contained in:
Luís Guimarães 2024-05-30 15:04:23 +00:00 committed by GitHub
parent 908c854859
commit ef3870ee60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,12 +6,12 @@ let
iniFormat = pkgs.formats.ini { }; iniFormat = pkgs.formats.ini { };
settingsPath = settingsPath =
if config.programs.awscli.settingsPath != "" if cfg.settingsPath != ""
then config.programs.awscli.settingsPath then cfg.settingsPath
else "${config.home.homeDirectory}/.aws/config"; else "${config.home.homeDirectory}/.aws/config";
credentialsPath = credentialsPath =
if config.programs.awscli.credentialsPath != "" if cfg.credentialsPath != ""
then config.programs.awscli.credentialsPath then cfg.credentialsPath
else "${config.home.homeDirectory}/.aws/credentials"; else "${config.home.homeDirectory}/.aws/credentials";
in { in {
meta.maintainers = [ lib.maintainers.anthonyroussel ]; meta.maintainers = [ lib.maintainers.anthonyroussel ];