Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f4f301d
nixos/auto-upgrade: introduce the concept of desync, for often-failin…
Ekleog Feb 26, 2025
4e2110f
nixos/auto-upgrade: run nixfmt
Ekleog Feb 26, 2025
9a9eb01
handle review comments
Ekleog Feb 26, 2025
d027c02
nixfmt
Ekleog Feb 26, 2025
463f768
review comments
Ekleog Feb 28, 2025
f1da502
use a declarative container for the example
Ekleog Mar 14, 2025
212e6e3
also document the dangers of mix-and-matching packages
Ekleog Mar 14, 2025
84d0d26
fix typo
Ekleog Mar 26, 2025
6497445
symlink instead of copying out of the store, to keep the gc root aliv…
Ekleog Apr 3, 2025
9a18d01
avoid remembering /nix/var/nix if a desync literally never built fine
Ekleog Apr 3, 2025
56a8a15
Merge remote-tracking branch 'upstream/master' into desync
Ekleog Apr 3, 2025
0a3db5d
write release notes
Ekleog Apr 3, 2025
d92a223
review comments
Ekleog May 24, 2025
b625e4b
Merge remote-tracking branch 'upstream/master' into desync
Ekleog May 24, 2025
ec02d51
fix manual build
Ekleog May 24, 2025
7d1a2bf
nixfmt
Ekleog May 24, 2025
b241bd1
remove example tag
Ekleog May 24, 2025
3b2ae02
no double-escape
Ekleog May 25, 2025
ddf7ee3
add links to docs
Ekleog May 25, 2025
c6fcd89
fix release notes
Ekleog May 25, 2025
dd416fe
use pkgs.path
Ekleog May 25, 2025
e72f51d
fix mistake in merge resolution
Ekleog May 25, 2025
f36e70d
fix manual build
Ekleog May 25, 2025
e5d35ef
third attempt at proper manual building, if manual took less time to …
Ekleog May 25, 2025
f425694
unlink a non-option to fix manual build
Ekleog May 25, 2025
8ecffc1
hopefully fix ci
Ekleog May 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/types.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,15 @@ let
nestedTypes.elemType = elemType;
};

extensionFunction = lib.mkOptionType {
name = "extensionFunction";
description = "extension function";
check = lib.isFunction;
# A more capable function is possible, see
# https://github.com/NixOS/nixpkgs/issues/215486
merge = lib.mergeOneOption;
};

Comment on lines +1085 to +1093
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Factoring this out should be its own commit. This is one of the reasons the commit history needs to be cleaned up and not just squashed.

Copy link
Member Author

@Ekleog Ekleog May 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I answered that in my answer to your first comment too. Same as the options linking, if this is the only thing blocking merging I'll do it; but considering the fact that last time I finished "fixing the only thing that blocked merging" I'll wait for a signal that this can land before making further efforts on the code part. For example if the thumbs up go up in the first post, or if people who previously voiced negative opinions voice positive opinions.

# A submodule (like typed attribute set). See NixOS manual.
submodule =
modules:
Expand Down
5 changes: 5 additions & 0 deletions nixos/doc/manual/development/option-types.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ merging is handled.

: A type for the top level Nixpkgs package set.

`types.extensionFunction`

: An extension function (e.g. `final: prev: { }`). Typically used to overlay
the Nixpkgs package set or other "extensible" attrsets.

### Numeric types {#sec-option-types-numeric}

`types.int`
Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2511.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

- A `desync` option has been added to the `system.autoUpgrade` module, which allows upgrading the system's channels even when not all installed packages can be built. This works by continuing to track the problematic channel's previous revision, which is used for packages that are broken on the newer revision. Having multiple revisions of a channel can potentially lead to other issues, however many of these can be avoided by using declarative containers. See [`system.autoUpgrade.desync`](options.html#opt-system.autoUpgrade.desync) for more details.

- Secure boot support can now be enabled for the Limine bootloader through {option}`boot.loader.limine.secureBoot.enable`. Bootloader install script signs the bootloader, then kernels are hashed during system rebuild and written to a config. This allows Limine to boot only the kernels installed through NixOS system.

## New Modules {#sec-release-25.11-new-modules}
Expand Down
9 changes: 1 addition & 8 deletions nixos/modules/misc/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ let
merge = args: lib.foldr (def: mergeConfig def.value) { };
};

overlayType = lib.mkOptionType {
name = "nixpkgs-overlay";
description = "nixpkgs overlay";
check = lib.isFunction;
merge = lib.mergeOneOption;
};

pkgsType = lib.types.pkgs // {
# This type is only used by itself, so let's elaborate the description a bit
# for the purpose of documentation.
Expand Down Expand Up @@ -183,7 +176,7 @@ in
})
]
'';
type = lib.types.listOf overlayType;
type = lib.types.listOf lib.types.extensionFunction;
description = ''
List of overlays to apply to Nixpkgs.
This option allows modifying the Nixpkgs package set accessed through the `pkgs` module argument.
Expand Down
Loading