From 87d3381c789dca7d87c99ebf009307c8ac8666e1 Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Fri, 10 Nov 2023 16:10:54 -0500 Subject: [PATCH] Add assertion for default framework import --- framework/OLD-BEHAVIOUR-DEPRECATION.md | 34 ++++++++++++++++++++++++++ framework/default.nix | 9 ++++--- 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 framework/OLD-BEHAVIOUR-DEPRECATION.md diff --git a/framework/OLD-BEHAVIOUR-DEPRECATION.md b/framework/OLD-BEHAVIOUR-DEPRECATION.md new file mode 100644 index 0000000..4f8f4a1 --- /dev/null +++ b/framework/OLD-BEHAVIOUR-DEPRECATION.md @@ -0,0 +1,34 @@ +# Changes to the framework top-level + +## Overview + +When the framework profile was created, there weren't other models of laptop available by the +company. Now there are multiple generations of the Framework 13, and the Framework 16 shipping by +the end of 2023. + +## How to update + +By preference, there will already be a specialised module for your model's configuration. + +If not and you have a 13-inch model, the common module under `framework/13-inch/common/default.nix` +can be imported directly, and the options provided can be used in your own system's configuration. + +Alternatively, you can create a new specialisation for your model under `framework` configured for +that model. + +## Changes + +### 13-inch profile + +All of the existing modules have been reconfigured to be under the `framework/13-inch` folder. + +The 12th and 13th gen Intel Framework 13's had their own specialisation modules separately available +already. To mirror those modules, the 11th gen Intel Framework 13 configuration has been moved to +`framework/13-inch/11th-gen-intel/default.nix`. + +### "Common" modules + +Tools / services that are shared among several models are now extracted to their own module under +`13-inch/common/` and imported by `13-inch/common/default.nix`. There were several tweaks for +11th gen/12th gen that were duplicated and are now a part of common modules. + diff --git a/framework/default.nix b/framework/default.nix index b693c13..b8c6c12 100644 --- a/framework/default.nix +++ b/framework/default.nix @@ -1,7 +1,8 @@ { - # Per original module layout, default framework export was the 11th gen Intel - # of the Framework 13 Laptop - imports = [ - ./13-inch/11th-gen-intel + assertions = [ + { + assertion = false; + message = "Importing framework/ (default.nix) directly is deprecated! See https://github.com/NixOS/nixos-hardware/blob/master/framework/OLD-BEHAVIOUR-DEPRECATED.md for more details."; + } ]; }