Generate proper service configs and fix password credential loading
This commit is contained in:
		| @@ -50,13 +50,12 @@ in { | ||||
|       after = [ "network.target" ]; | ||||
|  | ||||
|       serviceConfig = { | ||||
|         type = "simple"; | ||||
|         Type = "simple"; | ||||
|         User = "scan-to-gpg"; | ||||
|         Group = "scan-to-gpg"; | ||||
|         StateDirectory = "scan-to-gpg"; | ||||
|         StateDirectoryMode = "775"; | ||||
|       } // mkIf (cfg.passFile != null) { | ||||
|         LoadCredential = "pass-file:${cfg.passFile}"; | ||||
|         LoadCredential = mkIf (cfg.passFile != null) "pass-file:${cfg.passFile}"; | ||||
|       }; | ||||
|  | ||||
|       environment = mkIf (cfg.passFile != null) { | ||||
| @@ -69,7 +68,7 @@ in { | ||||
|         }${ | ||||
|           optionalString (cfg.user != null) "-user ${cfg.user} " | ||||
|         }${ | ||||
|           optionalString (cfg.passFile != null) "-pass <($${PASS_FILE}) " | ||||
|           optionalString (cfg.passFile != null) "-pass \"\$(cat \"\${PASS_FILE}\")\" " | ||||
|         }-output ${cfg.output} -gpgkey ${cfg.gpgkey} | ||||
|       ''; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user