From 3dc736f1fac7a8ece7dcda8d497a6e274e187dc0 Mon Sep 17 00:00:00 2001 From: op Date: Sat, 27 Apr 2024 21:31:35 +0100 Subject: laurel: add conduit homeserver --- flake.nix | 2 ++ hosts/laurel/configuration.nix | 18 +++++++++++++++++- scripts/record.nix | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index ff479f9..55ed146 100644 --- a/flake.nix +++ b/flake.nix @@ -53,6 +53,8 @@ flaresolverr = flaresolverr.overlays.default; }; + formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt; + nixosConfigurations = { olive = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; diff --git a/hosts/laurel/configuration.nix b/hosts/laurel/configuration.nix index 541f185..29864cf 100644 --- a/hosts/laurel/configuration.nix +++ b/hosts/laurel/configuration.nix @@ -20,7 +20,7 @@ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. networking.hostName = "laurel"; - networking.firewall.allowedTCPPorts = [ 80 443 ]; + networking.firewall.allowedTCPPorts = [ 80 443 6197 ]; time.timeZone = "Europe/London"; i18n.defaultLocale = "en_US.UTF-8"; @@ -140,6 +140,22 @@ }; }; + services.matrix-conduit = { + enable = true; + settings = { + global = { + allow_encryption = true; + allow_federation = true; + allow_registration = false; + database_backend = "rocksdb"; + server_name = "oppi.li"; + address = "0.0.0.0"; + port = 6197; + enable_lightning_bolt = false; + }; + }; + }; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/scripts/record.nix b/scripts/record.nix index d5bfff5..a86d4cd 100644 --- a/scripts/record.nix +++ b/scripts/record.nix @@ -1,11 +1,11 @@ -{ pkgs, ...}: +{ pkgs, ... }: let name = "record"; slop = "${pkgs.slop}/bin/slop"; ffmpeg = "${pkgs.ffmpeg}/bin/ffmpeg"; in - pkgs.writeScriptBin name +pkgs.writeScriptBin name '' echo starting recording ... coords=$(${slop} -f "%x %y %w %h %g %i") || exit 1 -- cgit v1.2.3