mirror of
https://github.com/Noratrieb/vps.git
synced 2026-03-14 21:26:08 +01:00
Compare commits
2 commits
d392369473
...
eebb543d99
| Author | SHA1 | Date | |
|---|---|---|---|
| eebb543d99 | |||
| f2b1f2bc51 |
8 changed files with 54 additions and 14 deletions
|
|
@ -1,8 +1,7 @@
|
||||||
{ pkgs, nixpkgs-next, lib, config, my-projects-versions, ... }:
|
{ pkgs, lib, config, my-projects-versions, ... }:
|
||||||
let
|
let
|
||||||
does-it-build-base = (import (pkgs.fetchFromGitHub my-projects-versions.does-it-build.fetchFromGitHub)) {
|
does-it-build-base = (import (pkgs.fetchFromGitHub my-projects-versions.does-it-build.fetchFromGitHub)) {
|
||||||
# needs a recent rust version.
|
inherit pkgs;
|
||||||
pkgs = nixpkgs-next;
|
|
||||||
};
|
};
|
||||||
does-it-build = does-it-build-base.overrideAttrs (finalAttrs: previousAttrs: {
|
does-it-build = does-it-build-base.overrideAttrs (finalAttrs: previousAttrs: {
|
||||||
DOES_IT_BUILD_OVERRIDE_VERSION = my-projects-versions.does-it-build.commit;
|
DOES_IT_BUILD_OVERRIDE_VERSION = my-projects-versions.does-it-build.commit;
|
||||||
|
|
|
||||||
36
nix/apps/matrix/default.nix
Normal file
36
nix/apps/matrix/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.matrix-continuwuity = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
server_name = "noratrieb.dev";
|
||||||
|
allow_registration = false;
|
||||||
|
allow_encryption = true;
|
||||||
|
allow_federation = true;
|
||||||
|
trusted_servers = [ "matrix.org" ];
|
||||||
|
well_known = {
|
||||||
|
server = "matrix.noratrieb.dev:443";
|
||||||
|
client = "https://matrix.noratrieb.dev";
|
||||||
|
support_page = "https://noratrieb.dev";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = [ pkgs.matrix-continuwuity ];
|
||||||
|
services.caddy.virtualHosts."matrix.noratrieb.dev" = {
|
||||||
|
extraConfig = ''
|
||||||
|
encode zstd gzip
|
||||||
|
|
||||||
|
reverse_proxy * http://localhost:6167
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
services.caddy.virtualHosts."matrix.noratrieb.dev:8448" = {
|
||||||
|
extraConfig = ''
|
||||||
|
encode zstd gzip
|
||||||
|
|
||||||
|
reverse_proxy * http://localhost:6167
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 8448 ];
|
||||||
|
networking.firewall.interfaces.wg0.allowedTCPPorts = [ 6167 ];
|
||||||
|
}
|
||||||
|
|
@ -12,6 +12,12 @@
|
||||||
logFormat = "";
|
logFormat = "";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
|
|
||||||
|
reverse_proxy /.well-known/matrix/* https://matrix.noratrieb.dev {
|
||||||
|
header_up Host matrix.noratrieb.dev
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
header -Last-Modified
|
header -Last-Modified
|
||||||
|
|
||||||
header /blog/css/* Cache-Control "max-age=31540000, immutable"
|
header /blog/css/* Cache-Control "max-age=31540000, immutable"
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
meta =
|
meta =
|
||||||
let
|
let
|
||||||
nixpkgs-version = builtins.fromJSON (builtins.readFile ./nixpkgs.json);
|
nixpkgs-version = builtins.fromJSON (builtins.readFile ./nixpkgs.json);
|
||||||
nixpkgs-path = (fetchTarball "https://github.com/NixOS/nixpkgs/archive/${nixpkgs-version."nixos-25.05".commit}.tar.gz");
|
nixpkgs-path = (fetchTarball "https://github.com/NixOS/nixpkgs/archive/${nixpkgs-version."nixos-25.11".commit}.tar.gz");
|
||||||
nixpkgs-next = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/${nixpkgs-version."nixos-25.11".commit}.tar.gz") { };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Override to pin the Nixpkgs version (recommended). This option
|
# Override to pin the Nixpkgs version (recommended). This option
|
||||||
|
|
@ -16,7 +15,6 @@
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
my-projects-versions = builtins.fromJSON (builtins.readFile ./my-projects.json);
|
my-projects-versions = builtins.fromJSON (builtins.readFile ./my-projects.json);
|
||||||
|
|
||||||
inherit nixpkgs-next;
|
|
||||||
inherit nixpkgs-path;
|
inherit nixpkgs-path;
|
||||||
|
|
||||||
networkingConfig = {
|
networkingConfig = {
|
||||||
|
|
@ -205,6 +203,9 @@
|
||||||
./modules/caddy
|
./modules/caddy
|
||||||
./modules/garage
|
./modules/garage
|
||||||
./modules/snowflake-proxy
|
./modules/snowflake-proxy
|
||||||
|
|
||||||
|
# apps
|
||||||
|
./apps/matrix
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ let
|
||||||
"github.com/noratrieb-mirrors/certmagic-s3@v1.1.3"
|
"github.com/noratrieb-mirrors/certmagic-s3@v1.1.3"
|
||||||
"github.com/sagikazarmark/caddy-fs-s3@v0.10.0"
|
"github.com/sagikazarmark/caddy-fs-s3@v0.10.0"
|
||||||
];
|
];
|
||||||
hash = "sha256-onWUF2Ecd+LFprqY52U1AEvKhBIwKmI6eibeK03LpWM=";
|
hash = "sha256-ERccS8hBcjttV92MgJkgLBNY1RWRztYujby80MH52Xo=";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,8 @@ let
|
||||||
|
|
||||||
garage = combine [ vps1 vps2 vps3 vps4 ];
|
garage = combine [ vps1 vps2 vps3 vps4 ];
|
||||||
|
|
||||||
|
matrix = vps2;
|
||||||
|
|
||||||
# --- apps
|
# --- apps
|
||||||
docker = vps1;
|
docker = vps1;
|
||||||
hugo-chat = vps1 // {
|
hugo-chat = vps1 // {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ in
|
||||||
};
|
};
|
||||||
services.garage = {
|
services.garage = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.garage_2_1_0;
|
package = pkgs.garage_2;
|
||||||
settings = {
|
settings = {
|
||||||
metadata_dir = "/var/lib/garage/meta";
|
metadata_dir = "/var/lib/garage/meta";
|
||||||
data_dir = "/var/lib/garage/data";
|
data_dir = "/var/lib/garage/data";
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
{
|
{
|
||||||
"nixos-25.05": {
|
|
||||||
"lastUpdated": "2026-01-31T13:55:04.757Z",
|
|
||||||
"commit": "ac62194c3917d5f474c1a844b6fd6da2db95077d"
|
|
||||||
},
|
|
||||||
"nixos-25.11": {
|
"nixos-25.11": {
|
||||||
"lastUpdated": "2026-01-31T13:55:04.922Z",
|
"lastUpdated": "2026-02-14T15:07:37.351Z",
|
||||||
"commit": "fa83fd837f3098e3e678e6cf017b2b36102c7211"
|
"commit": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue