From a2e23ee8f8699f8971b4fde86efc1b7ec1e19681 Mon Sep 17 00:00:00 2001 From: 0xda157 Date: Tue, 16 Jun 2026 15:44:05 -0700 Subject: [PATCH] helix: make package nullable --- modules/programs/helix.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/programs/helix.nix b/modules/programs/helix.nix index 0af8509d..9498f512 100644 --- a/modules/programs/helix.nix +++ b/modules/programs/helix.nix @@ -22,7 +22,10 @@ in options.programs.helix = { enable = lib.mkEnableOption "helix text editor"; - package = lib.mkPackageOption pkgs "helix" { example = "pkgs.evil-helix"; }; + package = lib.mkPackageOption pkgs "helix" { + nullable = true; + example = "pkgs.evil-helix"; + }; extraPackages = mkOption { type = with types; listOf package; @@ -203,6 +206,11 @@ in }; config = mkIf cfg.enable { + assertions = lib.singleton { + assertion = cfg.extraPackages != [ ] -> cfg.package != null; + message = "programs.helix.extraPackages require programs.helix.package to not be null"; + }; + warnings = lib.optional (lib.any builtins.isList options.programs.helix.languages.definitions) ( lib.hm.deprecations.mkDeprecatedOptionValueWarning { option = [ @@ -221,7 +229,7 @@ in } ); - home.packages = + home.packages = lib.mkIf (cfg.package != null) ( if cfg.extraPackages != [ ] then [ (pkgs.symlinkJoin { @@ -236,7 +244,8 @@ in }) ] else - [ cfg.package ]; + [ cfg.package ] + ); home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "hx";