Jump to content

Unfree software: Difference between revisions

Update code
("See also" section)
(Update code)
Line 2: Line 2:


=== Per-package (Ideal) ===
=== Per-package (Ideal) ===
This method works for NixOS system level configuration and Home-Manager standalone
This method works for both NixOS system level configuration and standalone [[Home manager]]:


<syntaxhighlight lang="nix">
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{lib, ...}: {
{
   nixpkgs.config.allowUnfreePredicate = pkg:
   allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
    builtins.elem (lib.getName pkg) [
    "vscode"
      # Add additional package names here
  ];
      "hello-unfree"
    ];
}
}
</syntaxhighlight>
 
</nowiki>}}


=== For all packages ===
=== For all packages ===
142

edits