diff --git a/config/hosts/gameserver-node-1/configuration.nix b/config/hosts/gameserver-node-1/configuration.nix deleted file mode 100644 index fcdeeae..0000000 --- a/config/hosts/gameserver-node-1/configuration.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ pterodactyl, ... }: -{ - boot.loader.grub = { - enable = true; - device = "/dev/vda"; - }; - - networking = { - hostName = "gameserver-node-1"; - }; - - #environment.systemPackages = [ - # pterodactyl.packages."x86_64-linux".pterodactyl-wings - #]; - - imports = [ - pterodactyl.nixosModules.pterodactyl-wings - ]; - - services.wings = { - enable = false; - configuration = ""; - }; - - system.stateVersion = "24.05"; -} diff --git a/config/hosts/gameserver-node-1/default.nix b/config/hosts/gameserver-node-1/default.nix deleted file mode 100644 index 0167962..0000000 --- a/config/hosts/gameserver-node-1/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ ... }: -{ - imports = [ - ./configuration.nix - ]; -} diff --git a/config/hosts/matrix/default.nix b/config/hosts/matrix/default.nix index 9b4da42..27528b7 100644 --- a/config/hosts/matrix/default.nix +++ b/config/hosts/matrix/default.nix @@ -3,7 +3,6 @@ imports = [ ./configuration.nix ./hardware-configuration.nix - ./mas.nix ./postgresql.nix ./matrix-synapse.nix ./nginx.nix diff --git a/config/hosts/matrix/mas.nix b/config/hosts/matrix/mas.nix deleted file mode 100644 index 4750b5f..0000000 --- a/config/hosts/matrix/mas.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, ... }: -{ - environment.systemPackages = with pkgs; [ - matrix-authentication-service - ]; -} diff --git a/config/hosts/matrix/matrix-synapse.nix b/config/hosts/matrix/matrix-synapse.nix index 7f339bf..e719484 100644 --- a/config/hosts/matrix/matrix-synapse.nix +++ b/config/hosts/matrix/matrix-synapse.nix @@ -1,4 +1,4 @@ -{ ... }: +{ config, ... }: { services.matrix-synapse = { enable = true; @@ -55,4 +55,12 @@ "/secrets/matrix-keycloak-client-secret.secret" ]; }; + + services.matrix-sliding-sync = { + enable = true; + settings = { + SYNCV3_SERVER = config.services.matrix-synapse.settings.public_baseurl; + }; + environmentFile = "/secrets/matrix-SYNCV3_SECRET.secret"; + }; } diff --git a/config/hosts/matrix/postgresql.nix b/config/hosts/matrix/postgresql.nix index 06d10e2..03b753a 100644 --- a/config/hosts/matrix/postgresql.nix +++ b/config/hosts/matrix/postgresql.nix @@ -8,11 +8,6 @@ TEMPLATE template0 LC_COLLATE = "C" LC_CTYPE = "C"; - CREATE ROLE "mas_user" WITH LOGIN PASSWORD 'mas'; - CREATE DATABASE "mas" WITH OWNER "mas_user" - TEMPLATE template0 - LC_COLLATE = "C" - LC_CTYPE = "C"; ''; }; } diff --git a/config/hosts/matrix/secrets.nix b/config/hosts/matrix/secrets.nix index a95309e..68e4771 100644 --- a/config/hosts/matrix/secrets.nix +++ b/config/hosts/matrix/secrets.nix @@ -33,6 +33,14 @@ permissions = "0640"; uploadAt = "pre-activation"; }; + "matrix-SYNCV3_SECRET.secret" = { + keyCommand = keyCommandEnv ++ [ "pass" "matrix/SYNCV3_SECRET" ]; + destDir = "/secrets"; + user = "matrix-synapse"; + group = "matrix-synapse"; + permissions = "0640"; + uploadAt = "pre-activation"; + }; "matrix-keycloak-client-secret.secret" = { keyCommand = keyCommandEnv ++ [ "pass" "matrix/keycloak-client-secret" ]; destDir = "/secrets"; diff --git a/config/hosts/paperless/configuration.nix b/config/hosts/paperless/configuration.nix index a48164e..494f08c 100644 --- a/config/hosts/paperless/configuration.nix +++ b/config/hosts/paperless/configuration.nix @@ -13,5 +13,5 @@ }; }; - system.stateVersion = "24.05"; + system.stateVersion = "23.05"; } diff --git a/config/hosts/web-public-2/virtualHosts/nekover.se.nix b/config/hosts/web-public-2/virtualHosts/nekover.se.nix index 19a7766..08a61ea 100644 --- a/config/hosts/web-public-2/virtualHosts/nekover.se.nix +++ b/config/hosts/web-public-2/virtualHosts/nekover.se.nix @@ -16,22 +16,7 @@ ''; }; locations."/.well-known/matrix/client" = { - return = "200 ' - { - \"m.homeserver\": { - \"base_url\": \"https://matrix.nekover.se\" - }, - \"m.identity_server\": { - \"base_url\": \"https://vector.im\" - }, - \"org.matrix.msc3575.proxy\": { - \"url\": \"https://matrix.nekover.se\" - }, - \"org.matrix.msc2965.authentication\": { - \"issuer\": \"https://nekover.se/\", - \"account\": \"https://matrix-auth.nekover.se/account\" - } - }'"; + return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.nekover.se\"}, \"m.identity_server\": {\"base_url\": \"https://vector.im\"}, \"org.matrix.msc3575.proxy\": {\"url\": \"https://matrix.nekover.se\"}, \"org.matrix.msc2965.authentication\": {\"issuer\": \"https://id.nekover.se/realms/nekoverse\", \"account\": \"https://id.nekover.se/realms/nekoverse/account/\"}}'"; extraConfig = '' default_type application/json; add_header Access-Control-Allow-Origin *; diff --git a/flake.lock b/flake.lock index 3a30919..4534930 100644 --- a/flake.lock +++ b/flake.lock @@ -70,11 +70,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1730963269, - "narHash": "sha256-rz30HrFYCHiWEBCKHMffHbMdWJ35hEkcRVU0h7ms3x0=", + "lastModified": 1730142757, + "narHash": "sha256-O2/v/ocUL0KsACqEIK5eD5XeX46duRIgKdOu6uCKarw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "83fb6c028368e465cd19bb127b86f971a5e41ebc", + "rev": "dd6d18bf8d291daca03a444973bd4f9aa5c1f681", "type": "github" }, "original": { @@ -101,11 +101,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1731015792, - "narHash": "sha256-u8U89hPPbGu627UNtd3H9/CPifDOrmsNGm2y83C9A0A=", + "lastModified": 1730209337, + "narHash": "sha256-WPGVR8NW9ctqwLMtYV23b94ExQulTFoTKqD21WI3fbg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f7516232a6bf821825c2bd114abcaec1bcd1e54d", + "rev": "ec7caabec9679b1a9008e0cbcfa4b14a2b600774", "type": "github" }, "original": { @@ -117,11 +117,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1730989260, - "narHash": "sha256-5R9m921OhgOUNHVIxTS8+jZJokkZRsH7UOecxlchqZ8=", + "lastModified": 1730157240, + "narHash": "sha256-P8wF4ag6Srmpb/gwskYpnIsnspbjZlRvu47iN527ABQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3aea494127aae5d08c4c501ea4ba27e6c185b822", + "rev": "75e28c029ef2605f9841e0baa335d70065fe7ae2", "type": "github" }, "original": { @@ -132,22 +132,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1729265718, - "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ccc0c2126893dd20963580b6478d1a10a4512185", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1717602782, "narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=", @@ -162,31 +146,12 @@ "type": "indirect" } }, - "pterodactyl": { - "inputs": { - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1730915158, - "narHash": "sha256-qQvhHUbC5yKD6x/G0P2tvHoRf92Nd/QWB76CRnV5oyI=", - "ref": "refs/heads/main", - "rev": "1eff87119f6e48b6b1d1afef468ee4ff1aebe333", - "revCount": 3, - "type": "git", - "url": "https://git.nekover.se/fi/pterodactyl.git" - }, - "original": { - "type": "git", - "url": "https://git.nekover.se/fi/pterodactyl.git" - } - }, "root": { "inputs": { "nixos-generators": "nixos-generators", "nixpkgs": "nixpkgs", "nixpkgs-master": "nixpkgs-master", "nixpkgs-unstable": "nixpkgs-unstable", - "pterodactyl": "pterodactyl", "simple-nixos-mailserver": "simple-nixos-mailserver" } }, @@ -194,7 +159,7 @@ "inputs": { "blobs": "blobs", "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "nixpkgs-24_05": "nixpkgs-24_05", "utils": "utils" }, diff --git a/flake.nix b/flake.nix index 3aae2d8..5cf2232 100644 --- a/flake.nix +++ b/flake.nix @@ -8,12 +8,9 @@ inputs.nixpkgs.follows = "nixpkgs"; }; simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05"; - pterodactyl = { - url = "git+https://git.nekover.se/fi/pterodactyl.git"; - }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-master, nixos-generators, simple-nixos-mailserver, pterodactyl, ... }@inputs: + outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-master, nixos-generators, simple-nixos-mailserver, ... }@inputs: let hosts = import ./hosts.nix inputs; helper = import ./helper.nix inputs; @@ -31,7 +28,7 @@ nodeNixpkgs = builtins.mapAttrs (name: host: host.pkgs) hosts; specialArgs = { - inherit nixpkgs-unstable nixpkgs-master hosts simple-nixos-mailserver pterodactyl; + inherit nixpkgs-unstable nixpkgs-master hosts simple-nixos-mailserver; # Provide environment for secret key command keyCommandEnv = [ "env" "GNUPGHOME=/home/yuri/.passinfra_gnupg" "PASSWORD_STORE_DIR=/home/yuri/pass/infra" ]; diff --git a/hosts.nix b/hosts.nix index 820e5cb..363f377 100644 --- a/hosts.nix +++ b/hosts.nix @@ -26,10 +26,9 @@ let }) hosts; in generateDefaults { - gameserver-node-1 = { - site = "vs"; - environment = "proxmox"; - }; + #fee = { + # site = "wg"; + #}; hydra = { site = "vs"; environment = "proxmox"; @@ -71,7 +70,6 @@ in environment = "proxmox"; }; matrix = { - hostNixpkgs = nixpkgs-unstable; site = "vs"; environment = "proxmox"; }; @@ -96,6 +94,10 @@ in site = "vs"; environment = "proxmox"; }; + paperless = { + site = "wg"; + environment = "proxmox"; + }; coturn = { site = "vs"; environment = "proxmox"; @@ -106,7 +108,6 @@ in environment = "proxmox"; }; torrent = { - hostNixpkgs = nixpkgs-unstable; site = "vs"; environment = "proxmox"; };