init
This commit is contained in:
parent
3728ac496d
commit
53395d3971
81 changed files with 723 additions and 1543 deletions
19
LICENSE
19
LICENSE
|
|
@ -1,19 +0,0 @@
|
|||
Copyright (c) 2024 gpskwlkr <giorgi.anakidze@outlook.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
98
README.md
98
README.md
|
|
@ -1,98 +0,0 @@
|
|||
# NixOS + Hyprland (Secureboot enabled)
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
> ⚠ WARNING! This configuration uses [lanzaboote](https://github.com/nix-community/lanzaboote) for Secure boot support. If you want to use the flake and don't need secure boot, make appropriate changes in [boot.nix](./system/boot.nix).
|
||||
|
||||
> ⚠ WARNING! Make sure to change [hardware-configuration.nix](./system/hardware-configuration.nix) according to your PC or generate a new one via `nixos-generate-config --root /mnt` while installing.
|
||||
|
||||
> ⚠ WARNING! Make sure to change home paths for config files in [user](./home/config).
|
||||
|
||||
> ⚠ WARNING! This configuration uses Podman as opposed to Docker, if you want to use dokcer make according changes in [virtualisation](./system/modules/virtualisation.nix).
|
||||
|
||||
> ⚠ WARNING! There might be some non-critical bugs in configuration as I'm still working on it.
|
||||
|
||||
## Table Of Contents
|
||||
|
||||
- ℹ [About](#-about)
|
||||
- 🔧 [Components](#-components)
|
||||
- ⌨ [Keybindings](#-keybindings)
|
||||
- [NixOS specific zsh aliases](#-nixos-specific-zsh-aliases)
|
||||
- 📖 [License](#-license)
|
||||
|
||||
## ℹ About
|
||||
|
||||
This repository is housing my daily drive NixOS configuration using ❄️ flakes, running Hyprland. Feel free to utilize it in its entirety or borrow specific components for your own configuration.
|
||||
|
||||
> Configuration is not lightweight and may require some disk space.
|
||||
|
||||
Notably, it utilizes:
|
||||
|
||||
- **flake** (Experimental feature of the Nix package manager)
|
||||
- **nixpkgs**: unstable (only used for hyprshot & [Vesktop](https://github.com/Vencord/Vesktop))
|
||||
|
||||
## 🔧 Components
|
||||
|
||||
| Component | Version/Name |
|
||||
| ---------------- | ------------------------------ |
|
||||
| Distro | NixOS |
|
||||
| Shell | Zsh |
|
||||
| Display Server | Wayland |
|
||||
| WM (Compositor) | Hyprland |
|
||||
| Bar | Waybar |
|
||||
| Notification | Mako |
|
||||
| Launcher | Wofi |
|
||||
| Editor | Neovim |
|
||||
| Terminal | Kitty |
|
||||
| Fetch Utility | Neofetch |
|
||||
| Theme | Catppuccin Macchiato |
|
||||
| Font | JetBrains Mono & Font Awesome |
|
||||
| File Browser | Thunar & viewnior for images |
|
||||
| Internet Browser | Firefox |
|
||||
| Screenshot | Hyprshot |
|
||||
| Clipboard | wl-clipboard |
|
||||
| Idle | Swayidle |
|
||||
| Lock | Swaylock |
|
||||
| Logout menu | Wlogout |
|
||||
| Wallpaper | Hyprpaper |
|
||||
| Display Manager | SDDM |
|
||||
| Containerization | Podman |
|
||||
| Virtualisation | qemu + virt-manager + libvirtd |
|
||||
|
||||
## ⌨ Keybindings
|
||||
|
||||
| Key Combination | Action |
|
||||
| ------------------------- | --------------------------------------------------------------------- |
|
||||
| SUPER + H, J, K, L | Change window focus |
|
||||
| SUPER + CTRL + H, J, K, L | Resize window |
|
||||
| SUPER + SHIFT + H,J,K,L | Move windows |
|
||||
| SUPER + 1..0 | Change workspace |
|
||||
| SUPER + SHIFT + 1..0 | Move window to workspace |
|
||||
| SUPER + S | Toggle split |
|
||||
| SUPER + Q | Kill active window |
|
||||
| SUPER + SHIFT + Q | Launch `swaylock` |
|
||||
| SUPER + M | Exit from `hyprland` |
|
||||
| SUPER + Return | Launch `kitty` |
|
||||
| SUPER + D | Launch `wofi` |
|
||||
| SUPER + E | Launch `thunar` |
|
||||
| SUPER + M | Launch `wlogout` |
|
||||
| SUPER + B | Launch `firefox` |
|
||||
| SUPER + C | Launch `telegram-desktop` |
|
||||
| Print | Take screenshot (currently configured to area capture into clipboard) |
|
||||
|
||||
All other keybindings can be found at [bind.conf](./home/config/hypr/bind.conf)
|
||||
|
||||
## NixOS specific zsh aliases
|
||||
|
||||
- **fullClean** - Fully clean old generations data
|
||||
- **rebuild** - alias to `nixos-rebuild switch`
|
||||
- **fullRebuild** - same as previous but also includes `home-manager switch`
|
||||
- **homeRebuild** - only rebuild home-manager
|
||||
|
||||
> Make sure to make appropriate changes to [shell.nix](./home/user/shell.nix) flake paths.
|
||||
|
||||
## 📖 License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||
68
flake.lock
generated
68
flake.lock
generated
|
|
@ -2,22 +2,10 @@
|
|||
"nodes": {
|
||||
"crane": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"lanzaboote",
|
||||
"flake-compat"
|
||||
],
|
||||
"flake-utils": [
|
||||
"lanzaboote",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": [
|
||||
"lanzaboote",
|
||||
"rust-overlay"
|
||||
]
|
||||
"flake-compat": ["lanzaboote", "flake-compat"],
|
||||
"flake-utils": ["lanzaboote", "flake-utils"],
|
||||
"nixpkgs": ["lanzaboote", "nixpkgs"],
|
||||
"rust-overlay": ["lanzaboote", "rust-overlay"]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681177078,
|
||||
|
|
@ -36,9 +24,7 @@
|
|||
"firefox-addons": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs": ["nixpkgs"]
|
||||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
|
|
@ -74,10 +60,7 @@
|
|||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs-lib": ["lanzaboote", "nixpkgs"]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680392223,
|
||||
|
|
@ -128,11 +111,7 @@
|
|||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"pre-commit-hooks-nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs": ["lanzaboote", "pre-commit-hooks-nix", "nixpkgs"]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1660459072,
|
||||
|
|
@ -150,9 +129,7 @@
|
|||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs": ["nixpkgs"]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710888565,
|
||||
|
|
@ -175,9 +152,7 @@
|
|||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs": ["nixpkgs"],
|
||||
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
|
|
@ -245,19 +220,10 @@
|
|||
},
|
||||
"pre-commit-hooks-nix": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"lanzaboote",
|
||||
"flake-compat"
|
||||
],
|
||||
"flake-utils": [
|
||||
"lanzaboote",
|
||||
"flake-utils"
|
||||
],
|
||||
"flake-compat": ["lanzaboote", "flake-compat"],
|
||||
"flake-utils": ["lanzaboote", "flake-utils"],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs": ["lanzaboote", "nixpkgs"],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
|
|
@ -285,14 +251,8 @@
|
|||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"lanzaboote",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
]
|
||||
"flake-utils": ["lanzaboote", "flake-utils"],
|
||||
"nixpkgs": ["lanzaboote", "nixpkgs"]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682129965,
|
||||
|
|
|
|||
84
flake.nix
84
flake.nix
|
|
@ -1,52 +1,48 @@
|
|||
{
|
||||
description = "gpskwlkr NixOS";
|
||||
description = "danny NixOS";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
firefox-addons = {
|
||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.3.0";
|
||||
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
firefox-addons = {
|
||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, lanzaboote, ... }@inputs:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
nixosConfigurations.nixos-personal = lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./system/configuration.nix
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
specialArgs = {
|
||||
inherit pkgs-unstable;
|
||||
};
|
||||
};
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.3.0";
|
||||
|
||||
homeConfigurations = {
|
||||
gpskwlkr = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [ ./home ];
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs-unstable;
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs, nixpkgs-unstable, home-manager, lanzaboote, ... }@inputs:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
|
||||
in {
|
||||
nixosConfigurations.nixos-personal = lib.nixosSystem {
|
||||
inherit system;
|
||||
modules =
|
||||
[ ./system/configuration.nix lanzaboote.nixosModules.lanzaboote ];
|
||||
specialArgs = { inherit pkgs-unstable; };
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
danny = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [ ./home ];
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs-unstable;
|
||||
inherit inputs;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
$mainMod = SUPER
|
||||
|
||||
bind = $mainMod, T, exec, kitty
|
||||
bind = $mainMod, Return, exec, kitty
|
||||
bind = $mainMod, Q, killactive,
|
||||
bind = $mainMod, M, exec, wlogout --protocol layer-shell
|
||||
|
|
@ -48,8 +49,7 @@ bind = $mainMod SHIFT, h, movewindow, l
|
|||
bind = $mainMod SHIFT, k, movewindow, u
|
||||
bind = $mainMod SHIFT, j, movewindow, d
|
||||
|
||||
bind = $mainMod, b, exec, firefox
|
||||
bind = $mainMod, c, exec, telegram-desktop
|
||||
bind = $mainMod, f, exec, firefox
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
|
|
|
|||
|
|
@ -5,7 +5,3 @@ exec-once = waybar & hyprpaper
|
|||
exec-once = swayidle -w
|
||||
exec-once = nwg-look -a
|
||||
exec-once = [workspace 2 silent] firefox
|
||||
exec-once = [workspace 10 silent] telegram-desktop
|
||||
exec-once = [workspace 10 silent] vesktop
|
||||
exec-once = [workspace 3 silent] thunderbird
|
||||
exec-once = [workspace 5 silent] steam
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
preload = ~/.config/wallpapers/wall.png
|
||||
wallpaper = HDMI-A-1, ~/.config/wallpapers/wall.png
|
||||
# wallpaper = HDMI-A-1, ~/.config/wallpapers/wall.png
|
||||
splash = false
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
input {
|
||||
kb_layout = us, ru, ge
|
||||
kb_layout = us
|
||||
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options = grp:alt_shift_toggle, caps:swapescape
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
|
|
|||
10
home/config/nvim/.gitignore
vendored
Normal file
10
home/config/nvim/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
||||
lazy-lock.json
|
||||
lazyvim.json
|
||||
15
home/config/nvim/.neoconf.json
Normal file
15
home/config/nvim/.neoconf.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
home/config/nvim/coc-settings.json
Normal file
3
home/config/nvim/coc-settings.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"stylelint.enable": false
|
||||
}
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
require("gpskwlkr.core")
|
||||
require("gpskwlkr.lazy")
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||
"LuaSnip": { "branch": "master", "commit": "2463d687fe704b76eb0aa3bb34e95f69a5bb0362" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "6c456b888823d9e4832aa91c482bccd19445c009" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"conform.nvim": { "branch": "master", "commit": "ad2b5ecd907128ed1b66b1cf4bed57902ef836ee" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "94b0d24483d56f3777ee0c8dc51675f21709318c" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "7f26cf5e27e2bd910ce0ea00c514da2bf97423b8" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
|
||||
"mason-null-ls.nvim": { "branch": "main", "commit": "d1f7258f80867f718d643d88eee66959671a4bef" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "8b70e7f1e0a4119c1234c3bde4a01c241cabcc74" },
|
||||
"mason.nvim": { "branch": "main", "commit": "a09da6ac634926a299dd439da08bdb547a8ca011" },
|
||||
"move.nvim": { "branch": "main", "commit": "d663b74b4e38f257aae757541c9076b8047844d6" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "e7382de51b4cf629e56f1fa18192e716e5ba8145" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
|
||||
"nvim-lint": { "branch": "master", "commit": "3ffa176628fe49e74f47992757016b7371a9b86b" },
|
||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "8e7223e138590c1bd9d86d3de810e65939d8b12f" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "0d9e870d01894c592d7ea93cfe0fa451916d9a7f" },
|
||||
"nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "50f30bcd8c62ac4a83d133d738f268279f2c2ce2" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "362ebd3a210f20aab80be05557f216cbaf4531e6" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0e2d5bd4cbe75849a013901555d436a48c6680cb" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "808627b8d412b2a6b6fc6eed816fec3557198b01" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||
"vim-ReplaceWithRegister": { "branch": "master", "commit": "aad1e8fa31cb4722f20fe40679caa56e25120032" },
|
||||
"vim-nightfly-guicolors": { "branch": "master", "commit": "90d85c8a094266122fb1fd173e7bcc0cd0efdd49" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" }
|
||||
}
|
||||
15
home/config/nvim/lua/config/autocmds.lua
Normal file
15
home/config/nvim/lua/config/autocmds.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
desc = "Auto select virtualenv Nvim open",
|
||||
pattern = "*.py",
|
||||
callback = function()
|
||||
local venv = vim.fn.findfile("pyproject.toml", vim.fn.getcwd() .. ";")
|
||||
if venv ~= "" then
|
||||
require("venv-selector").retrieve_from_cache()
|
||||
end
|
||||
end,
|
||||
once = true,
|
||||
})
|
||||
3
home/config/nvim/lua/config/keymaps.lua
Normal file
3
home/config/nvim/lua/config/keymaps.lua
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
77
home/config/nvim/lua/config/lazy.lua
Normal file
77
home/config/nvim/lua/config/lazy.lua
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import any extras modules here
|
||||
{ import = "lazyvim.plugins.extras.coding.luasnip" },
|
||||
{ import = "lazyvim.plugins.extras.coding.mini-surround" },
|
||||
{ import = "lazyvim.plugins.extras.coding.yanky" },
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
{ import = "lazyvim.plugins.extras.dap.nlua" },
|
||||
{ import = "lazyvim.plugins.extras.editor.dial" },
|
||||
{ import = "lazyvim.plugins.extras.formatting.biome" },
|
||||
{ import = "lazyvim.plugins.extras.formatting.black" },
|
||||
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||
{ import = "lazyvim.plugins.extras.lang.cmake" },
|
||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
||||
{ import = "lazyvim.plugins.extras.lang.git" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
||||
{ import = "lazyvim.plugins.extras.lang.nushell" },
|
||||
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
|
||||
{ import = "lazyvim.plugins.extras.lang.python" },
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
{ import = "lazyvim.plugins.extras.lang.toml" },
|
||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||
{ import = "lazyvim.plugins.extras.ui.alpha" },
|
||||
{ import = "lazyvim.plugins.extras.ui.dashboard-nvim" },
|
||||
{ import = "lazyvim.plugins.extras.ui.edgy" },
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-indentscope" },
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
{ import = "lazyvim.plugins.extras.ui.smear-cursor" },
|
||||
{ import = "lazyvim.plugins.extras.ui.treesitter-context" },
|
||||
{ import = "lazyvim.plugins.extras.util.dot" },
|
||||
{ import = "lazyvim.plugins.extras.util.mini-hipatterns" },
|
||||
{ import = "lazyvim.plugins.extras.util.project" },
|
||||
{ import = "lazyvim.plugins.extras.vscode" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
21
home/config/nvim/lua/config/options.lua
Normal file
21
home/config/nvim/lua/config/options.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
|
||||
function GetAvailableWindowsShell()
|
||||
local shellList = { "nu", "pwsh-preview", "pwsh", "powershell", "cmd" }
|
||||
local length = #shellList
|
||||
for i = 1, length do
|
||||
local commandToCheck = "where " .. shellList[i]
|
||||
local exitCode = os.execute(commandToCheck)
|
||||
if exitCode == 0 then
|
||||
return shellList[i]
|
||||
end
|
||||
end
|
||||
|
||||
return shellList[length - 1]
|
||||
end
|
||||
|
||||
if package.config:sub(1, 1) == "\\" then
|
||||
vim.o.shell = GetAvailableWindowsShell()
|
||||
end
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
require("gpskwlkr.core.options")
|
||||
require("gpskwlkr.core.keymaps")
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
vim.g.mapleader = " "
|
||||
|
||||
local keymap = vim.keymap
|
||||
|
||||
keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||
keymap.set("n", "x", '"_x')
|
||||
keymap.set("n", "<C-s>", ":w<CR>")
|
||||
|
||||
-- increment/decrement numbers
|
||||
keymap.set("n", "<leader>+", "<C-a>") -- increment
|
||||
keymap.set("n", "<leader>-", "<C-x>") -- decrement
|
||||
|
||||
-- window management
|
||||
keymap.set("n", "<leader>sv", "<C-w>v") -- split window vertically
|
||||
keymap.set("n", "<leader>sh", "<C-w>s") -- split window horizontally
|
||||
keymap.set("n", "<leader>se", "<C-w>=") -- make split windows equal width & height
|
||||
keymap.set("n", "<leader>sx", ":close<CR>") -- close current split window
|
||||
|
||||
keymap.set("n", "<leader>to", ":tabnew<CR>") -- open new tab
|
||||
keymap.set("n", "<leader>tx", ":tabclose<CR>") -- close current tab
|
||||
keymap.set("n", "<leader>tn", ":tabn<CR>") -- go to next tab
|
||||
keymap.set("n", "<leader>tp", ":tabp<CR>") -- go to previous tab
|
||||
|
||||
keymap.set("n", "<leader>ff", ":Format<CR>") -- fix indentations in the current file
|
||||
|
||||
opts = { noremap = true, silent = true }
|
||||
-- Normal-mode commands
|
||||
vim.keymap.set("n", "<A-j>", ":MoveLine(1)<CR>", opts)
|
||||
vim.keymap.set("n", "<A-k>", ":MoveLine(-1)<CR>", opts)
|
||||
vim.keymap.set("n", "<A-h>", ":MoveHChar(-1)<CR>", opts)
|
||||
vim.keymap.set("n", "<A-l>", ":MoveHChar(1)<CR>", opts)
|
||||
|
||||
-- Visual-mode commands
|
||||
vim.keymap.set("v", "<A-j>", ":MoveBlock(1)<CR>", opts)
|
||||
vim.keymap.set("v", "<A-k>", ":MoveBlock(-1)<CR>", opts)
|
||||
vim.keymap.set("v", "<A-h>", ":MoveHBlock(-1)<CR>", opts)
|
||||
vim.keymap.set("v", "<A-l>", ":MoveHBlock(1)<CR>", opts)
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
local opt = vim.opt
|
||||
|
||||
opt.nu = true
|
||||
opt.relativenumber = true
|
||||
|
||||
opt.tabstop = 4
|
||||
opt.softtabstop = 4
|
||||
opt.shiftwidth = 4
|
||||
opt.expandtab = true
|
||||
|
||||
opt.smartindent = true
|
||||
opt.wrap = false
|
||||
|
||||
opt.hlsearch = false
|
||||
opt.incsearch = true
|
||||
opt.ignorecase = true
|
||||
opt.smartcase = true
|
||||
|
||||
opt.termguicolors = true
|
||||
|
||||
opt.scrolloff = 8
|
||||
opt.signcolumn = "yes"
|
||||
|
||||
opt.updatetime = 50
|
||||
|
||||
-- opt.colorcolumn = "80"
|
||||
|
||||
opt.cursorline = true
|
||||
|
||||
opt.clipboard:append("unnamedplus")
|
||||
opt.backspace = "indent,eol,start"
|
||||
opt.splitright = true
|
||||
opt.splitbelow = true
|
||||
opt.iskeyword:append("-")
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({ { import = "gpskwlkr.plugins" }, { import = "gpskwlkr.plugins.lsp" } }, {
|
||||
install = {
|
||||
colorscheme = { "nightfly" },
|
||||
},
|
||||
checker = {
|
||||
enabled = true,
|
||||
notify = false,
|
||||
},
|
||||
change_detection = {
|
||||
notify = false,
|
||||
},
|
||||
})
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
version = "*",
|
||||
opts = {
|
||||
options = {
|
||||
mode = "tabs",
|
||||
separator_style = "slant",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = true,
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
config = function()
|
||||
local catppuccin = require("catppuccin")
|
||||
catppuccin.setup({
|
||||
flavour = "macchiato"
|
||||
})
|
||||
-- load the colorscheme here
|
||||
vim.cmd([[colorscheme catppuccin]])
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
},
|
||||
config = function()
|
||||
-- import comment plugin safely
|
||||
local comment = require("Comment")
|
||||
|
||||
local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim")
|
||||
|
||||
-- enable comment
|
||||
comment.setup({
|
||||
-- for commenting tsx and jsx files
|
||||
pre_hook = ts_context_commentstring.create_pre_hook(),
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
"stevearc/dressing.nvim",
|
||||
event = "VeryLazy",
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
return {
|
||||
"stevearc/conform.nvim",
|
||||
lazy = true,
|
||||
event = { "BufReadPre", "BufNewFile" }, -- to disable, comment this out
|
||||
config = function()
|
||||
local conform = require("conform")
|
||||
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
javascript = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
javascriptreact = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
svelte = { "prettier" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
json = { "prettier" },
|
||||
yaml = { "prettier" },
|
||||
markdown = { "prettier" },
|
||||
graphql = { "prettier" },
|
||||
lua = { "stylua" },
|
||||
python = { "isort", "black" },
|
||||
},
|
||||
format_on_save = {
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = 1000,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "<leader>mp", function()
|
||||
conform.format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = 1000,
|
||||
})
|
||||
end, { desc = "Format file or range (in visual mode)" })
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = true,
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
return {
|
||||
"christoomey/vim-tmux-navigator",
|
||||
"nvim-lua/plenary.nvim", -- lua functions that many plugins use
|
||||
"christoomey/vim-tmux-navigator", -- tmux & split window navigation
|
||||
"inkarkat/vim-ReplaceWithRegister",
|
||||
"fedepujol/move.nvim",
|
||||
"xiyaowong/transparent.nvim"
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
lazy = true,
|
||||
event = { "BufReadPre", "BufNewFile" }, -- to disable, comment this out
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
|
||||
lint.linters_by_ft = {
|
||||
javascript = { "eslint_d" },
|
||||
typescript = { "eslint_d" },
|
||||
javascriptreact = { "eslint_d" },
|
||||
typescriptreact = { "eslint_d" },
|
||||
svelte = { "eslint_d" },
|
||||
python = { "pylint" },
|
||||
}
|
||||
|
||||
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>l", function()
|
||||
lint.try_lint()
|
||||
end, { desc = "Trigger linting for current file" })
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,166 +0,0 @@
|
|||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||
},
|
||||
config = function()
|
||||
-- import lspconfig plugin
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- import cmp-nvim-lsp plugin
|
||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
|
||||
local keymap = vim.keymap -- for conciseness
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
local on_attach = function(client, bufnr)
|
||||
opts.buffer = bufnr
|
||||
|
||||
-- set keybinds
|
||||
opts.desc = "Show LSP references"
|
||||
keymap.set("n", "gR", "<cmd>Telescope lsp_references<CR>", opts) -- show definition, references
|
||||
|
||||
opts.desc = "Go to declaration"
|
||||
keymap.set("n", "gD", vim.lsp.buf.declaration, opts) -- go to declaration
|
||||
|
||||
opts.desc = "Show LSP definitions"
|
||||
keymap.set("n", "gd", "<cmd>Telescope lsp_definitions<CR>", opts) -- show lsp definitions
|
||||
|
||||
opts.desc = "Show LSP implementations"
|
||||
keymap.set("n", "gi", "<cmd>Telescope lsp_implementations<CR>", opts) -- show lsp implementations
|
||||
|
||||
opts.desc = "Show LSP type definitions"
|
||||
keymap.set("n", "gt", "<cmd>Telescope lsp_type_definitions<CR>", opts) -- show lsp type definitions
|
||||
|
||||
opts.desc = "See available code actions"
|
||||
keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection
|
||||
|
||||
opts.desc = "Smart rename"
|
||||
keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts) -- smart rename
|
||||
|
||||
opts.desc = "Show buffer diagnostics"
|
||||
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnr=0<CR>", opts) -- show diagnostics for file
|
||||
|
||||
opts.desc = "Show line diagnostics"
|
||||
keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts) -- show diagnostics for line
|
||||
|
||||
opts.desc = "Go to previous diagnostic"
|
||||
keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer
|
||||
|
||||
opts.desc = "Go to next diagnostic"
|
||||
keymap.set("n", "]d", vim.diagnostic.goto_next, opts) -- jump to next diagnostic in buffer
|
||||
|
||||
opts.desc = "Show documentation for what is under cursor"
|
||||
keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor
|
||||
|
||||
opts.desc = "Restart LSP"
|
||||
keymap.set("n", "<leader>rs", ":LspRestart<CR>", opts) -- mapping to restart lsp if necessary
|
||||
end
|
||||
|
||||
-- used to enable autocompletion (assign to every lsp server config)
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
|
||||
-- Change the Diagnostic symbols in the sign column (gutter)
|
||||
-- (not in youtube nvim video)
|
||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
end
|
||||
|
||||
-- configure html server
|
||||
lspconfig["html"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- configure typescript server with plugin
|
||||
lspconfig["tsserver"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- configure css server
|
||||
lspconfig["cssls"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- configure tailwindcss server
|
||||
lspconfig["tailwindcss"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- configure svelte server
|
||||
lspconfig["svelte"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = function(client, bufnr)
|
||||
on_attach(client, bufnr)
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = { "*.js", "*.ts" },
|
||||
callback = function(ctx)
|
||||
if client.name == "svelte" then
|
||||
client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.file })
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
lspconfig["csharp_ls"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- configure prisma orm server
|
||||
lspconfig["prismals"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- configure graphql language server
|
||||
lspconfig["graphql"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" },
|
||||
})
|
||||
|
||||
-- configure emmet language server
|
||||
lspconfig["emmet_ls"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" },
|
||||
})
|
||||
|
||||
-- configure python server
|
||||
lspconfig["pyright"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- configure lua server (with special settings)
|
||||
lspconfig["lua_ls"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = { -- custom settings for lua
|
||||
Lua = {
|
||||
-- make the language server recognize "vim" global
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
-- make language server aware of runtime files
|
||||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.stdpath("config") .. "/lua"] = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
return {
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- import mason
|
||||
local mason = require("mason")
|
||||
|
||||
-- import mason-lspconfig
|
||||
local mason_lspconfig = require("mason-lspconfig")
|
||||
|
||||
local mason_tool_installer = require("mason-tool-installer")
|
||||
|
||||
-- enable mason and configure icons
|
||||
mason.setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
mason_lspconfig.setup({
|
||||
-- list of servers for mason to install
|
||||
ensure_installed = {
|
||||
"tsserver",
|
||||
"html",
|
||||
"cssls",
|
||||
"tailwindcss",
|
||||
"svelte",
|
||||
"lua_ls",
|
||||
"graphql",
|
||||
"emmet_ls",
|
||||
"prismals",
|
||||
"pyright",
|
||||
"csharp_ls"
|
||||
},
|
||||
-- auto-install configured servers (with lspconfig)
|
||||
automatic_installation = true, -- not the same as ensure_installed
|
||||
})
|
||||
|
||||
mason_tool_installer.setup({
|
||||
ensure_installed = {
|
||||
"prettier", -- prettier formatter
|
||||
"stylua", -- lua formatter
|
||||
"isort", -- python formatter
|
||||
"black", -- python formatter
|
||||
"pylint", -- python linter
|
||||
"eslint_d", -- js linter
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
return {
|
||||
"nvimtools/none-ls.nvim", -- configure formatters & linters
|
||||
lazy = true,
|
||||
-- event = { "BufReadPre", "BufNewFile" }, -- to enable uncomment this
|
||||
dependencies = {
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
},
|
||||
config = function()
|
||||
local mason_null_ls = require("mason-null-ls")
|
||||
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
local null_ls_utils = require("null-ls.utils")
|
||||
|
||||
mason_null_ls.setup({
|
||||
ensure_installed = {
|
||||
"prettier", -- prettier formatter
|
||||
"stylua", -- lua formatter
|
||||
"black", -- python formatter
|
||||
"pylint", -- python linter
|
||||
"eslint_d", -- js linter
|
||||
},
|
||||
})
|
||||
|
||||
-- for conciseness
|
||||
local formatting = null_ls.builtins.formatting -- to setup formatters
|
||||
local diagnostics = null_ls.builtins.diagnostics -- to setup linters
|
||||
|
||||
-- to setup format on save
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
|
||||
-- configure null_ls
|
||||
null_ls.setup({
|
||||
-- add package.json as identifier for root (for typescript monorepos)
|
||||
root_dir = null_ls_utils.root_pattern(".null-ls-root", "Makefile", ".git", "package.json"),
|
||||
-- setup formatters & linters
|
||||
sources = {
|
||||
-- to disable file types use
|
||||
-- "formatting.prettier.with({disabled_filetypes: {}})" (see null-ls docs)
|
||||
formatting.prettier.with({
|
||||
extra_filetypes = { "svelte" },
|
||||
}), -- js/ts formatter
|
||||
formatting.stylua, -- lua formatter
|
||||
formatting.isort,
|
||||
formatting.black,
|
||||
diagnostics.pylint,
|
||||
diagnostics.eslint_d.with({ -- js/ts linter
|
||||
condition = function(utils)
|
||||
return utils.root_has_file({ ".eslintrc.js", ".eslintrc.cjs" }) -- only enable if root has .eslintrc.js or .eslintrc.cjs
|
||||
end,
|
||||
}),
|
||||
},
|
||||
-- configure format on save
|
||||
on_attach = function(current_client, bufnr)
|
||||
if current_client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({
|
||||
filter = function(client)
|
||||
-- only use null-ls for formatting instead of lsp server
|
||||
return client.name == "null-ls"
|
||||
end,
|
||||
bufnr = bufnr,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"simrat39/rust-tools.nvim",
|
||||
config = function()
|
||||
local rt = require("rust-tools")
|
||||
rt.setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
-- Hover actions
|
||||
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||
-- Code action groups
|
||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
local lualine = require("lualine")
|
||||
local lazy_status = require("lazy.status") -- to configure lazy pending updates count
|
||||
|
||||
local colors = {
|
||||
blue = "#65D1FF",
|
||||
green = "#3EFFDC",
|
||||
violet = "#FF61EF",
|
||||
yellow = "#FFDA7B",
|
||||
red = "#FF4A4A",
|
||||
fg = "#c3ccdc",
|
||||
bg = "#112638",
|
||||
inactive_bg = "#2c3043",
|
||||
}
|
||||
|
||||
local my_lualine_theme = {
|
||||
normal = {
|
||||
a = { bg = colors.blue, fg = colors.bg, gui = "bold" },
|
||||
b = { bg = colors.bg, fg = colors.fg },
|
||||
c = { bg = colors.bg, fg = colors.fg },
|
||||
},
|
||||
insert = {
|
||||
a = { bg = colors.green, fg = colors.bg, gui = "bold" },
|
||||
b = { bg = colors.bg, fg = colors.fg },
|
||||
c = { bg = colors.bg, fg = colors.fg },
|
||||
},
|
||||
visual = {
|
||||
a = { bg = colors.violet, fg = colors.bg, gui = "bold" },
|
||||
b = { bg = colors.bg, fg = colors.fg },
|
||||
c = { bg = colors.bg, fg = colors.fg },
|
||||
},
|
||||
command = {
|
||||
a = { bg = colors.yellow, fg = colors.bg, gui = "bold" },
|
||||
b = { bg = colors.bg, fg = colors.fg },
|
||||
c = { bg = colors.bg, fg = colors.fg },
|
||||
},
|
||||
replace = {
|
||||
a = { bg = colors.red, fg = colors.bg, gui = "bold" },
|
||||
b = { bg = colors.bg, fg = colors.fg },
|
||||
c = { bg = colors.bg, fg = colors.fg },
|
||||
},
|
||||
inactive = {
|
||||
a = { bg = colors.inactive_bg, fg = colors.semilightgray, gui = "bold" },
|
||||
b = { bg = colors.inactive_bg, fg = colors.semilightgray },
|
||||
c = { bg = colors.inactive_bg, fg = colors.semilightgray },
|
||||
},
|
||||
}
|
||||
|
||||
-- configure lualine with modified theme
|
||||
lualine.setup({
|
||||
options = {
|
||||
theme = my_lualine_theme,
|
||||
},
|
||||
sections = {
|
||||
lualine_x = {
|
||||
{
|
||||
lazy_status.updates,
|
||||
cond = lazy_status.has_updates,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{ "encoding" },
|
||||
{ "fileformat" },
|
||||
{ "filetype" },
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = { "InsertEnter" },
|
||||
dependencies = {
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
config = function()
|
||||
-- import nvim-autopairs
|
||||
local autopairs = require("nvim-autopairs")
|
||||
|
||||
-- configure autopairs
|
||||
autopairs.setup({
|
||||
check_ts = true, -- enable treesitter
|
||||
ts_config = {
|
||||
lua = { "string" }, -- don't add pairs in lua string treesitter nodes
|
||||
javascript = { "template_string" }, -- don't add pairs in javscript template_string treesitter nodes
|
||||
java = false, -- don't check treesitter on java
|
||||
},
|
||||
})
|
||||
|
||||
-- import nvim-autopairs completion functionality
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
|
||||
-- import nvim-cmp plugin (completions plugin)
|
||||
local cmp = require("cmp")
|
||||
|
||||
-- make autopairs and completion work together
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer", -- source for text in buffer
|
||||
"hrsh7th/cmp-path", -- source for file system paths
|
||||
"L3MON4D3/LuaSnip", -- snippet engine
|
||||
"saadparwaiz1/cmp_luasnip", -- for autocompletion
|
||||
"rafamadriz/friendly-snippets", -- useful snippets
|
||||
"onsails/lspkind.nvim", -- vs-code like pictograms
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
local lspkind = require("lspkind")
|
||||
|
||||
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
completion = {
|
||||
completeopt = "menu,menuone,preview,noselect",
|
||||
},
|
||||
snippet = { -- configure how nvim-cmp interacts with snippet engine
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-k>"] = cmp.mapping.select_prev_item(), -- previous suggestion
|
||||
["<C-j>"] = cmp.mapping.select_next_item(), -- next suggestion
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||
["<C-e>"] = cmp.mapping.abort(), -- close completion window
|
||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
||||
}),
|
||||
-- sources for autocompletion
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" }, -- snippets
|
||||
{ name = "buffer" }, -- text within current buffer
|
||||
{ name = "path" }, -- file system paths
|
||||
}),
|
||||
-- configure lspkind for vs-code like pictograms in completion menu
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
maxwidth = 50,
|
||||
ellipsis_char = "...",
|
||||
}),
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
return {
|
||||
"kylechui/nvim-surround",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
config = true,
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
local nvimtree = require("nvim-tree")
|
||||
|
||||
-- recommended settings from nvim-tree documentation
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- change color for arrows in tree to light blue
|
||||
vim.cmd([[ highlight NvimTreeFolderArrowClosed guifg=#3FC5FF ]])
|
||||
vim.cmd([[ highlight NvimTreeFolderArrowOpen guifg=#3FC5FF ]])
|
||||
|
||||
-- configure nvim-tree
|
||||
nvimtree.setup({
|
||||
view = {
|
||||
width = 35,
|
||||
relativenumber = true,
|
||||
},
|
||||
-- change folder arrow icons
|
||||
renderer = {
|
||||
indent_markers = {
|
||||
enable = true,
|
||||
},
|
||||
icons = {
|
||||
glyphs = {
|
||||
folder = {
|
||||
arrow_closed = "", -- arrow when folder is closed
|
||||
arrow_open = "", -- arrow when folder is open
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- disable window_picker for
|
||||
-- explorer to work well with
|
||||
-- window splits
|
||||
actions = {
|
||||
open_file = {
|
||||
window_picker = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
filters = {
|
||||
custom = { ".DS_Store" },
|
||||
},
|
||||
git = {
|
||||
ignore = false,
|
||||
},
|
||||
})
|
||||
|
||||
-- set keymaps
|
||||
local keymap = vim.keymap -- for conciseness
|
||||
|
||||
keymap.set("n", "<leader>ee", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle file explorer" }) -- toggle file explorer
|
||||
keymap.set("n", "<leader>ef", "<cmd>NvimTreeFindFileToggle<CR>", { desc = "Toggle file explorer on current file" }) -- toggle file explorer on current file
|
||||
keymap.set("n", "<leader>ec", "<cmd>NvimTreeCollapse<CR>", { desc = "Collapse file explorer" }) -- collapse file explorer
|
||||
keymap.set("n", "<leader>er", "<cmd>NvimTreeRefresh<CR>", { desc = "Refresh file explorer" }) -- refresh file explorer
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
config = function()
|
||||
-- import nvim-treesitter plugin
|
||||
local treesitter = require("nvim-treesitter.configs")
|
||||
|
||||
-- configure treesitter
|
||||
treesitter.setup({ -- enable syntax highlighting
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
-- enable indentation
|
||||
indent = { enable = true },
|
||||
-- enable autotagging (w/ nvim-ts-autotag plugin)
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
-- ensure these language parsers are installed
|
||||
ensure_installed = {
|
||||
"json",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"yaml",
|
||||
"html",
|
||||
"css",
|
||||
"prisma",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"svelte",
|
||||
"graphql",
|
||||
"bash",
|
||||
"lua",
|
||||
"vim",
|
||||
"dockerfile",
|
||||
"gitignore",
|
||||
"query",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
enable_autocmd = false,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "0.1.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
local actions = require("telescope.actions")
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
path_display = { "truncate " },
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-k>"] = actions.move_selection_previous, -- move to prev result
|
||||
["<C-j>"] = actions.move_selection_next, -- move to next result
|
||||
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
telescope.load_extension("fzf")
|
||||
|
||||
-- set keymaps
|
||||
local keymap = vim.keymap -- for conciseness
|
||||
|
||||
keymap.set("n", "<leader>pf", builtin.find_files, {})
|
||||
keymap.set("n", "<C-p>", builtin.git_files, {})
|
||||
keymap.set("n", "<leader>ps", function()
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||
end)
|
||||
keymap.set("n", "<leader>vh", builtin.help_tags, {})
|
||||
end,
|
||||
}
|
||||
4
home/config/nvim/lua/plugins/coc.lua
Normal file
4
home/config/nvim/lua/plugins/coc.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
{ "neoclide/coc.nvim", branch = "release" },
|
||||
{ "yaegassy/coc-volar", dependencies = "neoclide/coc.nvim", build = "yarn install --frozen-lockfile" },
|
||||
}
|
||||
66
home/config/nvim/lua/plugins/colorscheme.lua
Normal file
66
home/config/nvim/lua/plugins/colorscheme.lua
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
return {
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
opts = {
|
||||
flavour = "macchiato",
|
||||
background = {
|
||||
light = "latte",
|
||||
dark = "macchiato",
|
||||
},
|
||||
transparent_background = true,
|
||||
integrations = {
|
||||
aerial = true,
|
||||
alpha = true,
|
||||
cmp = true,
|
||||
dashboard = true,
|
||||
flash = true,
|
||||
gitsigns = true,
|
||||
headlines = true,
|
||||
illuminate = true,
|
||||
indent_blankline = { enabled = true },
|
||||
leap = true,
|
||||
lsp_trouble = true,
|
||||
mason = true,
|
||||
markdown = true,
|
||||
mini = true,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
underlines = {
|
||||
errors = { "undercurl" },
|
||||
hints = { "undercurl" },
|
||||
warnings = { "undercurl" },
|
||||
information = { "undercurl" },
|
||||
},
|
||||
},
|
||||
navic = { enabled = true, custom_bg = "lualine" },
|
||||
neotest = true,
|
||||
neotree = true,
|
||||
noice = true,
|
||||
notify = true,
|
||||
semantic_tokens = true,
|
||||
telescope = true,
|
||||
treesitter = true,
|
||||
treesitter_context = true,
|
||||
which_key = true,
|
||||
},
|
||||
},
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
opts = {
|
||||
transparent = true,
|
||||
styles = {
|
||||
sidebars = "transparent",
|
||||
floats = "transparent",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "catppuccin",
|
||||
},
|
||||
},
|
||||
}
|
||||
20
home/config/nvim/lua/plugins/lsp.lua
Normal file
20
home/config/nvim/lua/plugins/lsp.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
local util = require("lspconfig.util")
|
||||
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
biome = {
|
||||
root_dir = function(fname)
|
||||
return util.root_pattern("biome.json", "biome.jsonc")(fname)
|
||||
or util.find_package_json_ancestor(fname)
|
||||
or vim.fs.find("node_modules", { path = fname, upward = true })[1]
|
||||
or util.find_node_modules_ancestor(fname)
|
||||
or util.find_git_ancestor(fname)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
13
home/config/nvim/lua/plugins/notify.lua
Normal file
13
home/config/nvim/lua/plugins/notify.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
opts = {
|
||||
stages = "slide",
|
||||
render = "wrapped-compact",
|
||||
timeout = 2000,
|
||||
top_down = false,
|
||||
fps = 40,
|
||||
background_colour = "#000000",
|
||||
},
|
||||
},
|
||||
}
|
||||
92
home/config/nvim/lua/plugins/nvim-ufo.lua
Normal file
92
home/config/nvim/lua/plugins/nvim-ufo.lua
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (" %d "):format(endLnum - lnum)
|
||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||
local targetWidth = width - sufWidth
|
||||
local curWidth = 0
|
||||
for _, chunk in ipairs(virtText) do
|
||||
local chunkText = chunk[1]
|
||||
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
if targetWidth > curWidth + chunkWidth then
|
||||
table.insert(newVirtText, chunk)
|
||||
else
|
||||
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||
local hlGroup = chunk[2]
|
||||
table.insert(newVirtText, { chunkText, hlGroup })
|
||||
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
-- str width returned from truncate() may less than 2nd argument, need padding
|
||||
if curWidth + chunkWidth < targetWidth then
|
||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
||||
end
|
||||
break
|
||||
end
|
||||
curWidth = curWidth + chunkWidth
|
||||
end
|
||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
||||
return newVirtText
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = { "kevinhwang91/promise-async" },
|
||||
opts = {
|
||||
provider_selector = function()
|
||||
return { "lsp", "indent" }
|
||||
end,
|
||||
fold_virt_text_handler = handler,
|
||||
filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
|
||||
},
|
||||
config = function(_, opts)
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = vim.api.nvim_create_augroup("local_detach_ufo", { clear = true }),
|
||||
pattern = opts.filetype_exclude,
|
||||
callback = function()
|
||||
require("ufo").detach()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.o.foldcolumn = "1"
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldenable = true
|
||||
require("ufo").setup(opts)
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"zR",
|
||||
mode = { "n" },
|
||||
function()
|
||||
require("ufo").openAllFolds()
|
||||
end,
|
||||
{ desc = "Open all folds" },
|
||||
},
|
||||
{
|
||||
"zM",
|
||||
mode = { "n" },
|
||||
function()
|
||||
require("ufo").closeAllFolds()
|
||||
end,
|
||||
{ desc = "Close all folds" },
|
||||
},
|
||||
{
|
||||
"zK",
|
||||
function()
|
||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||
if not winid then
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end,
|
||||
{ desc = "Peek Fold" },
|
||||
},
|
||||
{
|
||||
"zr",
|
||||
mode = { "n" },
|
||||
function()
|
||||
require("ufo").openFoldsExceptKinds()
|
||||
end,
|
||||
{ desc = "Open fold" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
16
home/config/nvim/lua/plugins/venv-selector.lua
Normal file
16
home/config/nvim/lua/plugins/venv-selector.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
config = function() end,
|
||||
},
|
||||
{
|
||||
"linux-cultist/venv-selector.nvim",
|
||||
dependencies = { "neovim/nvim-lspconfig", "nvim-telescope/telescope.nvim", "mfussenegger/nvim-dap" },
|
||||
opts = {
|
||||
name = { "venv", ".venv" },
|
||||
parents = 2,
|
||||
auto_refresh = true,
|
||||
},
|
||||
event = "VeryLazy",
|
||||
},
|
||||
}
|
||||
4
home/config/nvim/stylua.toml
Normal file
4
home/config/nvim/stylua.toml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
{ config, pkgs, pkgs-unstable, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./user
|
||||
];
|
||||
|
||||
home.username = "gpskwlkr";
|
||||
home.homeDirectory = "/home/gpskwlkr";
|
||||
home.stateVersion = "23.11";
|
||||
imports = [ ./user ];
|
||||
|
||||
home.username = "danny";
|
||||
home.homeDirectory = "/home/danny";
|
||||
home.stateVersion = "24.11";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,17 @@
|
|||
let configDir = ../config;
|
||||
in
|
||||
{
|
||||
in {
|
||||
home.file = {
|
||||
".config/nvim".source = "${configDir}/nvim";
|
||||
".config/wallpapers".source = "${configDir}/wallpapers";
|
||||
".config/kitty".source = "${configDir}/kitty";
|
||||
".config/neofetch".source = "${configDir}/neofetch";
|
||||
".config/hypr".source = "${configDir}/hypr";
|
||||
".config/swayidle".source = "${configDir}/swayidle";
|
||||
".config/swaylock".source = "${configDir}/swaylock";
|
||||
".config/wlogout".source = "${configDir}/wlogout";
|
||||
".config/waybar".source = "${configDir}/waybar";
|
||||
".config/btop".source = "${configDir}/btop";
|
||||
".config/wofi".source = "${configDir}/wofi";
|
||||
".config/mako".source = "${configDir}/mako";
|
||||
".config/nvim".source = "${configDir}/nvim";
|
||||
".config/wallpapers".source = "${configDir}/wallpapers";
|
||||
".config/kitty".source = "${configDir}/kitty";
|
||||
".config/neofetch".source = "${configDir}/neofetch";
|
||||
".config/hypr".source = "${configDir}/hypr";
|
||||
".config/swayidle".source = "${configDir}/swayidle";
|
||||
".config/swaylock".source = "${configDir}/swaylock";
|
||||
".config/wlogout".source = "${configDir}/wlogout";
|
||||
".config/waybar".source = "${configDir}/waybar";
|
||||
".config/btop".source = "${configDir}/btop";
|
||||
".config/wofi".source = "${configDir}/wofi";
|
||||
".config/mako".source = "${configDir}/mako";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./gtk.nix
|
||||
./shell.nix
|
||||
./config.nix
|
||||
./packages.nix
|
||||
./programs.nix
|
||||
./environment.nix
|
||||
];
|
||||
imports = [
|
||||
./git.nix
|
||||
./gtk.nix
|
||||
./shell.nix
|
||||
./config.nix
|
||||
./packages.nix
|
||||
./programs.nix
|
||||
./environment.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
|
|
|
|||
|
|
@ -1,32 +1,31 @@
|
|||
{
|
||||
home.sessionVariables = {
|
||||
BROWSER = "firefox";
|
||||
EDITOR = "nvim";
|
||||
TERMINAL = "kitty";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||
QT_SCALE_FACTOR = "1";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland-egl";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
GTK_CSD = "0";
|
||||
WLR_DRM_DEVICES = "/dev/dri/card0";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
WLR_RENDERER = "vulkan";
|
||||
XCURSOR_SIZE = "32";
|
||||
GTK_THEME="Catppuccin-Macchiato-Compact-Blue-Dark";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
GTK_USE_PORTAL = "1";
|
||||
NIXOS_XDG_OPEN_USE_PORTAL = "1";
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||
#XDG_BIN_HOME = "\${HOME}/.local/bin";
|
||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||
|
||||
BROWSER = "firefox";
|
||||
EDITOR = "nvim";
|
||||
TERMINAL = "kitty";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||
QT_SCALE_FACTOR = "1";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland-egl";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
GTK_CSD = "0";
|
||||
WLR_DRM_DEVICES = "/dev/dri/card0";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
WLR_RENDERER = "vulkan";
|
||||
XCURSOR_SIZE = "32";
|
||||
GTK_THEME = "Catppuccin-Macchiato-Compact-Blue-Dark";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
GTK_USE_PORTAL = "1";
|
||||
NIXOS_XDG_OPEN_USE_PORTAL = "1";
|
||||
XDG_CACHE_HOME = "\${HOME}/.cache";
|
||||
XDG_CONFIG_HOME = "\${HOME}/.config";
|
||||
#XDG_BIN_HOME = "\${HOME}/.local/bin";
|
||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
let
|
||||
userName = "gpskwlkr";
|
||||
email = "giorgi.anakidze@outlook.com";
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = userName;
|
||||
userEmail = email;
|
||||
};
|
||||
userName = "danny";
|
||||
email = "Danny10132024@gmail.com";
|
||||
in {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = userName;
|
||||
userEmail = email;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,17 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{ pkgs, ... }: {
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
cursorTheme = {
|
||||
name = "Catppuccin-Macchiato-Blue";
|
||||
package = pkgs.catppuccin-cursors.macchiatoBlue;
|
||||
name = "Catppuccin-Macchiato-Blue";
|
||||
package = pkgs.catppuccin-cursors.macchiatoBlue;
|
||||
};
|
||||
|
||||
theme = {
|
||||
name = "Catppuccin-Macchiato-Compact-Blue-dark";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
size = "compact";
|
||||
accents = ["blue"];
|
||||
accents = [ "blue" ];
|
||||
variant = "macchiato";
|
||||
};
|
||||
};
|
||||
|
|
@ -23,15 +22,15 @@
|
|||
};
|
||||
|
||||
gtk3.extraConfig = {
|
||||
Settings = ''
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
'';
|
||||
Settings = ''
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
'';
|
||||
};
|
||||
|
||||
gtk4.extraConfig = {
|
||||
Settings = ''
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
'';
|
||||
Settings = ''
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,55 +1,32 @@
|
|||
{ pkgs, pkgs-unstable, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
home.packages = [
|
||||
|
||||
# Dev stuff
|
||||
pkgs.jetbrains.rider
|
||||
pkgs.dotnet-sdk_8
|
||||
pkgs.dotnetPackages.Nuget
|
||||
pkgs.gcc
|
||||
pkgs.go
|
||||
pkgs.lua
|
||||
pkgs.nodejs_21
|
||||
pkgs.nodePackages.pnpm
|
||||
(pkgs.python3.withPackages (python-pkgs: [
|
||||
python-pkgs.pip
|
||||
python-pkgs.requests
|
||||
]))
|
||||
(pkgs.python3.withPackages
|
||||
(python-pkgs: [ python-pkgs.pip python-pkgs.requests ]))
|
||||
pkgs.rustup
|
||||
pkgs.pkgsCross.mingwW64.stdenv.cc
|
||||
pkgs.pkgsCross.mingwW64.stdenv.cc
|
||||
pkgs.pkgsCross.mingwW64.windows.pthreads
|
||||
pkgs.zig
|
||||
|
||||
|
||||
# Work stuff
|
||||
pkgs.obsidian
|
||||
pkgs.teams-for-linux
|
||||
pkgs.thunderbird
|
||||
pkgs.zoom-us
|
||||
pkgs.libreoffice-qt
|
||||
pkgs.hunspell
|
||||
|
||||
|
||||
# Bluetooth
|
||||
pkgs.blueberry
|
||||
|
||||
|
||||
|
||||
# Social
|
||||
pkgs.telegram-desktop
|
||||
pkgs-unstable.vesktop
|
||||
|
||||
# Gaming
|
||||
pkgs.steam
|
||||
pkgs.steam-run
|
||||
pkgs.yuzu-mainline
|
||||
(pkgs.lutris.override {
|
||||
extraPkgs = pkgs: [
|
||||
pkgs.wineWowPackages.stable
|
||||
pkgs.winetricks
|
||||
];
|
||||
})
|
||||
# pkgs.steam
|
||||
# pkgs.steam-run
|
||||
# (pkgs.lutris.override {
|
||||
# extraPkgs = pkgs: [ pkgs.wineWowPackages.stable pkgs.winetricks ];
|
||||
# })
|
||||
|
||||
# Downloads
|
||||
pkgs.qbittorrent
|
||||
|
|
@ -59,6 +36,6 @@
|
|||
pkgs-unstable.hyprshot
|
||||
pkgs.catppuccin-cursors.macchiatoBlue
|
||||
pkgs.catppuccin-gtk
|
||||
pkgs.papirus-folders
|
||||
# pkgs.papirus-folders
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,15 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
{ inputs, ... }: {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
profiles.gpskwlkr = {
|
||||
extensions = with inputs.firefox-addons.packages."x86_64-linux"; [
|
||||
bypass-paywalls-clean
|
||||
darkreader
|
||||
facebook-container
|
||||
i-dont-care-about-cookies
|
||||
proton-pass
|
||||
to-google-translate
|
||||
view-image
|
||||
ublock-origin
|
||||
youtube-shorts-block
|
||||
];
|
||||
profiles.danny = {
|
||||
extensions = with inputs.firefox-addons.packages."x86_64-linux"; [
|
||||
darkreader
|
||||
proton-pass
|
||||
to-google-translate
|
||||
view-image
|
||||
# ublock-origin
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,45 +1,40 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
let
|
||||
myAliases = {
|
||||
docker-compose = "podman-compose";
|
||||
cat = "bat";
|
||||
ls = "eza --icons=always";
|
||||
|
||||
fullClean = ''
|
||||
nix-collect-garbage --delete-old
|
||||
fullClean = ''
|
||||
nix-collect-garbage --delete-old
|
||||
|
||||
sudo nix-collect-garbage -d
|
||||
sudo nix-collect-garbage -d
|
||||
|
||||
sudo /run/current-system/bin/switch-to-configuration boot
|
||||
sudo /run/current-system/bin/switch-to-configuration boot
|
||||
'';
|
||||
rebuild = "sudo nixos-rebuild switch --flake ~/.dotfiles/";
|
||||
fullRebuild = "sudo nixos-rebuild switch --flake ~/.dotfiles/ && home-manager switch --flake ~/.dotfiles/ -b backup";
|
||||
fullRebuild =
|
||||
"sudo nixos-rebuild switch --flake ~/.dotfiles/ && home-manager switch --flake ~/.dotfiles/ -b backup";
|
||||
homeRebuild = "home-manager switch --flake ~/.dotfiles/ -b backup";
|
||||
};
|
||||
in
|
||||
{
|
||||
};
|
||||
in {
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initExtra = ''
|
||||
source ~/.p10k.zsh &&
|
||||
eval "$(zoxide init --cmd cd zsh)" &&
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initExtra = ''
|
||||
source ~/.p10k.zsh &&
|
||||
eval "$(zoxide init --cmd cd zsh)" &&
|
||||
|
||||
export PATH="$PATH:/home/gpskwlkr/.dotnet/tools"
|
||||
'';
|
||||
shellAliases = myAliases;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
custom = "$HOME/.oh-my-custom";
|
||||
theme = "powerlevel10k/powerlevel10k";
|
||||
plugins = [
|
||||
"git"
|
||||
"history"
|
||||
"wd"
|
||||
];
|
||||
};
|
||||
};
|
||||
export PATH="$PATH:/home/gpskwlkr/.dotnet/tools"
|
||||
'';
|
||||
shellAliases = myAliases;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
custom = "$HOME/.oh-my-custom";
|
||||
theme = "powerlevel10k/powerlevel10k";
|
||||
plugins = [ "git" "history" "wd" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 MiB |
BIN
images/sddm.png
BIN
images/sddm.png
Binary file not shown.
|
Before Width: | Height: | Size: 955 KiB |
|
|
@ -1,12 +1,8 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./modules
|
||||
];
|
||||
imports = [ ./hardware-configuration.nix ./modules ];
|
||||
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,35 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Switched to lanzaboote Secure Boot
|
||||
# boot = {
|
||||
# kernelParams = ["nohibernate" "ipv6.disable=1"];
|
||||
# tmp.cleanOnBoot = true;
|
||||
# supportedFilesystems = ["ntfs"];
|
||||
# loader = {
|
||||
# grub = {
|
||||
# device = "nodev";
|
||||
# efiSupport = true;
|
||||
# enable = true;
|
||||
# useOSProber = true;
|
||||
# timeoutStyle = "menu";
|
||||
# efiInstallAsRemovable = true;
|
||||
# extraConfig = ''
|
||||
# insmod tpm
|
||||
# '';
|
||||
# };
|
||||
# timeout = 300;
|
||||
# };
|
||||
# };
|
||||
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
sbctl
|
||||
];
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.swraid.enable = true;
|
||||
boot.swraid.mdadmConf =
|
||||
"\n MAILADDR smitty\n ARRAY /dev/md126 metadata=1.2 name=stuff:0\n UUID=3b0b7c51:2681:407e:a22a:e965a8aeece7\n ";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
{ ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./fonts.nix
|
||||
./gaming.nix
|
||||
./hardware.nix
|
||||
./hyprland.nix
|
||||
./internationalisation.nix
|
||||
./misc.nix
|
||||
./networking.nix
|
||||
./nixsettings.nix
|
||||
./packages.nix
|
||||
./polkit.nix
|
||||
./programs.nix
|
||||
./security.nix
|
||||
./services.nix
|
||||
./sound.nix
|
||||
./time.nix
|
||||
./theme.nix
|
||||
./users.nix
|
||||
./virtualisation.nix
|
||||
];
|
||||
imports = [
|
||||
./boot.nix
|
||||
./fonts.nix
|
||||
./gaming.nix
|
||||
./hardware.nix
|
||||
./hyprland.nix
|
||||
./internationalisation.nix
|
||||
./misc.nix
|
||||
./networking.nix
|
||||
./nixsettings.nix
|
||||
./packages.nix
|
||||
./polkit.nix
|
||||
./programs.nix
|
||||
./security.nix
|
||||
./services.nix
|
||||
./sound.nix
|
||||
./time.nix
|
||||
./theme.nix
|
||||
./users.nix
|
||||
# ./virtualisation.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
fonts.packages = with pkgs; [
|
||||
font-awesome
|
||||
font-awesome
|
||||
jetbrains-mono
|
||||
|
||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||
|
|
|
|||
|
|
@ -3,11 +3,9 @@
|
|||
{
|
||||
nix = {
|
||||
settings = {
|
||||
warn-dirty = false;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
substituters = ["https://nix-gaming.cachix.org"];
|
||||
trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
|
||||
};
|
||||
warn-dirty = false;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware = {
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
};
|
||||
graphics.enable = true;
|
||||
nvidia.modesetting.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,21 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
programs.hyprland = { enable = true; };
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
hyprpaper
|
||||
kitty
|
||||
libnotify
|
||||
mako
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
swayidle
|
||||
swaylock-effects
|
||||
wlogout
|
||||
wl-clipboard
|
||||
wofi
|
||||
waybar
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
hyprshade
|
||||
hyprpaper
|
||||
kitty
|
||||
libnotify
|
||||
mako
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
swayidle
|
||||
swaylock-effects
|
||||
wlogout
|
||||
wl-clipboard
|
||||
wofi
|
||||
waybar
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,5 @@
|
|||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
i18n.supportedLocales = [
|
||||
"en_US.UTF-8/UTF-8"
|
||||
"ru_RU.UTF-8/UTF-8"
|
||||
"ka_GE.UTF-8/UTF-8"
|
||||
];
|
||||
i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true;
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
{
|
||||
networking = {
|
||||
hostName = "nixos-personal";
|
||||
networkmanager.enable = true;
|
||||
enableIPv6 = false;
|
||||
firewall.enable = false;
|
||||
hostName = "dn-nix";
|
||||
networkmanager.enable = true;
|
||||
enableIPv6 = false;
|
||||
firewall.enable = false;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,18 +6,17 @@
|
|||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
warn-dirty = false;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
substituters = ["https://nix-gaming.cachix.org"];
|
||||
trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
|
||||
};
|
||||
settings = {
|
||||
warn-dirty = false;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
substituters =
|
||||
[ "https://nix-gaming.cachix.org" "https://hyprland.cachix.org" ];
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
trusted-public-keys = [
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,27 +1,25 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
systemd = {
|
||||
user.services.polkit-gnome-authentication-agent-1 = {
|
||||
description = "polkit-gnome-authentication-agent-1";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
description = "polkit-gnome-authentication-agent-1";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
DefaultTimeoutStopSec=10s
|
||||
DefaultTimeoutStopSec=10s
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
polkit
|
||||
polkit_gnome
|
||||
];
|
||||
environment.systemPackages = with pkgs; [ polkit polkit_gnome ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,94 +1,88 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
xdg.portal = {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = false;
|
||||
xdgOpenUsePortal = false;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
extraPortals =
|
||||
[ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
programs = {
|
||||
# steam = {
|
||||
# enable = true;
|
||||
# remotePlay.openFirewall = true;
|
||||
# dedicatedServer.openFirewall = true;
|
||||
# };
|
||||
|
||||
hyprland = {
|
||||
enable = true;
|
||||
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
xwayland = { enable = true; };
|
||||
portalPackage = pkgs.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
gnupg = {
|
||||
agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
escapeTime = 0;
|
||||
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.vim-tmux-navigator
|
||||
tmuxPlugins.resurrect
|
||||
tmuxPlugins.continuum
|
||||
tmuxPlugins.catppuccin
|
||||
];
|
||||
enable = true;
|
||||
escapeTime = 0;
|
||||
|
||||
extraConfig = ''
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -ga terminal-overrides ",*256col*:Tc"
|
||||
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
||||
set-environment -g COLORTERM "truecolor"
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
bind-key C-a send-prefix
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.vim-tmux-navigator
|
||||
tmuxPlugins.resurrect
|
||||
tmuxPlugins.continuum
|
||||
tmuxPlugins.catppuccin
|
||||
];
|
||||
|
||||
unbind %
|
||||
bind | split-window -h
|
||||
extraConfig = ''
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -ga terminal-overrides ",*256col*:Tc"
|
||||
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
||||
set-environment -g COLORTERM "truecolor"
|
||||
set -g prefix C-b
|
||||
bind-key C-b send-prefix
|
||||
|
||||
unbind '"'
|
||||
bind - split-window -v
|
||||
unbind %
|
||||
bind | split-window -h
|
||||
|
||||
unbind r
|
||||
bind r source-file ~/.tmux.conf
|
||||
unbind '"'
|
||||
bind - split-window -v
|
||||
|
||||
bind -r j resize-pane -D 5
|
||||
bind -r k resize-pane -U 5
|
||||
bind -r l resize-pane -R 5
|
||||
bind -r h resize-pane -L 5
|
||||
unbind r
|
||||
bind r source-file ~/.tmux.conf
|
||||
|
||||
bind -r m resize-pane -Z
|
||||
bind -r j resize-pane -D 5
|
||||
bind -r k resize-pane -U 5
|
||||
bind -r l resize-pane -R 5
|
||||
bind -r h resize-pane -L 5
|
||||
|
||||
set -g mouse on
|
||||
bind -r m resize-pane -Z
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
set -g mouse on
|
||||
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
unbind -T copy-mode-vi MouseDragEnd1Pane
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
||||
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @catppuccin-flavour 'macchiato'
|
||||
'';
|
||||
unbind -T copy-mode-vi MouseDragEnd1Pane
|
||||
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @catppuccin-flavour 'macchiato'
|
||||
'';
|
||||
};
|
||||
|
||||
zsh.enable = true;
|
||||
mtr.enable = true;
|
||||
};
|
||||
mtr.enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "sddm-theme";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gpskwlkr";
|
||||
repo = "sddm-astronaut-theme";
|
||||
rev = "468a100460d5feaa701c2215c737b55789cba0fc";
|
||||
sha256 = "1h20b7n6a4pbqnrj22y8v5gc01zxs58lck3bipmgkpyp52ip3vig";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R ./* $out/
|
||||
'';
|
||||
name = "sddm-theme";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gpskwlkr";
|
||||
repo = "sddm-astronaut-theme";
|
||||
rev = "468a100460d5feaa701c2215c737b55789cba0fc";
|
||||
sha256 = "1h20b7n6a4pbqnrj22y8v5gc01zxs58lck3bipmgkpyp52ip3vig";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R ./* $out/
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
security.polkit.enable = true;
|
||||
security.pam.services.swaylock = {};
|
||||
security.pam.services.swaylock = { };
|
||||
security.pam.services.swaylock.fprintAuth = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,20 +2,18 @@
|
|||
|
||||
{
|
||||
services = {
|
||||
dbus.enable = true;
|
||||
picom.enable = true;
|
||||
openssh.enable = true;
|
||||
spice-vdagentd.enable = true;
|
||||
dbus.enable = true;
|
||||
picom.enable = true;
|
||||
openssh.enable = true;
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "us, ru, ge";
|
||||
xkbOptions = "grp:alt_shift_toggle, caps:swapescape";
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "us";
|
||||
};
|
||||
|
||||
displayManager = {
|
||||
sddm.enable = true;
|
||||
sddm.theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
|
||||
};
|
||||
};
|
||||
displayManager = {
|
||||
sddm.enable = true;
|
||||
sddm.theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,16 +6,13 @@
|
|||
hardware.pulseaudio.enable = false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pamixer
|
||||
pavucontrol
|
||||
];
|
||||
environment.systemPackages = with pkgs; [ pamixer pavucontrol ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome3.adwaita-icon-theme # default gnome cursors
|
||||
glib
|
||||
adwaita-icon-theme # default gnome cursors
|
||||
glib
|
||||
gsettings-desktop-schemas
|
||||
|
||||
nwg-look
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
time.timeZone = "Asia/Tbilisi";
|
||||
time.timeZone = "Asia/Taipei";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.gpskwlkr = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"qemu"
|
||||
"kvm"
|
||||
"libvirtd"
|
||||
"networkmanager"
|
||||
];
|
||||
};
|
||||
users.users.danny = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "wheel" "qemu" "kvm" "libvirtd" "networkmanager" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation = {
|
||||
|
|
@ -31,6 +31,6 @@
|
|||
virt-manager
|
||||
virt-viewer
|
||||
win-spice
|
||||
win-virtio
|
||||
win-virtio
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue