This commit is contained in:
meml0rz
2024-11-12 00:59:46 +01:00
parent 571c6846ec
commit a402adf189
9 changed files with 46 additions and 230 deletions

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, ... }: { config, lib, pkgs, ... }:
{ {
imports = imports =
[ [
@ -81,7 +81,6 @@
neofetch neofetch
fastfetch fastfetch
onefetch onefetch
neovim
vim vim
weechat weechat
ranger ranger
@ -119,9 +118,6 @@
]); ]);
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
networking = { networking = {
firewall = { firewall = {
enable = true; enable = true;

View File

@ -29,6 +29,9 @@
} }
]; ];
}; };
specialArgs = {
inherit inputs;
};
}; };
}; };
} }

View File

@ -5,20 +5,16 @@
./nix/user.nix ./nix/user.nix
./nix/hypr.nix ./nix/hypr.nix
./nix/kitty.nix ./nix/kitty.nix
./nix/nixvim.nix ./nix/nvim/default.nix
]; ];
home.enableNixpkgsReleaseCheck = false; home.enableNixpkgsReleaseCheck = false;
home.stateVersion = "24.05"; home.stateVersion = "24.05";
home.file = { home.file = {
# WEZTERM
".config/wezterm/wezterm.lua".source = ./raw/wezterm/wezterm.lua;
# WAYBAR # WAYBAR
".config/waybar/style.css".source = ./raw/waybar/style.css; ".config/waybar/style.css".source = ./raw/waybar/style.css;
".config/waybar/config".source = ./raw/waybar/config; ".config/waybar/config".source = ./raw/waybar/config;
# ROFI
".config/rofi/config.rasi".source = ./raw/rofi/config.rasi;
# WP # WP
".wp/temple.png".source = ./raw/wp/temple.png; ".wp/temple.png".source = ./raw/wp/temple.png;
".wp/skull_purple.png".source = ./raw/wp/skull_purple.png; ".wp/skull_purple.png".source = ./raw/wp/skull_purple.png;

View File

@ -3,9 +3,6 @@
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
plugins = [
pkgs.hyprlandPlugins.borders-plus-plus
];
settings = { settings = {
"monitor" = "eDP-1, 1920x1080@60, 0x0, 1"; "monitor" = "eDP-1, 1920x1080@60, 0x0, 1";
"$mod" = "SUPER"; "$mod" = "SUPER";

37
modules/nix/nvim/cmp.nix Normal file
View File

@ -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 = {
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<Tab>" = {
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" ];
};
};
};
};
}

View File

@ -2,6 +2,8 @@
{ {
imports = [ imports = [
nixvim.homeManagerModules.nixvim nixvim.homeManagerModules.nixvim
./cmp.nix
#./lsp.nix
]; ];
programs.nixvim = { programs.nixvim = {
enable = true; enable = true;

View File

@ -12,7 +12,7 @@
alias ls="${pkgs.eza}/bin/eza -l --icons --absolute" alias ls="${pkgs.eza}/bin/eza -l --icons --absolute"
alias mkdir="mkdir -pv" alias mkdir="mkdir -pv"
alias http="python3 -m http.server 1337" alias http="python3 -m http.server 1337"
alias update="doas nixos-rebuild switch" alias update="sudo nixos-rebuild switch --flake /etc/nixos --impure"
''; '';
}; };

View File

@ -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;
}

View File

@ -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",
}