2026-01-28
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, inputs, hostname, username, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ # Include the results of the hardware scan.
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
hostname,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -60,6 +64,7 @@
|
|||||||
git
|
git
|
||||||
cifs-utils # required for network mounting the NAS
|
cifs-utils # required for network mounting the NAS
|
||||||
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default
|
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
|
age
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
@@ -122,7 +127,6 @@
|
|||||||
# required for zsh completion
|
# required for zsh completion
|
||||||
environment.pathsToLink = ["/share/zsh"];
|
environment.pathsToLink = ["/share/zsh"];
|
||||||
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
# List services that you want to enable:
|
||||||
|
|
||||||
services.kanata = {
|
services.kanata = {
|
||||||
|
|||||||
37
flake.lock
generated
37
flake.lock
generated
@@ -178,9 +178,31 @@
|
|||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
|
"spicetify-nix": "spicetify-nix",
|
||||||
"zen-browser": "zen-browser"
|
"zen-browser": "zen-browser"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"spicetify-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769316930,
|
||||||
|
"narHash": "sha256-4EOGHYLpIscwr+6drHE28Qj7NDjjowp2Vd8QkXjdBBE=",
|
||||||
|
"owner": "Gerg-L",
|
||||||
|
"repo": "spicetify-nix",
|
||||||
|
"rev": "b2ce438f386943ef611e196a178af2d79042903b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Gerg-L",
|
||||||
|
"repo": "spicetify-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
@@ -211,6 +233,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"zen-browser": {
|
"zen-browser": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|||||||
22
flake.nix
22
flake.nix
@@ -13,20 +13,32 @@
|
|||||||
};
|
};
|
||||||
catppuccin.url = "github:catppuccin/nix/release-25.11";
|
catppuccin.url = "github:catppuccin/nix/release-25.11";
|
||||||
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
|
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
||||||
|
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, nixvim, ... }@inputs: {
|
outputs = {
|
||||||
nixosConfigurations.keith =
|
self,
|
||||||
let
|
nixpkgs,
|
||||||
|
home-manager,
|
||||||
|
nixvim,
|
||||||
|
...
|
||||||
|
} @ inputs: {
|
||||||
|
nixosConfigurations.keith = let
|
||||||
hostname = "keith";
|
hostname = "keith";
|
||||||
username = "weckyy702";
|
username = "weckyy702";
|
||||||
specialArgs = { inherit inputs; inherit hostname; inherit username; };
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
inherit hostname;
|
||||||
|
inherit username;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, username, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||||
@@ -13,8 +18,8 @@
|
|||||||
boot.kernelModules = ["kvm-amd"];
|
boot.kernelModules = ["kvm-amd"];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/0869e843-348d-47e3-b6a1-79ad814ff62b";
|
device = "/dev/disk/by-uuid/0869e843-348d-47e3-b6a1-79ad814ff62b";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -25,8 +30,8 @@
|
|||||||
|
|
||||||
#TODO: add external hdd, nas, and ssd
|
#TODO: add external hdd, nas, and ssd
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [
|
||||||
[ { device = "/dev/disk/by-uuid/40b22e5b-839d-4189-93e7-246407cc76c7"; }
|
{device = "/dev/disk/by-uuid/40b22e5b-839d-4189-93e7-246407cc76c7";}
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|||||||
113
home/home.nix
113
home/home.nix
@@ -1,7 +1,15 @@
|
|||||||
{ config, pkgs, username, inputs, ...}: {
|
top @ {
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixvim.homeModules.nixvim
|
inputs.nixvim.homeModules.nixvim
|
||||||
inputs.catppuccin.homeModules.catppuccin
|
inputs.catppuccin.homeModules.catppuccin
|
||||||
|
inputs.spicetify-nix.homeManagerModules.default
|
||||||
|
./nixvim
|
||||||
];
|
];
|
||||||
|
|
||||||
#NOTE: MUST be kept up to date with nixpkgs!
|
#NOTE: MUST be kept up to date with nixpkgs!
|
||||||
@@ -18,70 +26,68 @@
|
|||||||
slurp
|
slurp
|
||||||
xdg-user-dirs
|
xdg-user-dirs
|
||||||
libqalculate
|
libqalculate
|
||||||
|
xfce.thunar
|
||||||
|
prismlauncher
|
||||||
|
playerctl
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.wofi.enable = true;
|
|
||||||
|
|
||||||
catppuccin.enable = true;
|
catppuccin.enable = true;
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
colorScheme = "dark";
|
||||||
|
font.name = "JetBrainsMono";
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = import ./hyprland/settings.nix;
|
settings = (import ./hyprland/settings.nix) top;
|
||||||
};
|
};
|
||||||
|
|
||||||
#TODO: decide on waybar
|
#TODO: decide on waybar
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
clipboard.register = "unnamedplus";
|
programs.zoxide = {
|
||||||
colorschemes.catppuccin = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.flavour = "mocha";
|
enableZshIntegration = true;
|
||||||
};
|
options = [
|
||||||
plugins.lualine.enable = true;
|
"--cmd cd"
|
||||||
plugins.telescope = {
|
|
||||||
enable = true;
|
|
||||||
extensions.file-browser = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
git_status = true;
|
|
||||||
hijack_netrw = true;
|
|
||||||
respect_gitignore = true;
|
|
||||||
fzf-native.enable = true;
|
|
||||||
fzf-native.settings.case_mode = "ignore_case";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
plugins.web-devicons.enable = true;
|
|
||||||
plugins.treesitter = {
|
|
||||||
enable = true;
|
|
||||||
folding = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
lsp = {
|
|
||||||
inlayHints.enable = true;
|
|
||||||
#TODO: keymaps
|
|
||||||
servers = {
|
|
||||||
"*" = {
|
|
||||||
config.capabilities.textDocument.semanticTokens.multilineTokenSupport = true;
|
|
||||||
config.root_markers = [
|
|
||||||
".git"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
clangd. enable = true;
|
|
||||||
rust-analzyer.enable = true;
|
programs.spicetify = let
|
||||||
rnix.enable = true;
|
spkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||||
};
|
in {
|
||||||
};
|
enable = true;
|
||||||
|
enabledExtensions = with spkgs.extensions; [
|
||||||
|
fullAppDisplay
|
||||||
|
shuffle
|
||||||
|
aiBandBlocker
|
||||||
|
];
|
||||||
|
enabledCustomApps = with spkgs.apps; [
|
||||||
|
newReleases
|
||||||
|
];
|
||||||
|
theme = spkgs.themes.catppuccin;
|
||||||
|
colorScheme = "mocha";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.vesktop = {
|
||||||
|
enable = true;
|
||||||
|
vencord.useSystem = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.wofi.enable = true;
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# For automatic login
|
# For automatic login
|
||||||
profileExtra = ''
|
profileExtra = ''
|
||||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
|
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
|
||||||
exec hyprland > /var/log/hypr.log
|
exec hyprland
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@@ -90,6 +96,7 @@
|
|||||||
autosuggestion.enable = true;
|
autosuggestion.enable = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
initContent = pkgs.lib.mkBefore ''
|
initContent = pkgs.lib.mkBefore ''
|
||||||
|
date
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||||
# Initialization code that may require console input (password prompts, [y/n]
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
# confirmations, etc.) must go above this block; everything else may go below.
|
# confirmations, etc.) must go above this block; everything else may go below.
|
||||||
@@ -127,6 +134,11 @@ fi
|
|||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableGitIntegration = true;
|
enableGitIntegration = true;
|
||||||
|
font = {
|
||||||
|
name = "JetBrains Mono";
|
||||||
|
size = 10;
|
||||||
|
};
|
||||||
|
shellIntegration.enableZshIntegration = true;
|
||||||
#TODO: kitty config
|
#TODO: kitty config
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -141,13 +153,11 @@ fi
|
|||||||
|
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings =
|
settings = let
|
||||||
let
|
|
||||||
# TODO: this should be done more cleanly
|
# TODO: this should be done more cleanly
|
||||||
wallpaper_path = "/home/weckyy702/Pictures/wallpapers/horizontal_16x9.png";
|
wallpaper_path = ./hyprland/horizontal_16x9.png;
|
||||||
in
|
in {
|
||||||
{
|
preload = toString wallpaper_path;
|
||||||
preload = wallpaper_path;
|
|
||||||
wallpaper = [
|
wallpaper = [
|
||||||
#TODO: this should be dynamic
|
#TODO: this should be dynamic
|
||||||
"DP-1,${wallpaper_path}"
|
"DP-1,${wallpaper_path}"
|
||||||
@@ -158,5 +168,8 @@ fi
|
|||||||
|
|
||||||
services.hyprpolkitagent.enable = true;
|
services.hyprpolkitagent.enable = true;
|
||||||
|
|
||||||
#TODO: hyprsunset?
|
services.ssh-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
home/hyprland/horizontal_16x9.png
Normal file
BIN
home/hyprland/horizontal_16x9.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 MiB |
@@ -1,5 +0,0 @@
|
|||||||
let
|
|
||||||
#TODO: this needs to be modular!
|
|
||||||
wallpaper = "/home/weckyy702/Pictures/wallpapers/horizontal_16x9.png";
|
|
||||||
in
|
|
||||||
{}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{...}: {
|
||||||
"$mod" = "SUPER";
|
"$mod" = "SUPER";
|
||||||
"$browser" = "zen";
|
"$browser" = "zen";
|
||||||
"$term" = "kitty";
|
"$term" = "kitty";
|
||||||
@@ -13,7 +13,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
snap = {
|
snap = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
@@ -21,7 +20,8 @@
|
|||||||
follow_mouse = 1;
|
follow_mouse = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
bind = [
|
bind =
|
||||||
|
[
|
||||||
"$mod, Q, exit"
|
"$mod, Q, exit"
|
||||||
"$mod, Return, exec, $term"
|
"$mod, Return, exec, $term"
|
||||||
"$mod, D, exec, wofi --show drun"
|
"$mod, D, exec, wofi --show drun"
|
||||||
@@ -42,13 +42,28 @@
|
|||||||
++
|
++
|
||||||
# Switch workspaces
|
# Switch workspaces
|
||||||
(map (i: "$mod, ${builtins.toString i}, workspace, ${builtins.toString i}") [1 2 3 4 5 6 7 8 9])
|
(map (i: "$mod, ${builtins.toString i}, workspace, ${builtins.toString i}") [1 2 3 4 5 6 7 8 9])
|
||||||
++
|
++ (map (i: "$mod+SHIFT, ${builtins.toString i}, movetoworkspacesilent, ${builtins.toString i}") [1 2 3 4 5 6 7 8 9]);
|
||||||
(map (i: "$mod+SHIFT, ${builtins.toString i}, movetoworkspacesilent, ${builtins.toString i}") [1 2 3 4 5 6 7 8 9]);
|
|
||||||
|
|
||||||
bindm = [
|
bindm = [
|
||||||
"$mod, mouse:272, movewindow"
|
"$mod, mouse:272, movewindow"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
bindel = [
|
||||||
|
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
|
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindl = [
|
||||||
|
", XF86AudioNext, exec, playerctl position 5+"
|
||||||
|
", XF86AudioPrev, exec, playerctl position 5-"
|
||||||
|
", XF86AudioPlay, exec, playerctl play-pause"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindo = [
|
||||||
|
", XF86AudioNext, exec, playerctl next"
|
||||||
|
", XF86AudioPrev, exec, playerctl previous"
|
||||||
|
];
|
||||||
|
|
||||||
decoration = {
|
decoration = {
|
||||||
shadow.enabled = false;
|
shadow.enabled = false;
|
||||||
blur.enabled = true;
|
blur.enabled = true;
|
||||||
@@ -60,9 +75,8 @@
|
|||||||
|
|
||||||
misc.disable_hyprland_logo = true;
|
misc.disable_hyprland_logo = true;
|
||||||
|
|
||||||
cursor.inactive_timeout = 5;
|
cursor.inactive_timeout = 3;
|
||||||
|
|
||||||
ecosystem.no_update_news = true;
|
ecosystem.no_update_news = true;
|
||||||
ecosystem.no_donation_nag = true;
|
ecosystem.no_donation_nag = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
23
home/nixvim/default.nix
Normal file
23
home/nixvim/default.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./keymaps.nix
|
||||||
|
./options.nix
|
||||||
|
./plugins
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.nixvim = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
clipboard.register = "unnamedplus";
|
||||||
|
|
||||||
|
colorschemes.catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
settings.flavour = "mocha";
|
||||||
|
settings.integrations = {
|
||||||
|
gitsigns = true;
|
||||||
|
treesitter = true;
|
||||||
|
cmp = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
25
home/nixvim/keymaps.nix
Normal file
25
home/nixvim/keymaps.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.nixvim.globals.mapleader = " ";
|
||||||
|
|
||||||
|
programs.nixvim.keymaps = [
|
||||||
|
{
|
||||||
|
key = "<esc>";
|
||||||
|
action = ":noh<CR>";
|
||||||
|
mode = "n";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "Clear search highlight";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "j";
|
||||||
|
action = "gj";
|
||||||
|
mode = "n";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "k";
|
||||||
|
action = "gk";
|
||||||
|
mode = "n";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
50
home/nixvim/options.nix
Normal file
50
home/nixvim/options.nix
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.nixvim.opts = {
|
||||||
|
# Expand tabs to 4 spaces
|
||||||
|
shiftwidth = 4;
|
||||||
|
softtabstop = 4;
|
||||||
|
expandtab = true;
|
||||||
|
|
||||||
|
signcolumn = "yes:3";
|
||||||
|
|
||||||
|
# automatically indent and try to be smart about it
|
||||||
|
autoindent = true;
|
||||||
|
smartindent = true;
|
||||||
|
|
||||||
|
# Relative line numbers
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
|
||||||
|
# See search result as you type
|
||||||
|
inccommand = "split";
|
||||||
|
|
||||||
|
# Visualize whitespace
|
||||||
|
list = true;
|
||||||
|
listchars = {
|
||||||
|
tab = "» ";
|
||||||
|
trail = "·";
|
||||||
|
nbsp = "␣";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Show which line the cursor is on
|
||||||
|
cursorline = true;
|
||||||
|
|
||||||
|
# Keep the cursor somewhat centered on the screen
|
||||||
|
scrolloff = 25;
|
||||||
|
|
||||||
|
# Ask if operations would fail due to unsaved buffers
|
||||||
|
confirm = true;
|
||||||
|
|
||||||
|
# ignore case in search unless multiple capital case letter have been typed
|
||||||
|
smartcase = true;
|
||||||
|
ignorecase = true;
|
||||||
|
|
||||||
|
completeopt = "menu,menuone,noselect";
|
||||||
|
|
||||||
|
# Persistent undos :)
|
||||||
|
undofile = true;
|
||||||
|
|
||||||
|
# enable resize by mouse
|
||||||
|
mouse = "n";
|
||||||
|
};
|
||||||
|
}
|
||||||
40
home/nixvim/plugins/cmp/default.nix
Normal file
40
home/nixvim/plugins/cmp/default.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.nixvim.plugins = {
|
||||||
|
lspkind.enable = true;
|
||||||
|
|
||||||
|
blink-cmp.enable = true;
|
||||||
|
|
||||||
|
# cmp-nvim-lsp-signature-help.enable = true;
|
||||||
|
#
|
||||||
|
# cmp = {
|
||||||
|
# enable = true;
|
||||||
|
# autoEnableSources = true;
|
||||||
|
# autoLoad = true;
|
||||||
|
#
|
||||||
|
# settings.sources = [
|
||||||
|
# { name = "nvim_lsp"; }
|
||||||
|
# { name = "nvim_lsp_signature_help"; }
|
||||||
|
# { name = "path"; }
|
||||||
|
# ];
|
||||||
|
#
|
||||||
|
# settings.mapping = {
|
||||||
|
# "<Tab>" = "cmp.mapping.select_next_item()";
|
||||||
|
# "<S-Tab>" = "cmp.mapping.select_prev_item()";
|
||||||
|
# "<C-Space>" = "cmp.mapping.complete()";
|
||||||
|
# "<C-S-Space>" = "cmp.mapping.close()";
|
||||||
|
# "<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# lsp-format.enable = true;
|
||||||
|
#
|
||||||
|
# none-ls = {
|
||||||
|
# enable = true;
|
||||||
|
# enableLspFormat = true;
|
||||||
|
# sources.formatting = {
|
||||||
|
# alejandra.enable = true;
|
||||||
|
# nixpkgs_fmt.enable = true;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
||||||
25
home/nixvim/plugins/default.nix
Normal file
25
home/nixvim/plugins/default.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./lsp.nix
|
||||||
|
./telescope
|
||||||
|
./cmp
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.nixvim.plugins = {
|
||||||
|
lualine.enable = true;
|
||||||
|
|
||||||
|
web-devicons.enable = true;
|
||||||
|
|
||||||
|
treesitter = {
|
||||||
|
enable = true;
|
||||||
|
folding = true;
|
||||||
|
autoLoad = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gitsigns.enable = true;
|
||||||
|
|
||||||
|
which-key.enable = true;
|
||||||
|
|
||||||
|
glow.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
30
home/nixvim/plugins/lsp.nix
Normal file
30
home/nixvim/plugins/lsp.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.nixvim = {
|
||||||
|
dependencies.rust-analyzer.enable = true;
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
inlayHints.enable = true;
|
||||||
|
servers = {
|
||||||
|
"*" = {
|
||||||
|
config.capabilities.textDocument.semanticTokens.multilineTokenSupport = true;
|
||||||
|
config.root_markers = [
|
||||||
|
".git"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
clangd = {
|
||||||
|
enable = true;
|
||||||
|
config.root_markers = [
|
||||||
|
"compile_commands.json"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
rust_analyzer = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
rnix.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins.lspconfig.enable = true;
|
||||||
|
plugins.clangd-extensions.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
20
home/nixvim/plugins/telescope/default.nix
Normal file
20
home/nixvim/plugins/telescope/default.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./keymaps.nix
|
||||||
|
];
|
||||||
|
programs.nixvim.dependencies.ripgrep.enable = true;
|
||||||
|
|
||||||
|
programs.nixvim.plugins.telescope = {
|
||||||
|
enable = true;
|
||||||
|
extensions.file-browser = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
git_status = true;
|
||||||
|
hijack_netrw = true;
|
||||||
|
respect_gitignore = true;
|
||||||
|
fzf-native.enable = true;
|
||||||
|
fzf-native.settings.case_mode = "ignore_case";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
home/nixvim/plugins/telescope/keymaps.nix
Normal file
19
home/nixvim/plugins/telescope/keymaps.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.nixvim.keymaps = [
|
||||||
|
{
|
||||||
|
key = "<leader>sf";
|
||||||
|
action = "<cmd>Telescope find_files<CR>";
|
||||||
|
options.desc = "[S]earch [F]iles";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sg";
|
||||||
|
action = "<cmd>Telescope live_grep<CR>";
|
||||||
|
options.desc = "[S]earch by [G]rep";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "<leader>sw";
|
||||||
|
action = "<cmd>Telescope grep_string<CR>";
|
||||||
|
options.desc = "[S]earch current [W]ord";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{inputs, pkgs, }: {
|
|
||||||
inputs.nixvim = {
|
|
||||||
url = "github:nix-community/nixvim/nixos-25.11";
|
|
||||||
# If you are not running an unstable channel of nixpkgs, select the corresponding branch of Nixvim.
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user