nix machine / user configurations

matrix

+48 -35
+32 -19
hosts/wolumonde/modules/conduit.nix
··· 1 - {config, pkgs, ...}: 2 - let 3 - wellKnownFileClient = 4 - pkgs.writeText "client" ( 5 - builtins.toJSON 6 - { "m.homeserver"."base_url" = "https://matrix.gaze.systems"; } 7 - ); 8 - wellKnownFileServer = 1 + { 2 + config, 3 + pkgs, 4 + ... 5 + }: let 6 + _wellKnownFileClient = pkgs.writeText "client" ( 7 + builtins.toJSON 8 + {"m.homeserver"."base_url" = "https://matrix.gaze.systems";} 9 + ); 10 + _wellKnownFileServer = 9 11 pkgs.writeText "server" 10 - (builtins.toJSON { "m.server" = "matrix.gaze.systems:443"; }); 11 - in 12 - { 12 + (builtins.toJSON {"m.server" = "matrix.gaze.systems:443";}); 13 + wellKnownFiles = pkgs.runCommand "well-known" {} '' 14 + mkdir -p $out 15 + cp ${_wellKnownFileServer} $out/server 16 + cp ${_wellKnownFileClient} $out/client 17 + ''; 18 + in { 13 19 services.matrix-conduit = { 14 20 enable = true; 21 + package = pkgs.matrix-conduit.overrideAttrs (old: rec { 22 + name = "${old.pname}-${version}"; 23 + version = "147f2752"; 24 + src = pkgs.fetchFromGitLab { 25 + owner = "famedly"; 26 + repo = "conduit"; 27 + rev = "147f27521c0d7dbc32d39ec1d8da6cd00008f23c"; 28 + sha256 = "sha256-j469Zh8zyqJNWz7q6gjRu1Khk9y6Xbb52SpxzNjADW8="; 29 + }; 30 + }); 15 31 settings.global = { 16 32 server_name = "gaze.systems"; 17 33 max_request_size = 1000 * 1000 * 20; 18 - allow_registration = true; 34 + allow_registration = false; 19 35 allow_federation = true; 20 36 trusted_servers = ["matrix.org" "nixos.dev" "conduit.rs"]; 21 37 address = "::1"; ··· 26 42 services.nginx.virtualHosts."matrix.gaze.systems" = { 27 43 enableACME = true; 28 44 forceSSL = true; 29 - locations."/".proxyPass = 30 - "http://localhost:${toString config.services.matrix-conduit.settings.global.port}"; 45 + locations."/".proxyPass = "http://localhost:${toString config.services.matrix-conduit.settings.global.port}"; 31 46 }; 32 47 services.nginx.virtualHosts."gaze.systems" = { 33 - locations."/.well-known/matrix/client".extraConfig = '' 34 - alias ${wellKnownFileClient}; 35 - ''; 36 - locations."/.well-known/matrix/server".extraConfig = '' 37 - alias ${wellKnownFileServer}; 48 + locations."/.well-known/matrix/".extraConfig = '' 49 + add_header content-type application/json; 50 + alias ${wellKnownFiles}/; 38 51 ''; 39 52 }; 40 53 }
+2 -2
modules/network/iwd.nix
··· 3 3 networking.wireless.iwd = { 4 4 enable = true; 5 5 settings = { 6 - Network = { EnableIPv6 = true; }; 7 - Settings = { AutoConnect = true; }; 6 + Network = {EnableIPv6 = true;}; 7 + Settings = {AutoConnect = true;}; 8 8 }; 9 9 }; 10 10 networking.networkmanager.wifi.backend = "iwd";
+14 -14
users/modules/discord/default.nix
··· 17 17 home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ 18 18 ".config/WebCord" 19 19 ]; 20 - home.packages = 21 - let 20 + home.packages = let 22 21 pkg = inputs.webcord.packages.${pkgs.system}.webcord; 23 - in 24 - [( 25 - pkgs.runCommand pkg.name {nativeBuildInputs = [pkgs.makeWrapper];} '' 26 - mkdir -p $out 27 - ln -sf ${pkg}/* $out/ 28 - rm $out/bin 29 - mkdir $out/bin 30 - ln -s ${pkg}/bin/webcord $out/bin/webcord 31 - wrapProgram $out/bin/webcord \ 32 - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [pkgs.pipewire]}" 33 - '' 34 - )]; 22 + in [ 23 + ( 24 + pkgs.runCommand pkg.name {nativeBuildInputs = [pkgs.makeWrapper];} '' 25 + mkdir -p $out 26 + ln -sf ${pkg}/* $out/ 27 + rm $out/bin 28 + mkdir $out/bin 29 + ln -s ${pkg}/bin/webcord $out/bin/webcord 30 + wrapProgram $out/bin/webcord \ 31 + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [pkgs.pipewire]}" 32 + '' 33 + ) 34 + ]; 35 35 }