forked from fediversity/fediversity
Compare commits
4 commits
b0dd161902
...
147171a183
| Author | SHA1 | Date | |
|---|---|---|---|
| 147171a183 | |||
| db0d0a90d4 | |||
| e8158b0e6d | |||
| b8c2250131 |
4 changed files with 3 additions and 70 deletions
|
|
@ -41,7 +41,7 @@ in
|
||||||
## Memory use is expected to be dominated by the NixOS evaluation,
|
## Memory use is expected to be dominated by the NixOS evaluation,
|
||||||
## which happens on the deployer.
|
## which happens on the deployer.
|
||||||
memorySize = 4 * 1024;
|
memorySize = 4 * 1024;
|
||||||
diskSize = 32 * 1024;
|
diskSize = 4 * 1024;
|
||||||
cores = 2;
|
cores = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -62,7 +62,6 @@ in
|
||||||
sources.nixpkgs
|
sources.nixpkgs
|
||||||
sources.flake-inputs
|
sources.flake-inputs
|
||||||
sources.git-hooks
|
sources.git-hooks
|
||||||
sources.disko
|
|
||||||
|
|
||||||
pkgs.stdenv
|
pkgs.stdenv
|
||||||
pkgs.stdenvNoCC
|
pkgs.stdenvNoCC
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ in
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
# FIXME uncomment this when using test over `nix run`
|
# FIXME needed for non-proxmox tests
|
||||||
# (modulesPath + "/../lib/testing/nixos-test-base.nix")
|
# (modulesPath + "/../lib/testing/nixos-test-base.nix")
|
||||||
./sharedOptions.nix
|
./sharedOptions.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,7 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
system.extraDependencies = [
|
system.extraDependencies = [
|
||||||
|
sources.disko
|
||||||
pkgs.ubootQemuX86
|
pkgs.ubootQemuX86
|
||||||
pkgs.ubootQemuX86.inputDerivation
|
pkgs.ubootQemuX86.inputDerivation
|
||||||
pkgs.pve-qemu
|
pkgs.pve-qemu
|
||||||
|
|
|
||||||
67
flake.nix
67
flake.nix
|
|
@ -52,73 +52,6 @@
|
||||||
trim-trailing-whitespace.enable = true;
|
trim-trailing-whitespace.enable = true;
|
||||||
shellcheck.enable = true;
|
shellcheck.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://192.168.51.81:8006/#v1:0:=node%2Fnode051:4:::::8::=apitokens
|
|
||||||
|
|
||||||
# apps.default = {
|
|
||||||
# type = "app";
|
|
||||||
# program = pkgs.writers.writeBashBin "provision-proxmox.sh"
|
|
||||||
# {
|
|
||||||
# makeWrapperArgs = [
|
|
||||||
# "--prefix"
|
|
||||||
# "PATH"
|
|
||||||
# ":"
|
|
||||||
# "${lib.makeBinPath [
|
|
||||||
# pkgs.jq
|
|
||||||
# pkgs.httpie
|
|
||||||
# ]}"
|
|
||||||
# ];
|
|
||||||
# }
|
|
||||||
# ''
|
|
||||||
# sh ./infra/proxmox-remove.sh --api-url "https://192.168.51.81:8006/api2/json" --username "kiara@ProcoliX" --password "" 7014 # test14
|
|
||||||
# sh ./infra/proxmox-provision.sh --api-url "https://192.168.51.81:8006/api2/json" --username "kiara@ProcoliX" --password "" test14
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
|
|
||||||
# api_token = "terraform@pve!provider=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
||||||
# kiara@ProcoliX!dsdfsfdsfd=30df234b-02f3-4ed9-b778-00d28ad3499c
|
|
||||||
|
|
||||||
apps.default =
|
|
||||||
let
|
|
||||||
inherit (pkgs) system;
|
|
||||||
# FIXME rewire to defer env var
|
|
||||||
deployment = pkgs.writeShellScriptBin "my-app-with-environment" ''
|
|
||||||
export PROXMOX_VE_SSH_USERNAME="kiara@ProcoliX"
|
|
||||||
export PROXMOX_VE_SSH_PASSWORD=""
|
|
||||||
${(import ./deployment/check/common/data-model.nix {
|
|
||||||
inherit system;
|
|
||||||
config = {
|
|
||||||
targetSystem = system;
|
|
||||||
nodeName = "192.168.51.81"; # root@fediversity-proxmox
|
|
||||||
pathToRoot = builtins.path {
|
|
||||||
path = ./.;
|
|
||||||
name = "root";
|
|
||||||
};
|
|
||||||
sshOpts = [ ];
|
|
||||||
key-file = "";
|
|
||||||
node-name = "node051";
|
|
||||||
bridge = "ovsbr0";
|
|
||||||
vlanId = 1305;
|
|
||||||
imageDatastoreId = "local";
|
|
||||||
vmDatastoreId = "linstor_storage";
|
|
||||||
cdDatastoreId = "local-lvm";
|
|
||||||
ipv4Gateway = "eth0";
|
|
||||||
ipv4Address = "";
|
|
||||||
# ipv4Address = "95.215.187.${vm-id}";
|
|
||||||
ipv6Gateway = "eth0";
|
|
||||||
ipv6Address = "";
|
|
||||||
# ipv6Address = "2a00:51c0:13:1305::${vm-id}";
|
|
||||||
};
|
|
||||||
# opt not to pass `inputs`, as we could only pass serializable arguments through to its self-call
|
|
||||||
})."tf-proxmox-deployment".tf-proxmox-vm
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
type = "app";
|
|
||||||
program = deployment.run;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue