diff --git a/flake.lock b/flake.lock index fe2a687..a6da1a3 100644 --- a/flake.lock +++ b/flake.lock @@ -1294,6 +1294,26 @@ "type": "github" } }, + "phishboard": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1784207158, + "narHash": "sha256-Y8ZUZMBA/EZCt9qIFhZBC/39O+BofLjclmLyrFkCPLU=", + "ref": "refs/heads/master", + "rev": "514ee9a2e3541db65f6934a425d291de9782e7ce", + "revCount": 1, + "type": "git", + "url": "https://git.az-gruppe.com/AZ-Intec-GmbH/phishboard.git" + }, + "original": { + "type": "git", + "url": "https://git.az-gruppe.com/AZ-Intec-GmbH/phishboard.git" + } + }, "pyproject-build-systems": { "inputs": { "nixpkgs": [ @@ -1402,6 +1422,7 @@ "nixpkgs": "nixpkgs_7", "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur_2", + "phishboard": "phishboard", "zugferd-service": "zugferd-service" } }, diff --git a/flake.nix b/flake.nix index 191d8ec..78f3dbc 100644 --- a/flake.nix +++ b/flake.nix @@ -66,6 +66,10 @@ url = "git+https://git.az-gruppe.com/AZ-Intec-GmbH/AZess"; inputs.nixpkgs.follows = "nixpkgs"; }; + phishboard = { + url = "git+https://git.az-gruppe.com/AZ-Intec-GmbH/phishboard.git"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { @@ -168,6 +172,7 @@ inputs.azion-scheduler.nixosModules.default inputs.zugferd-service.nixosModules.default inputs.azess.nixosModules.default + inputs.phishboard.nixosModules.default ]; }; }; diff --git a/hosts/AZ-PRM-1/secrets.nix b/hosts/AZ-PRM-1/secrets.nix index 736698b..ef3b6fb 100644 --- a/hosts/AZ-PRM-1/secrets.nix +++ b/hosts/AZ-PRM-1/secrets.nix @@ -56,6 +56,9 @@ in { group = "postgres"; mode = "0600"; }; + phishboard-env = { + file = ../../secrets/phishboard-env.age; + }; smb-autoablage = { file = ../../secrets/smb-autoablage.age; }; diff --git a/hosts/AZ-PRM-1/services/default.nix b/hosts/AZ-PRM-1/services/default.nix index 229986d..3b623c8 100644 --- a/hosts/AZ-PRM-1/services/default.nix +++ b/hosts/AZ-PRM-1/services/default.nix @@ -9,6 +9,7 @@ ./n8n.nix ./netbird.nix ./pgadmin.nix + ./phishboard.nix ./postgres.nix ./printing.nix ./traefik.nix diff --git a/hosts/AZ-PRM-1/services/phishboard.nix b/hosts/AZ-PRM-1/services/phishboard.nix new file mode 100644 index 0000000..d5cb541 --- /dev/null +++ b/hosts/AZ-PRM-1/services/phishboard.nix @@ -0,0 +1,32 @@ +{ + config, + inputs, + pkgs, + ... +}: let + serviceName = "phishboard"; + servicePort = config.m3ta.ports.get serviceName; +in { + services.phishboard = { + enable = true; + package = inputs.phishboard.packages.${pkgs.stdenv.hostPlatform.system}.default; + host = "127.0.0.1"; + port = servicePort; + environmentFile = config.age.secrets.phishboard-env.path; + }; + + services.traefik.dynamicConfigOptions.http = { + services.${serviceName}.loadBalancer.servers = [ + {url = "http://localhost:${toString servicePort}/";} + ]; + + routers.${serviceName} = { + rule = "Host(`pb.l.az-gruppe.com`)"; + tls = { + certResolver = "ionos"; + }; + service = serviceName; + entrypoints = "websecure"; + }; + }; +} diff --git a/hosts/common/ports.nix b/hosts/common/ports.nix index da8de83..84cbe41 100644 --- a/hosts/common/ports.nix +++ b/hosts/common/ports.nix @@ -19,6 +19,7 @@ netbird = 3038; azion-scheduler = 3039; azion-scheduler-proxy = 3049; + phishboard = 3055; metabase = 3013; baserow = 3050; diff --git a/secrets.nix b/secrets.nix index 04b9bf5..dcc4441 100644 --- a/secrets.nix +++ b/secrets.nix @@ -45,6 +45,7 @@ in { "secrets/snipe-it-db-password.age".publicKeys = systems ++ users; "secrets/snipe-it-mail-password.age".publicKeys = systems ++ users; "secrets/pgadmin-pw.age".publicKeys = systems ++ users; + "secrets/phishboard-env.age".publicKeys = systems ++ users; "secrets/vaultwarden-env.age".publicKeys = systems ++ users; "secrets/vaultwarden-db.age".publicKeys = systems ++ users; "secrets/zammad-pw.age".publicKeys = systems ++ users; diff --git a/secrets/phishboard-env.age b/secrets/phishboard-env.age new file mode 100644 index 0000000..0a014a5 Binary files /dev/null and b/secrets/phishboard-env.age differ