wonfeioan

This commit is contained in:
Noa Aarts 2024-03-28 21:00:41 +01:00
parent 38ff8d7b71
commit 26e3477a09
8 changed files with 51 additions and 118 deletions

8
common/dunst.nix Normal file
View file

@ -0,0 +1,8 @@
{ config, pkgs, inputs, ... }:
{
services.dunst = {
enable = true;
};
}

View file

@ -8,12 +8,12 @@
./wofi.nix ./wofi.nix
# ./hypridle.nix # TODO: find out why these bitches not work # ./hypridle.nix # TODO: find out why these bitches not work
# ./hyprlock.nix # ./hyprlock.nix
./dunst.nix
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
hyprland hyprland
# I always want these with hyprland anyways # I always want these with hyprland anyways
dunst
libnotify # to enable the notify-send command libnotify # to enable the notify-send command
wl-clipboard wl-clipboard

View file

@ -1,89 +1,3 @@
--[[
=====================================================================
==================== READ THIS BEFORE CONTINUING ====================
=====================================================================
======== .-----. ========
======== .----------------------. | === | ========
======== |.-""""""""""""""""""-.| |-----| ========
======== || || | === | ========
======== || KICKSTART.NVIM || |-----| ========
======== || || | === | ========
======== || || |-----| ========
======== ||:Tutor || |:::::| ========
======== |'-..................-'| |____o| ========
======== `"")----------------(""` ___________ ========
======== /::::::::::| |::::::::::\ \ no mouse \ ========
======== /:::========| |==hjkl==:::\ \ required \ ========
======== '""""""""""""' '""""""""""""' '""""""""""' ========
======== ========
=====================================================================
=====================================================================
What is Kickstart?
Kickstart.nvim is *not* a distribution.
Kickstart.nvim is a starting point for your own configuration.
The goal is that you can read every line of code, top-to-bottom, understand
what your configuration is doing, and modify it to suit your needs.
Once you've done that, you can start exploring, configuring and tinkering to
make Neovim your own! That might mean leaving kickstart just the way it is for a while
or immediately breaking it into modular pieces. It's up to you!
If you don't know anything about Lua, I recommend taking some time to read through
a guide. One possible example which will only take 10-15 minutes:
- https://learnxinyminutes.com/docs/lua/
After understanding a bit more about Lua, you can use `:help lua-guide` as a
reference for how Neovim integrates Lua.
- :help lua-guide
- (or HTML version): https://neovim.io/doc/user/lua-guide.html
Kickstart Guide:
TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.
If you don't know what this means, type the following:
- <escape key>
- :
- Tutor
- <enter key>
(If you already know how the Neovim basics, you can skip this step)
Once you've completed that, you can continue working through **AND READING** the rest
of the kickstart init.lua
Next, run AND READ `:help`.
This will open up a help window with some basic information
about reading, navigating and searching the builtin help documentation.
This should be the first place you go to look when you're stuck or confused
with something. It's one of my favorite neovim features.
MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation,
which is very useful when you're not sure exactly what you're looking for.
I have left several `:help X` comments throughout the init.lua
These are hints about where to find more information about the relevant settings,
plugins or neovim features used in kickstart.
NOTE: Look for lines like this
Throughout the file. These are for you, the reader, to help understand what is happening.
Feel free to delete them once you know what you're doing, but they should serve as a guide
for when you are first encountering a few different constructs in your nvim config.
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info
I hope you enjoy your Neovim journey,
- TJ
P.S. You can delete this when you're done too. It's your config now! :)
--]]
-- Set <space> as the leader key -- Set <space> as the leader key
-- See `:help mapleader` -- See `:help mapleader`
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
@ -174,11 +88,10 @@ vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagn
-- or just use <C-\><C-n> to exit terminal mode -- or just use <C-\><C-n> to exit terminal mode
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" }) vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
-- TIP: Disable arrow keys in normal mode vim.keymap.set("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>') vim.keymap.set("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>') vim.keymap.set("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>') vim.keymap.set("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- Keybinds to make split navigation easier. -- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows -- Use CTRL+<hjkl> to switch between windows
@ -569,12 +482,13 @@ require("lazy").setup({
-- - settings (table): Override the default settings passed when initializing the server. -- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = { local servers = {
-- TODO: see if there is a fun way to make these added and installed per project
clangd = {}, clangd = {},
gopls = {}, gopls = {},
pyright = {}, pyright = {},
rust_analyzer = {},
html = { filetypes = { "html", "twig", "hbs" } }, html = { filetypes = { "html", "twig", "hbs" } },
templ = { filetypes = { "templ" } }, templ = { filetypes = { "templ" } },
nil_ls = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
-- --
-- Some languages (like typescript) have entire language plugins that can be useful: -- Some languages (like typescript) have entire language plugins that can be useful:
@ -585,7 +499,6 @@ require("lazy").setup({
-- --
htmx = { htmx = {
cmd = { "/home/noa/Documents/programming/htmx-lsp/target/debug/htmx-lsp" },
filetypes = { "html" }, filetypes = { "html" },
}, },
@ -663,6 +576,8 @@ require("lazy").setup({
lua = { "stylua" }, lua = { "stylua" },
-- Conform can also run multiple formatters sequentially -- Conform can also run multiple formatters sequentially
python = { "black" }, python = { "black" },
go = { "gopls" },
-- --
-- You can use a sub-list to tell conform to run *until* a formatter -- You can use a sub-list to tell conform to run *until* a formatter
-- is found. -- is found.

View file

@ -4,6 +4,12 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
# needed for the nvim config, neovim itself is a system package already # needed for the nvim config, neovim itself is a system package already
ripgrep ripgrep
# TODO: find how I can make this build dependencies only
gnumake
cargo
rustc
python3
]; ];
programs.neovim = { programs.neovim = {
enable = true; enable = true;
@ -11,7 +17,7 @@
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
extraConfig = lib.fileContents ./nvim.lua; extraLuaConfig = lib.fileContents ./init.lua;
}; };
programs.nixvim = { programs.nixvim = {
enable = false; enable = false;

View file

@ -11,7 +11,7 @@
mainBar = { mainBar = {
layer = "top"; layer = "top";
position = "top"; position = "top";
height = 28; height = 39;
margin-top = 8; margin-top = 8;
margin-left = 10; margin-left = 10;
margin-right = 10; margin-right = 10;
@ -46,26 +46,10 @@
tooltip = false; tooltip = false;
}; };
"wireplumber" = { "wireplumber" = {
format = "{icon} {volume}% {format_source}"; format = "{volume}% {icon}";
format-bluetooth = "󰂯 {icon} {volume}% {format_source}"; format-muted = "";
format-bluetooth-muted = "󰂯 󰝟 {format_source}"; on-click = "helvum";
format-muted = "󰝟 {format_source}"; format-icons = ["" "" ""];
format-source = "󰍬";
format-source-muted = "󰍭";
format-icons = {
headphone = "󰋋";
hands-free = "󰋎";
headset = "󰋎";
phone = "";
portable = "";
car = "󰄋";
default = [
"󰕾"
"󰕾"
"󰕾"
];
};
on-click = "pavucontrol"; # TODO: find an alternative
}; };
"custom/vpn" = { "custom/vpn" = {
format = "VPN"; format = "VPN";
@ -209,6 +193,7 @@
#custom-media, #custom-media,
#mode, #mode,
#idle_inhibitor, #idle_inhibitor,
#custom-vpn,
#scratchpad, #scratchpad,
#tray, #tray,
#custom-updates, #custom-updates,

View file

@ -164,6 +164,27 @@
maxtime = "1h"; maxtime = "1h";
overalljails = true; overalljails = true;
}; };
jails = {
go-login.settings = {
enabled = true;
filter = "go-login";
action = ''iptables-multiport[name=HTTP, port="http,https,2000"]'';
logpath = "/home/noa/Documents/programming/SODS/login.log";
backend = "systemd";
findtime = 600;
bantime = 600;
maxretry = 5;
};
};
};
environment.etc = {
"fail2ban/filter.d/go-login.local".text = pkgs.lib.mkDefault (pkgs.lib.mkAfter ''
[Definition]
failregex=^time= level=WARN msg=".*?" ip=<ADDR> status=4\d\d$
'');
}; };
boot.kernelModules = [ boot.kernelModules = [

View file

@ -55,7 +55,6 @@
# Programming langs # Programming langs
go go
nodejs nodejs
rustup
]; ];

View file

@ -42,7 +42,6 @@
# Programming langs # Programming langs
go go
nodejs nodejs
rustup
]; ];