Self-host your own digital island

NixOS 24.11

Changed files
+8 -36
modules
+4 -4
flake.lock
···
},
"nixpkgs_2": {
"locked": {
-
"lastModified": 1717952948,
-
"narHash": "sha256-mJi4/gjiwQlSaxjA6AusXBN/6rQRaPCycR7bd8fydnQ=",
+
"lastModified": 1732981179,
+
"narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=",
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "2819fffa7fa42156680f0d282c60d81e8fb185b7",
+
"rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65",
"type": "github"
},
"original": {
"owner": "nixos",
-
"ref": "nixos-24.05",
+
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
+4 -4
flake.nix
···
{
inputs = {
-
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
+
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixos-mailserver.url = "gitlab:RyanGibb/nixos-mailserver/fork-24.05";
eon.url = "github:RyanGibb/eon";
eon.inputs.nixpkgs.follows = "nixpkgs";
};
-
outputs = { self, nixpkgs, nixos-mailserver, eon, ... }: rec {
+
outputs = { nixpkgs, nixos-mailserver, eon, ... }: {
packages = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system:
let pkgs = nixpkgs.legacyPackages.${system};
in { manpage = import ./man { inherit pkgs system nixos-mailserver; }; });
···
nixos-mailserver.nixosModule
eon.nixosModules.default
eon.nixosModules.acme
-
({ pkgs, config, ... }: {
+
{
nixpkgs.overlays = [
(final: prev: {
mautrix-meta = (prev.callPackage ./pkgs/mautrix-meta.nix { });
})
];
-
})
+
}
];
};
defaultTemplate.path = ./template;
-5
modules/headscale.nix
···
server_url = "https://${cfg.headscale.domain}";
logtail.enabled = false;
ip_prefixes = [ "100.64.0.0/10" "fd7a:115c:a1e0::/48" ];
-
dns_config = {
-
# magicDns = true;
-
nameservers = config.networking.nameservers;
-
base_domain = "${cfg.headscale.zone}";
-
};
};
};
-23
modules/matrix/synapse.nix
···
description = "Enable Facebook Messenger bridge.";
};
};
-
slidingSync = {
-
enable = mkEnableOption "sliding-sync";
-
secretFile = mkOption {
-
type = types.nullOr types.str;
-
default = null;
-
};
-
};
};
config = mkIf cfg.matrix.enable {
···
client = {
"m.homeserver" = { "base_url" = "https://${subdomain}"; };
"m.identity_server" = { "base_url" = "https://vector.im"; };
-
"org.matrix.msc3575.proxy" = if cfg.matrix.slidingSync.enable then {
-
"url" = "https://${subdomain}";
-
} else
-
{ };
};
# ACAO required to allow element-web on any URL to request this json file
# set other headers due to https://github.com/yandex/gixy/blob/master/docs/en/plugins/addheaderredefinition.md
···
locations."~ ^(\\/_matrix|\\/_synapse\\/client)" = {
proxyPass = "http://127.0.0.1:8008";
};
-
# forward all sliding sync API calls to the sliding sync server
-
locations."~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync)" =
-
mkIf cfg.matrix.slidingSync.enable {
-
priority = 100;
-
proxyPass = "http://127.0.0.1:8009";
-
};
};
};
};
···
type = "CNAME";
value = cfg.domainName;
}];
-
-
services.matrix-sliding-sync = mkIf cfg.matrix.slidingSync.enable {
-
enable = true;
-
environmentFile = cfg.matrix.slidingSync.secretFile;
-
settings = { SYNCV3_SERVER = "https://${subdomain}"; };
-
};
};
}