diff --git a/nixos/tam.nix b/nixos/tam.nix new file mode 100644 index 0000000..d97f4fc --- /dev/null +++ b/nixos/tam.nix @@ -0,0 +1,40 @@ +{ config, pkgs, ... } + +{ + + networking.hosts = { + "192.168.1.1" = [ "tam.lan" ]; # Change the IP of this line to the IP of the TAM server if applicable. + }; + + users.users."tam" = { + isNormalUser = true; + description = "Ticket Auction Manager"; + }; + + services.displayManager.sddm.settings.Autologin = { + Session = "plasma.desktop"; + User = "tam"; + }; + + environment.systemPackages = with pkgs; [ + chromium + ]; + + virtualisation.docker.enable = true; + + virtualisation.oci-containers = { + backend = "docker"; + containers."tam-client" = { + image = "dbob16/tam-client:0.1.0"; # Change image to local repo to avoid pull limits. + volumes = [ + "tam-data:/data" + ]; + environment = { + HOST = "localhost"; + PORT = "3000"; + }; + extraOptions = ["--network=host"] + }; + }; + +} diff --git a/rp/Caddyfile b/rp/Caddyfile index 816d440..c023b1c 100644 --- a/rp/Caddyfile +++ b/rp/Caddyfile @@ -1,4 +1,4 @@ -*:8443 { +{$TAM_HOSTNAME:tam.lan}:8443 { tls internal reverse_proxy {$TAM_SERVER:localhost}:8000 }