1 { config, options, lib, ... }:
3 path = [ "deployment" "autoLuks" ];
4 hasAutoLuksConfig = lib.hasAttrByPath path config && (lib.attrByPath path {} config) != {};
6 inherit (config.nixops) enableDeprecatedAutoLuks;
8 options.nixops.enableDeprecatedAutoLuks = lib.mkEnableOption "the deprecated NixOps AutoLuks module";
13 assertion = if hasAutoLuksConfig then hasAutoLuksConfig && enableDeprecatedAutoLuks else true;
17 NixOps autoLuks is deprecated. The feature was never widely used and the maintenance did outgrow the benefit.
18 If you still want to use the module:
19 a) Please raise your voice in the issue tracking usage of the module:
20 https://github.com/NixOS/nixpkgs/issues/62211
21 b) make sure you set the `_netdev` option for each of the file
22 systems referring to block devices provided by the autoLuks module.
24 ⚠️ If you do not set the option your system will not boot anymore! ⚠️
27 fileSystems."/secret" = { options = [ "_netdev" ]; };
30 b) set the option >nixops.enableDeprecatedAutoLuks = true< to remove this error.
33 For more details read through the following resources:
34 - https://github.com/NixOS/nixops/pull/1156
35 - https://github.com/NixOS/nixpkgs/issues/47550
36 - https://github.com/NixOS/nixpkgs/issues/62211
37 - https://github.com/NixOS/nixpkgs/pull/61321