Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e6a75fcc1
|
||
|
|
5f8e82ce33
|
||
|
|
1639cf6b0e
|
||
|
|
c506d9c185
|
||
|
|
adb21bb242
|
||
|
|
7d42a6c466
|
||
|
|
e1c421af54
|
@@ -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;
|
||||
};
|
||||
})
|
||||
]
|
||||
@@ -16,8 +16,17 @@ in
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Disable = "HeadSet";
|
||||
MultiProfile = "multiple";
|
||||
|
||||
# Avoid bluetooth headset connection failure
|
||||
Experimental = true;
|
||||
FastConnectable = true;
|
||||
ControllerMode = "dual";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
options btusb enable_autosuspend=n
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@@ -19,6 +18,7 @@ in
|
||||
my.persist.homeDirs = [
|
||||
".config/VSCodium"
|
||||
".vscode-oss"
|
||||
".vscode-oss-shared"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,10 +15,12 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
package = pkgs.steam;
|
||||
extraPackages = with pkgs; [
|
||||
gamescope
|
||||
];
|
||||
extraCompatPackages = with pkgs; [
|
||||
proton-ge-bin
|
||||
];
|
||||
};
|
||||
my.persist.homeDirs = [
|
||||
".local/share/Steam"
|
||||
|
||||
+2
-1
@@ -16,12 +16,13 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
enableDefaultPackages = true;
|
||||
fontDir.enable = true;
|
||||
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-color-emoji
|
||||
|
||||
jetbrains-mono
|
||||
|
||||
@@ -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:
|
||||
@@ -0,0 +1,58 @@
|
||||
# Vendored from nixpkgs
|
||||
{
|
||||
lib,
|
||||
clang,
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "dae";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "daeuniverse";
|
||||
repo = "dae";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-RpbWZEoGrCq3Py0hu6YDie6ErDTLS3oabqScPzhCtm0=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
vendorHash = "sha256-u2DCHmX7vRNWIQ2Ir3UrxPGduggEqoUr1rnkDfwsT0I=";
|
||||
|
||||
proxyVendor = true;
|
||||
|
||||
nativeBuildInputs = [ clang ];
|
||||
|
||||
hardeningDisable = [
|
||||
"zerocallusedregs"
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
make CFLAGS="-D__REMOVE_BPF_PRINTK -fno-stack-protector -Wno-unused-command-line-argument" \
|
||||
NOSTRIP=y \
|
||||
VERSION=${finalAttrs.version} \
|
||||
OUTPUT=$out/bin/dae
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
# network required
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 install/dae.service $out/lib/systemd/system/dae.service
|
||||
substituteInPlace $out/lib/systemd/system/dae.service \
|
||||
--replace-fail "/usr/bin/dae" "$out/bin/dae"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Linux high-performance transparent proxy solution based on eBPF";
|
||||
homepage = "https://github.com/daeuniverse/dae";
|
||||
license = lib.licenses.agpl3Only;
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "dae";
|
||||
};
|
||||
})
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user