mirror of
https://git.lgmrszd.xyz/Lgmrszd/nix-cfg.git
synced 2025-12-16 00:18:19 +01:00
Local akkoma for testing
This commit is contained in:
parent
b317cd7865
commit
85654ce3a9
8 changed files with 361 additions and 17 deletions
45
hosts/laptop/akkoma/akkontainer.nix
Normal file
45
hosts/laptop/akkoma/akkontainer.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue