From 6975ee09f55b4a1518b76a31e3c9fe5b7618d3f3 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Wed, 17 Jul 2024 15:16:06 +0100 Subject: [PATCH] modules/outputs: make `type` readOnly at the top-level Instead of relying on `lib.mkForce` we can enforce this more strictly by setting the option "readOnly". --- modules/output.nix | 7 ++++++- modules/top-level/output.nix | 1 - 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/output.nix b/modules/output.nix index 0beb31d4..112ee18e 100644 --- a/modules/output.nix +++ b/modules/output.nix @@ -80,7 +80,12 @@ in "lua" ]; default = "lua"; - description = "Whether the generated file is a vim or a lua file"; + description = '' + Whether the generated file is a vim or a lua file + + Read-only outside of `files` submodules. + ''; + readOnly = config.isTopLevel; }; path = mkOption { diff --git a/modules/top-level/output.nix b/modules/top-level/output.nix index 13998071..eca831aa 100644 --- a/modules/top-level/output.nix +++ b/modules/top-level/output.nix @@ -274,7 +274,6 @@ in ); in { - type = lib.mkForce "lua"; finalPackage = wrappedNeovim; initPath = "${init}";