Commit Graph

832 Commits

Author SHA1 Message Date
éclairevoyant
7d8742da87
treewide: fix mkEnableOption usage 2024-06-14 02:41:42 -04:00
Sandro Jäckel
8e66b653e8
nixos/locate: drop with lib{,.types}, misc cleanup 2024-06-11 00:44:19 +02:00
Sandro Jäckel
dec5ef74b0
nixos/locate: only set LOCATE_PATH for findutils locate
For plocate/mlocate it causes the results to be printed twice.
2024-06-11 00:10:09 +02:00
nikstur
acba687721 nixos/version: remove strict type constraints from image options
This constraints aren't super useful because they arent really enforced
by the software, so it's hard to get them right and we've gotten them
wrong multiple times in the past. It's better to remove them altogether
in the spirit of RFC 42.
2024-05-29 16:13:41 +02:00
nikstur
ff776981fe nixos/version: support UAPI Version Format in IMAGE_VERSION field
Add '~' and '^' to the supported characters for the field. These
characters are needed to be able to define all versions that are
compatible with the UAPI Version Format specification.

One example where this is used is the `%A` flag in systemd.unit. If we
don't allow these other characters, we for example cannot declare a
pre-relase version.

systemd, as far as I can tell, doesn't enforce any restrictions on the
os-release fields.

https://uapi-group.org/specifications/specs/version_format_specification/
2024-05-16 15:37:41 +02:00
emilylange
2872e10333
nixos/manual: apply cfg.warningsAreErrors to nix eval as well
This change makes `baseOptionsJSON` (`lazy-option.json`) take
our existing `documentation.nixos.options.warningsAreErrors` option into
account to then set the `NIX_ABORT_ON_WARN` environment variable within
its build sandbox accordingly.

Given `documentation.nixos.options.warningsAreErrors` default to true,
our nixpkgs CI check that builds the NixOS manual for each PR, will now
fail when something raises a warning, e.g. as part of the `lib.mdDoc`
deprecation.

This should prevent new PRs with lib.mdDoc from getting merged.

Previously, the manual would build successfully, even if an eval warning
was raised.
2024-04-21 18:01:26 +02:00
Valentin Gagarin
e6057cfd59 doc: link to Nixpkgs manual for global configuration options
Co-authored-by: Dominic Mills <dominic.millz27@gmail.com>
2024-04-15 17:00:26 +02:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Philip Taron
58f791c765
nixos/documentation: avoid top-level with ...; in nixos/modules/misc/documentation.nix 2024-04-01 18:29:29 -07:00
aleksana
b60f6b118b nixos/mandoc: add leading slash to manPath 2024-03-20 00:56:18 +01:00
aleksana
da089cf63a nixos/mandoc: fix invalid manpath directory and add cachePath option 2024-03-20 00:56:18 +01:00
Jared Baur
3794246066
nixos/nixpkgs: fix determination for cross-compiled nixos system
Since the output of `lib.systems.elaborate` contains functions, an
equality check with `==` does not suffice, `lib.systems.equals` should
be used instead.
2024-03-01 09:05:08 -08:00
Ryan Lahfa
5337ff6a80
Merge pull request #254405 from lf-/jade/nix-path-flakes
nixos/flake: set up NIX_PATH and system flake registry automatically
2024-02-25 21:08:19 +01:00
Sandro
756e574ebd
Merge pull request #282971 from wegank/restya-board-drop
restya-board: drop
2024-02-10 17:28:05 +01:00
Peter Hoeg
9a113b42b3 nixos/version: add ANSI_COLOR 2024-02-08 00:14:53 +01:00
Weijia Wang
29b534a3d4 restya-board: drop 2024-02-07 01:33:05 +01:00
Jade Lovelace
e456032add nixos/flake: put nixpkgs in NIX_PATH and system registry for flake configs
Currently there are a bunch of really wacky hacks required to get nixpkgs
path correctly set up under flake configs such that `nix run
nixpkgs#hello` and `nix run -f '<nixpkgs>' hello` hit the nixpkgs that
the system was built with. In particular you have to use specialArgs or
an anonymous module, and everyone has to include this hack in their
own configs.

We can do this for users automatically.

I have tested these manually with a basic config; I don't know if it is
even possible to write a nixos test for it since you can't really get a
string-with-context to yourself unless you are in a flake context.
2024-02-03 20:44:38 -08:00
nikstur
066151e0de
Merge pull request #277633 from nikstur/image-repart-improvements
Image repart improvements
2024-01-19 15:25:08 +01:00
nikstur
a34af9a955 image/repart: add version and compression options
The version option is needed if you want to implement partition &
systemd-boot based A/B booting where the version information is encoded
in the files on the ESP. See systemd-sysupate docs for more details on
this:
https://www.freedesktop.org/software/systemd/man/latest/sysupdate.d.html

