mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-06-08 10:09:04 +02:00
deployment module
This commit is contained in:
parent
361d3c57c4
commit
7b8c08c068
4 changed files with 27 additions and 8 deletions
22
modules/deployment/default.nix
Normal file
22
modules/deployment/default.nix
Normal 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;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue