From 8ae348d68694a0c66eae3e76185e074663657d4a Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Tue, 22 Apr 2025 01:55:21 +1000 Subject: [PATCH] vars: improve messaging --- nixosModules/clanCore/vars/interface.nix | 2 +- nixosModules/clanCore/vars/public/in_repo.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nixosModules/clanCore/vars/interface.nix b/nixosModules/clanCore/vars/interface.nix index d58634f1c..b154f7f17 100644 --- a/nixosModules/clanCore/vars/interface.nix +++ b/nixosModules/clanCore/vars/interface.nix @@ -228,7 +228,7 @@ in description = '' Whether the file should be deployed to the target machine. - Enable this if the generated file is only used as an input to other generators. + Disable this if the generated file is only used as an input to other generators. ''; type = bool; default = true; diff --git a/nixosModules/clanCore/vars/public/in_repo.nix b/nixosModules/clanCore/vars/public/in_repo.nix index c500f5c35..5551d515c 100644 --- a/nixosModules/clanCore/vars/public/in_repo.nix +++ b/nixosModules/clanCore/vars/public/in_repo.nix @@ -30,7 +30,9 @@ in readFile file.config.path else # if the file is not found, we want to downgrade the priority, to allow overriding via mkDefault - mkOptionDefault (throw "File not found: ${file.config.path}") + mkOptionDefault ( + throw "Please run `clan vars generate ${config.clan.core.settings.machine.name}` as file was not found: ${file.config.path}" + ) ); }; };