Note, however, that this is not *only* useful for systemd-sysupdate but
also for other similar updating tools/mechanisms.
2024-01-19 14:43:29 +01:00
nikstur
1e70382b81 nixos/version: add options to identify images
This is useful when building appliance images that use among other
things partition based A/B updates.
2024-01-19 01:16:49 +01:00
pennae
4374f2feda nixos/doc: avoid bash argument list size limit
see #277861. as the module list grows the argument size in the
lazy-options nix call grows, eventually reaching a hard limit and
causing the build to fail. writing the list to a file instead and import
it instead of providing it directly circumvents this.
2023-12-31 18:08:46 +01:00
sternenseemann
4cf470c97c nixos/mandoc: don't create leading double slashes in MANPATH 2023-12-24 18:44:36 +01:00
aleksana
ad235e5072 nixos/mandoc: add man.conf settings option 2023-12-24 18:44:36 +01:00
aleksana
4f3e29f3a3 nixos/mandoc: use MANPATH environment variable 2023-12-24 18:44:36 +01:00
aleksana
ab222895b1 nixos/mandoc: fix paths don't exist failure 2023-12-24 18:44:36 +01:00
Sandro
d011c93f7d
nixos/hound: adopt, rework, cleanup (#268983)
- add me as maintainer
- remove hardcoded user id
- validate syntax of config file
- remove superfluous option extraGroups
- use mkPackageOptionMD
2023-12-05 15:59:26 +01:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Artturin
be6349fdee Revert "23.11 beta release"
This line shouldn't be changed from pre to beta on master, only in the beta branch

https://nixos.github.io/release-wiki/Branch-Off.html#on-the-release-branch

This reverts commit dc7b3febf8.

Revert "nixos/release: fix versionSuffix eval"

This reverts commit 625c450024.
2023-11-22 22:39:48 +02:00
figsoda
dc7b3febf8
23.11 beta release
Signed-off-by: figsoda <figsoda@pm.me>
2023-11-21 14:04:49 -05:00
tu-maurice
40c06a143f prayer: remove 2023-11-10 20:44:28 -03:00
K900
424b0cefa4 nixos/version: rewrite stateVersion documentation
Match the comment in nixos-generate-config and add some more details for the curious.
2023-10-29 15:02:50 +03:00
Alyssa Ross
a3ba049545 nixos/nixpkgs.nix: use less confusing example systems
system and config shouldn't both be specified — each will be filled in
based on the other when the system is elaborated.
2023-10-25 08:33:14 +00:00
Bjørn Forsman
8a8ec36615 Revert "ddclient: remove package and module on upstream maintainer request"
This reverts commit d35df28f65.

Upstream ddclient has new maintainers and made a new release (update in
next commit(s)).
2023-10-20 23:49:18 +02:00
Bjørn Forsman
142074c2a8 nixos: fix bad mkEnableOption descriptions
Fix descriptions that don't account for (1) the "Whether to enable"
prefix or (2) the automatically added trailing dot.
2023-10-20 16:22:40 +01:00
Bob van der Linden
423c86a70b
nixos/locate: rename option locate -> package 2023-10-08 10:09:12 +02:00
Sandro Jäckel
b53f817088
nixos/locate: cleanup optional parenthesis 2023-10-03 00:19:57 +02:00
K900
524181b5b8 nixos/locate: rip out dbfile overrides
All the locate versions we have support LOCATE_PATH, so just use that
instead of adding indirections all over the place AND forcing people
to rebuild their locate implementation if they want the path changed.
2023-10-02 15:10:22 +03:00
K900
eb8ce7930d
Merge pull request #257458 from K900/die-nixpkgs-config-die
treewide: fail when `nixpkgs.config` is set with explicit `pkgs`, remove all `nixpkgs.config` usages in in-tree modules
2023-10-01 10:11:15 +03:00
Silvan Mosberger
11406bdc0e nixos/nixpkgs: Rewrite overlays option docs
henrik-ch was also here :)

Co-Authored-By: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-09-28 16:27:33 +02:00
K900
38461ff27a nixos/locate: remove nixpkgs.config usage 2023-09-26 18:02:00 +03:00
K900
ce87196a00 nixos/nixpkgs: assert that nixpkgs.config is not set when pkgs is passed in externally
This is a common footgun people hit often. Remove it.
2023-09-26 18:02:00 +03:00
Doron Behar
924a07dc22 nixos/doc: Improve documentation of documentation
- Move contents of README.md from
  nixos/modules/installer/tools/manpages/ to
  nixos/doc/manual/contributing-to-this-manual.chapter.md.
- Don't mention DocBook as its obsolete and too specific.
- Rename derivation attribute name of configuration.nix(5) manual page,
  both on the `contributing-to-this-manual.chapter.md`, and in other
  places.
2023-08-12 22:28:04 +03:00
Doron Behar
32f75a0f2a nixos/install-tools: Add manpages to packages instead of seperating them
Since each such `nixos-*` tool has it's own derivation, exposed in pkgs,
There is no point in separating the manuals from the packages. If
someone wishes to have the tools without the manuals, they can use
meta.outputsToInstall to disable the installation of the manpages of
these packages. This Fixes #244450.
2023-08-12 18:01:06 +03:00
Ryan Lahfa
0d2f526dbb
Merge pull request #241462 from SuperSandro2000/remove-ddclient 2023-07-08 14:33:00 +02:00
Robert Hensing
5c0c96a828 nixos/config/nix-channel: Factor out root channel initialization 2023-07-05 14:54:29 +02:00
Sandro Jäckel
d35df28f65
ddclient: remove package and module on upstream maintainer request 2023-07-04 16:46:53 +02:00
Will Fancher
b154feadb9
Merge pull request #237823 from lilyinstarlight/fix/systemd-initrd-no-rev
nixos/version: remove nixpkgs commit rev from initrd
2023-06-24 20:25:32 -04:00
Robert Hensing
b1ad9cd27d
Merge pull request #238136 from hercules-ci/nixos-nixpkgs-dont-check-when-_module.args.pkgs-is-set
`nixos/nixpkgs`: Don't check when `_module.args.pkgs` is set
2023-06-23 19:17:36 +02:00
Robert Hensing
8f31bff794 nixos/nixpkgs: Don't check when _module.args.pkgs is set 2023-06-16 22:08:16 +02:00
Robert Hensing
a742767baf nixos/nixpkgs: Make default Nixpkgs lazy when overridden 2023-06-16 21:46:26 +02:00