Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: nixpakd-firefox #166

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hardening/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Linux Hardening

> Work in progress.

## Goal

- **System Level**: Protect critical files from being accessed by untrusted applications.
Expand Down
5 changes: 0 additions & 5 deletions hardening/nixpaks/firefox.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ mkNixPak {
};
bind.dev = [
"/dev/shm" # Shared Memory

# seems required when using nvidia as primary gpu
"/dev/nvidia0"
"/dev/nvidia-uvm"
"/dev/nvidia-modeset"
];
tmpfs = [
"/tmp"
Expand Down
14 changes: 13 additions & 1 deletion hardening/nixpaks/modules/gui-base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ in {
};
# https://github.com/nixpak/nixpak/blob/master/modules/gui/fonts.nix
# 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
locale.enable = true;
bubblewrap = {
Expand Down Expand Up @@ -66,7 +66,19 @@ in {
"/etc/fonts" # for fontconfig
"/etc/machine-id"
"/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 = {
XDG_DATA_DIRS = lib.mkForce (lib.makeSearchPath "share" [
iconTheme
Expand Down
5 changes: 0 additions & 5 deletions hardening/nixpaks/qq.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ mkNixPak {
};
bind.dev = [
"/dev/shm" # Shared Memory

# seems required when using nvidia as primary gpu
"/dev/nvidia0"
"/dev/nvidia-uvm"
"/dev/nvidia-modeset"
];
tmpfs = [
"/tmp"
Expand Down
6 changes: 3 additions & 3 deletions home/linux/gui/hyprland/values/wayland-apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
+ (builtins.readFile "${nur-ryan4yin.packages.${pkgs.system}.catppuccin-foot}/catppuccin-mocha.conf");

home.packages = [
pkgs.firefox-wayland
# pkgs.nixpaks.firefox
# pkgs.nixpaks.firefox-desktop-item
# pkgs.firefox-wayland
pkgs.nixpaks.firefox
pkgs.nixpaks.firefox-desktop-item
];

programs = {
Expand Down