fix(nvim): conflict with using global packages
Now it is an error to override the pkgs if global packages are being used.
This commit is contained in:
parent
440bf3cbf8
commit
7963190ef1
4 changed files with 11 additions and 30 deletions
|
@ -2,17 +2,12 @@
|
|||
{
|
||||
flake.nixosModules =
|
||||
let
|
||||
nvim-config =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
(import ../nvim {
|
||||
inherit (inputs) unstable;
|
||||
inherit (pkgs) system;
|
||||
})
|
||||
];
|
||||
};
|
||||
nvim-config = {
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
../nvim
|
||||
];
|
||||
};
|
||||
homeManagerModuleSandalone = import ../home {
|
||||
inherit nvim-config;
|
||||
inherit (inputs) stylix;
|
||||
|
|
|
@ -3,19 +3,15 @@
|
|||
flake.overlays.nixvim = inputs.nixvim.overlays.default;
|
||||
|
||||
perSystem =
|
||||
{ pkgs, system, ... }:
|
||||
{ system, ... }:
|
||||
let
|
||||
nixvimLib = inputs.nixvim.lib.${system};
|
||||
nixvim = inputs.nixvim.legacyPackages.${system};
|
||||
testNvimModule = nixvimLib.check.mkTestDerivationFromNixvimModule;
|
||||
nvimModule = extraConfig: {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {
|
||||
inherit (inputs) unstable;
|
||||
inherit system;
|
||||
};
|
||||
pkgs = inputs.unstable.legacyPackages.${system};
|
||||
module = {
|
||||
imports = [ (import ../nvim/standalone.nix { standalone = true; }) ];
|
||||
imports = [ ../nvim/standalone.nix ];
|
||||
config = extraConfig;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{ system, unstable }:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.jhome.nvim;
|
||||
|
@ -7,9 +6,8 @@ in
|
|||
imports = [ ./options.nix ];
|
||||
|
||||
config.programs.nixvim = lib.mkMerge [
|
||||
(import ./standalone.nix { standalone = false; })
|
||||
(import ./standalone.nix)
|
||||
(lib.mkIf cfg.enable {
|
||||
nixpkgs = lib.mkForce { pkgs = import unstable { inherit system; }; };
|
||||
enable = true;
|
||||
defaultEditor = lib.mkDefault true;
|
||||
jhome.nvim = cfg;
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
{ standalone }:
|
||||
{
|
||||
pkgs,
|
||||
system,
|
||||
unstable,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
|
@ -17,7 +10,6 @@
|
|||
|
||||
config = {
|
||||
withRuby = false;
|
||||
nixpkgs = lib.optionalAttrs standalone { pkgs = unstable.legacyPackages.${system}; };
|
||||
globals.mapleader = " ";
|
||||
# Appearance
|
||||
colorschemes.gruvbox = {
|
||||
|
|
Loading…
Reference in a new issue