deployment module

This commit is contained in:
Luj 2023-07-27 21:08:00 +02:00
parent 361d3c57c4
commit 7b8c08c068
Signed by: luj
GPG key ID: 6FC74C847011FD83
4 changed files with 27 additions and 8 deletions

View file

@ -0,0 +1,22 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.luj.deployment;
hostname = config.networking.hostName;
in
{
options.luj.deployment.enable = mkEnableOption "activate deployment on machine";
config = mkIf cfg.enable {
deployment = {
targetHost = "${hostname}.${lib.luj.machines.${hostname}.tld}";
targetPort = 45;
targetUser = "root";
allowLocalDeployment = true;
};
};
}