From b2c5455747d78d6fd64a580ccb6cf53e95d24645 Mon Sep 17 00:00:00 2001 From: Pierre Martin Date: Sat, 3 Sep 2022 07:02:38 +0200 Subject: [PATCH] feat(packages): explicitely allow unfree packages instead of global wildcard --- config.nix | 1 - home.nix | 15 ++++++++++++++- nixos/configuration.nix | 3 --- 3 files changed, 14 insertions(+), 5 deletions(-) delete mode 100644 config.nix diff --git a/config.nix b/config.nix deleted file mode 100644 index 69baf10..0000000 --- a/config.nix +++ /dev/null @@ -1 +0,0 @@ -{ allowUnfree = true; } diff --git a/home.nix b/home.nix index 554c983..b364875 100644 --- a/home.nix +++ b/home.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { home.stateVersion = "22.05"; @@ -6,6 +6,19 @@ home.file.".i3status.conf".source = ./files/.i3status.conf; home.file.".config/traefik/traefik.toml".source = ./files/traefik.toml; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "1password" "1password-cli" + + "ngrok" + "postman" + "vscode" + + "google-chrome-beta" + "slack" + "spotify" "spotify-unwrapped" + "zoom" + ]; + home.packages = with pkgs; [ wget curl diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 01d3152..93d77d8 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -76,9 +76,6 @@ }; home-manager.users.pierre = import /home/pierre/dotfiles/home.nix; - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [