Commit Graph

94 Commits

Author SHA1 Message Date
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
Peter Hoeg
9a113b42b3 nixos/version: add ANSI_COLOR 2024-02-08 00:14:53 +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
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
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
Robert Hensing
5c0c96a828 nixos/config/nix-channel: Factor out root channel initialization 2023-07-05 14:54:29 +02:00
Lily Foster
b5cc73db7d
nixos/version: remove nixpkgs commit rev from initrd
This avoids unnecessary initrd rebuilds when nothing in the initrd would
have changed aside from the nixpkgs revision.
2023-06-14 16:57:34 -04:00
figsoda
701bcdbead nixos: fix typos 2023-05-19 22:31:04 -04:00
Jason Yundt
b1bb9bb6c8 treewide: fix backwards smart apostrophes
According to the Unicode Standard, you should use U+2019 RIGHT SINGLE
QUOTATION MARK for apostrophes [1]. Before this change, some of the text
in this repo would use U+2018 LEFT SINGLE QUOTATION MARKs instead.

[1]: https://www.unicode.org/versions/Unicode15.0.0/ch06.pdf#G12411
2023-02-06 07:24:42 -05:00
Victor Fuentes
d3528cdc3d
nixos/version: add config.system.nixos.distroName and config.system.nixos.distroId 2023-01-14 16:19:06 -05:00
lassulus
5464e0a018 nixos/misc: add VARIANT_ID in /etc/os-release for identifying nixos installer
This is a feature useful for nixos-remote and other installation tools
that try to identify if the remote machine has been successfully booted
into an installer.
2023-01-04 19:11:41 +01:00
Robert Hensing
f03c7fb8d4 nixos/version: Only warn about unset stateVersion if used
If a configuration does not use services that depend on the
stateVersion, it does not need to be set.

This provides an incentive for services not to rely on
stateVersion, and not to burden users with this.
2022-12-28 14:35:14 +01:00
Robert Hensing
661c29c806
Merge pull request #181222 from hercules-ci/module-specialArgs
`_module.specialArgs` + unit test for nixos/documentation module
2022-08-08 11:53:10 +02:00
pennae
4f91838584 nixos/misc: invariant option docs MD conversions 2022-07-24 13:01:18 +02:00
Robert Hensing
ec3e1c6a3a nixos/documentation: Remove systemd/initrd dependency
Working towards a unit-testable documentation module.
2022-07-21 15:32:10 +02:00
Robert Hensing
08e6f45747 nixos: Declare module dependencies
Working towards a unit-testable documentation module.
2022-07-21 15:32:10 +02:00
Matthew Toohey
e41c423b01 nixos/version: add trailing newline to os-release 2022-05-25 20:25:27 -04:00
Janne Heß
e2703d2697
nixos/version: Warn about using the default of system.stateVersion 2022-05-05 12:22:31 +02:00
Janne Heß
7cdc4dd5d1
Merge pull request #164943 from ElvishJerricco/systemd-initrd-reuse-systemd-module
initrd: Opt-in bare bones systemd-based initrd
2022-04-03 15:53:02 +02:00
Janne Heß
7ebb4ebe40
nixos/systemd-stage-1: Append (Initrd) to /etc/initrd-release
This is more in line with what dracut does (it appends "Initramfs") and
makes it clear where the boot is currently at when it hangs.
2022-04-01 13:54:09 +02:00
Vladimir Serov
0c68e23f52
nixos/modules/version: remove unnecessary quoting
(In cases it is unnecessary)
2022-03-15 14:17:59 +03:00
Peter Hoeg
bae181d3f0 nixos/os-release: generate from attrset 2022-03-04 09:36:40 +08:00
pennae
fc614c37c6 nixos/documentation: split options doc build
most modules can be evaluated for their documentation in a very
restricted environment that doesn't include all of nixpkgs. this
evaluation can then be cached and reused for subsequent builds, merging
only documentation that has changed into the cached set. since nixos
ships with a large number of modules of which only a few are used in any
given config this can save evaluation a huge percentage of nixos
options available in any given config.

