mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-12-02 10:44:00 +01:00
feat(nixpak): unify desktop app sandboxes (#491)
* refactor(nixpak): unify desktop app sandboxes Move common GUI, portal, and network policy into reusable modules and migrate browsers plus Zoom/WeChat/QQ/Telegram to the same boundary. Assisted-by: DeepSeek Harness (deepseek-flash)
This commit is contained in:
1 parent
707da35996
commit
818965a11f
35 files changed
+1858
-565
No files matched your search
@@ -1,20 +1,16 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
nixpaks.firefox
|
||||
];
|
||||
|
||||
# source code: https://github.com/nix-community/home-manager/blob/master/modules/programs/chromium.nix
|
||||
|
||||
# open-source upstream Chromium, the base for all the browsers below
|
||||
programs.chromium.enable = true;
|
||||
# the world's most widely used browser, with deep Google account and services integration
|
||||
programs.google-chrome.enable = true;
|
||||
# Brave's privacy-first build (Shields ad/tracker blocking), minus the crypto/AI extras
|
||||
programs.brave-origin.enable = true;
|
||||
# Microsoft's browser, with built-in phishing/malware protection, x86_64 build only
|
||||
programs.microsoft-edge.enable = pkgs.stdenv.hostPlatform.isx86_64;
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
nixpaks.firefox
|
||||
nixpaks.google-chrome
|
||||
nixpaks.chromium
|
||||
nixpaks.brave-origin
|
||||
]
|
||||
++ lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [ nixpaks.microsoft-edge ];
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
]
|
||||
# Zoom: Settings > Share Screen > Advanced > Screen Capture Mode on Wayland > PipeWire Mode.
|
||||
# zoom-us ships only an x86_64 Linux client, so the aarch64 host skips it.
|
||||
++ lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [ pkgs.zoom-us ];
|
||||
++ lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [ pkgs.nixpaks.zoom ];
|
||||
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# my custom hardened packages
|
||||
nixpaks.qq
|
||||
nixpaks.telegram-desktop
|
||||
bwraps.wechat
|
||||
nixpaks.wechat
|
||||
# discord # update too frequently, use the web version instead
|
||||
];
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
# nixpaks
|
||||
"${pkgs.nixpaks.firefox}/share/applications/org.mozilla.firefox.desktop"
|
||||
"${pkgs.nixpaks.telegram-desktop}/share/applications/org.telegram.desktop.desktop"
|
||||
"${pkgs.google-chrome}/share/applications/google-chrome.desktop"
|
||||
"${pkgs.nixpaks.google-chrome}/share/applications/com.google.Chrome.desktop"
|
||||
];
|
||||
}
|
||||
@@ -14,8 +14,8 @@
|
||||
defaultApplications =
|
||||
let
|
||||
browser = [
|
||||
"google-chrome.desktop"
|
||||
"firefox.desktop"
|
||||
"com.google.Chrome.desktop"
|
||||
"org.mozilla.firefox.desktop"
|
||||
];
|
||||
editor = [
|
||||
"dev.zed.Zed.desktop"
|
||||
@@ -48,11 +48,14 @@
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
"x-scheme-handler/zoommtg" = [ "Zoom.desktop" ];
|
||||
"x-scheme-handler/zoomus" = [ "Zoom.desktop" ];
|
||||
"application/x-zoom" = [ "Zoom.desktop" ];
|
||||
|
||||
# all other unknown schemes will be opened by this default application.
|
||||
# "x-scheme-handler/unknown" = editor;
|
||||
|
||||
"x-scheme-handler/tg" = [ "org.telegram.desktop.desktop" ];
|
||||
"x-scheme-handler/weixin" = [ "wechat.desktop" ];
|
||||
|
||||
"audio/*" = [ "mpv.desktop" ];
|
||||
"video/*" = [ "mpv.desktop" ];
|
||||
|
||||
Reference in new issue
Block a user