Robert Hensing
9edad17d29
nixos/top-level: Remove unused builder variables
...
These variables were previously used by the activation script
build commands, but are now embedded into those commands for
to improve reusability for an upcoming addition.
2023-06-28 12:49:34 +02:00
Robert Hensing
7891c8cdaf
nixos/activatable-system: Move legacy variables to top-level
2023-06-28 12:48:59 +02:00
Robert Hensing
990b72f6af
nixos/activatable-system: Make system builder commands env independent
...
This way it will be easier to reuse in a different context, such as
a separate build of the activation script by itself (TBD).
2023-06-28 12:42:51 +02:00
Robert Hensing
193f4fea90
nixos/activatable-system: Make substitutions explicit
...
This helps with understanding the code.
We might make this not depend on environment variables later.
systemBuilderArgs is a form of global state, which isn't helpful.
2023-06-10 19:15:00 +02:00
Robert Hensing
a16986f1a3
nixos: Move installBootLoader to activation script modules
2023-06-10 19:15:00 +02:00
Robert Hensing
61d43dee5f
nixos: Extract module for activation script inclusion into toplevel
...
Allows omission of this functionality through disabledModules, e.g.
for image building.
2023-06-10 19:15:00 +02:00
Victor Engmark
8deaa732a8
refactor: Split mkdir -m …
into mkdir
+ chmod
...
As recommended by ShellCheck
<https://www.shellcheck.net/wiki/SC2174 >.
2023-06-08 15:55:40 +12:00
Bjørn Forsman
ef85c3fe51
nixos: use passAsFile to avoid "Argument list too long" error
...
This patch fixes "Argument list too long" build failure when passing a
list of store paths to system.extraDependencies that exceeds Linux'
MAX_ARG_STRLEN limit of 128 KiB. With the shortest possible derivation
names (one byte), the 128 KiB limit is equivalent to about 2850
derivations. With longer derivations names, the limit is hit earlier.
Fix this restriction.
2023-05-19 22:31:31 +02:00
Robert Hensing
5bdf63819b
nixos/top-level.nix: Add system.checks
...
Note that this does not add to the `forbiddenDependenciesRegex`
code because that code check should be unaffected as it only checks
output dependencies, not build dependencies.
Build deps are added after that check, if those are enabled in the
first place.
2023-05-11 21:18:38 +02:00
Jared Baur
67561dcc59
nixos/bootspec: Fix cross for nixos-system systemBuilder
...
When `nixpkgs.hostPlatform` != `nixpkgs.buildPlatform`, building the
top-level attribute fails since the bootspec portion of the system
builder tries to reference the host platform's `jq`. Change this to
reference the build platform's `jq`.
2023-05-04 20:09:16 -07:00
Raito Bezarius
bc502d0a14
nixos/bootspec: adopt the merged RFC-0125
...
This removes the feature preview warning, enable by default bootspec,
adds a validation flag to prevent Go to go into build-time closure.
This will break all downstream users of bootspec as those changes are
not backward-compatible.
2023-04-28 18:26:11 -07:00
K900
48b2f723f5
nixos/system: disallow system.copySystemConfiguration in pure eval mode
...
This is already broken, so let's give it a better error message.
2023-03-29 17:49:30 +03:00
Linus Heckemann
eb45cd5108
nixos/top-level: add includeBuildDependencies option
...
This option allows adding the build closure of the system to its
runtime closure, enabling fully-offline rebuilds (as long as no new
packages are added).
2023-03-14 11:55:13 +01:00
Victor Fuentes
d3528cdc3d
nixos/version: add config.system.nixos.distroName and config.system.nixos.distroId
2023-01-14 16:19:06 -05:00
Ryan Lahfa
e2e8dfcf44
Merge pull request #207163 from NixOS/rfc0125-improvements
...
nixos/activation/bootspec: make initrd optional, serialize system, precise extensions' type
2022-12-23 00:43:29 +01:00
Cole Helbling
21f4afd799
nixos/activation/bootspec: fix document output path
...
The RFC currently stipulates the document will be available at
`$out/boot.json`.
2022-12-22 07:56:09 -08:00
Raito Bezarius
5dd2e60371
nixos/activation/bootspec: make initrd optional, serialize system, precise extensions' type
2022-12-21 23:28:21 +01:00
Jörg Thalheim
668a2b2f33
Merge pull request #172237 from DeterminateSystems/bootspec-rfc
...
Support external bootloader backends (RFC-0125)
2022-12-17 08:35:53 +00:00
Cole Helbling
5af481f67f
nixos/activation/bootspec: fixup improper $out substitution
2022-12-08 13:50:05 -08:00
Cole Helbling
dce9add02b
nixos/activation/bootspec: refactor the generator script
...
We separate the different steps (injecting the toplevel and injecting
the specialisations) so that it's easy to document what each snippet is
actually doing.
2022-12-08 13:50:05 -08:00
Cole Helbling
38e5089814
nixos/activation/bootspec: drop problematic comment, only generate bootspec when bootspec is enabled
2022-12-08 13:50:05 -08:00
Cole Helbling
97f657c742
nixos/activation/bootspec: DocBook -> Markdown, add description for extensions field
2022-12-08 13:50:05 -08:00
Raito Bezarius
680369e504
nixos/activation/bootspec: add some comments to explain the delicate manipulations
2022-12-08 13:50:05 -08:00
Raito Bezarius
11dfbee0a4
nixos/activation/bootspec: add bootspec chapter in NixOS manual
2022-12-08 13:50:05 -08:00
Raito Bezarius
9832e3e9b9
nixos/activation/bootspec: remove SB extension example in Cue schema
2022-12-08 13:50:04 -08:00
Raito Bezarius
348ba1b33c
nixos/activation/bootspec: module-ify
...
This does the following:
* turns bootspec into a NixOS module
* validates bootspecs with Cue
* exposes internal knobs
2022-12-08 13:50:04 -08:00
Raito Bezarius
ee27291b34
nixos/activation/bootspec: fix slurping specialisation bootspecs
2022-12-08 13:50:04 -08:00
K900
e69c37eae9
nixos/activation: don't generate bootspec for containers
2022-12-08 13:50:04 -08:00
Graham Christensen
e9c85d6d0f
nixos/activation/bootspec: embed the document into a bootspec subdir
2022-12-08 13:50:04 -08:00
Graham Christensen
6c0e4e892f
nixos/activation/bootspec: embed the entire contents of specialisation's bootspecs into the parent
...
See: https://github.com/NixOS/rfcs/pull/125#discussion_r871222614
2022-12-08 13:50:04 -08:00
Cole Helbling
942dcd238b
nixos/activation/bootspec: init bootspec support (RFC-0125)
2022-12-08 13:50:03 -08:00
Artturin
a34d7b67fd
nixos/top-level.nix: add forbiddenDependenciesRegex option
...
useful for making sure that there's no dev outputs in the system
2022-12-02 21:15:24 +02:00
Sandro
9477fa1e44
Merge pull request #197917 from SuperSandro2000/kernel-enable
2022-11-12 21:12:56 +01:00
Sandro Jäckel
182575a60d
nixos/kernel: replace boot.isContainer with boot.kernel.enable
2022-11-09 23:45:33 +01:00
Robert Hensing
9299483604
nixos/top-level.nix: Move configurationName to grub.nix
...
The configuration-name file is grub specific, so it should not be
in top-level.nix.
2022-11-05 00:25:46 +01:00
Robert Hensing
37fa46a224
nixos/top-level.nix: Remove workaround for #156533
2022-11-05 00:25:46 +01:00
Robert Hensing
0b05ed2c78
nixos/specialisation.nix: Extract module
2022-11-05 00:25:46 +01:00
Robert Hensing
d3ac0938a7
nixos/top-level.nix: Make extensible
...
(cherry picked from commit 4ec415cff9
)
2022-11-05 00:05:26 +01:00
pennae
1d41cff3dc
nixos/*: convert straggler options to MD
2022-08-31 17:27:38 +02:00
pennae
f2ea09ecbe
nixos/*: convert options with listings
...
minor rendering changes.
2022-08-31 17:27:36 +02:00
pennae
bd56368848
nixos/*: md-convert hidden plaintext options
...
most of these are hidden because they're either part of a submodule that
doesn't have its type rendered (eg because the submodule type is used in
an either type) or because they are explicitly hidden. some of them are
merely hidden from nix-doc-munge by how their option is put together.
2022-08-31 16:32:54 +02:00
pennae
9547123258
nixos/*: convert internal option descriptions to MD
...
we'll have to do it eventually, may as well be now.
2022-08-31 16:32:54 +02:00
pennae
0cfcb5908c
nixos/*: <screen> -> <programlisting>
...
most of the screen tags used in option docs are actually listings of
some sort. nsd had a notable exception where its screen usage was pretty
much a raw markdown block that made most sense to convert into docbook lists.
2022-08-31 16:27:24 +02:00
pennae
51a11254a7
nixos/*: literalDocBook -> literalMD
...
no change to rendered output
2022-08-27 19:18:29 +02:00
Stig
8c4a3b279b
Merge pull request #186503 from Weathercold/patch-1
...
nixos/switch-to-configuration: fix units starting with dash not being able to reload
2022-08-21 17:31:52 +02:00
pennae
e4ed177f82
nixos/* eliminate inner whitespace in tags that was missed earlier
...
nix-doc-munge won't match tags that contain newlines anywhere. most of
these have already been removed, but a few obviously made it through.
2022-08-19 22:40:58 +02:00
Weathercold
8fb63401af
nixos/switch-to-configuration: fix units starting with dash
...
Fix units starting with `-` being recognized as options.
2022-08-12 18:36:15 -04:00
pennae
50f9b3107a
Merge pull request #185474 from pennae/option-docs-md
...
nixos/*: more options md conversion
2022-08-12 23:23:26 +02:00
Janne Heß
1120326a5b
Merge pull request #185067 from stigtsp/refactor/stc-no-net-debus
...
nixos/switch-to-configuration: replace Net::DBus with busctl
2022-08-09 20:28:49 +02:00
pennae
087472b1e5
nixos/*: automatically convert option docs
2022-08-06 20:39:12 +02:00