From 5a75d6b869b1ad523914b483d23ede0e7ff335ff Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sun, 5 Jan 2025 18:56:17 +0530 Subject: os/pc/firejail: init --- os/common/configuration.nix | 2 +- os/pc/configuration.nix | 1 + os/pc/modules/firejail.nix | 10 ++++++++++ os/pc/modules/nocodb.nix | 9 +++------ 4 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 os/pc/modules/firejail.nix diff --git a/os/common/configuration.nix b/os/common/configuration.nix index 74c4f9b..dba2275 100644 --- a/os/common/configuration.nix +++ b/os/common/configuration.nix @@ -48,5 +48,5 @@ in { ''; nixpkgs.config.allowUnfreePredicate = - pkg: builtins.elem (lib.getName pkg) [ "nvidia-x11" "slack" ]; + pkg: builtins.elem (lib.getName pkg) [ "nvidia-x11" "slack" "spotify" ]; } diff --git a/os/pc/configuration.nix b/os/pc/configuration.nix index f9fbcec..7e7218a 100644 --- a/os/pc/configuration.nix +++ b/os/pc/configuration.nix @@ -10,6 +10,7 @@ in { ./modules/wayland.nix ./modules/nopolkit.nix ./modules/nocodb.nix + ./modules/firejail.nix ]; boot = { diff --git a/os/pc/modules/firejail.nix b/os/pc/modules/firejail.nix new file mode 100644 index 0000000..920607e --- /dev/null +++ b/os/pc/modules/firejail.nix @@ -0,0 +1,10 @@ +{ pkgs, lib, ... }: { + programs.firejail = { + enable = true; + + wrappedBinaries.spotify = { + executable = lib.getExe pkgs.spotify; + profile = "${pkgs.firejail}/etc/firejail/spotify.profile"; + }; + }; +} diff --git a/os/pc/modules/nocodb.nix b/os/pc/modules/nocodb.nix index d34aca9..6b26bf2 100644 --- a/os/pc/modules/nocodb.nix +++ b/os/pc/modules/nocodb.nix @@ -1,12 +1,9 @@ { config, pkgs, lib, ... }: let user = config.global.userdata.name; in { - programs.firejail = { - enable = true; - wrappedBinaries.slack = { - executable = lib.getExe pkgs.slack; - profile = "${pkgs.firejail}/etc/firejail/slack.profile"; - }; + programs.firejail.wrappedBinaries.slack = { + executable = lib.getExe pkgs.slack; + profile = "${pkgs.firejail}/etc/firejail/slack.profile"; }; virtualisation.docker.enable = true; -- cgit v1.2.3