fix(droid): make assertion work
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-12-22 04:42:36 -05:00
parent 75444803cd
commit e8aad7eef7

View file

@ -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.