diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-07-31 19:44:36 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-07-31 19:44:36 -0500 |
| commit | 07ad5b45941fa3e33a70270592815fa317a14c19 (patch) | |
| tree | 4080e43f80cc0cffeca31faed45ae5ba9a36102b | |
| parent | ab30a01570d1c99e0b73959552de8ad8421cb8fd (diff) | |
| download | neovim-vanilla-wrapped-master.tar.xz neovim-vanilla-wrapped-master.zip | |
| -rw-r--r-- | flake.nix | 4 | ||||
| -rw-r--r-- | module.nix | 8 |
2 files changed, 7 insertions, 5 deletions
@@ -12,7 +12,7 @@ ... }: { - hmModules.neovim-vanilla-wrapped = import ./module.nix; - nixosModules.neovim-vanilla-wrapped = import ./module.nix; + hmModules.neovim-vanilla-wrapped = import ./module.nix "home-manager"; + nixosModules.neovim-vanilla-wrapped = import ./module.nix "nixos"; }; } @@ -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}" ); } |
