flake: reorganize overlays under flake/ as a plain overlay list
This commit is contained in:
@@ -158,7 +158,6 @@
|
||||
./flake/hosts.nix
|
||||
./flake/pkgs.nix
|
||||
./treefmt.nix
|
||||
./overlays
|
||||
];
|
||||
|
||||
nixosHosts = {
|
||||
|
||||
+2
-13
@@ -9,22 +9,11 @@
|
||||
}:
|
||||
let
|
||||
vars = import ../vars.nix;
|
||||
pkgsModule = { config, ... }: {
|
||||
pkgsModule = args: {
|
||||
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;
|
||||
};
|
||||
})
|
||||
];
|
||||
overlays = (import ./overlays args);
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
[
|
||||
(
|
||||
final: prev:
|
||||
lib.infuse prev {
|
||||
cage.__output.patches.__append = [ ./cage-specify-output-name.patch ];
|
||||
bottles.__input.removeWarningPopup.__assign = true;
|
||||
|
||||
easytier.__assign = final.stable.easytier;
|
||||
|
||||
python314Packages.patool.__input.file.__output.postPatch.__append =
|
||||
lib.warn "Remove `file` patch once https://github.com/NixOS/nixpkgs/pull/540742 is merged" ''
|
||||
substituteInPlace src/landlock.c --replace-fail \
|
||||
"LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR" \
|
||||
"LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR | LANDLOCK_ACCESS_FS_EXECUTE"
|
||||
'';
|
||||
}
|
||||
)
|
||||
(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;
|
||||
};
|
||||
})
|
||||
]
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake.overlays = {
|
||||
modifications =
|
||||
final: prev:
|
||||
lib.infuse prev {
|
||||
cage.__output.patches.__append = [ ./cage-specify-output-name.patch ];
|
||||
bottles.__input.removeWarningPopup.__assign = true;
|
||||
|
||||
easytier.__assign = final.stable.easytier;
|
||||
|
||||
python314Packages.patool.__input.file.__output.postPatch.__append =
|
||||
lib.warn "Remove `file` patch once https://github.com/NixOS/nixpkgs/pull/540742 is merged" ''
|
||||
substituteInPlace src/landlock.c --replace-fail \
|
||||
"LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR" \
|
||||
"LANDLOCK_ACCESS_FS_READ_FILE | LANDLOCK_ACCESS_FS_READ_DIR | LANDLOCK_ACCESS_FS_EXECUTE"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
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:
|
||||
Reference in New Issue
Block a user