Akkoma on vps

This commit is contained in:
Lgmrszd 2024-02-23 01:52:10 +03:00
parent 4d4bdbefec
commit acd2192b23
No known key found for this signature in database
GPG key ID: 9396B8BA6FBB14DE
6 changed files with 342 additions and 41 deletions

View file

@ -0,0 +1,45 @@
{ lib, config, ... }:
let
cfg = config.myAkkomaContainerOptions;
in
with lib;
{
options.myAkkomaContainerOptions = {
enable = mkEnableOption "akkoma container tweaks";
hostAddress = mkOption {
type = types.str;
};
localAddress = mkOption {
type = types.str;
};
localPort = mkOption {
type = types.int;
};
domain = mkOption {
type = types.str;
};
isContainer = mkOption {
type = types.uniq types.bool;
default = false;
};
containerName = mkOption {
type = types.uniq types.str;
};
};
config = mkIf (cfg.enable && (!cfg.isContainer)) {
containers.${cfg.containerName}.config =
{ config, pkgs, ... }:
{
myAkkomaContainerOptions = with cfg; {
isContainer = true;
inherit hostAddress;
inherit localAddress;
inherit localPort;
inherit domain;
# inherit containerName;
};
};
};
}