Compare commits

..
7 Commits
Author SHA1 Message Date
imxyy1soope1 a732c14010 mautrix-telegram: fix 2026-07-17 12:59:26 +08:00
imxyy1soope1 6d809fdbd3 secrets: update 2026-07-17 12:59:14 +08:00
imxyy1soope1 3afc4cb724 server: efl: update config 2026-07-17 12:58:38 +08:00
imxyy1soope1 9dc47df5ea flake, overlays: move stable and master overlays to host config
Defining the `stable` and `master` package overlays directly in `flake/hosts.nix` allows them to properly
inherit `config.nixpkgs.config` from the specific host.
2026-07-17 12:57:13 +08:00
imxyy1soope1 ee609f0425 nextcloud: update 2026-07-17 12:51:20 +08:00
imxyy1soope1 6e3ea74221 flake.lock: update 2026-07-17 12:50:34 +08:00
imxyy1soope1 add318487d server: use xanmod LTS and zfs stable 2026-07-17 12:15:46 +08:00
10 changed files with 119 additions and 72 deletions
Generated
+37 -37
View File
@@ -221,11 +221,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1783972995, "lastModified": 1784248563,
"narHash": "sha256-BIti2dNiCWjOpemU6z0sKaSa214XwdynXckvX5Sirkk=", "narHash": "sha256-rRjR2qADMZbvrDkZzeYrdssLKpbTGymNXLnVdbT6XpQ=",
"owner": "cachix", "owner": "cachix",
"repo": "devenv", "repo": "devenv",
"rev": "32f6747aabbd5aeb7413bae53d7e01e224ec77bc", "rev": "d77304696697c43672e10f29d1da401b33ab2778",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -242,11 +242,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1784017020, "lastModified": 1784190100,
"narHash": "sha256-49WO85egjNtN1vMgJ3zUjDh5IqO+ou4zZY80WQ6EKGg=", "narHash": "sha256-cE4wAMa3MDhnx+mH5Y72tM/VTSh5cS5S2q0w56XurJU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "fa2a0be0f712d7147d1677d33d15ea7b0589cdb4", "rev": "010b0647f8ebce9cd9e185773a7f9e422af1154a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -473,11 +473,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1783963347, "lastModified": 1784129366,
"narHash": "sha256-r376E2XpakiXwModDHIxlvB6qLq4iFVEq730vxOO4JY=", "narHash": "sha256-N5JiyICSeQF14x+OQebNyPpYowOT9Rs1iKyeCylSzOA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a45a7c451455a51ae740ec3bce4024b312809c29", "rev": "165228b0efefc3e635e5174020c40ea64271dc25",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -541,11 +541,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784012825, "lastModified": 1784258713,
"narHash": "sha256-lbdkOH57StVOFMEpFASzEmi+GlK3iX6Uu7Y2zGUgVFE=", "narHash": "sha256-Fxltsmg9SHOTRJuc4x8J/MB6/cEIjKcMGN/9GyKYQcY=",
"owner": "numtide", "owner": "numtide",
"repo": "llm-agents.nix", "repo": "llm-agents.nix",
"rev": "5c73869318afcf796a7a465b4b5e31b27f0819d4", "rev": "31405cadaf364d17d2d736e9002efb91558bf07d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -608,11 +608,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1783966637, "lastModified": 1784155826,
"narHash": "sha256-hOP+6qnU9fUNj81Pf//PZ31rT5DPilMKitijMtBi12c=", "narHash": "sha256-UVSn05UV5tlyYAgocTA83ujbKreFrivRG/KGtQAErds=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "889b49712d22394e0d21402d0d4d502d40c309b0", "rev": "f8c23c6d66d1a3ef8b5f7625d10eac84ce9af2ea",
"revCount": 141, "revCount": 142,
"type": "git", "type": "git",
"url": "https://codeberg.org/bananad3v/niri-nix" "url": "https://codeberg.org/bananad3v/niri-nix"
}, },
@@ -758,11 +758,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1783897948, "lastModified": 1784058842,
"narHash": "sha256-wusXpttNJn7SvUMvGLpNuJgcwIIkMwlWNnasPPxpftg=", "narHash": "sha256-3u3tvbCIAid3Mv7RrJx13jusIEQC/HeKYhO/SUSxR3A=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NixOS-WSL", "repo": "NixOS-WSL",
"rev": "7348d3f38ab1bd6abe156a923fab6f43656b168f", "rev": "24c8dc8e0f2170e1a377be24dfadc7d9d21dc1ad",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -773,11 +773,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1783816212, "lastModified": 1784176690,
"narHash": "sha256-2aZisVTVGSFEk3MYcOiWQp3zvwyzbqpktB69Rcfp150=", "narHash": "sha256-RUXu+GHGkY+eShsqx8hp0BIIo51K3V1Q8AY4pPAUcDw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3b32825de172d0bc85664f495edb096b10862524", "rev": "6368bc923cec55a5f78960ade0cb4dd99580e087",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -789,11 +789,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1784024528, "lastModified": 1784260328,
"narHash": "sha256-RzN/SB6kDzINm4GRH6BVabgi9zzpBnyurvjiJvZesoo=", "narHash": "sha256-/WB6EO62HYR/0nE9C4tM1QctaE4FJGbdxSE7Ka9yW+I=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6b4ecdea71b0e1bec2e847c667f691ab253b2d57", "rev": "6bfaf02a46540dad5b083e46e80d9ac133260cd3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -821,11 +821,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1783776592, "lastModified": 1784120854,
"narHash": "sha256-UgCQzxeWI75XM8G+hPrPh+MKzEPjG3SpAj7dtqSbksA=", "narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e7a3ca8092b61ff85b6a45bf863ea2b2d6a661b3", "rev": "753cc8a3a87467296ddd1fa93f0cc3e81120ee46",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -962,11 +962,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1783975201, "lastModified": 1784155628,
"narHash": "sha256-oyHWTfKWk06nTynCO8ByEAx/KEARvOOyTVnwinOmK3Q=", "narHash": "sha256-yLgQQpQJpNkqoNvYc93pr7HjpW2uOP6Y1sm/vQakEc4=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "63a6f0d4bcfd3bbcf36383fcbcbcd93456ed1653", "rev": "7a5ecc88dbdfa13bac99fa4e0f38adcfdca1bb0a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1041,11 +1041,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1783358511, "lastModified": 1784059683,
"narHash": "sha256-/F85cBWvU8b2hpawuCog464065ZTJtdMgVPWwJ9yHjE=", "narHash": "sha256-q5MZrmKlg9A4ORx3EQcr7qkuidMU1gVZ+xJ3nCK+xgc=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "14814ef555d8148ab82eba5054e654cd9eae3a1f", "rev": "c8ccc31f3ea29dc3eb5b54945e5eb549529491d6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1221,11 +1221,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784009464, "lastModified": 1784180486,
"narHash": "sha256-TxtWabLo6fUbQOHZRXh7hW6p0KiGXR7Dsw1umqgZs8s=", "narHash": "sha256-WyEBfIw3m2qpb/dy63NIEe9tmC9a1YxIRcEjrD2e390=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "405effabbf8973829863d8ceb52d09a104b4c0b9", "rev": "2c429687b07e5b08a22552e85802ede13d1761cc",
"type": "github" "type": "github"
}, },
"original": { "original": {
+18 -2
View File
@@ -9,8 +9,24 @@
}: }:
let let
vars = import ../vars.nix; vars = import ../vars.nix;
pkgsModule = { pkgsModule = { config, ... }: {
nixpkgs = pkgsParams; nixpkgs = lib.mkMerge [
pkgsParams
{
overlays = [
(final: _prev: {
stable = import inputs.nixpkgs-stable {
inherit (final.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config;
};
master = import inputs.nixpkgs-master {
inherit (final.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config;
};
})
];
}
];
}; };
hmModule = { hmModule = {
home-manager = { home-manager = {
-7
View File
@@ -25,13 +25,6 @@
config.sops.secrets.efl-tuwunel-env.path config.sops.secrets.efl-tuwunel-env.path
]; ];
}; };
mautrix-telegram = {
image = "dock.mau.dev/mautrix/telegram:latest";
ports = [ "8099:8099" ];
networks = [ "podman" ];
extraOptions = [ "--ip=10.88.0.254" ];
volumes = [ "/var/lib/efl-mautrix-telegram:/data" ];
};
send = { send = {
image = "lanol/filecodebox:latest"; image = "lanol/filecodebox:latest";
+1 -2
View File
@@ -18,12 +18,11 @@ in
]; ];
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_xanmod_stable; boot.kernelPackages = lib.mkForce pkgs.linuxPackages_xanmod; # LTS
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.tmp.useTmpfs = true; boot.tmp.useTmpfs = true;
boot.supportedFilesystems = [ "zfs" ]; boot.supportedFilesystems = [ "zfs" ];
boot.zfs = { boot.zfs = {
package = pkgs.zfs_unstable;
extraPools = [ "data" ]; extraPools = [ "data" ];
forceImportRoot = false; forceImportRoot = false;
}; };
+11 -3
View File
@@ -1,12 +1,20 @@
{ {
lib,
pkgs,
config, config,
secrets, secrets,
... ...
}: }:
{ {
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = (
"olm-3.2.16" lib.warn
]; ''
mautrix-telegram still using olm-3.2.16
''
[
"olm-3.2.16"
]
);
sops.secrets.tuwunel-reg-token = { sops.secrets.tuwunel-reg-token = {
sopsFile = secrets.tuwunel-reg-token; sopsFile = secrets.tuwunel-reg-token;
restartUnits = [ "tuwunel.service" ]; restartUnits = [ "tuwunel.service" ];
+2
View File
@@ -501,6 +501,8 @@
server = [ "192.168.3.1" ]; server = [ "192.168.3.1" ];
address = map (sub: "/${sub}.imxyy.top/192.168.3.2") subDomains ++ [ address = map (sub: "/${sub}.imxyy.top/192.168.3.2") subDomains ++ [
"/imxyy-nix-server/192.168.3.2" "/imxyy-nix-server/192.168.3.2"
"/mtx.eflx.top/192.168.3.2"
"/send.eflx.top/192.168.3.2"
"/imxyy-cloudwin/192.168.3.4" "/imxyy-cloudwin/192.168.3.4"
"/printer.home/192.168.3.53" "/printer.home/192.168.3.53"
]; ];
+2 -3
View File
@@ -17,14 +17,13 @@ in
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud33; package = pkgs.nextcloud34;
extraApps = { extraApps = {
inherit (pkgs.nextcloud33.packages.apps) inherit (pkgs.nextcloud34.packages.apps)
bookmarks bookmarks
previewgenerator previewgenerator
spreed spreed
notes notes
registration
; ;
}; };
extraAppsEnable = true; extraAppsEnable = true;
+8 -14
View File
@@ -1,16 +1,7 @@
{ {
inputs,
lib, lib,
... ...
}: }:
let
mkPkgs = type: final: _prev: {
${type} = import inputs."nixpkgs-${type}" {
system = final.stdenv.hostPlatform.system;
config.allowUnfree = true;
};
};
in
{ {
flake.overlays = { flake.overlays = {
modifications = modifications =
@@ -27,10 +18,13 @@ in
"LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR" \ "LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR" \
"LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR | LANDLOCK_ACCESS_FS_EXECUTE" "LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR | LANDLOCK_ACCESS_FS_EXECUTE"
''; '';
mautrix-telegram.__input.python3.__input.packageOverrides.__assign = _pyfinal: pyprev: {
telethon = pyprev.telethon.overridePythonAttrs {
disabled = false;
};
};
mautrix-telegram.__output.patches.__append = [ ./mautrix-telegram-use-importlib-resources.patch ];
}; };
} };
//
# this allows us to access specific version of nixpkgs
# by `pkgs.unstable`, `pkgs.stable` and `pkgs.master`
lib.genAttrs [ "stable" "unstable" "master" ] mkPkgs;
} }
@@ -0,0 +1,36 @@
diff --git a/mautrix_telegram/web/public/__init__.py b/mautrix_telegram/web/public/__init__.py
index cde3735..d911779 100644
--- a/mautrix_telegram/web/public/__init__.py
+++ b/mautrix_telegram/web/public/__init__.py
@@ -23,7 +23,7 @@ import time
from aiohttp import web
from mako.template import Template
-import pkg_resources
+from importlib.resources import files
from mautrix.types import UserID
from mautrix.util.signed_token import sign_token, verify_token
@@ -45,11 +45,11 @@ class PublicBridgeWebsite(AuthAPI):
self.secret_key = "".join(random.choices(string.ascii_lowercase + string.digits, k=64))
self.login = Template(
- pkg_resources.resource_string("mautrix_telegram", "web/public/login.html.mako")
+ files("mautrix_telegram").joinpath("web/public/login.html.mako").read_bytes()
)
self.mx_login = Template(
- pkg_resources.resource_string("mautrix_telegram", "web/public/matrix-login.html.mako")
+ files("mautrix_telegram").joinpath("web/public/matrix-login.html.mako").read_bytes()
)
self.app = web.Application(loop=loop)
@@ -58,7 +58,7 @@ class PublicBridgeWebsite(AuthAPI):
self.app.router.add_route("GET", "/matrix-login", self.get_matrix_login)
self.app.router.add_route("POST", "/matrix-login", self.post_matrix_login)
self.app.router.add_static(
- "/", pkg_resources.resource_filename("mautrix_telegram", "web/public/")
+ "/", str(files("mautrix_telegram").joinpath("web/public/"))
)
def make_token(self, mxid: str, endpoint: str = "/login", expires_in: int = 900) -> str:
File diff suppressed because one or more lines are too long