Skip to content

Commit

Permalink
Add warnings for future deprecation of nixos options related to packa…
Browse files Browse the repository at this point in the history
…ging
  • Loading branch information
jmbaur committed Dec 14, 2024
1 parent 53c37d2 commit 3ebff61
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions modules/flash-script.nix
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,63 @@ in
};

config = lib.mkIf cfg.enable {
warnings = lib.optionals options.hardware.nvidia-jetpack.firmware.uefi.edk2NvidiaPatches.isDefined [
''
The option `hardware.nvidia-jetpack.firmware.uefi.edk2NvidiaPatches`
will be deprecated soon. Please migrate to using the `nixpkgs.overlays`
option to define an overlay that modifies the
`pkgs.nvidia-jetpack.edk2NvidiaSrc` derivation. For example, see
<jetpack-nixos/overlay-with-config.nix>.
''
]
++ lib.optionals options.hardware.nvidia-jetpack.firmware.uefi.edk2UefiPatches.isDefined [
''
The option `hardware.nvidia-jetpack.firmware.uefi.edk2UefiPatches` will
be deprecated soon. Please migrate to using the `nixpkgs.overlays`
option to define an overlay that modifies the
`pkgs.nvidia-jetpack.jetsonEdk2Uefi` derivation. For example, see
<jetpack-nixos/overlay-with-config.nix>.
''
]
++ lib.optionals options.hardware.nvidia-jetpack.flashScriptOverrides.patches.isDefined [
''
The option `hardware.nvidia-jetpack.flashScriptOverrides.patches` will
be deprecated soon. Please migrate to using the `nixpkgs.overlays`
option to define an overlay that modifies the
`pkgs.nvidia-jetpack.flash-tools` derivation. For example, see
<jetpack-nixos/overlay-with-config.nix>.
''
]
++ lib.optionals options.hardware.nvidia-jetpack.flashScriptOverrides.postPatch.isDefined [
''
The option `hardware.nvidia-jetpack.flashScriptOverrides.postPatch`
will be deprecated soon. Please migrate to using the `nixpkgs.overlays`
option to define an overlay that modifies the
`pkgs.nvidia-jetpack.flash-tools` derivation. For example, see
<jetpack-nixos/overlay-with-config.nix>.
''
]
++ lib.optionals options.hardware.nvidia-jetpack.firmware.optee.patches.isDefined [
''
The option `hardware.nvidia-jetpack.firmware.optee.patches` will be
deprecated soon. Please migrate to using the `nixpkgs.overlays` option
to define an overlay that modifies the `pkgs.nvidia-jetpack.opteeOS`
and/or `pkgs.nvidia-jetpack.opteeTaDevKit` derivations. For example,
see <jetpack-nixos/overlay-with-config.nix>.
''
]
++ lib.optionals options.hardware.nvidia-jetpack.firmware.optee.extraMakeFlags.isDefined [
''
The option `hardware.nvidia-jetpack.firmware.optee.extraMakeFlags` will
be deprecated soon. Please migrate to using the `nixpkgs.overlays`
option to define an overlay that modifies the
`pkgs.nvidia-jetpack.opteeOS` and/or
`pkgs.nvidia-jetpack.opteeTaDevKit` derivations. For example, see
<jetpack-nixos/overlay-with-config.nix>.
''
]
;

hardware.nvidia-jetpack.flashScript = lib.warn "hardware.nvidia-jetpack.flashScript is deprecated, use config.system.build.flashScript" config.system.build.flashScript;
hardware.nvidia-jetpack.devicePkgs = (lib.mapAttrs (_: lib.warn "hardware.nvidia-jetpack.devicePkgs is deprecated, use pkgs.nvidia-jetpack") pkgs.nvidia-jetpack);

Expand Down

0 comments on commit 3ebff61

Please sign in to comment.