colima: only pass --save-config=false if settings were set

This commit is contained in:
Vinicius Deolindo 2026-03-02 09:45:09 -03:00 committed by Bruno BELANYI
parent 5a75730e6f
commit daa2c22132
5 changed files with 8 additions and 8 deletions

View file

@ -271,8 +271,8 @@ in
"start"
name
"-f"
"--activate=${if profile.isActive then "true" else "false"}"
"--save-config=false"
"--activate=${lib.boolToString profile.isActive}"
"--save-config=${lib.boolToString (profile.settings == { })}"
];
KeepAlive = {
SuccessfulExit = true;
@ -319,8 +319,8 @@ in
ExecStart = ''
${lib.getExe cfg.package} start ${name} \
-f \
--activate=${if profile.isActive then "true" else "false"} \
--save-config=false
--activate=${lib.boolToString profile.isActive} \
--save-config=${lib.boolToString (profile.settings == { })}
'';
Restart = "always";
RestartSec = 2;

View file

@ -26,7 +26,7 @@
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>/bin/wait4path /nix/store &amp;&amp; exec @colima@/bin/colima start default -f &apos;--activate=true&apos; &apos;--save-config=false&apos;</string>
<string>/bin/wait4path /nix/store &amp;&amp; exec @colima@/bin/colima start default -f &apos;--activate=true&apos; &apos;--save-config=true&apos;</string>
</array>
<key>RunAtLoad</key>
<true/>

View file

@ -22,7 +22,7 @@
<array>
<string>/bin/sh</string>
<string>-c</string>
<string>/bin/wait4path /nix/store &amp;&amp; exec @colima@/bin/colima start default -f &apos;--activate=true&apos; &apos;--save-config=false&apos;</string>
<string>/bin/wait4path /nix/store &amp;&amp; exec @colima@/bin/colima start default -f &apos;--activate=true&apos; &apos;--save-config=true&apos;</string>
</array>
<key>RunAtLoad</key>
<true/>

View file

@ -9,7 +9,7 @@ Environment=DOCKER_CONFIG=/home/hm-user/.config/docker
ExecStart=@colima@/bin/colima start default \
-f \
--activate=true \
--save-config=false
--save-config=true
Restart=always
RestartSec=2

View file

@ -7,7 +7,7 @@ Environment=PATH=@colima@/bin:@perl@/bin:@docker@/bin:@openssh@/bin:@coreutils@/
ExecStart=@colima@/bin/colima start default \
-f \
--activate=true \
--save-config=false
--save-config=true
Restart=always
RestartSec=2