diff options
Diffstat (limited to 'module.nix')
| -rw-r--r-- | module.nix | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,3 +1,4 @@ +environment: { lib, config, @@ -6,7 +7,6 @@ }: let cfg = config.programs.neovim-vanilla; - isHomeManager = lib.hasAttrByPath [ "home" "packages" ] config; pluginDir = let @@ -131,13 +131,15 @@ in config = lib.mkIf cfg.enable ( # NOTE: Don't use programs.neovim since that will build neovim from source in either case - if isHomeManager then + if environment == "home-manager" then { home.packages = [ finalPackage ]; } - else + else if environment == "nixos" then { environment.systemPackages = [ finalPackage ]; } + else + throw "Unknown environment: ${environment}" ); } |
