formatting

This commit is contained in:
mjallen18
2024-02-28 21:49:51 -06:00
parent bdfd5e92b7
commit 347d30094b
40 changed files with 459 additions and 503 deletions

View File

@@ -1,14 +1,11 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.nas-apps.swag;
let cfg = config.nas-apps.swag;
in {
imports = [
./options.nix
];
imports = [ ./options.nix ];
config = mkIf cfg.enable {
networking.firewall = {
allowedTCPPorts = [ cfg.httpPort cfg.httpsPort ];
allowedUDPPorts = [ cfg.httpPort cfg.httpsPort ];
@@ -18,17 +15,15 @@ in {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${toString cfg.httpPort}:80" "${toString cfg.httpsPort}:443" ];
volumes = [
"${cfg.configPath}:/config"
];
volumes = [ "${cfg.configPath}:/config" ];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
EMAIL = cfg.email;
URL = cfg.url;
VALIDATION = cfg.validation;
SUBDOMAINS = cfg.subdomains;
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
EMAIL = cfg.email;
URL = cfg.url;
VALIDATION = cfg.validation;
SUBDOMAINS = cfg.subdomains;
};
};
};

View File

@@ -1,6 +1,5 @@
{lib, ... }:
with lib;
{
{ lib, ... }:
with lib; {
options.nas-apps.swag = {
enable = mkEnableOption "swag docker service";
@@ -13,7 +12,7 @@ with lib;
type = types.int;
default = 80;
};
httpsPort = mkOption {
type = types.int;
default = 443;