diff --git a/configuration.nix b/configuration.nix index 3683dcf..a504c29 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, ... }: +{ config, lib, pkgs, ... }: { imports = [ @@ -81,7 +81,6 @@ neofetch fastfetch onefetch - neovim vim weechat ranger @@ -119,9 +118,6 @@ ]); - nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; - - networking = { firewall = { enable = true; diff --git a/flake.nix b/flake.nix index 89b9caf..7d23d30 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,9 @@ } ]; }; + specialArgs = { + inherit inputs; + }; }; }; } diff --git a/modules/home.nix b/modules/home.nix index b46ecbe..93e3945 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -5,20 +5,16 @@ ./nix/user.nix ./nix/hypr.nix ./nix/kitty.nix - ./nix/nixvim.nix + ./nix/nvim/default.nix ]; home.enableNixpkgsReleaseCheck = false; home.stateVersion = "24.05"; home.file = { - # WEZTERM - ".config/wezterm/wezterm.lua".source = ./raw/wezterm/wezterm.lua; # WAYBAR ".config/waybar/style.css".source = ./raw/waybar/style.css; ".config/waybar/config".source = ./raw/waybar/config; - # ROFI - ".config/rofi/config.rasi".source = ./raw/rofi/config.rasi; # WP ".wp/temple.png".source = ./raw/wp/temple.png; ".wp/skull_purple.png".source = ./raw/wp/skull_purple.png; diff --git a/modules/nix/hypr.nix b/modules/nix/hypr.nix index c3dd536..3330e42 100644 --- a/modules/nix/hypr.nix +++ b/modules/nix/hypr.nix @@ -3,9 +3,6 @@ wayland.windowManager.hyprland = { enable = true; xwayland.enable = true; - plugins = [ - pkgs.hyprlandPlugins.borders-plus-plus - ]; settings = { "monitor" = "eDP-1, 1920x1080@60, 0x0, 1"; "$mod" = "SUPER"; diff --git a/modules/nix/nvim/cmp.nix b/modules/nix/nvim/cmp.nix new file mode 100644 index 0000000..3378e03 --- /dev/null +++ b/modules/nix/nvim/cmp.nix @@ -0,0 +1,37 @@ +{ config, pkgs, nixvim, ...}: +{ + programs.nixvim = { + cmp = { + enable = true; + autoEnableSources = true; + sources = [ + {name = "nvim_lsp";} + {name = "path";} + {name = "buffer";} + {name = "luasnip";} + ]; + + mapping = { + "" = "cmp.mapping.confirm({ select = true })"; + "" = { + action = '' + function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expandable() then + luasnip.expand() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif check_backspace() then + fallback() + else + fallback() + end + end + ''; + modes = [ "i" "s" ]; + }; + }; + }; + }; +} diff --git a/modules/nix/nixvim.nix b/modules/nix/nvim/default.nix similarity index 91% rename from modules/nix/nixvim.nix rename to modules/nix/nvim/default.nix index 561c2de..f778d79 100644 --- a/modules/nix/nixvim.nix +++ b/modules/nix/nvim/default.nix @@ -2,7 +2,9 @@ { imports = [ nixvim.homeManagerModules.nixvim - ]; + ./cmp.nix + #./lsp.nix + ]; programs.nixvim = { enable = true; colorschemes.oxocarbon.enable = true; diff --git a/modules/nix/user.nix b/modules/nix/user.nix index f38eb70..6d19832 100644 --- a/modules/nix/user.nix +++ b/modules/nix/user.nix @@ -12,7 +12,7 @@ alias ls="${pkgs.eza}/bin/eza -l --icons --absolute" alias mkdir="mkdir -pv" alias http="python3 -m http.server 1337" - alias update="doas nixos-rebuild switch" + alias update="sudo nixos-rebuild switch --flake /etc/nixos --impure" ''; }; diff --git a/modules/raw/rofi/config.rasi b/modules/raw/rofi/config.rasi deleted file mode 100755 index f1ab9c7..0000000 --- a/modules/raw/rofi/config.rasi +++ /dev/null @@ -1,76 +0,0 @@ -configuration { - display-drun: "Applications:"; - drun-display-format: "{icon} {name}"; - font: "JetBrainsMono Nerd Font Medium 10"; - show-icons: true; - modi: "drun"; -} - -@theme "/dev/null" - -* { - - opacity: 0.5; - color0: #39305320; - color1: #494d6420; - color3: #d8dee9; - color4: #7b68ee; - color5: #cbe3e7; - - - background-color: transparent; - text-color: @color3; - accent-color: @color5; - - margin: 0px; - border: 0px; - padding: 0px; - spacing: 0px; -} - -window { - background-color: @color0; - border-color: @accent-color; - - width: 50%; - border: 2px; -} - -inputbar { - padding: 10px 12px; - spacing: 12px; - children: [ prompt, entry ]; -} - -prompt, entry, element-text, element-icon { - vertical-align: 0.5; -} - -prompt { - text-color: @accent-color; - enabled: true; - text-color: @color4; -} - -listview { - lines: 8; - columns: 2; - -} - -element { - padding: 8px; - spacing: 8px; -} - -element selected { - text-color: @color4; -} - -element-icon { - size: 20; -} - -element-text { - text-color: inherit; -} diff --git a/modules/raw/wezterm/wezterm.lua b/modules/raw/wezterm/wezterm.lua deleted file mode 100755 index 88e10ae..0000000 --- a/modules/raw/wezterm/wezterm.lua +++ /dev/null @@ -1,139 +0,0 @@ -local wezterm = require 'wezterm' -local act = wezterm.action - -mb = { -} - -for i = 1,99,1 -do - table.insert(mb, - { - event = { Down = { streak = i, button = 'Middle' } }, - mods = 'NONE', - action = act.PasteFrom("PrimarySelection") - }) - table.insert(mb, { - event = { Down = { streak = i, button = 'Right' } }, - mods = 'NONE', - action = wezterm.action_callback(function(window, pane) - local has_selection = window:get_selection_text_for_pane(pane) ~= '' - if has_selection then - window:perform_action( - act.CopyTo 'ClipboardAndPrimarySelection', - pane - ) - - window:perform_action(act.ClearSelection, pane) - else - window:perform_action(act.PasteFrom("PrimarySelection"), pane) - end - end), - }) -end - -return { - disable_default_key_bindings = true, - pane_focus_follows_mouse = false, - mouse_bindings = mb, --- leader = { key = 'VoidSymbol', timeout_milliseconds = 1000 }, - keys = { --- { --- key = 'c', --- mods = 'CTRL|SHIFT', --- action = wezterm.action.SpawnCommandInNewTab { --- args = { 'zsh' }, --- cwd = '~' --- }, --- }, - { - key = 'v', - mods = 'CTRL|SHIFT', - action = act.PasteFrom("Clipboard"), - }, - { - key = 'c', - mods = 'CTRL|SHIFT', - action = act.CopyTo("Clipboard"), - }, - { - key = 't', - mods = 'CTRL|SHIFT', - action = wezterm.action.SpawnCommandInNewTab { - args = { 'fish' }, - cwd = '~' - }, - }, - { - key = 'f', - mods = 'CTRL', - action = wezterm.action.TogglePaneZoomState, - }, --- { --- key = 'p', --- mods = 'LEADER', --- action = act.ActivateTabRelative(-1), --- }, --- { --- key = 'n', --- mods = 'LEADER', --- action = act.ActivateTabRelative(1), --- }, - - }, - window_padding = { - left = 2, - right = 2, - top = 0, - bottom = 0, - }, - window_frame = { - border_left_width = '0.5cell', - border_right_width = '0.5cell', - }, - window_background_opacity = 0.50, - window_decorations = "NONE", - tab_bar_at_bottom = true, - hide_tab_bar_if_only_one_tab = true, - warn_about_missing_glyphs = false, - use_fancy_tab_bar = true, - scrollback_lines = 999999, - enable_scroll_bar = false, - adjust_window_size_when_changing_font_size=false, - -- font = wezterm.font_with_fallback({"Hack", "Twemoji"}), - font_size = 15, - force_reverse_video_cursor = false, - colors = { - ansi = { - '#1d1f21', - '#cc6666', - '#b5bd68', - '#f0c674', - '#81a2be', - '#b294bb', - '#8abeb7', - '#c5c8c6' - }, - background = '#010101', - brights = { - '#969896', - '#cc6666', - '#b5bd68', - '#f0c674', - '#81a2be', - '#b294bb', - '#8abeb7', - '#ffffff' - }, - foreground = '#c5c8c6', - selection_bg = '#373b41', - selection_fg = '#c5c8c6', - cursor_bg = '#c5c8c6', - cursor_border = '#c5c8c6', - cursor_fg = '#1d1f21', - }, --- color_scheme = 'Catppuccin Macchiato', --- default_cursor_style = 'BlinkingBlock', --- cursor_blink_rate = 500, --- animation_fps = 100, --- front_end = "Software", -}