diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-04-19 18:01:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 18:01:26 +0000 |
commit | dd424ee92c1c5c76ffe3896d26cdf687e7fbb09a (patch) | |
tree | fd3247be2314c5a220706c0250fdf7e98fd03256 /nixos/doc | |
parent | a770f545e349a46563a54dfe67ebd08e4c536e8d (diff) | |
parent | 79daf776941d08f6b41a50290eed5c99c519d2fc (diff) |
Merge staging-next into staging
Diffstat (limited to 'nixos/doc')
-rw-r--r-- | nixos/doc/manual/configuration/customizing-packages.section.md | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/nixos/doc/manual/configuration/customizing-packages.section.md b/nixos/doc/manual/configuration/customizing-packages.section.md index a524ef266eaff..074932b3f1105 100644 --- a/nixos/doc/manual/configuration/customizing-packages.section.md +++ b/nixos/doc/manual/configuration/customizing-packages.section.md @@ -1,11 +1,33 @@ # Customising Packages {#sec-customising-packages} -Some packages in Nixpkgs have options to enable or disable optional -functionality or change other aspects of the package. +The Nixpkgs configuration for a NixOS system is set by the {option}`nixpkgs.config` option. + +::::{.example} +# Globally allow unfree packages + +```nix +{ + nixpkgs.config = { + allowUnfree = true; + }; +} +``` + +:::{.note} +This only allows unfree software in the given NixOS configuration. +For users invoking Nix commands such as [`nix-build`](https://nixos.org/manual/nix/stable/command-ref/nix-build), Nixpkgs is configured independently. +See the [Nixpkgs manual section on global configuration](https://nixos.org/manual/nixpkgs/unstable/#chap-packageconfig) for details. +::: +:::: + +<!-- TODO(@fricklerhandwerk) +all of the following should go to the Nixpkgs manual, it has nothing to do with NixOS +--> + +Some packages in Nixpkgs have options to enable or disable optional functionality, or change other aspects of the package. ::: {.warning} -Unfortunately, Nixpkgs currently lacks a way to query available -configuration options. +Unfortunately, Nixpkgs currently lacks a way to query available package configuration options. ::: ::: {.note} |