Merge pull request #166 from ryan4yin/nixpaks

feat: nixpakd-firefox
This commit is contained in:
Ryan Yin
2024-09-25 19:54:43 +08:00
committed by GitHub
5 changed files with 18 additions and 14 deletions

View File

@@ -1,5 +1,7 @@
# Linux Hardening # Linux Hardening
> Work in progress.
## Goal ## Goal
- **System Level**: Protect critical files from being accessed by untrusted applications. - **System Level**: Protect critical files from being accessed by untrusted applications.

View File

@@ -61,11 +61,6 @@ mkNixPak {
}; };
bind.dev = [ bind.dev = [
"/dev/shm" # Shared Memory "/dev/shm" # Shared Memory
# seems required when using nvidia as primary gpu
"/dev/nvidia0"
"/dev/nvidia-uvm"
"/dev/nvidia-modeset"
]; ];
tmpfs = [ tmpfs = [
"/tmp" "/tmp"

View File

@@ -31,7 +31,7 @@ in {
}; };
# https://github.com/nixpak/nixpak/blob/master/modules/gui/fonts.nix # https://github.com/nixpak/nixpak/blob/master/modules/gui/fonts.nix
# it works not well, bind system's /etc/fonts directly instead # it works not well, bind system's /etc/fonts directly instead
fonts.enable = true; fonts.enable = false;
# https://github.com/nixpak/nixpak/blob/master/modules/locale.nix # https://github.com/nixpak/nixpak/blob/master/modules/locale.nix
locale.enable = true; locale.enable = true;
bubblewrap = { bubblewrap = {
@@ -66,7 +66,19 @@ in {
"/etc/fonts" # for fontconfig "/etc/fonts" # for fontconfig
"/etc/machine-id" "/etc/machine-id"
"/etc/localtime" "/etc/localtime"
# Fix: libEGL warning: egl: failed to create dri2 screen
"/etc/egl"
"/etc/static/egl"
]; ];
bind.dev = [
# seems required when using nvidia as primary gpu
"/dev/nvidia0"
"/dev/nvidiactl"
"/dev/nvidia-modeset"
"/dev/nvidia-uvm"
];
env = { env = {
XDG_DATA_DIRS = lib.mkForce (lib.makeSearchPath "share" [ XDG_DATA_DIRS = lib.mkForce (lib.makeSearchPath "share" [
iconTheme iconTheme

View File

@@ -45,11 +45,6 @@ mkNixPak {
}; };
bind.dev = [ bind.dev = [
"/dev/shm" # Shared Memory "/dev/shm" # Shared Memory
# seems required when using nvidia as primary gpu
"/dev/nvidia0"
"/dev/nvidia-uvm"
"/dev/nvidia-modeset"
]; ];
tmpfs = [ tmpfs = [
"/tmp" "/tmp"

View File

@@ -22,9 +22,9 @@
+ (builtins.readFile "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-foot}/catppuccin-mocha.conf"); + (builtins.readFile "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-foot}/catppuccin-mocha.conf");
home.packages = [ home.packages = [
pkgs.firefox-wayland # pkgs.firefox-wayland
# pkgs.nixpaks.firefox pkgs.nixpaks.firefox
# pkgs.nixpaks.firefox-desktop-item pkgs.nixpaks.firefox-desktop-item
]; ];
programs = { programs = {