in tests of this caching, despite having to copy most of nixos/, saves
about 80% of the time needed to build the system manual, or about two
second on the machine used for testing. build time for a full system
config shrank from 9.4s to 7.4s, while turning documentation off
entirely shortened the build to 7.1s.
2022-01-02 19:46:13 +01:00
pennae
e24a8775a8 treewide: set defaultText for options using simple path defaults
adds defaultText for all options that set their default to a path expression
using the ubiquitous `cfg` shortcut bindings.
2021-12-09 01:12:13 +01:00
Pavol Rusnak
d2e468a571
nixos/version: make versions in /etc/os-release less verbose
Fixes #127654; also see details in there.
2021-07-29 17:26:31 +02:00
davidak
6a7e0562de
Update link in /etc/os-release (#85723) 2020-04-22 00:16:22 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Eelco Dolstra
f0f040c3f7 nixos/modules/misc/version.nix: Don't parse .git
This leads to inconsistent results between local builds and
Hydra. Also Nix is not a general purpose language, we shouldn't be
parsing .git from inside Nix code.
2020-02-15 20:16:14 +01:00
Eelco Dolstra
c05cc615f2 nixos.revision: Use null instead of "master"
"master" is not a valid SHA-1 commit hash, and it's not even
necessarily the branch used. 'nixos-version --revision' now returns an
error if the commit hash is not known.
2020-02-10 15:45:15 +01:00
Eelco Dolstra
855fcc324a Add option system.configurationRevision to record revision of top-level flake 2020-02-05 23:15:18 +01:00
Franz Pletz
46773a15b3
nixos/version: fix case where .git is a symlink
Before c9214c394b and
9d396d2e42 if .git is symlink the version
would gracefully default to no git revision. With those changes an
exception is thrown instead.

This introduces a new function `pathIsGitRepo` that checks if
`commitIdFromGitRepo` fails without error so we don't have to
reimplement this logic again and can fail gracefully.
2020-01-20 00:53:44 +01:00
elseym
c9214c394b
lib.commitIdFromGitRepo: support git-worktree
lib.commitIdFromGitRepo now resolves the refs from the
parent repository in case the supplied path is a file
containing the path to said repository. this adds support
for git-worktree and things alike. see gitrepository-layout(5).

this also:
- adds a new boolean function lib.pathIsRegularFile to
  check whether a path is a regular file
- patches lib.revisionWithDefault and
  the revision and versionSuffix attributes in
  config.system.nixos in order to support git-worktrees
2020-01-10 22:29:48 +01:00
Malte Brandy
c1d7850f85
Improve documentation for stateVersion
The meaning of stateVersion often leads to a lot of confusion. This
commit trys to improve that situation.
2020-01-07 22:27:03 +01:00
Silvan Mosberger
4ee3e8b21d
nixos/treewide: Move rename.nix imports to their respective modules
A centralized list for these renames is not good because:
- It breaks disabledModules for modules that have a rename defined
- Adding/removing renames for a module means having to find them in the
central file
- Merge conflicts due to multiple people editing the central file
2019-12-10 02:51:19 +01:00
davidak
0ba3761ba8 nixos/version: PRETTY_NAME in /etc/os-release uses the release now instead of full version
to be more suitable for presentation to the user
2019-12-02 20:04:44 +01:00
volth
35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Jörg Thalheim
2a0f85d882
nixos/os-release: add documentation url 2019-06-03 15:05:10 +02:00
Jan Malakhovski
234ba7446c nixos: version: cleanup a bit 2019-02-03 20:10:12 +00:00
worldofpeace
21327795ce nixos/version: add LOGO to /etc/os-release 2019-01-05 00:03:39 -05:00
zimbatm
2a838cb6d7
group the release info
this makes the codename globally accessible in the repo. The release is
not only for NixOS anymore.
2018-11-15 21:56:17 +01:00
Eelco Dolstra
b6bac6c144
Revert "Merge pull request #48122 from zimbatm/pkg-nixos-rebuild"
This reverts commit 10addad603, reversing
changes made to 7786575c6c.

NixOS scripts should be kept in the NixOS source tree, not in
pkgs. Moving them around is just confusing and creates unnecessary
code/history churn.
2018-10-16 20:25:44 +02:00
zimbatm
b7a07313cc
move the codeName to /.codeName
Make the codeName globally accessible in the repo. The release is not
only for NixOS anymore.
2018-10-16 11:11:28 +02:00
Graham Christensen
4312cfdbda
version.nix: extract revision-fetching function 2018-10-05 11:06:28 -04:00
Samuel Dionne-Riel
e144899b74 release-notes: Adds 19.03 — Koi 2018-09-02 17:47:24 -04:00
Eelco Dolstra
4d1332e507
nixos/modules/misc/version.nix: Don't spam the user with vague warnings 2018-08-10 21:39:36 +02:00
Tuomas Tynkkynen
96190535e5 Revert "nixos: rename system.{stateVersion,defaultChannel} -> system.nixos.\1"
This reverts commit 095fe5b43d.

Pointless renames considered harmful. All they do is force people to
spend extra work updating their configs for no benefit, and hindering
the ability to switch between unstable and stable versions of NixOS.

Like, what was the value of having the "nixos." there? I mean, by
definition anything in a NixOS module has something to do with NixOS...
2018-07-28 00:12:55 +03:00
Jan Malakhovski
1f0b6922d3 nixos: version: produce a warning when no system.nixos.stateVersion is explicitly set 2018-05-12 19:27:10 +00:00