Merge pull request #253973 from trofi/bcache-make-optional

This commit is contained in:
Artturi 2023-09-11 08:10:19 +03:00 committed by GitHub
commit 4c22001bbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -265,6 +265,8 @@ The module update takes care of the new config syntax and the data itself (user
- Certificate generation via the `security.acme` now limits the concurrent number of running certificate renewals and generation jobs, to avoid spiking resource usage when processing many certificates at once. The limit defaults to *5* and can be adjusted via `maxConcurrentRenewals`. Setting it to *0* disables the limits altogether. - Certificate generation via the `security.acme` now limits the concurrent number of running certificate renewals and generation jobs, to avoid spiking resource usage when processing many certificates at once. The limit defaults to *5* and can be adjusted via `maxConcurrentRenewals`. Setting it to *0* disables the limits altogether.
- New `boot.bcache.enable` (default enabled) allows completely removing `bcache` mount support.
## Nixpkgs internals {#sec-release-23.11-nixpkgs-internals} ## Nixpkgs internals {#sec-release-23.11-nixpkgs-internals}
- The use of `sourceRoot = "source";`, `sourceRoot = "source/subdir";`, and similar lines in package derivations using the default `unpackPhase` is deprecated as it requires `unpackPhase` to always produce a directory named "source". Use `sourceRoot = src.name`, `sourceRoot = "${src.name}/subdir";`, or `setSourceRoot = "sourceRoot=$(echo */subdir)";` or similar instead. - The use of `sourceRoot = "source";`, `sourceRoot = "source/subdir";`, and similar lines in package derivations using the default `unpackPhase` is deprecated as it requires `unpackPhase` to always produce a directory named "source". Use `sourceRoot = src.name`, `sourceRoot = "${src.name}/subdir";`, or `setSourceRoot = "sourceRoot=$(echo */subdir)";` or similar instead.

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }: let
cfg = config.boot.bcache;
{ in {
options.boot.bcache.enable = lib.mkEnableOption (lib.mdDoc "bcache mount support") // {
default = true;
example = false;
};
options.boot.initrd.services.bcache.enable = lib.mkEnableOption (lib.mdDoc "bcache support in the initrd") // { options.boot.initrd.services.bcache.enable = lib.mkEnableOption (lib.mdDoc "bcache support in the initrd") // {
description = lib.mdDoc '' description = lib.mdDoc ''
*This will only be used when systemd is used in stage 1.* *This will only be used when systemd is used in stage 1.*
@ -9,7 +13,7 @@
''; '';
}; };
config = { config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.bcache-tools ]; environment.systemPackages = [ pkgs.bcache-tools ];