1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

news: create an individual file for each news entry (#6747)

The current way to define a news entry in Home-Manager is error prone
(since you need to type the date manually) and also it is common cause
of conflicts after merges because all entries are defined in the same
file.

This commit fixes this: we can now create individual news entries for
each new entry. A script `create-news-entry.sh` also helps to create it
in the correct format (with the correct filenames and structure).
This commit is contained in:
Thiago Kenji Okada 2025-04-05 17:13:59 +01:00 committed by GitHub
parent b5e2956513
commit d094c6763c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 53 additions and 16 deletions

View file

@ -10,14 +10,17 @@ If you do have a change worthy of a news entry then please add one in
[`news.nix`](https://github.com/nix-community/home-manager/blob/master/modules/misc/news.nix)
but you should follow some basic guidelines:
- The entry timestamp should be in ISO-8601 format having \"+00:00\"
as time zone. For example, \"2017-09-13T17:10:14+00:00\". A suitable
timestamp can be produced by the command
- Use the included
[`create-news-entry.sh`](https://github.com/nix-community/home-manager/blob/master/modules/misc/news/create-news-entry.sh)
script to generate a news entry file:
``` shell
$ date --iso-8601=second --universal
$ modules/misc/news/create-news-entry.sh
```
this will create a new file inside `modules/misc/news` directory
with some placeholder information that you can edit.
- The entry condition should be as specific as possible. For example,
if you are changing or deprecating a specific option then you could
restrict the news to those users who actually use this option.