diff --git a/home/nixvim.nix b/home/nixvim.nix index 01223e2..2ec7587 100644 --- a/home/nixvim.nix +++ b/home/nixvim.nix @@ -6,9 +6,12 @@ ... }: { - options.nix-leonhard.neovim.enable = lib.mkEnableOption "neovim"; + home.packages = lib.mkIf config.nix-leonhard.neovim.enable [ + self.packages.${pkgs.stdenv.hostPlatform.system}.nixvim + ]; - config = lib.mkIf config.nix-leonhard.neovim.enable { - home.packages = [ self.packages.${pkgs.stdenv.hostPlatform.system}.nixvim ]; + home.sessionVariables = lib.mkIf config.nix-leonhard.neovim.enable { + EDITOR = "nvim"; + VISUAL = "nvim"; }; } diff --git a/hosts/default.nix b/hosts/default.nix index b8c7ba0..d7f3c5d 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -19,6 +19,7 @@ let home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.leonhard = ../home; + home-manager.extraSpecialArgs = specialArgs; } ]; }; diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 3939f4c..d6bf113 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -3,6 +3,9 @@ ./hardware-configuration.nix ]; + nix-leonhard.graphical.enable = true; + nix-leonhard.neovim.enable = true; + # Enable CUPS to print documents. #services.printing.enable = true; diff --git a/hosts/server/default.nix b/hosts/server/default.nix index 700f6ba..7b293ca 100644 --- a/hosts/server/default.nix +++ b/hosts/server/default.nix @@ -26,7 +26,7 @@ }; config = { - nix-leonhard.graphical = false; + nix-leonhard.neovim.enable = true; users.users.leonhard = { initialPassword = "leonhard"; diff --git a/options.nix b/options.nix index 0ce05df..479feef 100644 --- a/options.nix +++ b/options.nix @@ -4,10 +4,7 @@ }: { options.nix-leonhard = with lib.types; { - graphical = lib.mkOption { - type = bool; - default = true; - description = "Whether to enable GUI features and programs."; - }; + graphical = lib.mkEnableOption "GUI features and programs"; + neovim.enable = lib.mkEnableOption "neovim"; }; } diff --git a/standalone/default.nix b/standalone/default.nix index 79062e3..0998546 100644 --- a/standalone/default.nix +++ b/standalone/default.nix @@ -15,7 +15,6 @@ homeManagerConfiguration { ./base.nix ../home { - nix-leonhard.graphical = false; nix-leonhard.neovim.enable = true; } ]; diff --git a/system/default.nix b/system/default.nix index 9eca54f..63750d2 100644 --- a/system/default.nix +++ b/system/default.nix @@ -13,7 +13,6 @@ ]; environment.systemPackages = with pkgs; [ - vim wget ];