From e8aad7eef7881c1994ce10ea7bc8029cde466621 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 22 Dec 2024 04:42:36 -0500 Subject: [PATCH] fix(droid): make assertion work --- homeManagerModules/neovim/langs/nix-lang/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeManagerModules/neovim/langs/nix-lang/default.nix b/homeManagerModules/neovim/langs/nix-lang/default.nix index 272c30e4..354b7335 100644 --- a/homeManagerModules/neovim/langs/nix-lang/default.nix +++ b/homeManagerModules/neovim/langs/nix-lang/default.nix @@ -10,18 +10,19 @@ self: { inherit (osConfig.networking) hostName; cfg = config.programs.neovim; + mainHmCfg = osConfig.home-manager.users.${cfg.user} or config; defaultFormatter = self.formatter.${pkgs.system}; nixdPkg = self.inputs.nixd.packages.${pkgs.system}.default; flakeEnv = config.programs.bash.sessionVariables.FLAKE; - flakeDir = "${removePrefix "/home/${cfg.user}/" flakeEnv}"; + flakeDir = "${removePrefix "${mainHmCfg.home.homeDirectory}/" flakeEnv}"; in { config = mkIf cfg.enable { assertions = [ { - assertion = hasPrefix "/home/${cfg.user}/" flakeEnv; + assertion = hasPrefix "${mainHmCfg.home.homeDirectory}/" flakeEnv; message = '' Your $FLAKE environment variable needs to point to a directory in the main users' home to use the neovim module.