Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles
This commit is contained in:
63
flake.lock
generated
63
flake.lock
generated
@@ -1,25 +1,5 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"Hyprspace": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprland": [
|
|
||||||
"hyprland"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1713738762,
|
|
||||||
"narHash": "sha256-wXMqOQosjblsdV3x0DzpH7qSBUs5hT5Ca6eZ2Xp8TOA=",
|
|
||||||
"owner": "KZDKM",
|
|
||||||
"repo": "Hyprspace",
|
|
||||||
"rev": "de3b1ccbf30498b6fcd42b36418e33a2c8c1405a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "KZDKM",
|
|
||||||
"repo": "Hyprspace",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -27,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712386041,
|
"lastModified": 1714043624,
|
||||||
"narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
|
"narHash": "sha256-Xn2r0Jv95TswvPlvamCC46wwNo8ALjRCMBJbGykdhcM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
|
"rev": "86853e31dc1b62c6eeed11c667e8cdd0285d4411",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -82,11 +62,11 @@
|
|||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713778289,
|
"lastModified": 1714248933,
|
||||||
"narHash": "sha256-h3ufswObZ8qUxQewTc5L173ILfV6JBQ+IaN1aN9RPjY=",
|
"narHash": "sha256-hACvj8q0ucxslZmHf7j6bYlxVeDkJleAW+sCHGv4+2k=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "e1644e91ead7cdef5d08bfe6a579c4478a816a8e",
|
"rev": "2e763764bfdaee2039961c6c220b5d6af31712d4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -107,11 +87,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713607544,
|
"lastModified": 1714219583,
|
||||||
"narHash": "sha256-nbqQmhvYbDVC/5YiZLSGj5r14cOk2k6TGPpP2TtCfhI=",
|
"narHash": "sha256-s6yf/bsAum3sAXSxB5gDCHQoLMn5Skl9EWL8nvsXzog=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprland-plugins",
|
"repo": "hyprland-plugins",
|
||||||
"rev": "9971fec974a9d94a2a1b1d68d5ada5fc59fec053",
|
"rev": "97e9d252ffec654cdc69a2cea8b63a172795706b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -182,11 +162,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713730424,
|
"lastModified": 1714171579,
|
||||||
"narHash": "sha256-MqYjTvQCxwuDIuAaqIEuyqserm5PYr0auiHHPuYFN/k=",
|
"narHash": "sha256-eaWDIvt8ufUKKz3Lc2a3PyemLJG1m9RYlF+HP3hWbaw=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "hyprwayland-scanner",
|
"repo": "hyprwayland-scanner",
|
||||||
"rev": "7c9c8adfe7e424faa0c5ce6e8be90157fda53c06",
|
"rev": "126dad854f22fe30e6b82cd21808e76903d90ac5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -197,11 +177,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713537308,
|
"lastModified": 1714076141,
|
||||||
"narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=",
|
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f",
|
"rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -213,11 +193,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713714899,
|
"lastModified": 1714076141,
|
||||||
"narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=",
|
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6143fc5eeb9c4f00163267708e26191d1e918932",
|
"rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -228,11 +208,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713725259,
|
"lastModified": 1713995372,
|
||||||
"narHash": "sha256-9ZR/Rbx5/Z/JZf5ehVNMoz/s5xjpP0a22tL6qNvLt5E=",
|
"narHash": "sha256-fFE3M0vCoiSwCX02z8VF58jXFRj9enYUSTqjyHAjrds=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a5e4bbcb4780c63c79c87d29ea409abf097de3f7",
|
"rev": "dd37924974b9202f8226ed5d74a252a9785aedf8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -243,7 +223,6 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"Hyprspace": "Hyprspace",
|
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
"hyprland-plugins": "hyprland-plugins",
|
"hyprland-plugins": "hyprland-plugins",
|
||||||
|
|||||||
22
flake.nix
22
flake.nix
@@ -9,7 +9,7 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland = {
|
hyprland ={
|
||||||
url = "github:hyprwm/Hyprland";
|
url = "github:hyprwm/Hyprland";
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
@@ -17,11 +17,15 @@
|
|||||||
url = "github:hyprwm/hyprland-plugins";
|
url = "github:hyprwm/hyprland-plugins";
|
||||||
inputs.hyprland.follows = "hyprland";
|
inputs.hyprland.follows = "hyprland";
|
||||||
};
|
};
|
||||||
Hyprspace = {
|
# Hyprspace = {
|
||||||
url = "github:KZDKM/Hyprspace";
|
# url = "github:KZDKM/Hyprspace";
|
||||||
inputs.hyprland.follows = "hyprland";
|
# inputs.hyprland.follows = "hyprland";
|
||||||
};
|
# };
|
||||||
|
|
||||||
|
# nixvim = {
|
||||||
|
# url = "github:nix-community/nixvim/nixos-23.11";
|
||||||
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# };
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -126,12 +130,16 @@
|
|||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"${user}@NxXPS" = let host = "NxXPS"; in home-manager.lib.homeManagerConfiguration {
|
"${user}@NxXPS" = let host = "NxXPS"; in home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [ ./home.nix ];
|
modules = [
|
||||||
|
./home.nix
|
||||||
|
];
|
||||||
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
|
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
|
||||||
};
|
};
|
||||||
"${user}@NxNORTH" = let host = "NxNORTH"; in home-manager.lib.homeManagerConfiguration {
|
"${user}@NxNORTH" = let host = "NxNORTH"; in home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [ ./home.nix ];
|
modules = [
|
||||||
|
./home.nix
|
||||||
|
];
|
||||||
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
|
extraSpecialArgs = { inherit inputs system user host allowed secrets pkgs-unstable rice nvidia; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ in
|
|||||||
pkgs-unstable.hyprlock
|
pkgs-unstable.hyprlock
|
||||||
pkgs-unstable.hypridle
|
pkgs-unstable.hypridle
|
||||||
|
|
||||||
|
pkgs.grim
|
||||||
|
pkgs.slurp
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
@@ -55,10 +58,10 @@ in
|
|||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
# inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo
|
inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo
|
||||||
# inputs.hyprfocus.packages.${pkgs.system}.hyprfocus
|
# inputs.hyprfocus.packages.${pkgs.system}.hyprfocus
|
||||||
# inputs.hycov.packages.${pkgs.system}.hycov
|
# inputs.hycov.packages.${pkgs.system}.hycov
|
||||||
inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
|
# inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
|
||||||
];
|
];
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
@@ -346,8 +349,8 @@ in
|
|||||||
## ROW 2:
|
## ROW 2:
|
||||||
|
|
||||||
#bind = SUPER, TAB, hycov:toggleoverview
|
#bind = SUPER, TAB, hycov:toggleoverview
|
||||||
"SUPER, TAB, overview:toggle"
|
# "SUPER, TAB, overview:toggle"
|
||||||
# "SUPER SHIFT, TAB, hyprexpo:expo, toggle"
|
"SUPER, TAB, hyprexpo:expo, toggle"
|
||||||
"ALT, TAB, focuscurrentorlast"
|
"ALT, TAB, focuscurrentorlast"
|
||||||
"SUPER, Q, killactive"
|
"SUPER, Q, killactive"
|
||||||
"SUPER, W, exec, waybar_mode set ' '"
|
"SUPER, W, exec, waybar_mode set ' '"
|
||||||
@@ -428,7 +431,7 @@ in
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
## MEGA KEYS:
|
## MEGA KEYS:
|
||||||
|
|
||||||
", Print, exec, /home/nx2/scripts/screenshot.sh "
|
'' , Print, exec, grim -g "$(slurp)"''
|
||||||
"SUPER, Next, resizeactive, 100 -100"
|
"SUPER, Next, resizeactive, 100 -100"
|
||||||
"SUPER, Prior, resizeactive, -100 100"
|
"SUPER, Prior, resizeactive, -100 100"
|
||||||
|
|
||||||
@@ -437,12 +440,12 @@ in
|
|||||||
|
|
||||||
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
",XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
|
",XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
",XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
",XF86AudioPlay, exec, playerctl play-pause"
|
",XF86AudioPlay, exec, playerctl play-pause"
|
||||||
",XF86AudioPrev, exec, playerctl playerctl previous"
|
",XF86AudioPrev, exec, playerctl previous"
|
||||||
",XF86AudioNext, exec, playerctl playerctl next"
|
",XF86AudioNext, exec, playerctl next"
|
||||||
",XF86MonBrightnessUp, exec, brightnessctl s '5%+'"
|
",XF86MonBrightnessUp, exec, brightnessctl s '5%+'"
|
||||||
",XF86MonBrightnessDown, exec, brightnessctl s '5%-'"
|
",XF86MonBrightnessDown, exec, brightnessctl s '5%-'"
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
## MOUSE:
|
## MOUSE:
|
||||||
@@ -756,18 +759,18 @@ in
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# plugin {
|
plugin {
|
||||||
# hyprexpo {
|
hyprexpo {
|
||||||
# columns = 5
|
columns = 5
|
||||||
# gap_size = ${builtins.toString rice.gap-size}
|
gap_size = ${builtins.toString rice.gap-size}
|
||||||
# bg_col = rgb(${rice.lib.nohash rice.color.background})
|
bg_col = rgb(${rice.lib.nohash rice.color.background})
|
||||||
# workspace_method = first 10 # [center/first] [workspace] e.g. first 1 or center m+1
|
workspace_method = first 10 # [center/first] [workspace] e.g. first 1 or center m+1
|
||||||
|
|
||||||
# enable_gesture = false # laptop touchpad, 4 fingers
|
enable_gesture = false # laptop touchpad, 4 fingers
|
||||||
# gesture_distance = 300 # how far is the "max"
|
gesture_distance = 300 # how far is the "max"
|
||||||
# gesture_positive = true # positive = swipe down. Negative = swipe up.
|
gesture_positive = true # positive = swipe down. Negative = swipe up.
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
|
|
||||||
|
|
||||||
plugin {
|
plugin {
|
||||||
|
|||||||
128
home-modules/nixvim.nix
Normal file
128
home-modules/nixvim.nix
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
{ config, pkgs, inputs, system, rice, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.neovide
|
||||||
|
];
|
||||||
|
programs.nixvim = {
|
||||||
|
enable = true;
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
clipboard.providers.wl-copy.enable = true;
|
||||||
|
|
||||||
|
options = {
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
shiftwidth = 2;
|
||||||
|
};
|
||||||
|
colorschemes.catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
mocha = {
|
||||||
|
base = "#ff0000";
|
||||||
|
};
|
||||||
|
disable_underline = true;
|
||||||
|
flavour = "mocha";
|
||||||
|
integrations = {
|
||||||
|
cmp = true;
|
||||||
|
gitsigns = true;
|
||||||
|
mini = {
|
||||||
|
enabled = true;
|
||||||
|
indentscope_color = "";
|
||||||
|
};
|
||||||
|
notify = false;
|
||||||
|
nvimtree = true;
|
||||||
|
treesitter = true;
|
||||||
|
};
|
||||||
|
styles = {
|
||||||
|
booleans = [
|
||||||
|
"bold"
|
||||||
|
"italic"
|
||||||
|
];
|
||||||
|
conditionals = [
|
||||||
|
"bold"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
term_colors = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# colorschemes.base16 = {
|
||||||
|
# enable = true;
|
||||||
|
# setUpBar = true;
|
||||||
|
# colorscheme = "onedark";
|
||||||
|
|
||||||
|
# customColorScheme = {
|
||||||
|
# base00 = rice.color.background;
|
||||||
|
# base01 = rice.color.bright-black;
|
||||||
|
# base02 = rice.color.blue;
|
||||||
|
# base03 = rice.color.bright-blue;
|
||||||
|
# base04 = rice.color.cyan;
|
||||||
|
# base05 = rice.color.bright-cyan;
|
||||||
|
# base06 = rice.color.green;
|
||||||
|
# base07 = rice.color.bright-green;
|
||||||
|
# base08 = rice.color.magenta;
|
||||||
|
# base09 = rice.color.bright-magenta;
|
||||||
|
# base0A = rice.color.red;
|
||||||
|
# base0B = rice.color.bright-red;
|
||||||
|
# base0C = rice.color.white;
|
||||||
|
# base0D = rice.color.bright-white;
|
||||||
|
# base0E = rice.color.yellow;
|
||||||
|
# base0F = rice.color.bright-yellow;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
opts = {
|
||||||
|
termguicolors = true;
|
||||||
|
};
|
||||||
|
globals = {
|
||||||
|
mapleader = " ";
|
||||||
|
};
|
||||||
|
plugins = {
|
||||||
|
telescope = {
|
||||||
|
enable = true;
|
||||||
|
extensions = {
|
||||||
|
fzf-native.enable = true;
|
||||||
|
};
|
||||||
|
keymaps = {
|
||||||
|
"<C-o>" = { action = "find_files"; };
|
||||||
|
"<leader>fg" = { action = "live_grep"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
lightline = {
|
||||||
|
enable = true;
|
||||||
|
# colorscheme = "base16";
|
||||||
|
# active = {
|
||||||
|
# left = [
|
||||||
|
# ["mode" "paste"]
|
||||||
|
# ["readonly" "filename" "modified"]
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# right = [
|
||||||
|
# [ "lineinfo" ]
|
||||||
|
# [ "percent" ]
|
||||||
|
# [ "fileformat" "fileencoding" "filetype" "charvaluehex" ]
|
||||||
|
# [ "git" ]
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
nix.enable = true;
|
||||||
|
|
||||||
|
lsp-lines.enable = true;
|
||||||
|
lspkind.enable = true;
|
||||||
|
};
|
||||||
|
extraPlugins = [ ];
|
||||||
|
keymaps =
|
||||||
|
let
|
||||||
|
mkKeymap = mode: key: action: { inherit mode key action; };
|
||||||
|
mkKeymapWithOpts = mode: key: action: opts: (mkKeymap mode key action) // { options = opts; };
|
||||||
|
in
|
||||||
|
[
|
||||||
|
(mkKeymap "" "<Space>" "<Nop>")
|
||||||
|
(mkKeymap "n" "<leader>ff" "builtin.find_files")
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
## vl clipboard?
|
||||||
18
home-modules/nvim-lua/options.lua
Normal file
18
home-modules/nvim-lua/options.lua
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
vim.g.mapleader = ' '
|
||||||
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
|
vim.o.clipboard = 'unnamedplus'
|
||||||
|
|
||||||
|
vim.o.number = true
|
||||||
|
-- vim.o.relativenumber = true
|
||||||
|
|
||||||
|
vim.o.signcolumn = 'yes'
|
||||||
|
|
||||||
|
vim.o.tabstop = 4
|
||||||
|
vim.o.shiftwidth = 4
|
||||||
|
|
||||||
|
vim.o.updatetime = 300
|
||||||
|
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
vim.o.mouse = 'a'
|
||||||
46
home-modules/nvim-lua/plugin/cmp.lua
Normal file
46
home-modules/nvim-lua/plugin/cmp.lua
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
local cmp = require('cmp')
|
||||||
|
local luasnip = require('luasnip')
|
||||||
|
|
||||||
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
|
luasnip.config.setup {}
|
||||||
|
|
||||||
|
cmp.setup {
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert {
|
||||||
|
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||||
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
['<C-Space>'] = cmp.mapping.complete {},
|
||||||
|
['<CR>'] = cmp.mapping.confirm {
|
||||||
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = true,
|
||||||
|
},
|
||||||
|
['<Tab>'] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif luasnip.expand_or_locally_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif luasnip.locally_jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
},
|
||||||
|
}
|
||||||
48
home-modules/nvim-lua/plugin/lsp.lua
Normal file
48
home-modules/nvim-lua/plugin/lsp.lua
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
local on_attach = function(_, bufnr)
|
||||||
|
|
||||||
|
local bufmap = function(keys, func)
|
||||||
|
vim.keymap.set('n', keys, func, { buffer = bufnr })
|
||||||
|
end
|
||||||
|
|
||||||
|
bufmap('<leader>r', vim.lsp.buf.rename)
|
||||||
|
bufmap('<leader>a', vim.lsp.buf.code_action)
|
||||||
|
|
||||||
|
bufmap('gd', vim.lsp.buf.definition)
|
||||||
|
bufmap('gD', vim.lsp.buf.declaration)
|
||||||
|
bufmap('gI', vim.lsp.buf.implementation)
|
||||||
|
bufmap('<leader>D', vim.lsp.buf.type_definition)
|
||||||
|
|
||||||
|
bufmap('gr', require('telescope.builtin').lsp_references)
|
||||||
|
bufmap('<leader>s', require('telescope.builtin').lsp_document_symbols)
|
||||||
|
bufmap('<leader>S', require('telescope.builtin').lsp_dynamic_workspace_symbols)
|
||||||
|
|
||||||
|
bufmap('K', vim.lsp.buf.hover)
|
||||||
|
|
||||||
|
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||||
|
vim.lsp.buf.format()
|
||||||
|
end, {})
|
||||||
|
end
|
||||||
|
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
|
||||||
|
require('neodev').setup()
|
||||||
|
require('lspconfig').lua_ls.setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
root_dir = function()
|
||||||
|
return vim.loop.cwd()
|
||||||
|
end,
|
||||||
|
cmd = { "lua-lsp" },
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
workspace = { checkThirdParty = false },
|
||||||
|
telemetry = { enable = false },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
require('lspconfig').rnix.setup {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
}
|
||||||
11
home-modules/nvim-lua/plugin/other.lua
Normal file
11
home-modules/nvim-lua/plugin/other.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
-- Lualine
|
||||||
|
require("lualine").setup({
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = 'onedark',
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Colorscheme
|
||||||
|
vim.cmd("colorscheme gruvbox")
|
||||||
|
|
||||||
|
-- Comment
|
||||||
|
require("Comment").setup()
|
||||||
13
home-modules/nvim-lua/plugin/telescope.lua
Normal file
13
home-modules/nvim-lua/plugin/telescope.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
require('telescope').setup({
|
||||||
|
extensions = {
|
||||||
|
fzf = {
|
||||||
|
fuzzy = true, -- false will only do exact matching
|
||||||
|
override_generic_sorter = true, -- override the generic sorter
|
||||||
|
override_file_sorter = true, -- override the file sorter
|
||||||
|
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||||
|
-- the default case_mode is "smart_case"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
require('telescope').load_extension('fzf')
|
||||||
9
home-modules/nvim-lua/plugin/treesitter.lua
Normal file
9
home-modules/nvim-lua/plugin/treesitter.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
require('nvim-treesitter.configs').setup {
|
||||||
|
ensure_installed = {},
|
||||||
|
|
||||||
|
auto_install = false,
|
||||||
|
|
||||||
|
highlight = { enable = true },
|
||||||
|
|
||||||
|
indent = { enable = true },
|
||||||
|
}
|
||||||
97
home-modules/nvim.nix
Normal file
97
home-modules/nvim.nix
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
{ config, pkgs, rice, ... }:
|
||||||
|
let
|
||||||
|
toLua = str: "lua << EOF\n${str}\nEOF\n";
|
||||||
|
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
vimdiffAlias = true;
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
lua-language-server
|
||||||
|
# rnix-lsp
|
||||||
|
|
||||||
|
xclip
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
|
||||||
|
{
|
||||||
|
plugin = nvim-lspconfig;
|
||||||
|
config = toLuaFile ./nvim-lua/plugin/lsp.lua;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
plugin = comment-nvim;
|
||||||
|
config = toLua ''require("Comment").setup()'';
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
plugin = gruvbox-nvim;
|
||||||
|
config = "colorscheme gruvbox";
|
||||||
|
}
|
||||||
|
|
||||||
|
neodev-nvim
|
||||||
|
|
||||||
|
nvim-cmp
|
||||||
|
{
|
||||||
|
plugin = nvim-cmp;
|
||||||
|
config = toLuaFile ./nvim-lua/plugin/cmp.lua;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
plugin = telescope-nvim;
|
||||||
|
config = toLuaFile ./nvim-lua/plugin/telescope.lua;
|
||||||
|
}
|
||||||
|
|
||||||
|
telescope-fzf-native-nvim
|
||||||
|
|
||||||
|
cmp_luasnip
|
||||||
|
cmp-nvim-lsp
|
||||||
|
|
||||||
|
luasnip
|
||||||
|
friendly-snippets
|
||||||
|
|
||||||
|
|
||||||
|
lualine-nvim
|
||||||
|
nvim-web-devicons
|
||||||
|
|
||||||
|
{
|
||||||
|
plugin = (nvim-treesitter.withPlugins (p: [
|
||||||
|
p.tree-sitter-nix
|
||||||
|
p.tree-sitter-vim
|
||||||
|
p.tree-sitter-bash
|
||||||
|
p.tree-sitter-lua
|
||||||
|
p.tree-sitter-python
|
||||||
|
p.tree-sitter-json
|
||||||
|
]));
|
||||||
|
config = toLuaFile ./nvim-lua/plugin/treesitter.lua;
|
||||||
|
}
|
||||||
|
|
||||||
|
vim-nix
|
||||||
|
|
||||||
|
# {
|
||||||
|
# plugin = vimPlugins.own-onedark-nvim;
|
||||||
|
# config = "colorscheme onedark";
|
||||||
|
# }
|
||||||
|
];
|
||||||
|
|
||||||
|
extraLuaConfig = ''
|
||||||
|
${builtins.readFile ./nvim-lua/options.lua}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# extraLuaConfig = ''
|
||||||
|
# ${builtins.readFile ./nvim-lua/options.lua}
|
||||||
|
# ${builtins.readFile ./nvim-lua/plugin/lsp.lua}
|
||||||
|
# ${builtins.readFile ./nvim-lua/plugin/cmp.lua}
|
||||||
|
# ${builtins.readFile ./nvim-lua/plugin/telescope.lua}
|
||||||
|
# ${builtins.readFile ./nvim-lua/plugin/treesitter.lua}
|
||||||
|
# ${builtins.readFile ./nvim-lua/plugin/other.lua}
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
{ config, pkgs, secrets, ... }:
|
{ config, pkgs, secrets, ... }:
|
||||||
let in
|
let
|
||||||
|
sep = " ";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
file."${config.xdg.dataHome}/nx-gcal-event-credentials.json".text = ''
|
file."${config.xdg.dataHome}/nx-gcal-event-credentials.json".text = ''
|
||||||
@@ -176,7 +178,7 @@ let in
|
|||||||
|
|
||||||
name = escape(event['summary'])
|
name = escape(event['summary'])
|
||||||
|
|
||||||
print(f" {sec_to_nice_string(remaining.seconds)}{mode}\'{name}\'")
|
print(f"${sep}{sec_to_nice_string(remaining.seconds)}{mode}\'{name}\'")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
def print_help():
|
def print_help():
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, host, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
config = lib.mkIf (host == "NxNORTH") {
|
||||||
virt-manager
|
home.packages = with pkgs; [
|
||||||
];
|
virt-manager
|
||||||
|
];
|
||||||
|
|
||||||
# programs.virt-manager.enable = true; # needs this in virtualization.nix
|
# programs.virt-manager.enable = true; # needs this in virtualization.nix
|
||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
"org/virt-manager/virt-manager/connections" = {
|
"org/virt-manager/virt-manager/connections" = {
|
||||||
autoconnect = [ "qemu:///system" ];
|
autoconnect = [ "qemu:///system" ];
|
||||||
uris = [ "qemu:///system" ];
|
uris = [ "qemu:///system" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{ config, lib, pkgs, rice, ... }:
|
{ config, lib, pkgs, rice, ... }:
|
||||||
let
|
let
|
||||||
|
sep = " ";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -46,7 +47,7 @@ in
|
|||||||
#ord=$(date +"%e" | awk '{printf("%d%s\n", $1, substr("thstndrd", ($1%100-20)%10*2+1, 2))}')
|
#ord=$(date +"%e" | awk '{printf("%d%s\n", $1, substr("thstndrd", ($1%100-20)%10*2+1, 2))}')
|
||||||
ord=$(date +"%e" | awk '{printf("%d%s\n", $1, ($1==11||$1==12||$1==13)?"th":((($1%10)==1)?"st":((($1%10)==2)?"nd":((($1%10)==3)?"rd":"th"))))}')
|
ord=$(date +"%e" | awk '{printf("%d%s\n", $1, ($1==11||$1==12||$1==13)?"th":((($1%10)==1)?"st":((($1%10)==2)?"nd":((($1%10)==3)?"rd":"th"))))}')
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
echo " $(date +'%A the')" "$ord" "of" "$(date +'%B')" " " "$(date +'%R')"
|
echo "${sep}$(date +'%A the')" "$ord" "of" "$(date +'%B')" " ${sep}$(date +'%R')"
|
||||||
elif [ "$1" = "--no-icons" ]; then
|
elif [ "$1" = "--no-icons" ]; then
|
||||||
echo "$(date +'%A the')" "$ord" "of" "$(date +'%B')" "$(date +'%R')"
|
echo "$(date +'%A the')" "$ord" "of" "$(date +'%B')" "$(date +'%R')"
|
||||||
fi
|
fi
|
||||||
@@ -58,7 +59,7 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
bar = {
|
bar = {
|
||||||
height = 30;
|
height = 20;
|
||||||
layer = "top";
|
layer = "top";
|
||||||
# position = "top";
|
# position = "top";
|
||||||
position = "bottom";
|
position = "bottom";
|
||||||
@@ -68,8 +69,8 @@ in
|
|||||||
margin-right = rice.gap-size;
|
margin-right = rice.gap-size;
|
||||||
spacing = 10;
|
spacing = 10;
|
||||||
modules-left = [
|
modules-left = [
|
||||||
"cpu"
|
# "cpu"
|
||||||
"memory"
|
# "memory"
|
||||||
"wireplumber"
|
"wireplumber"
|
||||||
"backlight"
|
"backlight"
|
||||||
"battery"
|
"battery"
|
||||||
@@ -92,6 +93,7 @@ in
|
|||||||
active-only = false;
|
active-only = false;
|
||||||
};
|
};
|
||||||
"hyprland/window" = {
|
"hyprland/window" = {
|
||||||
|
# format = "${sep}{}";
|
||||||
format = "{}";
|
format = "{}";
|
||||||
separate-outputs = true;
|
separate-outputs = true;
|
||||||
};
|
};
|
||||||
@@ -111,20 +113,20 @@ in
|
|||||||
|
|
||||||
cpu = {
|
cpu = {
|
||||||
interval = 1;
|
interval = 1;
|
||||||
format = " {}%";
|
format = "${sep}{}%";
|
||||||
max-length = 10;
|
max-length = 10;
|
||||||
};
|
};
|
||||||
memory = {
|
memory = {
|
||||||
interval = 5;
|
interval = 5;
|
||||||
format = " {avail:.0f}G free";
|
format = "${sep}{avail:.0f}G free";
|
||||||
};
|
};
|
||||||
battery = {
|
battery = {
|
||||||
interval = 60;
|
interval = 60;
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
format = "{icon} {capacity}%";
|
format = "{icon}${sep}{capacity}%";
|
||||||
states = {
|
states = {
|
||||||
warning = 25;
|
warning = 15;
|
||||||
critical = 10;
|
critical = 5;
|
||||||
};
|
};
|
||||||
format-icons = [
|
format-icons = [
|
||||||
" "
|
" "
|
||||||
@@ -133,13 +135,13 @@ in
|
|||||||
" "
|
" "
|
||||||
" "
|
" "
|
||||||
];
|
];
|
||||||
format-charging = "{icon} +{capacity}%";
|
format-charging = "{icon}${sep}+{capacity}%";
|
||||||
format-plugged = "{icon} P{capacity}%";
|
format-plugged = "{icon}${sep}P{capacity}%";
|
||||||
format-full = "{icon} F{capacity}%";
|
format-full = "{icon}${sep}F{capacity}%";
|
||||||
};
|
};
|
||||||
backlight = {
|
backlight = {
|
||||||
device = "DP-1";
|
device = "eDP-1";
|
||||||
format = "{icon} {percent}%";
|
format = "{icon}${sep}{percent}%";
|
||||||
format-icons = [
|
format-icons = [
|
||||||
""
|
""
|
||||||
""
|
""
|
||||||
@@ -153,13 +155,13 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
network = {
|
network = {
|
||||||
format-wifi = " {essid}";
|
format-wifi = "${sep}{essid}";
|
||||||
format-ethernet = " Wired";
|
format-ethernet = "${sep}Wired";
|
||||||
format-disconnected = " Disconnected";
|
format-disconnected = "${sep}Disconnected";
|
||||||
};
|
};
|
||||||
wireplumber = {
|
wireplumber = {
|
||||||
format = " {volume}%";
|
format = "${sep}{volume}%";
|
||||||
format-muted = " Muted";
|
format-muted = "${sep}--%";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -174,7 +176,7 @@ in
|
|||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.background},${builtins.toString rice.transparency});
|
background-color: rgba(${rice.lib.hex-to-rgb-comma-string rice.color.background},${builtins.toString rice.transparency});
|
||||||
transition-duration: 0.5s;
|
transition-duration: 2s;
|
||||||
padding: 7px 10px;
|
padding: 7px 10px;
|
||||||
padding-top: 0.1em;
|
padding-top: 0.1em;
|
||||||
/* border: ${builtins.toString rice.border-width}px solid rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue}); */
|
/* border: ${builtins.toString rice.border-width}px solid rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue}); */
|
||||||
@@ -227,10 +229,26 @@ in
|
|||||||
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red});
|
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red});
|
||||||
}
|
}
|
||||||
|
|
||||||
#cpu {
|
#window, #custom-ctimeremaining {
|
||||||
margin-left: 0.5em;
|
font-family: ${rice.font.base.name}, ${rice.font.code.name2};
|
||||||
}
|
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue});
|
||||||
|
}
|
||||||
|
|
||||||
|
#wireplumber.muted {
|
||||||
|
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.blue});
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning:not(.charging) {
|
||||||
|
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green});;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.red});;
|
||||||
|
background: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.bright-red});
|
||||||
|
}
|
||||||
|
#battery.charging { color: rgb(${rice.lib.hex-to-rgb-comma-string rice.color.green}); }
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
5
home.nix
5
home.nix
@@ -24,6 +24,8 @@
|
|||||||
./home-modules/kitty.nix
|
./home-modules/kitty.nix
|
||||||
./home-modules/shell/fish.nix
|
./home-modules/shell/fish.nix
|
||||||
./home-modules/shell/starship.nix
|
./home-modules/shell/starship.nix
|
||||||
|
# ./home-modules/nixvim.nix
|
||||||
|
./home-modules/nvim.nix
|
||||||
./home-modules/shell/yazi.nix
|
./home-modules/shell/yazi.nix
|
||||||
./home-modules/shell/zoxide.nix
|
./home-modules/shell/zoxide.nix
|
||||||
./home-modules/shell/nh.nix
|
./home-modules/shell/nh.nix
|
||||||
@@ -60,7 +62,7 @@
|
|||||||
spotify spicetify-cli
|
spotify spicetify-cli
|
||||||
obs-studio
|
obs-studio
|
||||||
|
|
||||||
waybar swww rofi
|
waybar swww rofi playerctl
|
||||||
|
|
||||||
imv mpv mediainfo exiftool ffmpeg
|
imv mpv mediainfo exiftool ffmpeg
|
||||||
pavucontrol fontpreview gtk2fontsel
|
pavucontrol fontpreview gtk2fontsel
|
||||||
@@ -71,6 +73,7 @@
|
|||||||
|
|
||||||
nodejs
|
nodejs
|
||||||
gnumake
|
gnumake
|
||||||
|
cmake
|
||||||
|
|
||||||
speedtest-go
|
speedtest-go
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
{ config, pkgs, user, ... }:
|
{ config, pkgs, lib, user, host, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
config = lib.mkIf (host == "NxNORTH") {
|
||||||
virtiofsd
|
environment.systemPackages = with pkgs; [
|
||||||
];
|
virtiofsd
|
||||||
virtualisation.libvirtd.enable = true;
|
];
|
||||||
programs.virt-manager.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
users.users."${user}".extraGroups = [ "libvirtd" ];
|
programs.virt-manager.enable = true;
|
||||||
|
users.users."${user}".extraGroups = [ "libvirtd" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user