mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-23 09:16:54 +00:00
fix(digital-ocean): Modify cloud-init, add write_files sections
Provide host.nix to infect with 0644 permissions
This commit is contained in:
parent
8c053f50b0
commit
dc4ba7bce5
|
@ -313,8 +313,11 @@ class DigitalOceanApi extends ServerProviderApi with VolumeProviderApi {
|
|||
|
||||
final String formattedHostname = getHostnameFromDomain(domainName);
|
||||
|
||||
// TODO: change to 'master' change to 'master' change to 'master'
|
||||
const String infectBranch = 'digital-ocean';
|
||||
|
||||
final String userdataString =
|
||||
"#cloud-config\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=$infectProviderName NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log";
|
||||
"#cloud-config\nwrite_files:\n- path: /etc/nixos/host.nix\n permissions: '0644'\n content: |\n {pkgs, ...}:\n {\n environment.systemPackages = with pkgs; [ vim ];\n }\nruncmd:\n- curl https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect/raw/branch/$infectBranch/nixos-infect | PROVIDER=$infectProviderName NIXOS_IMPORT=./host.nix NIX_CHANNEL=nixos-21.05 DOMAIN='$domainName' LUSER='${rootUser.login}' ENCODED_PASSWORD='$base64Password' CF_TOKEN=$dnsApiToken DB_PASSWORD=$dbPassword API_TOKEN=$apiToken HOSTNAME=$formattedHostname bash 2>&1 | tee /tmp/infect.log";
|
||||
print(userdataString);
|
||||
|
||||
final Dio client = await getClient();
|
||||
|
|
Loading…
Reference in a new issue