summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory&::Emma <root@rory.gay>2024-01-20 15:32:52 +0000
committerRory&::Emma <root@rory.gay>2024-01-20 15:36:54 +0000
commit2b68eeed357e6b83103de561637f465c4f6b363c (patch)
treecb58680405550d03c910af7d1e6d646c2baf54f7
parentMove dconf to Rory.client.nix (diff)
downloadRory-Open-Architecture-2b68eeed357e6b83103de561637f465c4f6b363c.tar.xz
Changes
-rw-r--r--flake.lock421
-rw-r--r--hardware-configuration.nix77
-rwxr-xr-xhost/Rory-nginx/services/matrix/conduit.nix19
-rwxr-xr-xhost/Rory-nginx/services/matrix/synapse.nix1
-rwxr-xr-xupdate.sh6
5 files changed, 100 insertions, 424 deletions
diff --git a/flake.lock b/flake.lock
deleted file mode 100644
index d3bcd4f..0000000
--- a/flake.lock
+++ /dev/null
@@ -1,421 +0,0 @@
-{
-  "nodes": {
-    "botcore-v4": {
-      "inputs": {
-        "nixpkgs": "nixpkgs"
-      },
-      "locked": {
-        "lastModified": 1683656302,
-        "narHash": "sha256-I2eu+9/i0ktqNzQwkc0NuczQ2UThCBf8L9xnZ8v3NSM=",
-        "owner": "BotCore-Devs",
-        "repo": "BotCore-v4",
-        "rev": "0e8738ba7df060782df050dc733b0bfc8c499830",
-        "type": "gitlab"
-      },
-      "original": {
-        "owner": "BotCore-Devs",
-        "ref": "staging",
-        "repo": "BotCore-v4",
-        "type": "gitlab"
-      }
-    },
-    "conduit": {
-      "inputs": {
-        "crane": "crane",
-        "fenix": "fenix",
-        "flake-utils": "flake-utils",
-        "nixpkgs": [
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1703432212,
-        "narHash": "sha256-v/wpbH/xuh9SJjLeCQIDiCeEbyui2WuWvIjOIH+lx80=",
-        "owner": "famedly",
-        "repo": "conduit",
-        "rev": "ca6219723b0d562d86a69824720215f8a1851836",
-        "type": "gitlab"
-      },
-      "original": {
-        "owner": "famedly",
-        "repo": "conduit",
-        "type": "gitlab"
-      }
-    },
-    "crane": {
-      "inputs": {
-        "flake-compat": "flake-compat",
-        "flake-utils": [
-          "conduit",
-          "flake-utils"
-        ],
-        "nixpkgs": [
-          "conduit",
-          "nixpkgs"
-        ],
-        "rust-overlay": "rust-overlay"
-      },
-      "locked": {
-        "lastModified": 1688772518,
-        "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=",
-        "owner": "ipetkov",
-        "repo": "crane",
-        "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e",
-        "type": "github"
-      },
-      "original": {
-        "owner": "ipetkov",
-        "repo": "crane",
-        "type": "github"
-      }
-    },
-    "fenix": {
-      "inputs": {
-        "nixpkgs": [
-          "conduit",
-          "nixpkgs"
-        ],
-        "rust-analyzer-src": "rust-analyzer-src"
-      },
-      "locked": {
-        "lastModified": 1689488573,
-        "narHash": "sha256-diVASflKCCryTYv0djvMnP2444mFsIG0ge5pa7ahauQ=",
-        "owner": "nix-community",
-        "repo": "fenix",
-        "rev": "39096fe3f379036ff4a5fa198950b8e79defe939",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nix-community",
-        "repo": "fenix",
-        "type": "github"
-      }
-    },
-    "flake-compat": {
-      "flake": false,
-      "locked": {
-        "lastModified": 1673956053,
-        "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
-        "owner": "edolstra",
-        "repo": "flake-compat",
-        "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
-        "type": "github"
-      },
-      "original": {
-        "owner": "edolstra",
-        "repo": "flake-compat",
-        "type": "github"
-      }
-    },
-    "flake-compat_2": {
-      "flake": false,
-      "locked": {
-        "lastModified": 1696426674,
-        "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
-        "owner": "edolstra",
-        "repo": "flake-compat",
-        "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
-        "type": "github"
-      },
-      "original": {
-        "owner": "edolstra",
-        "repo": "flake-compat",
-        "type": "github"
-      }
-    },
-    "flake-utils": {
-      "inputs": {
-        "systems": "systems"
-      },
-      "locked": {
-        "lastModified": 1689068808,
-        "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
-        "owner": "numtide",
-        "repo": "flake-utils",
-        "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
-        "type": "github"
-      },
-      "original": {
-        "owner": "numtide",
-        "repo": "flake-utils",
-        "type": "github"
-      }
-    },
-    "flake-utils_2": {
-      "inputs": {
-        "systems": "systems_2"
-      },
-      "locked": {
-        "lastModified": 1701680307,
-        "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
-        "owner": "numtide",
-        "repo": "flake-utils",
-        "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
-        "type": "github"
-      },
-      "original": {
-        "owner": "numtide",
-        "repo": "flake-utils",
-        "type": "github"
-      }
-    },
-    "home-manager": {
-      "inputs": {
-        "nixpkgs": "nixpkgs_2"
-      },
-      "locked": {
-        "lastModified": 1703838268,
-        "narHash": "sha256-SRg5nXcdPnrsQR2MTAp7en0NyJnQ2wB1ivmsgEbvN+o=",
-        "owner": "nix-community",
-        "repo": "home-manager",
-        "rev": "2aff324cf65f5f98f89d878c056b779466b17db8",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nix-community",
-        "ref": "master",
-        "repo": "home-manager",
-        "type": "github"
-      }
-    },
-    "mtxclientSrc": {
-      "flake": false,
-      "locked": {
-        "lastModified": 1700483982,
-        "narHash": "sha256-xKuY3IxaFdrxlxDH3t3ZmVWWOcqzAZvl/97mQOk1Tek=",
-        "owner": "Nheko-reborn",
-        "repo": "mtxclient",
-        "rev": "901ec5e35f76ebdff732ea28953b772ec7024df3",
-        "type": "github"
-      },
-      "original": {
-        "owner": "Nheko-reborn",
-        "ref": "master",
-        "repo": "mtxclient",
-        "type": "github"
-      }
-    },
-    "nhekoSrc": {
-      "flake": false,
-      "locked": {
-        "lastModified": 1703650822,
-        "narHash": "sha256-ga9DbE+KlRzOdQvE52tryN1KdCViV2Jvrx9DmClF1CQ=",
-        "owner": "Nheko-reborn",
-        "repo": "nheko",
-        "rev": "9abc44efe9de42ce1b8ff55331064ccd9832bdcd",
-        "type": "github"
-      },
-      "original": {
-        "owner": "Nheko-reborn",
-        "ref": "master",
-        "repo": "nheko",
-        "type": "github"
-      }
-    },
-    "nixos-wsl": {
-      "inputs": {
-        "flake-compat": "flake-compat_2",
-        "flake-utils": "flake-utils_2",
-        "nixpkgs": "nixpkgs_3"
-      },
-      "locked": {
-        "lastModified": 1703991017,
-        "narHash": "sha256-5wlJYAktFeHJlQt9VubO0FjaLe+96A/N3Die5Ym5Y/E=",
-        "owner": "nix-community",
-        "repo": "NixOS-WSL",
-        "rev": "c1c843e5059d942092d9bb9dc93768e5d2d79bdc",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nix-community",
-        "repo": "NixOS-WSL",
-        "type": "github"
-      }
-    },
-    "nixpkgs": {
-      "locked": {
-        "lastModified": 1683408522,
-        "narHash": "sha256-9kcPh6Uxo17a3kK3XCHhcWiV1Yu1kYj22RHiymUhMkU=",
-        "owner": "nixos",
-        "repo": "nixpkgs",
-        "rev": "897876e4c484f1e8f92009fd11b7d988a121a4e7",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nixos",
-        "ref": "nixos-unstable",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "nixpkgs-RoryNix": {
-      "locked": {
-        "lastModified": 1703467016,
-        "narHash": "sha256-/5A/dNPhbQx/Oa2d+Get174eNI3LERQ7u6WTWOlR1eQ=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "d02d818f22c777aa4e854efc3242ec451e5d462a",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixos-23.11",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "nixpkgs-rory": {
-      "locked": {
-        "lastModified": 1702491123,
-        "narHash": "sha256-5cMiUR/tLaPTn9TkVoi0FgOPx3TV5/Wnq8drAtL6NfY=",
-        "owner": "TheArcaneBrony",
-        "repo": "nixpkgs",
-        "rev": "7b65f36cb20ec965a39f6e5e1cd273644adb5293",
-        "type": "github"
-      },
-      "original": {
-        "owner": "TheArcaneBrony",
-        "ref": "master",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "nixpkgs_2": {
-      "locked": {
-        "lastModified": 1703255338,
-        "narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "6df37dc6a77654682fe9f071c62b4242b5342e04",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixos-unstable",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "nixpkgs_3": {
-      "locked": {
-        "lastModified": 1703068421,
-        "narHash": "sha256-WSw5Faqlw75McIflnl5v7qVD/B3S2sLh+968bpOGrWA=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "d65bceaee0fb1e64363f7871bc43dc1c6ecad99f",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixos-23.11",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "nixpkgs_4": {
-      "locked": {
-        "lastModified": 1703637592,
-        "narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=",
-        "owner": "NixOS",
-        "repo": "nixpkgs",
-        "rev": "cfc3698c31b1fb9cdcf10f36c9643460264d0ca8",
-        "type": "github"
-      },
-      "original": {
-        "owner": "NixOS",
-        "ref": "nixos-unstable",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "root": {
-      "inputs": {
-        "botcore-v4": "botcore-v4",
-        "conduit": "conduit",
-        "home-manager": "home-manager",
-        "mtxclientSrc": "mtxclientSrc",
-        "nhekoSrc": "nhekoSrc",
-        "nixos-wsl": "nixos-wsl",
-        "nixpkgs": "nixpkgs_4",
-        "nixpkgs-RoryNix": "nixpkgs-RoryNix",
-        "nixpkgs-rory": "nixpkgs-rory"
-      }
-    },
-    "rust-analyzer-src": {
-      "flake": false,
-      "locked": {
-        "lastModified": 1689441253,
-        "narHash": "sha256-4MSDZaFI4DOfsLIZYPMBl0snzWhX1/OqR/QHir382CY=",
-        "owner": "rust-lang",
-        "repo": "rust-analyzer",
-        "rev": "996e054f1eb1dbfc8455ecabff0f6ff22ba7f7c8",
-        "type": "github"
-      },
-      "original": {
-        "owner": "rust-lang",
-        "ref": "nightly",
-        "repo": "rust-analyzer",
-        "type": "github"
-      }
-    },
-    "rust-overlay": {
-      "inputs": {
-        "flake-utils": [
-          "conduit",
-          "crane",
-          "flake-utils"
-        ],
-        "nixpkgs": [
-          "conduit",
-          "crane",
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1688351637,
-        "narHash": "sha256-CLTufJ29VxNOIZ8UTg0lepsn3X03AmopmaLTTeHDCL4=",
-        "owner": "oxalica",
-        "repo": "rust-overlay",
-        "rev": "f9b92316727af9e6c7fee4a761242f7f46880329",
-        "type": "github"
-      },
-      "original": {
-        "owner": "oxalica",
-        "repo": "rust-overlay",
-        "type": "github"
-      }
-    },
-    "systems": {
-      "locked": {
-        "lastModified": 1681028828,
-        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
-        "owner": "nix-systems",
-        "repo": "default",
-        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nix-systems",
-        "repo": "default",
-        "type": "github"
-      }
-    },
-    "systems_2": {
-      "locked": {
-        "lastModified": 1681028828,
-        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
-        "owner": "nix-systems",
-        "repo": "default",
-        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nix-systems",
-        "repo": "default",
-        "type": "github"
-      }
-    }
-  },
-  "root": "root",
-  "version": 7
-}
diff --git a/hardware-configuration.nix b/hardware-configuration.nix
new file mode 100644
index 0000000..d465d53
--- /dev/null
+++ b/hardware-configuration.nix
@@ -0,0 +1,77 @@
+# Do not modify this file!  It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations.  Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+  imports =
+    [ (modulesPath + "/profiles/qemu-guest.nix")
+    ];
+
+  boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-amd" ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/df27a146-a490-4d5e-aa4b-8f52de9cf955";
+      fsType = "ext4";
+    };
+
+  fileSystems."/nix/store" =
+    { device = "/nix/store";
+      fsType = "none";
+      options = [ "bind" ];
+    };
+
+  fileSystems."/data" =
+    { device = "/dev/disk/by-uuid/ca6e141a-05af-48de-a97b-b75cda10f864";
+      fsType = "ext4";
+    };
+
+  fileSystems."/mnt/postgres" =
+    { device = "/dev/disk/by-uuid/c947f43c-5c80-4e29-ac8c-89763ecc02ad";
+      fsType = "ext4";
+    };
+
+  fileSystems."/mnt/sde" =
+    { device = "/dev/disk/by-uuid/1f31f2d7-043c-4bbf-8a3e-5e575a8c398a";
+      fsType = "ext4";
+    };
+
+  fileSystems."/mnt/sdf" =
+    { device = "/dev/disk/by-uuid/a09a20e9-7265-4976-ba8f-f4848c99e769";
+      fsType = "ext4";
+    };
+
+  fileSystems."/mnt/torrent" =
+    { device = "/dev/disk/by-uuid/c720dc91-0f69-4dca-88c5-ef36ec0d69e8";
+      fsType = "ext4";
+    };
+
+  fileSystems."/var/lib/matrix-synapse" =
+    { device = "/dev/disk/by-uuid/1089e10b-8951-411b-9103-110349d08d10";
+      fsType = "ext4";
+    };
+
+  fileSystems."/data/nginx/html_thearcanebrony/torrents" =
+    { device = "/mnt/torrent";
+      fsType = "none";
+      options = [ "bind" ];
+    };
+
+  swapDevices = [ ];
+
+  # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
+  # (the default) this is the recommended approach. When using systemd-networkd it's
+  # still possible to use this option, but it's recommended to use it in conjunction
+  # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
+  networking.useDHCP = lib.mkDefault true;
+  # networking.interfaces.ens18.useDHCP = lib.mkDefault true;
+  # networking.interfaces.ens19.useDHCP = lib.mkDefault true;
+  # networking.interfaces.ve-matrixunlB21.useDHCP = lib.mkDefault true;
+  # networking.interfaces.ve-pluralcoZ833.useDHCP = lib.mkDefault true;
+
+  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/host/Rory-nginx/services/matrix/conduit.nix b/host/Rory-nginx/services/matrix/conduit.nix
index 3594244..95e5d40 100755
--- a/host/Rory-nginx/services/matrix/conduit.nix
+++ b/host/Rory-nginx/services/matrix/conduit.nix
@@ -7,11 +7,30 @@
     settings.global = {
       address = "127.0.0.1";
       server_name = "conduit.rory.gay";
+      
       database_backend = "rocksdb";
+      rocksdb_optimize_for_spinning_disks = true;
+      rocksdb_max_log_file_size = 33554432;
+
+
+      allow_public_room_directory_over_federation = true;
+    
+      allow_device_name_federation = true;
       enable_lightning_bolt = true;
+      allow_local_presence = true;
+      allow_incoming_presence = true;
+      allow_outgoing_presence = true;
+      presence_idle_timeout_s = 60;
+      presence_offline_timeout_s = 180;
+
+
       max_concurrent_requests = 1000;
+      conduit_cache_capacity_modifier = 3.0;
+
+
       allow_check_for_updates = false;
       allow_registration = false;
+
       log = "info,state_res=info";
     };
   };
diff --git a/host/Rory-nginx/services/matrix/synapse.nix b/host/Rory-nginx/services/matrix/synapse.nix
index dcc9a10..df0b172 100755
--- a/host/Rory-nginx/services/matrix/synapse.nix
+++ b/host/Rory-nginx/services/matrix/synapse.nix
@@ -77,6 +77,7 @@
       };
       app_service_config_files = [
         #"/etc/matrix-synapse/appservice-registration.yaml"
+        "/var/lib/matrix-synapse/modas-registration.yaml"
       ];
 
       rc_message = {
diff --git a/update.sh b/update.sh
index a277a4e..f233b68 100755
--- a/update.sh
+++ b/update.sh
@@ -2,9 +2,9 @@
 
 if [ -d "nixpkgs" ]; then
     cd nixpkgs
-    git remote add upstream https://github.com/NixOS/nixpkgs || git remote set-url upstream https://github.com/NixOS/nixpkgs
-    git fetch --all -v
-    git rebase upstream/nixos-unstable -v && git push --force
+#    git remote add upstream https://github.com/NixOS/nixpkgs || git remote set-url upstream https://github.com/NixOS/nixpkgs
+#    git fetch --all -v
+#    git rebase upstream/nixos-unstable -v && git push --force
     cd ..
 fi