From 367bf7508a0bdf78d160b1e3a4858d471f1d9160 Mon Sep 17 00:00:00 2001 From: Spencer Brower Date: Thu, 6 Oct 2022 14:42:03 -0400 Subject: [PATCH] fix: Fixed issues with the vagrant module not loading. --- nixos/modules/virtualisation/vagrant.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/nixos/modules/virtualisation/vagrant.nix b/nixos/modules/virtualisation/vagrant.nix index 9a39513..bbaaaad 100644 --- a/nixos/modules/virtualisation/vagrant.nix +++ b/nixos/modules/virtualisation/vagrant.nix @@ -1,5 +1,8 @@ -{ config, hostName ? "nixos", ... }: { - config = mkMerge [ +{ config, lib, hostName ? "nixos", ... }: +let cfg = config.services.laravel; +in +{ + config = lib.mkMerge [ { nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -42,11 +45,11 @@ }; }; } - mkIf - services.laravel.enable - { - services.laravel.root = mkDefault /vagrant; - services.laravel.domain = mkDefault (config.networking.hostName + ".local"); - } + (lib.mkIf + cfg.enable + { + services.laravel.root = lib.mkDefault /vagrant; + services.laravel.domain = lib.mkDefault (hostName + ".local"); + }) ]; }