Changed nixvim to nvf
This commit is contained in:
parent
9f55457ddf
commit
b66cb9f49d
10 changed files with 4988 additions and 410 deletions
2492
flake.lock
generated
2492
flake.lock
generated
File diff suppressed because it is too large
Load diff
220
flake.nix
220
flake.nix
|
|
@ -1,30 +1,30 @@
|
|||
{
|
||||
description = "NixOS config";
|
||||
description = "NixOS config";
|
||||
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
};
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
};
|
||||
neovim = {
|
||||
url = "path:nixos/modules/neovim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
stylix.url = "github:danth/stylix";
|
||||
#nix-flatpak.url = "github:GermanBread/declarative-flatpak/stable-v3";
|
||||
#nix-flatpak.url = "github:GermanBread/declarative-flatpak/stable-v3";
|
||||
apple-silicon-support.url = "github:tpwrules/nixos-apple-silicon";
|
||||
|
||||
#nur.url = "github:nix-community/NUR";
|
||||
#nur.url = "github:nix-community/NUR";
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
||||
|
||||
|
|
@ -33,105 +33,111 @@
|
|||
impermanence.url = "github:nix-community/impermanence";
|
||||
|
||||
nix-darwin = {
|
||||
url = "github:LnL7/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
url = "github:LnL7/nix-darwin";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-on-droid = {
|
||||
url = "github:nix-community/nix-on-droid";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
url = "github:nix-community/nix-on-droid";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
#systems = ["aarch64-linux" "x86_64-linux" ];
|
||||
#forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
#pkgs = import nixpkgs {
|
||||
# inherit system;
|
||||
# config = {
|
||||
# allowUnfree = true;
|
||||
# };
|
||||
#};
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
#systems = ["aarch64-linux" "x86_64-linux" ];
|
||||
#forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
#pkgs = import nixpkgs {
|
||||
# inherit system;
|
||||
# config = {
|
||||
# allowUnfree = true;
|
||||
# };
|
||||
#};
|
||||
arm = "aarch64-linux";
|
||||
x86 = "x86_64-linux";
|
||||
|
||||
first-nixos-install = "1729112485"; #stat -c %W /
|
||||
in
|
||||
{
|
||||
nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
pkgs = import nixpkgs { system = "aarch64-linux"; overlays = [ inputs.nix-on-droid.overlays.default ]; };
|
||||
modules = [ ./nixos/hosts/android ];
|
||||
home-manager-path = inputs.home-manager.outPath;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit first-nixos-install;
|
||||
};
|
||||
};
|
||||
darwinConfigurations = {
|
||||
"kylekrein-air" = inputs.nix-darwin.lib.darwinSystem {
|
||||
specialArgs = { inherit self; };
|
||||
modules = [ ./nixos/hosts/kylekrein-air ];
|
||||
};
|
||||
};
|
||||
nixosConfigurations = {
|
||||
"kylekrein-homepc" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
|
||||
hwconfig = {
|
||||
hostname = "kylekrein-homepc";
|
||||
isLaptop = false;
|
||||
system = x86;
|
||||
useImpermanence = true;
|
||||
};
|
||||
inherit first-nixos-install;
|
||||
inherit inputs; };
|
||||
|
||||
system = x86;
|
||||
pkgs = import nixpkgs {
|
||||
system = x86;
|
||||
overlays = [
|
||||
inputs.hyprland.overlays.default
|
||||
];
|
||||
config = {
|
||||
allowBroken = true;
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
(import ./nixos/modules/disko/impermanence-btrfs.nix { device = "/dev/nvme0n1"; } )
|
||||
./nixos/configuration.nix
|
||||
#nix-flatpak.nixosModules.default
|
||||
];
|
||||
};
|
||||
"kylekrein-mac" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
hwconfig = {
|
||||
hostname = "kylekrein-mac";
|
||||
isLaptop = true;
|
||||
system = arm;
|
||||
useImpermanence = true;
|
||||
};
|
||||
inherit first-nixos-install;
|
||||
inherit inputs; };
|
||||
|
||||
system = arm;
|
||||
pkgs = import nixpkgs {
|
||||
system = arm;
|
||||
overlays = [
|
||||
inputs.hyprland.overlays.default
|
||||
#(import ./nixos/macos/widevine.nix)
|
||||
];
|
||||
config = {
|
||||
allowBroken = true;
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./nixos/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
in {
|
||||
nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = "aarch64-linux";
|
||||
overlays = [inputs.nix-on-droid.overlays.default];
|
||||
};
|
||||
modules = [./nixos/hosts/android];
|
||||
home-manager-path = inputs.home-manager.outPath;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit first-nixos-install;
|
||||
};
|
||||
};
|
||||
darwinConfigurations = {
|
||||
"kylekrein-air" = inputs.nix-darwin.lib.darwinSystem {
|
||||
specialArgs = {inherit self;};
|
||||
modules = [./nixos/hosts/kylekrein-air];
|
||||
};
|
||||
};
|
||||
nixosConfigurations = {
|
||||
"kylekrein-homepc" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
hwconfig = {
|
||||
hostname = "kylekrein-homepc";
|
||||
isLaptop = false;
|
||||
system = x86;
|
||||
useImpermanence = true;
|
||||
};
|
||||
inherit first-nixos-install;
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
system = x86;
|
||||
pkgs = import nixpkgs {
|
||||
system = x86;
|
||||
overlays = [
|
||||
inputs.hyprland.overlays.default
|
||||
];
|
||||
config = {
|
||||
allowBroken = true;
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
(import ./nixos/modules/disko/impermanence-btrfs.nix {device = "/dev/nvme0n1";})
|
||||
./nixos/configuration.nix
|
||||
#nix-flatpak.nixosModules.default
|
||||
];
|
||||
};
|
||||
"kylekrein-mac" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
hwconfig = {
|
||||
hostname = "kylekrein-mac";
|
||||
isLaptop = true;
|
||||
system = arm;
|
||||
useImpermanence = true;
|
||||
};
|
||||
inherit first-nixos-install;
|
||||
inherit inputs;
|
||||
};
|
||||
|
||||
system = arm;
|
||||
pkgs = import nixpkgs {
|
||||
system = arm;
|
||||
overlays = [
|
||||
inputs.hyprland.overlays.default
|
||||
#(import ./nixos/macos/widevine.nix)
|
||||
];
|
||||
config = {
|
||||
allowBroken = true;
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./nixos/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nixos-facter-modules.nixosModules.facter
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.nixvim.nixosModules.nixvim
|
||||
inputs.disko.nixosModules.default
|
||||
|
||||
./modules/firefox
|
||||
|
|
@ -196,26 +195,11 @@
|
|||
obs-studio
|
||||
vesktop
|
||||
vscode-fhs
|
||||
inputs.neovim.packages.${hwconfig.system}.default
|
||||
];
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.kdeconnect.package = lib.mkDefault pkgs.kdePackages.kdeconnect-kde;
|
||||
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
colorschemes.catppuccin.enable = true;
|
||||
plugins = {
|
||||
lualine.enable = true;
|
||||
};
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
shiftwidth = 4;
|
||||
};
|
||||
};
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
{
|
||||
imports =
|
||||
[
|
||||
./modules/nixvim
|
||||
./modules/fastfetch
|
||||
./modules/tmux/home.nix
|
||||
] ++ lib.optional (hwconfig.useImpermanence) (import ./modules/impermanence/home.nix { inherit username; inherit inputs; } )
|
||||
|
|
|
|||
|
|
@ -1,21 +1,25 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
environment.packages = with pkgs;[
|
||||
neovim
|
||||
git
|
||||
fastfetch
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
];
|
||||
environment.packages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
fastfetch
|
||||
inputs.neovim.packages.aarch64-linux.default
|
||||
|
||||
(pkgs.writeShellScriptBin "droid-switch" ''
|
||||
nix-on-droid switch --flake /data/data/com.termux.nix/files/home/nixos-config
|
||||
'')
|
||||
];
|
||||
(pkgs.writeShellScriptBin "droid-switch" ''
|
||||
nix-on-droid switch --flake /data/data/com.termux.nix/files/home/nixos-config
|
||||
'')
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
config = ./home.nix;
|
||||
useGlobalPkgs = true;
|
||||
};
|
||||
home-manager = {
|
||||
config = ./home.nix;
|
||||
useGlobalPkgs = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../modules/nixvim
|
||||
#../../modules/nixvim
|
||||
];
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
|
|
|
|||
2341
nixos/modules/neovim/flake.lock
generated
Normal file
2341
nixos/modules/neovim/flake.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
34
nixos/modules/neovim/flake.nix
Normal file
34
nixos/modules/neovim/flake.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
description = "A neovim configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
nvf.url = "github:notashelf/nvf";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nvf,
|
||||
...
|
||||
}: {
|
||||
packages.x86_64-linux.default =
|
||||
(nvf.lib.neovimConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
modules = [./nvf-configuration.nix];
|
||||
})
|
||||
.neovim;
|
||||
packages.aarch64-linux.default =
|
||||
(nvf.lib.neovimConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.aarch64-linux;
|
||||
modules = [./nvf-configuration.nix];
|
||||
})
|
||||
.neovim;
|
||||
packages.aarch64-darwin.default =
|
||||
(nvf.lib.neovimConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
|
||||
modules = [./nvf-configuration.nix];
|
||||
})
|
||||
.neovim;
|
||||
};
|
||||
}
|
||||
205
nixos/modules/neovim/nvf-configuration.nix
Normal file
205
nixos/modules/neovim/nvf-configuration.nix
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
vim = {
|
||||
spellcheck.enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
shiftwidth = 4;
|
||||
tabstop = 4;
|
||||
useSystemClipboard = true;
|
||||
lineNumberMode = "number";
|
||||
|
||||
languages = {
|
||||
enableFormat = true;
|
||||
enableLSP = true;
|
||||
enableTreesitter = true;
|
||||
|
||||
nix.enable = true;
|
||||
rust.enable = true;
|
||||
clang.enable = true;
|
||||
rust.crates.enable = true;
|
||||
csharp.enable = true;
|
||||
# Nim LSP is broken on Darwin and therefore
|
||||
# should be disabled by default. Users may still enable
|
||||
# `vim.languages.vim` to enable it, this does not restrict
|
||||
# that.
|
||||
# See: <https://github.com/PMunch/nimlsp/issues/178#issue-2128106096>
|
||||
nim.enable = false;
|
||||
};
|
||||
|
||||
lsp = {
|
||||
formatOnSave = true;
|
||||
lspkind.enable = false;
|
||||
lightbulb.enable = true;
|
||||
lspsaga.enable = false;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
otter-nvim.enable = true;
|
||||
lsplines.enable = true;
|
||||
nvim-docs-view.enable = true;
|
||||
};
|
||||
|
||||
debugger = {
|
||||
nvim-dap = {
|
||||
enable = true;
|
||||
ui.enable = true;
|
||||
};
|
||||
};
|
||||
visuals = {
|
||||
nvim-scrollbar.enable = true;
|
||||
nvim-web-devicons.enable = true;
|
||||
nvim-cursorline.enable = true;
|
||||
cinnamon-nvim.enable = true;
|
||||
fidget-nvim.enable = true;
|
||||
|
||||
highlight-undo.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
|
||||
# Fun
|
||||
cellular-automaton.enable = false;
|
||||
};
|
||||
statusline = {
|
||||
lualine = {
|
||||
enable = true;
|
||||
theme = "catppuccin";
|
||||
};
|
||||
};
|
||||
|
||||
theme = {
|
||||
enable = true;
|
||||
name = "catppuccin";
|
||||
style = "mocha";
|
||||
transparent = false;
|
||||
};
|
||||
|
||||
autopairs.nvim-autopairs.enable = true;
|
||||
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
snippets.luasnip.enable = true;
|
||||
|
||||
filetree = {
|
||||
neo-tree = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
tabline = {
|
||||
nvimBufferline.enable = true;
|
||||
};
|
||||
|
||||
treesitter.context.enable = true;
|
||||
|
||||
binds = {
|
||||
whichKey.enable = true;
|
||||
cheatsheet.enable = true;
|
||||
};
|
||||
|
||||
telescope.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
gitsigns.enable = true;
|
||||
gitsigns.codeActions.enable = false; # throws an annoying debug message
|
||||
};
|
||||
|
||||
minimap = {
|
||||
minimap-vim.enable = false;
|
||||
codewindow.enable = true; # lighter, faster, and uses lua for configuration
|
||||
};
|
||||
|
||||
dashboard = {
|
||||
dashboard-nvim.enable = false;
|
||||
alpha.enable = true;
|
||||
};
|
||||
|
||||
notify = {
|
||||
nvim-notify.enable = true;
|
||||
};
|
||||
|
||||
projects = {
|
||||
project-nvim.enable = true;
|
||||
};
|
||||
|
||||
utility = {
|
||||
ccc.enable = false;
|
||||
vim-wakatime.enable = false;
|
||||
icon-picker.enable = true;
|
||||
surround.enable = true;
|
||||
diffview-nvim.enable = true;
|
||||
motion = {
|
||||
hop.enable = true;
|
||||
leap.enable = true;
|
||||
precognition.enable = true;
|
||||
};
|
||||
|
||||
images = {
|
||||
image-nvim.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
notes = {
|
||||
obsidian.enable = false; # FIXME: neovim fails to build if obsidian is enabled
|
||||
neorg.enable = false;
|
||||
orgmode.enable = false;
|
||||
mind-nvim.enable = true;
|
||||
todo-comments.enable = true;
|
||||
};
|
||||
|
||||
terminal = {
|
||||
toggleterm = {
|
||||
enable = true;
|
||||
lazygit.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
ui = {
|
||||
borders.enable = true;
|
||||
noice.enable = true;
|
||||
colorizer.enable = true;
|
||||
modes-nvim.enable = false; # the theme looks terrible with catppuccin
|
||||
illuminate.enable = true;
|
||||
breadcrumbs = {
|
||||
enable = true;
|
||||
navbuddy.enable = true;
|
||||
};
|
||||
smartcolumn = {
|
||||
enable = true;
|
||||
setupOpts.custom_colorcolumn = {
|
||||
# this is a freeform module, it's `buftype = int;` for configuring column position
|
||||
nix = "110";
|
||||
ruby = "120";
|
||||
java = "130";
|
||||
go = ["90" "130"];
|
||||
};
|
||||
};
|
||||
fastaction.enable = true;
|
||||
};
|
||||
|
||||
assistant = {
|
||||
chatgpt.enable = false;
|
||||
copilot = {
|
||||
enable = false;
|
||||
cmp.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
session = {
|
||||
nvim-session-manager.enable = false;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
gesture-nvim.enable = false;
|
||||
};
|
||||
|
||||
comments = {
|
||||
comment-nvim.enable = true;
|
||||
};
|
||||
|
||||
presence = {
|
||||
neocord.enable = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
colorschemes.catppuccin.enable = true;
|
||||
plugins = {
|
||||
markview.enable = true;
|
||||
tmux-navigator = {
|
||||
enable = true;
|
||||
};
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
};
|
||||
lsp-format = {
|
||||
enable = false;
|
||||
};
|
||||
lsp = {
|
||||
enable = false;
|
||||
inlayHints = true;
|
||||
servers = {
|
||||
nixd = {
|
||||
enable = true;
|
||||
#extraOptions = {
|
||||
# nixos = {
|
||||
# expr = "(builtins.getFlake \"/etc/nixos\").nixosConfigurations.aurelionite.options";
|
||||
#};
|
||||
#home_manager = {
|
||||
# expr = "(builtins.getFlake \"/etc/nixos\").homeConfigurations.aurelionite.options";
|
||||
#};
|
||||
#};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
opts = {
|
||||
number = true;
|
||||
shiftwidth = 4;
|
||||
relativenumber = false;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue