forked from Fediversity/Fediversity
Make a NixOps4 deployment for action runners
This commit is contained in:
parent
8a53b5242b
commit
40ec7e9c8c
|
@ -25,6 +25,7 @@
|
|||
inputs.nixops4-nixos.modules.flake.default
|
||||
|
||||
./deployment/flake-part.nix
|
||||
./infra/flake-part.nix
|
||||
./services/flake-part.nix
|
||||
];
|
||||
|
||||
|
|
47
infra/flake-part.nix
Normal file
47
infra/flake-part.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ inputs, self, ... }:
|
||||
|
||||
{
|
||||
nixops4Deployments.actions-runners =
|
||||
{ providers, ... }:
|
||||
{
|
||||
providers.local = inputs.nixops4-nixos.modules.nixops4Provider.local;
|
||||
|
||||
resources = {
|
||||
vm02179 = {
|
||||
type = providers.local.exec;
|
||||
imports = [ inputs.nixops4-nixos.modules.nixops4Resource.nixos ];
|
||||
ssh = {
|
||||
host = "185.206.232.179";
|
||||
opts = "";
|
||||
hostPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPAsOCOsJ0vNL9fGj0XC25ir8B+k2NlVJzsiVUx+0eWM";
|
||||
};
|
||||
nixpkgs = inputs.nixpkgs;
|
||||
nixos.module = {
|
||||
imports = [
|
||||
./vm02179/configuration.nix
|
||||
./vm02186/hardware-configuration.nix
|
||||
./vm02179/gitea-runner.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
vm02186 = {
|
||||
type = providers.local.exec;
|
||||
imports = [ inputs.nixops4-nixos.modules.nixops4Resource.nixos ];
|
||||
ssh = {
|
||||
host = "185.206.232.186";
|
||||
opts = "";
|
||||
hostPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII6mnBgEeyYE4tzHeFNHVNBV6KR+hAqh3PYSqlh0QViW";
|
||||
};
|
||||
nixpkgs = inputs.nixpkgs;
|
||||
nixos.module = {
|
||||
imports = [
|
||||
./vm02186/procolix-configuration.nix
|
||||
./vm02186/hardware-configuration.nix
|
||||
./vm02186/gitea-runner.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,12 +6,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./gitea-runner.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
@ -193,11 +187,6 @@
|
|||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
system.copySystemConfiguration = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
snf.url = "git+https://git.fediversity.eu/fediversity/simple-nixos-fediverse.git";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, snf }:
|
||||
let
|
||||
vmName = "vm02186";
|
||||
|
||||
in {
|
||||
nixosConfigurations.${vmName} = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
||||
modules = [
|
||||
./procolix-configuration.nix
|
||||
./hardware-configuration.nix
|
||||
./gitea-runner.nix
|
||||
];
|
||||
};
|
||||
|
||||
isoInstallers.${vmName} = snf.mkInstaller nixpkgs self.nixosConfigurations.${vmName};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue