From c1781f45ca635c34c0aae5fac0f304efe6b94c5f Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Fri, 12 Jun 2026 18:16:20 +0100 Subject: [PATCH] feat: allow unfree packages distro-wide nixpkgs.config.allowUnfree in the system module (covers the live ISO via useGlobalPkgs and every mkFlake machine) plus the two explicit `import nixpkgs` sites (repo + lib.nix) so the standalone HM desktop sees the same package set. Unblocks claude-code for the menu system's ask-Claude module, vendor drivers, etc. Opt out with `nixpkgs.config = lib.mkForce { allowUnfree = false; }`. Co-Authored-By: Claude Fable 5 --- flake.nix | 3 +++ lib.nix | 3 +++ modules/nixos/default.nix | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/flake.nix b/flake.nix index fe28559..8df64cd 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,9 @@ pkgs = import nixpkgs { inherit system; overlays = [ self.overlays.default ]; + # Matches nixpkgs.config.allowUnfree in modules/nixos — the + # standalone HM generation must come from like-configured pkgs. + config.allowUnfree = true; }; # The guided installer — live-ISO only (not in the overlay): it bakes diff --git a/lib.nix b/lib.nix index 674ad95..07e442d 100644 --- a/lib.nix +++ b/lib.nix @@ -47,6 +47,9 @@ pkgs = import nixpkgs { inherit system; overlays = [ nomarchy.overlays.default ]; + # Matches nixpkgs.config.allowUnfree in modules/nixos: the system + # and the standalone HM desktop see the same package set. + config.allowUnfree = true; }; in { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 431a0ef..4ef0cda 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -14,6 +14,12 @@ in imports = [ ./options.nix ]; config = { + # Unfree allowed distro-wide: pragmatic-desktop territory (claude-code + # for the menu's ask-Claude module, vendor drivers, …). The custom + # nixpkgs-config type can't carry a nested mkDefault; disagree with + # `nixpkgs.config = lib.mkForce { allowUnfree = false; }`. + nixpkgs.config.allowUnfree = true; + # ── Wayland session: Hyprland ──────────────────────────────────── # Installs the binary, registers the session, wires up # xdg-desktop-portal-hyprland. Configuration is Home Manager's job.