fix(droid): make assertion work
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
75444803cd
commit
e8aad7eef7
1 changed files with 3 additions and 2 deletions
|
@ -10,18 +10,19 @@ self: {
|
||||||
inherit (osConfig.networking) hostName;
|
inherit (osConfig.networking) hostName;
|
||||||
|
|
||||||
cfg = config.programs.neovim;
|
cfg = config.programs.neovim;
|
||||||
|
mainHmCfg = osConfig.home-manager.users.${cfg.user} or config;
|
||||||
|
|
||||||
defaultFormatter = self.formatter.${pkgs.system};
|
defaultFormatter = self.formatter.${pkgs.system};
|
||||||
|
|
||||||
nixdPkg = self.inputs.nixd.packages.${pkgs.system}.default;
|
nixdPkg = self.inputs.nixd.packages.${pkgs.system}.default;
|
||||||
|
|
||||||
flakeEnv = config.programs.bash.sessionVariables.FLAKE;
|
flakeEnv = config.programs.bash.sessionVariables.FLAKE;
|
||||||
flakeDir = "${removePrefix "/home/${cfg.user}/" flakeEnv}";
|
flakeDir = "${removePrefix "${mainHmCfg.home.homeDirectory}/" flakeEnv}";
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = hasPrefix "/home/${cfg.user}/" flakeEnv;
|
assertion = hasPrefix "${mainHmCfg.home.homeDirectory}/" flakeEnv;
|
||||||
message = ''
|
message = ''
|
||||||
Your $FLAKE environment variable needs to point to a directory in
|
Your $FLAKE environment variable needs to point to a directory in
|
||||||
the main users' home to use the neovim module.
|
the main users' home to use the neovim module.
|
||||||
|
|
Loading…
Reference in a new issue