From b28898690b2a0d77f7bb592618b92b883de4fbc0 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Sun, 16 Apr 2023 16:56:24 +0200 Subject: [PATCH] ported trucksimulatorbot images --- flake.lock | 33 +++++++++++++++---- flake.nix | 6 ++++ hosts/falkenstein-1/default.nix | 1 + .../modules/trucksimulatorbot/default.nix | 16 +++++++++ 4 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 hosts/falkenstein-1/modules/trucksimulatorbot/default.nix diff --git a/flake.lock b/flake.lock index a2442bd..0b3e595 100644 --- a/flake.lock +++ b/flake.lock @@ -142,11 +142,11 @@ ] }, "locked": { - "lastModified": 1681604834, - "narHash": "sha256-C+S7iViWG/N0ueax8WPTCQ5q1/IYZ1x2avzgvAtij50=", + "lastModified": 1681652918, + "narHash": "sha256-ybXmD3OhyMG1Yz31lxT8de7aBi2mQmXmzAZ7q49Uvi4=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "c86f06caa0be207882266947da67125177bba5af", + "rev": "b05ff89c76b2c9454c76daf2120f4ccb076a018d", "type": "github" }, "original": { @@ -204,11 +204,11 @@ ] }, "locked": { - "lastModified": 1681308705, - "narHash": "sha256-Iy1NVydzM04OqBLeD96zDmg1HMilUqa2vFeaOJFOp8o=", + "lastModified": 1681650457, + "narHash": "sha256-IGXRZrFGFqUeM5iDgP/ojbrd+gKL40PaFFAITxbkfZ0=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "10fd31a5444d25ab81c8105f2df1b4cb0cba68e5", + "rev": "3bfaac09f58ce31c33e1a56e7eaa606a87fe4c32", "type": "github" }, "original": { @@ -460,6 +460,7 @@ "nixvim": "nixvim", "purge": "purge", "sops-nix": "sops-nix", + "trucksimulatorbot-images": "trucksimulatorbot-images", "xdph": "xdph" } }, @@ -499,6 +500,26 @@ "type": "github" } }, + "trucksimulatorbot-images": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1681656676, + "narHash": "sha256-A1Hy2GaHAgUAhajgoRB0gE5cspvk7VoaVQXSCNKiyCY=", + "owner": "therealr5", + "repo": "trucksimulatorbot-images", + "rev": "e1e0330b0c228726a491c13a096e443f7e74d3d2", + "type": "github" + }, + "original": { + "owner": "therealr5", + "repo": "trucksimulatorbot-images", + "type": "github" + } + }, "utils": { "locked": { "lastModified": 1678901627, diff --git a/flake.nix b/flake.nix index fb37941..f315cd2 100644 --- a/flake.nix +++ b/flake.nix @@ -63,6 +63,10 @@ url = github:therealr5/purge; inputs.nixpkgs.follows = "nixpkgs"; }; + trucksimulatorbot-images = { + url = github:therealr5/trucksimulatorbot-images; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -76,6 +80,7 @@ , nixos-hardware , nixvim , purge + , trucksimulatorbot-images , ... }@attrs: { formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; @@ -124,6 +129,7 @@ nix-index-database.nixosModules.nix-index sops-nix.nixosModules.sops purge.nixosModules.default + trucksimulatorbot-images.nixosModules.default ]; }; }; diff --git a/hosts/falkenstein-1/default.nix b/hosts/falkenstein-1/default.nix index 2ed2842..8420c9f 100644 --- a/hosts/falkenstein-1/default.nix +++ b/hosts/falkenstein-1/default.nix @@ -8,6 +8,7 @@ ./modules/networks ./modules/nginx ./modules/purge + ./modules/trucksimulatorbot ]; boot = { diff --git a/hosts/falkenstein-1/modules/trucksimulatorbot/default.nix b/hosts/falkenstein-1/modules/trucksimulatorbot/default.nix new file mode 100644 index 0000000..923a38a --- /dev/null +++ b/hosts/falkenstein-1/modules/trucksimulatorbot/default.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: +let + domain = "trucksimulatorbot.rfive.de"; +in +{ + services.trucksimulatorbot = { + images.enable = true; + }; + services.nginx.virtualHosts."images.${domain}" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString config.services.trucksimulatorbot.images.listenPort}"; + }; + }; +}