Install neovim with nixvim

It is still relatively unconfigured in its current state, though.
wip
Bo Jeanes 2024-07-17 14:03:08 +10:00
parent 6b446fa0a9
commit 4782daee48
No known key found for this signature in database
1 changed files with 25 additions and 11 deletions

View File

@ -36,9 +36,6 @@
( (
let let
myUsername = "bjeanes"; myUsername = "bjeanes";
mkNvim = system: inputs.nixvim.legacyPackages."${system}".makeNixvim {
plugins.lsp.enable = true;
};
in in
{ {
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ]; systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
@ -89,9 +86,6 @@
nixosModules = { nixosModules = {
# Common nixos/nix-darwin configuration shared between Linux and macOS. # Common nixos/nix-darwin configuration shared between Linux and macOS.
common = { pkgs, system, ... }: common = { pkgs, system, ... }:
let
nvim = mkNvim system;
in
{ {
home-manager.backupFileExtension = "bak-hm"; home-manager.backupFileExtension = "bak-hm";
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
@ -99,10 +93,7 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
environment.variables = { environment.variables = { };
# EDITOR = "${nvim}/bin/nvim";
# VISUAL = "${nvim}/bin/nvim";
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git
@ -112,11 +103,19 @@
# NixOS specific configuration # NixOS specific configuration
linux = { pkgs, ... }: { linux = { pkgs, ... }: {
imports = [
inputs.nixvim.nixosModules.nixvim
];
users.users.${myUsername}.isNormalUser = true; users.users.${myUsername}.isNormalUser = true;
}; };
# nix-darwin specific configuration # nix-darwin specific configuration
darwin = { pkgs, ... }: { darwin = { pkgs, ... }: {
imports = [
inputs.nixvim.nixDarwinModules.nixvim
];
nix = { nix = {
useDaemon = true; useDaemon = true;
@ -165,6 +164,18 @@
}; };
in in
{ {
imports = [
inputs.nixvim.homeManagerModules.nixvim
];
programs.nixvim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
programs.git = { programs.git = {
enable = true; enable = true;
aliases = { aliases = {
@ -246,7 +257,10 @@
linux = { }; linux = { };
# home-manager config specific to Darwin # home-manager config specific to Darwin
darwin = { }; darwin = {
# Yank/paste in Neovim to/from macOS clipboard by default
programs.nixvim.clipboard.register = "unnamedplus";
};
}; };
}; };