From b0cd8a2d8409434d0be45761c9103d58e22cec83 Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Sat, 11 Nov 2023 23:12:33 +0100 Subject: [PATCH] explicitly list allowed unfree packages --- modules/base/system.nix | 1 - modules/desktop/programs.nix | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/base/system.nix b/modules/base/system.nix index d1e4d3a..873169e 100644 --- a/modules/base/system.nix +++ b/modules/base/system.nix @@ -27,7 +27,6 @@ nixpkgs-unstable.flake = nixpkgs-unstable; }; }; - nixpkgs.config.allowUnfree = true; # Enable all firmware with a license allowing redistribution hardware.enableRedistributableFirmware = true; diff --git a/modules/desktop/programs.nix b/modules/desktop/programs.nix index 70c7076..8c347b5 100644 --- a/modules/desktop/programs.nix +++ b/modules/desktop/programs.nix @@ -1,4 +1,4 @@ -{ home-manager, nixpkgs, pkgs, ... }: { +{ home-manager, lib, nixpkgs, pkgs, ... }: { # Packages useful on a desktop computer which don't require their own module environment.systemPackages = with pkgs; [ @@ -18,6 +18,11 @@ webcord # discord ]; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "pycharm-professional" + "spotify" + ]; + nixpkgs.config.permittedInsecurePackages = [ "electron-24.8.6" # for webcord ];