formatting
This commit is contained in:
@@ -1,20 +1,39 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let cfg = config.nas-apps.swag;
|
||||
in {
|
||||
let
|
||||
cfg = config.nas-apps.swag;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ cfg.httpPort cfg.httpsPort 81 ];
|
||||
allowedUDPPorts = [ cfg.httpPort cfg.httpsPort 81 ];
|
||||
allowedTCPPorts = [
|
||||
cfg.httpPort
|
||||
cfg.httpsPort
|
||||
81
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
cfg.httpPort
|
||||
cfg.httpsPort
|
||||
81
|
||||
];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers."${cfg.name}" = {
|
||||
autoStart = cfg.autoStart;
|
||||
image = cfg.image;
|
||||
ports = [ "${toString cfg.httpPort}:80" "${toString cfg.httpsPort}:443" "81:81" ];
|
||||
ports = [
|
||||
"${toString cfg.httpPort}:80"
|
||||
"${toString cfg.httpsPort}:443"
|
||||
"81:81"
|
||||
];
|
||||
volumes = [ "${cfg.configPath}:/config" ];
|
||||
environment = {
|
||||
PUID = cfg.puid;
|
||||
@@ -24,7 +43,7 @@ in {
|
||||
URL = cfg.url;
|
||||
VALIDATION = cfg.validation;
|
||||
SUBDOMAINS = cfg.subdomains;
|
||||
DOCKER_MODS="linuxserver/mods:swag-dashboard";
|
||||
DOCKER_MODS = "linuxserver/mods:swag-dashboard";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lib, ... }:
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
options.nas-apps.swag = {
|
||||
enable = mkEnableOption "swag docker service";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user