This commit is contained in:
Sebastian Moser
2024-02-27 00:55:44 +01:00
parent 06425c3a60
commit 166912d6b3
12 changed files with 126 additions and 26 deletions

View File

@@ -32,6 +32,7 @@
bcache-tools
su
fuse3
terraform
];
fileSystems."/" =
@@ -211,6 +212,44 @@
};
###################################### get oci ampere vm ####################################
systemd.services.oci-ampere =
let
oci-ampere = pkgs.writeShellApplication {
name = "oci-ampere";
runtimeInputs = with pkgs; [ terraform ];
text = ''
if [[ -f /home/me/here/oci-ampere-vm/not_gotten ]]
then
echo not gotten....................................
pwd
cd /home/me/here/oci-ampere-vm
terraform apply -auto-approve && rm /home/me/here/oci-ampere-vm/not_gotten
else
echo gotten!!!!!!!!!!!!!!!!!!!!!
fi
'';
};
in
{
enable = false;
description = "get a oci ampere vm";
unitConfig = {
Type = "simple";
};
serviceConfig = {
Restart = "always";
RestartSec = "500s";
ExecStart = "${oci-ampere}/bin/oci-ampere";
};
wantedBy = [ "multi-user.target" ];
};
################################## ssh ######################################
services.openssh = {
enable = true;