feat(wechat): bwrapped wechat from nur

This commit is contained in:
js0ny 2026-03-22 04:09:27 +00:00
parent 0e8eae72d1
commit f33575d2ff
6 changed files with 46 additions and 1 deletions

View file

@ -107,6 +107,7 @@
zen-browser = zen-browser.packages.x86_64-linux.zen-browser;
})
(import ./overlays/steamcmd.nix)
(import ./overlays/wechat-uos-sandboxed.nix)
];
forSystem = system:
import nixpkgs {

View file

@ -0,0 +1,20 @@
final: prev: {
wechat-uos-sandboxed = prev.nur.repos.xddxdd.wechat-uos-sandboxed.override {
buildFHSEnvBubblewrap = args:
prev.buildFHSEnvBubblewrap (
args
// {
extraPreBwrapCmds =
''
if [[ -z "''${WECHAT_DATA_DIR}" ]]; then
WECHAT_DATA_DIR="''${WECHAT_SANDBOX_DIR:-$HOME/.sandbox/.per-app/wechat}"
fi
''
+ (if args ? extraPreBwrapCmds then args.extraPreBwrapCmds else "");
targetPkgs =
pkgs:
(if args ? targetPkgs then args.targetPkgs pkgs else []) ++ [pkgs.util-linux];
}
);
};
}

View file

@ -58,7 +58,7 @@
);
in {
imports = [
../../../hardening/nixpaks/default.nix
../../../hardening/nixpaks
];
home.packages = with pkgs;

View file

@ -0,0 +1,9 @@
{config, ...}: let
home = config.home.homeDirectory;
user = config.home.username;
in {
systemd.user.tmpfiles.rules = [
"d ${home}/.sandbox/exchange 0755 ${user} users -"
"d ${home}/.sandbox/downloads 0755 ${user} users -"
];
}

View file

@ -0,0 +1,12 @@
{
config,
pkgs,
...
}: {
systemd.user.tmpfiles.rules = [
"d ${config.home.homeDirectory}/.sandbox/.per-app/wechat 0755 ${config.home.username} users -"
];
home.packages = with pkgs; [
wechat-uos-sandboxed
];
}

View file

@ -10,6 +10,8 @@ in {
# General config
./default.nix
./programs/sandboxed.nix
# Use Gnome-keyring for GUI setup
../../modules/home/gnome-keyrings.nix
@ -73,6 +75,7 @@ in {
# Social
./programs/social/discord.nix
./programs/social/telegram.nix
./programs/social/wechat.nix
# Utilities & misc
# ./programs/xilinx.nix