initial commit
This commit is contained in:
commit
ebc1be5217
143 changed files with 7721 additions and 0 deletions
9
modules/home/programs/atuin.nix
Normal file
9
modules/home/programs/atuin.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# ✨ Magical shell history
|
||||
{...}: {
|
||||
programs.atuin = {
|
||||
enable = true;
|
||||
flags = [
|
||||
"--disable-up-arrow"
|
||||
];
|
||||
};
|
||||
}
|
||||
6
modules/home/programs/bat.nix
Normal file
6
modules/home/programs/bat.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# A cat clone with syntax highlighting and Git integration.
|
||||
{...}: {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
123
modules/home/programs/brave.nix
Normal file
123
modules/home/programs/brave.nix
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.brave = {
|
||||
enable = true;
|
||||
commandLineArgs = [
|
||||
# Wayland Native
|
||||
"--enable-features=UseOzonePlatform"
|
||||
"--ozone-platform=wayland"
|
||||
|
||||
# Hardware Acceleration (NVIDIA optimized)
|
||||
"--enable-accelerated-video-decode"
|
||||
"--enable-gpu-rasterization"
|
||||
"--enable-zero-copy"
|
||||
"--ignore-gpu-blocklist"
|
||||
|
||||
# Performance
|
||||
"--enable-features=VaapiVideoDecoder"
|
||||
"--enable-features=VaapiVideoEncoder"
|
||||
"--enable-features=CanvasOopRasterization"
|
||||
"--disable-features=UseChromeOSDirectVideoDecoder"
|
||||
|
||||
# Privacy & Security
|
||||
"--disable-features=MediaRouter" # Disable Chromecast
|
||||
"--disable-features=OptimizationHints" # No Google suggestions
|
||||
"--disable-features=AutofillSavePaymentMethods"
|
||||
"--disable-background-networking" # No telemetry
|
||||
"--disable-sync" # Manual sync control
|
||||
|
||||
# Wayland-specific fixes
|
||||
"--disable-features=WaylandWpColorManagerV1" # Color management fix
|
||||
|
||||
# UI/UX
|
||||
"--force-dark-mode" # Match Stylix theme
|
||||
"--enable-features=WebUIDarkMode"
|
||||
"--no-default-browser-check"
|
||||
];
|
||||
extensions = [
|
||||
# let
|
||||
# ids = [
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin
|
||||
"dbepggeogbaibhgnhhndojpepiihcmeb" # vimium
|
||||
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # dark reader
|
||||
"pkehgijcmpdhfbdbbnkijodmdjhbjlgp" # privacy badger
|
||||
"ghmbeldphafepmbegfdlkpapadhbakde" # proton pass
|
||||
"mmjbdbjnoablegbkcklggeknkfcjkjia" # custom new tab page
|
||||
];
|
||||
# in
|
||||
# map (id: { inherit id; }) ids;
|
||||
};
|
||||
|
||||
xdg.configFile."BraveSoftware/Brave-Browser/Policies/managed/policy.json".text = builtins.toJSON {
|
||||
BraveShieldsAdControl = 2;
|
||||
BraveShieldsTrackersBlocked = 1;
|
||||
BraveShieldsHttpsEverywhere = 1;
|
||||
BraveRewardsDisabled = 1;
|
||||
BraveWalletDisabled = 1;
|
||||
BraveVPNDisabled = 1;
|
||||
BraveAIChatEnabled = 0;
|
||||
PasswordManagerEnabled = 0;
|
||||
BravePlaylistEnabled = 0;
|
||||
BraveWebDiscoveryEnabled = 0;
|
||||
BraveStatsPingEnabled = 0;
|
||||
DnsOverHttpsMode = "automatic";
|
||||
BraveDarkMode = 1;
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
DEFAULT_BROWSER = "${pkgs.brave}/bin/brave";
|
||||
BROWSER = "${pkgs.brave}/bin/brave";
|
||||
};
|
||||
|
||||
xdg.desktopEntries = {
|
||||
brave-incognito = {
|
||||
name = "Brave (Private window)";
|
||||
genericName = "Navigateur Web";
|
||||
exec = "brave --incognito";
|
||||
icon = "brave-browser";
|
||||
terminal = false;
|
||||
categories = [
|
||||
"Network"
|
||||
"WebBrowser"
|
||||
];
|
||||
mimeType = [
|
||||
"text/html"
|
||||
"text/xml"
|
||||
];
|
||||
};
|
||||
brave-tor = {
|
||||
name = "Brave (Private window w/Tor)";
|
||||
genericName = "Navigateur Web";
|
||||
exec = "brave --tor";
|
||||
icon = "brave-browser";
|
||||
terminal = false;
|
||||
categories = [
|
||||
"Network"
|
||||
"WebBrowser"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# =================================================================
|
||||
# BRAVE SETTINGS (via brave://flags)
|
||||
# =================================================================
|
||||
|
||||
# These need to be set manually in brave://flags on first launch:
|
||||
# - Enable Tab Groups (UI)
|
||||
# - Enable Parallel Downloading
|
||||
# - Enable Reader Mode
|
||||
# - GPU Rasterization: Enabled
|
||||
# - Override software rendering list: Enabled
|
||||
#
|
||||
# Privacy settings (brave://settings/privacy):
|
||||
# - Block trackers & ads: Aggressive
|
||||
# - Block all fingerprinting
|
||||
# - Upgrade connections to HTTPS
|
||||
# - Block scripts: Off (breaks sites, use uBlock instead)
|
||||
# - Block cookies: Only 3rd party
|
||||
#
|
||||
# Appearance (brave://settings/appearance):
|
||||
# - Show home button: Off
|
||||
# - Show bookmarks bar: Only on new tab
|
||||
# - Use wide address bar: On
|
||||
}
|
||||
7
modules/home/programs/broot.nix
Normal file
7
modules/home/programs/broot.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# An interactive treeview directory navigator
|
||||
{...}: {
|
||||
programs.broot = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
5
modules/home/programs/btop.nix
Normal file
5
modules/home/programs/btop.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
6
modules/home/programs/carapace.nix
Normal file
6
modules/home/programs/carapace.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.carapace = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
15
modules/home/programs/eza.nix
Normal file
15
modules/home/programs/eza.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# A modern replacement for 'ls'.
|
||||
{...}: {
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
git = true;
|
||||
icons = "auto";
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--no-quotes"
|
||||
"--git-ignore"
|
||||
"--icons=always"
|
||||
];
|
||||
};
|
||||
}
|
||||
33
modules/home/programs/fzf.nix
Normal file
33
modules/home/programs/fzf.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Fzf is a general-purpose command-line fuzzy finder.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
accent = "#" + config.lib.stylix.colors.base0D;
|
||||
foreground = "#" + config.lib.stylix.colors.base05;
|
||||
muted = "#" + config.lib.stylix.colors.base03;
|
||||
in {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
colors = lib.mkForce {
|
||||
"fg+" = accent;
|
||||
"bg+" = "-1";
|
||||
"fg" = foreground;
|
||||
"bg" = "-1";
|
||||
"prompt" = muted;
|
||||
"pointer" = accent;
|
||||
};
|
||||
defaultOptions = [
|
||||
"--margin=1"
|
||||
"--layout=reverse"
|
||||
"--border=none"
|
||||
"--info='hidden'"
|
||||
"--header=''"
|
||||
"--prompt='/ '"
|
||||
"-i"
|
||||
"--no-bold"
|
||||
];
|
||||
};
|
||||
}
|
||||
31
modules/home/programs/ghostty.nix
Normal file
31
modules/home/programs/ghostty.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
installVimSyntax = true;
|
||||
settings = {
|
||||
window-padding-x = 10;
|
||||
window-padding-y = 10;
|
||||
auto-update = "off";
|
||||
working-directory = "home";
|
||||
window-inherit-working-directory = false; # avoid inheritance
|
||||
keybinds = [];
|
||||
# background-opacity = 0.8;
|
||||
background-opacity = 1;
|
||||
confirm-close-surface = false;
|
||||
font-family = lib.mkForce "Comic Code Ligatures";
|
||||
# font-family = lib.mkForce "Terminus";
|
||||
font-size = 14;
|
||||
gtk-titlebar = false;
|
||||
# theme = "Teerb";
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
ueberzugpp
|
||||
terminus_font_ttf
|
||||
];
|
||||
}
|
||||
6
modules/home/programs/k9s.nix
Normal file
6
modules/home/programs/k9s.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# A terminal-based Kubernetes CLI.
|
||||
{...}: {
|
||||
programs.k9s = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
256
modules/home/programs/neovim/keymaps.nix
Normal file
256
modules/home/programs/neovim/keymaps.nix
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
{
|
||||
programs.nvf.settings.vim = {
|
||||
globals.mapleader = " ";
|
||||
binds = {
|
||||
whichKey = {
|
||||
enable = true;
|
||||
# TODO: registers
|
||||
register = { };
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
# General Mappings
|
||||
{
|
||||
key = "s";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('flash').jump()<cr>";
|
||||
desc = "Flash";
|
||||
}
|
||||
{
|
||||
key = "K";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
|
||||
desc = "LSP Hover";
|
||||
}
|
||||
{
|
||||
key = "<C-tab>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>bnext<cr>";
|
||||
desc = "Next Buffer";
|
||||
}
|
||||
{
|
||||
key = "<leader>bd";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>bd<cr>";
|
||||
desc = "Close current buffer";
|
||||
}
|
||||
|
||||
# Disable Arrow Keys in Normal Mode
|
||||
# {
|
||||
# key = "<Up>";
|
||||
# mode = "n";
|
||||
# silent = true;
|
||||
# action = "k";
|
||||
# desc = "Disable Up Arrow";
|
||||
# }
|
||||
# {
|
||||
# key = "<Down>";
|
||||
# mode = "n";
|
||||
# silent = true;
|
||||
# action = "j";
|
||||
# desc = "Disable Down Arrow";
|
||||
# }
|
||||
# {
|
||||
# key = "<Left>";
|
||||
# mode = "n";
|
||||
# silent = true;
|
||||
# action = "h";
|
||||
# desc = "Disable Left Arrow";
|
||||
# }
|
||||
# {
|
||||
# key = "<Right>";
|
||||
# mode = "n";
|
||||
# silent = true;
|
||||
# action = "l";
|
||||
# desc = "Disable Right Arrow";
|
||||
# }
|
||||
|
||||
# UI
|
||||
{
|
||||
key = "<leader>uw";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set wrap!<cr>";
|
||||
desc = "Toggle word wrapping";
|
||||
}
|
||||
{
|
||||
key = "<leader>ul";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set linebreak!<cr>";
|
||||
desc = "Toggle linebreak";
|
||||
}
|
||||
{
|
||||
key = "<leader>us";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set spell!<cr>";
|
||||
desc = "Toggle spellLazyGitcheck";
|
||||
}
|
||||
{
|
||||
key = "<leader>uc";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set cursorline!<cr>";
|
||||
desc = "Toggle cursorline";
|
||||
}
|
||||
{
|
||||
key = "<leader>un";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set number!<cr>";
|
||||
desc = "Toggle line numbers";
|
||||
}
|
||||
{
|
||||
key = "<leader>ur";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set relativenumber!<cr>";
|
||||
desc = "Toggle relative line numbers";
|
||||
}
|
||||
{
|
||||
key = "<leader>ut";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set showtabline=2<cr>";
|
||||
desc = "Show tabline";
|
||||
}
|
||||
{
|
||||
key = "<leader>uT";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>set showtabline=0<cr>";
|
||||
desc = "Hide tabline";
|
||||
}
|
||||
|
||||
# Windows
|
||||
{
|
||||
key = "<leader>ws";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>split<cr>";
|
||||
desc = "Split";
|
||||
}
|
||||
{
|
||||
key = "<leader>wv";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>vsplit<cr>";
|
||||
desc = "VSplit";
|
||||
}
|
||||
{
|
||||
key = "<leader>wd";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>close<cr>";
|
||||
desc = "Close";
|
||||
}
|
||||
{
|
||||
key = "<leader>ma";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>close<cr>";
|
||||
desc = "Close";
|
||||
}
|
||||
{
|
||||
key = "<C-Left>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').move_cursor_left()<cr>";
|
||||
desc = "Move to left split";
|
||||
}
|
||||
|
||||
{
|
||||
key = "<C-Down>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').move_cursor_down()<cr>";
|
||||
desc = "Move to lower split";
|
||||
}
|
||||
{
|
||||
key = "<C-Up>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').move_cursor_up()<cr>";
|
||||
desc = "Move to upper split";
|
||||
}
|
||||
{
|
||||
key = "<C-Right>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').move_cursor_right()<cr>";
|
||||
desc = "Move to right split";
|
||||
}
|
||||
|
||||
{
|
||||
key = "<M-Left>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').resize_left()<cr>";
|
||||
desc = "Resize left";
|
||||
}
|
||||
{
|
||||
key = "<M-Down>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').resize_down()<cr>";
|
||||
desc = "Resize down";
|
||||
}
|
||||
{
|
||||
key = "<M-Up>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').resize_up()<cr>";
|
||||
desc = "Resize up";
|
||||
}
|
||||
{
|
||||
key = "<M-Right>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').resize_right()<cr>";
|
||||
desc = "Resize right";
|
||||
}
|
||||
|
||||
{
|
||||
key = "<leader>w=";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<C-w>=";
|
||||
desc = "Equalize Splits";
|
||||
}
|
||||
{
|
||||
key = "<leader>we";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').swap_buf_right()<cr>";
|
||||
desc = "Swap Buffer Right";
|
||||
}
|
||||
{
|
||||
key = "<leader>wh";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua require('smart-splits').swap_buf_left()<cr>";
|
||||
desc = "Swap Buffer Left";
|
||||
}
|
||||
|
||||
{
|
||||
key = "<C-o>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<C-o>zz";
|
||||
desc = "Jump back and center";
|
||||
}
|
||||
{
|
||||
key = "<C-i>";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<C-i>zz";
|
||||
desc = "Jump forward and center";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
132
modules/home/programs/neovim/languages.nix
Normal file
132
modules/home/programs/neovim/languages.nix
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nvf.settings.vim = {
|
||||
diagnostics = {
|
||||
enable = true;
|
||||
config = {
|
||||
signs = {
|
||||
text = {
|
||||
"vim.diagnostic.severity.Error" = " ";
|
||||
"vim.diagnostic.severity.Warn" = " ";
|
||||
"vim.diagnostic.severity.Hint" = " ";
|
||||
"vim.diagnostic.severity.Info" = " ";
|
||||
};
|
||||
};
|
||||
underline = true;
|
||||
update_in_insert = true;
|
||||
virtual_text = {
|
||||
format =
|
||||
lib.generators.mkLuaInline
|
||||
# lua
|
||||
''
|
||||
function(diagnostic)
|
||||
return string.format("%s", diagnostic.message)
|
||||
--return string.format("%s (%s)", diagnostic.message, diagnostic.source)
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
nvim-lint = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
syntaxHighlighting = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
autotagHtml = true;
|
||||
context.enable = true;
|
||||
highlight = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
lspconfig.enable = true;
|
||||
formatOnSave = true;
|
||||
inlayHints.enable = true;
|
||||
null-ls.enable = true;
|
||||
servers.nixd.settings.nil.nix.autoArchive = true;
|
||||
otter-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
buffers.set_filetype = true;
|
||||
lsp = {
|
||||
diagnostic_update_event = [
|
||||
"BufWritePost"
|
||||
"InsertLeave"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
lspkind.enable = true;
|
||||
lspsaga = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
ui = {
|
||||
code_action = "";
|
||||
};
|
||||
lightbulb = {
|
||||
sign = false;
|
||||
virtual_text = true;
|
||||
};
|
||||
breadcrumbs.enable = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
languages = {
|
||||
enableDAP = true;
|
||||
enableExtraDiagnostics = true;
|
||||
enableFormat = true;
|
||||
enableTreesitter = true;
|
||||
|
||||
astro.enable = true;
|
||||
python.enable = true;
|
||||
java.enable = true;
|
||||
clang.enable = true;
|
||||
go.enable = true;
|
||||
markdown = {
|
||||
enable = true;
|
||||
format.type = [ "prettierd" ];
|
||||
extensions = {
|
||||
markview-nvim = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
extraDiagnostics.enable = true;
|
||||
};
|
||||
ts.enable = true;
|
||||
ts.extensions.ts-error-translator.enable = true;
|
||||
css.enable = true;
|
||||
svelte.enable = true;
|
||||
ocaml.enable = true;
|
||||
haskell.enable = true;
|
||||
haskell.lsp.enable = true;
|
||||
haskell.treesitter.enable = true;
|
||||
haskell.dap.enable = false;
|
||||
html.enable = true;
|
||||
bash.enable = true;
|
||||
nix.enable = true;
|
||||
nix.format.type = [ "nixfmt" ];
|
||||
tailwind.enable = true;
|
||||
typst = {
|
||||
enable = true;
|
||||
lsp.enable = true;
|
||||
lsp.servers = [ "tinymist" ];
|
||||
format.enable = true;
|
||||
treesitter.enable = true;
|
||||
};
|
||||
rust.enable = true;
|
||||
};
|
||||
formatter = {
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home/programs/neovim/mini.nix
Normal file
14
modules/home/programs/neovim/mini.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
programs.nvf.settings.vim.mini = {
|
||||
starter.enable = true;
|
||||
comment.enable = true;
|
||||
# cursorword.enable = true;
|
||||
icons.enable = true;
|
||||
indentscope.enable = true;
|
||||
notify.enable = true;
|
||||
pairs.enable = true;
|
||||
diff.enable = true;
|
||||
git.enable = true;
|
||||
# snippets.enable = true;
|
||||
};
|
||||
}
|
||||
23
modules/home/programs/neovim/options.nix
Normal file
23
modules/home/programs/neovim/options.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
programs.nvf.settings.vim = {
|
||||
viAlias = false;
|
||||
vimAlias = true;
|
||||
withNodeJs = true;
|
||||
# syntaxHighlighting = true;
|
||||
options = {
|
||||
autoindent = true;
|
||||
shiftwidth = 2;
|
||||
signcolumn = "yes";
|
||||
tabstop = 2;
|
||||
softtabstop = 2;
|
||||
wrap = false;
|
||||
undofile = true;
|
||||
shada = "!,'100,<50,s10,h";
|
||||
};
|
||||
clipboard = {
|
||||
enable = true;
|
||||
registers = "unnamedplus";
|
||||
providers.wl-copy.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
256
modules/home/programs/neovim/picker.nix
Normal file
256
modules/home/programs/neovim/picker.nix
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
{
|
||||
programs.nvf.settings.vim = {
|
||||
utility = {
|
||||
oil-nvim.enable = true;
|
||||
snacks-nvim = {
|
||||
setupOpts = {
|
||||
picker.enabled = true;
|
||||
explorer.enabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
keymaps = [
|
||||
# Top Pickers & Explorer
|
||||
{
|
||||
key = "<leader> ";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.smart()<cr>";
|
||||
desc = "Smart Find Files";
|
||||
}
|
||||
{
|
||||
key = "<leader>,";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.buffers()<cr>";
|
||||
desc = "Buffers";
|
||||
}
|
||||
{
|
||||
key = "<leader>/";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.grep()<cr>";
|
||||
desc = "Grep";
|
||||
}
|
||||
{
|
||||
key = "<leader>:";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.command_history()<cr>";
|
||||
desc = "Command History";
|
||||
}
|
||||
{
|
||||
key = "<leader>e";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.explorer()<cr>";
|
||||
desc = "File Explorer";
|
||||
}
|
||||
{
|
||||
key = "-";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>Oil<cr>";
|
||||
desc = "Oil";
|
||||
}
|
||||
|
||||
# Find
|
||||
{
|
||||
key = "<leader>fb";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.buffers()<cr>";
|
||||
desc = "Buffers";
|
||||
}
|
||||
{
|
||||
key = "<leader>fc";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = ''<cmd>lua Snacks.picker.files({ cwd = vim.fn.stdpath("config") })<cr>'';
|
||||
desc = "Find Config File";
|
||||
}
|
||||
{
|
||||
key = "<leader>ff";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.files()<cr>";
|
||||
desc = "Find Files";
|
||||
}
|
||||
{
|
||||
key = "<leader>fg";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_files()<cr>";
|
||||
desc = "Find Git Files";
|
||||
}
|
||||
{
|
||||
key = "<leader>fp";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.projects()<cr>";
|
||||
desc = "Projects";
|
||||
}
|
||||
{
|
||||
key = "<leader>fr";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.recent()<cr>";
|
||||
desc = "Recent";
|
||||
}
|
||||
{
|
||||
key = "<leader>fn";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.notifications()<cr>";
|
||||
desc = "Notification History";
|
||||
}
|
||||
{
|
||||
key = "<leader>fe";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.icons()<cr>";
|
||||
desc = "Emoji";
|
||||
}
|
||||
|
||||
# Git
|
||||
{
|
||||
key = "<leader>gb";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_branches()<cr>";
|
||||
desc = "Git Branches";
|
||||
}
|
||||
{
|
||||
key = "<leader>gL";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_log()<cr>";
|
||||
desc = "Git Log Line";
|
||||
}
|
||||
{
|
||||
key = "<leader>gs";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_status()<cr>";
|
||||
desc = "Git Status";
|
||||
}
|
||||
{
|
||||
key = "<leader>gS";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_stash()<cr>";
|
||||
desc = "Git Stash";
|
||||
}
|
||||
{
|
||||
key = "<leader>gd";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_diff()<cr>";
|
||||
desc = "Git Diff (Hunks)";
|
||||
}
|
||||
{
|
||||
key = "<leader>gf";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.git_log_file()<cr>";
|
||||
desc = "Git Log File";
|
||||
}
|
||||
|
||||
# Grep
|
||||
{
|
||||
key = "<leader>sb";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lines()<cr>";
|
||||
desc = "Buffer Lines";
|
||||
}
|
||||
{
|
||||
key = "<leader>st";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.todo_comments()<cr>";
|
||||
desc = "Todos";
|
||||
}
|
||||
{
|
||||
key = "<leader>sB";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.grep_buffers()<cr>";
|
||||
desc = "Grep Open Buffers";
|
||||
}
|
||||
{
|
||||
key = "<leader>sg";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.grep()<cr>";
|
||||
desc = "Grep";
|
||||
}
|
||||
{
|
||||
key = "<leader>sw";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.grep_word()<cr>";
|
||||
desc = "Visual selection or word";
|
||||
}
|
||||
{
|
||||
key = "<leader>sr";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>nohlsearch<cr>";
|
||||
desc = "Reset search";
|
||||
}
|
||||
|
||||
# LSP
|
||||
{
|
||||
key = "gd";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_definitions()<cr>";
|
||||
desc = "Goto Definition";
|
||||
}
|
||||
{
|
||||
key = "gD";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_declarations()<cr>";
|
||||
desc = "Goto Declaration";
|
||||
}
|
||||
{
|
||||
key = "gr";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_references()<cr>";
|
||||
desc = "References";
|
||||
nowait = true;
|
||||
}
|
||||
{
|
||||
key = "gI";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_implementations()<cr>";
|
||||
desc = "Goto Implementation";
|
||||
}
|
||||
{
|
||||
key = "gy";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_type_definitions()<cr>";
|
||||
desc = "Goto Type Definition";
|
||||
}
|
||||
{
|
||||
key = "<leader>ss";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_symbols()<cr>";
|
||||
desc = "LSP Symbols";
|
||||
}
|
||||
{
|
||||
key = "<leader>sS";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.picker.lsp_workspace_symbols()<cr>";
|
||||
desc = "LSP Workspace Symbols";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
19
modules/home/programs/neovim/snacks.nix
Normal file
19
modules/home/programs/neovim/snacks.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
programs.nvf.settings.vim.utility.snacks-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
image = {
|
||||
enabled = true;
|
||||
doc = {
|
||||
inline = false;
|
||||
float = true;
|
||||
};
|
||||
};
|
||||
quickfile.enabled = true;
|
||||
statuscolumn.enabled = true;
|
||||
zen.enabled = true;
|
||||
bufdelete.enabled = true;
|
||||
gitsigns.enabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
149
modules/home/programs/neovim/utils.nix
Normal file
149
modules/home/programs/neovim/utils.nix
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nvf.settings.vim = {
|
||||
undoFile.enable = true;
|
||||
# theme = lib.mkForce {
|
||||
# enable = true;
|
||||
# name = "catppuccin";
|
||||
# style = "latte";
|
||||
# transparent = false;
|
||||
# };
|
||||
|
||||
navigation = {
|
||||
harpoon.enable = true;
|
||||
};
|
||||
utility = {
|
||||
motion.flash-nvim.enable = true;
|
||||
outline.aerial-nvim.enable = true;
|
||||
diffview-nvim.enable = true;
|
||||
surround.enable = true;
|
||||
smart-splits.enable = true;
|
||||
yanky-nvim.enable = true;
|
||||
};
|
||||
tabline.nvimBufferline.enable = true;
|
||||
notes.todo-comments.enable = true;
|
||||
# assistant.copilot = {
|
||||
# enable = true;
|
||||
# cmp.enable = true;
|
||||
# };
|
||||
statusline.lualine.enable = true;
|
||||
autocomplete = {
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
sources = {
|
||||
buffer = "[Buffer]";
|
||||
nvim-cmp = null;
|
||||
path = "[Path]";
|
||||
};
|
||||
sourcePlugins = [
|
||||
pkgs.vimPlugins.cmp-cmdline
|
||||
];
|
||||
};
|
||||
};
|
||||
snippets.luasnip.enable = true;
|
||||
snippets.luasnip.customSnippets.snipmate = {
|
||||
all = [
|
||||
{
|
||||
trigger = "if";
|
||||
body = "if $1 else $2";
|
||||
}
|
||||
];
|
||||
nix = [
|
||||
{
|
||||
trigger = "mkOption";
|
||||
body = ''
|
||||
mkOption {
|
||||
type = $1;
|
||||
default = $2;
|
||||
description = $3;
|
||||
example = $4;
|
||||
}
|
||||
'';
|
||||
}
|
||||
];
|
||||
haskell = [
|
||||
{
|
||||
trigger = "zzis";
|
||||
body = ''
|
||||
insert :: (Ord a) => a -> [a] -> [a]
|
||||
insert x [] = [x]
|
||||
insert x (y:ys)
|
||||
| x <= y = x : y : ys
|
||||
| otherwise = y : insert x ys
|
||||
|
||||
insertionSort :: (Ord a) => [a] -> [a]
|
||||
insertionSort [] = []
|
||||
insertionSort (x:xs) = insert x (insertionSort xs)
|
||||
'';
|
||||
}
|
||||
{
|
||||
trigger = "zzso";
|
||||
body = ''
|
||||
sortOn :: Ord b => (a -> b) -> [a] -> [a]
|
||||
sortOn f = foldr insert []
|
||||
where
|
||||
insert x [] = [x]
|
||||
insert x (y:ys)
|
||||
| f x <= f y = x : y : ys
|
||||
| otherwise = y : insert x ys
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
ui = {
|
||||
noice.enable = true;
|
||||
colorizer.enable = true;
|
||||
};
|
||||
visuals = {
|
||||
rainbow-delimiters.enable = true;
|
||||
nvim-scrollbar = {
|
||||
enable = false;
|
||||
};
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
gitsigns.enable = true;
|
||||
};
|
||||
terminal.toggleterm = {
|
||||
enable = true;
|
||||
lazygit = {
|
||||
enable = true;
|
||||
mappings.open = "<leader>gl";
|
||||
};
|
||||
};
|
||||
formatter.conform-nvim.enable = true;
|
||||
binds.hardtime-nvim.enable = true;
|
||||
utility.motion.precognition.enable = true;
|
||||
binds.hardtime-nvim.setupOpts = {
|
||||
max_count = 3; # Optional: limit of consecutive presses
|
||||
disabled_keys = {
|
||||
"<Up>" = false;
|
||||
"<Down>" = false;
|
||||
"<Left>" = false;
|
||||
"<Right>" = false;
|
||||
};
|
||||
restricted_keys = {
|
||||
"<Up>" = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
"<Down>" = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
"<Left>" = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
"<Right>" = [
|
||||
"n"
|
||||
"x"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
10
modules/home/programs/niri/applications.nix
Normal file
10
modules/home/programs/niri/applications.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{pkgs}: {
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
terminal = "${pkgs.ghostty}/bin/ghostty";
|
||||
fileManager = "${pkgs.thunar}/bin/thunar";
|
||||
appLauncher = "${pkgs.walker}/bin/walker";
|
||||
|
||||
screenshotArea = "${pkgs.bash}/bin/bash -c '${pkgs.grim}/bin/grim -g \"\\\$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy'";
|
||||
screenshotWindow = "${pkgs.bash}/bin/bash -c '${pkgs.grim}/bin/grim -g \"\\\$(${pkgs.slurp}/bin/slurp -w)\" - | ${pkgs.wl-clipboard}/bin/wl-copy'";
|
||||
screenshotOutput = "${pkgs.bash}/bin/bash -c '${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy'";
|
||||
}
|
||||
26
modules/home/programs/niri/autostart.nix
Normal file
26
modules/home/programs/niri/autostart.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
xwayland-satellite
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
programs.niri.settings.spawn-at-startup = [
|
||||
{
|
||||
command = [
|
||||
"systemctl"
|
||||
"--user"
|
||||
"start"
|
||||
"hyprpolkitagent"
|
||||
];
|
||||
}
|
||||
{ command = [ "xwayland-satellite" ]; }
|
||||
{ command = [ "qs" ]; }
|
||||
{ command = [ "swww-daemon" ]; }
|
||||
#{ command = ["${pkgs.swaybg}/bin/swaybg" "-o" "DP-1" "-i" "/home/lysec/nixos/assets/wallpapers/clouds.png" "-m" "fill"]; }
|
||||
#{ command = ["sh" "-c" "swww-daemon & swww img /home/lysec/nixos/wallpapers/cloud.png"]; }
|
||||
];
|
||||
}
|
||||
106
modules/home/programs/niri/keybinds.nix
Normal file
106
modules/home/programs/niri/keybinds.nix
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
apps = import ./applications.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
programs.niri.settings.binds =
|
||||
with config.lib.niri.actions;
|
||||
let
|
||||
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||
|
||||
volume-up = spawn pactl [
|
||||
"set-sink-volume"
|
||||
"@DEFAULT_SINK@"
|
||||
"+5%"
|
||||
];
|
||||
volume-down = spawn pactl [
|
||||
"set-sink-volume"
|
||||
"@DEFAULT_SINK@"
|
||||
"-5%"
|
||||
];
|
||||
in
|
||||
{
|
||||
# Quickshell Keybinds Start
|
||||
"super+space".action = spawn [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"launcher"
|
||||
"toggle"
|
||||
];
|
||||
|
||||
"super+shift+Slash".action = show-hotkey-overlay;
|
||||
|
||||
"super+l".action = spawn [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"lockScreen"
|
||||
"lock"
|
||||
];
|
||||
|
||||
"xf86audioraisevolume".action = volume-up;
|
||||
"xf86audiolowervolume".action = volume-down;
|
||||
|
||||
"XF86MonBrightnessDown".action = spawn [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"brightness"
|
||||
"decrease"
|
||||
];
|
||||
"XF86MonBrightnessUp".action = spawn [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"brightness"
|
||||
"increase"
|
||||
];
|
||||
|
||||
"super+q".action = close-window;
|
||||
# "super+b".action = spawn apps.browser;
|
||||
"super+Return".action = spawn apps.terminal;
|
||||
#"super+Control+Return".action = spawn apps.appLauncher;
|
||||
"super+E".action = spawn apps.fileManager;
|
||||
"super+o".action = toggle-overview;
|
||||
|
||||
"super+f".action = maximize-column;
|
||||
"super+Shift+f".action = fullscreen-window;
|
||||
"super+t".action = toggle-window-floating;
|
||||
"super+r".action = switch-preset-column-width;
|
||||
"super+Shift+r".action = switch-preset-window-height;
|
||||
|
||||
"super+b".action =
|
||||
spawn-sh "${pkgs.grim}/bin/grim \"$HOME/Pictures/screenshots/desktop-$(${pkgs.busybox}/bin/date +%Y%m%d%H%M).png\"";
|
||||
"super+Shift+b".action =
|
||||
spawn-sh "${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -d)\" - | ${pkgs.wl-clipboard}/bin/wl-copy"; # Screenshot selection directly to clipboard
|
||||
|
||||
"super+Left".action = focus-column-left;
|
||||
"super+Right".action = focus-column-right;
|
||||
"super+Down".action = focus-workspace-down;
|
||||
"super+Up".action = focus-workspace-up;
|
||||
|
||||
"super+Shift+Left".action = move-column-left;
|
||||
"super+Shift+Right".action = move-column-right;
|
||||
"super+Shift+Down".action = move-column-to-workspace-down;
|
||||
"super+Shift+Up".action = move-column-to-workspace-up;
|
||||
|
||||
"super+Control+Left".action = focus-monitor-left;
|
||||
"super+Control+Right".action = focus-monitor-right;
|
||||
"super+Control+Down".action = focus-monitor-down;
|
||||
"super+Control+Up".action = focus-monitor-up;
|
||||
|
||||
"super+BracketLeft".action = consume-or-expel-window-left;
|
||||
"super+BracketRight".action = consume-or-expel-window-right;
|
||||
"super+Comma".action = consume-window-into-column;
|
||||
"super+Period".action = expel-window-from-column;
|
||||
|
||||
"super+Home".action = focus-column-first;
|
||||
"super+End".action = focus-column-last;
|
||||
};
|
||||
}
|
||||
78
modules/home/programs/niri/noctaliashell.nix
Normal file
78
modules/home/programs/niri/noctaliashell.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.noctalia.homeModules.default
|
||||
];
|
||||
|
||||
# configure options
|
||||
programs.noctalia-shell = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# configure noctalia here
|
||||
nightLight = {
|
||||
enabled = true;
|
||||
};
|
||||
dock = {
|
||||
enabled = false;
|
||||
};
|
||||
bar = {
|
||||
density = "default";
|
||||
position = "top";
|
||||
floating = true;
|
||||
showCapsule = false;
|
||||
widgets = {
|
||||
left = [
|
||||
{
|
||||
id = "ControlCenter";
|
||||
useDistroLogo = true;
|
||||
}
|
||||
{
|
||||
id = "Network";
|
||||
}
|
||||
{
|
||||
id = "Bluetooth";
|
||||
}
|
||||
];
|
||||
center = [
|
||||
{
|
||||
hideUnoccupied = false;
|
||||
id = "Workspace";
|
||||
labelMode = "none";
|
||||
}
|
||||
];
|
||||
right = [
|
||||
{
|
||||
id = "Tray";
|
||||
}
|
||||
{
|
||||
alwaysShowPercentage = false;
|
||||
id = "Battery";
|
||||
warningThreshold = 30;
|
||||
}
|
||||
{
|
||||
formatHorizontal = "HH:mm";
|
||||
formatVertical = "HH mm";
|
||||
id = "Clock";
|
||||
useMonospacedFont = true;
|
||||
usePrimaryColor = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
colorSchemes.predefinedScheme = "Monochrome";
|
||||
general = {
|
||||
avatarImage = "/home/gwg313/.face";
|
||||
radiusRatio = 0.2;
|
||||
};
|
||||
location = {
|
||||
monthBeforeDay = true;
|
||||
name = "Ottawa, Canada";
|
||||
};
|
||||
};
|
||||
# this may also be a string or a path to a JSON file.
|
||||
};
|
||||
}
|
||||
48
modules/home/programs/niri/rules.nix
Normal file
48
modules/home/programs/niri/rules.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.niri.settings = {
|
||||
layer-rules = [
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
namespace = "^quickshell-wallpaper$";
|
||||
}
|
||||
];
|
||||
#place-within-backdrop = true;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
namespace = "^quickshell-overview$";
|
||||
}
|
||||
];
|
||||
place-within-backdrop = true;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
namespace = "^swww-daemon$";
|
||||
}
|
||||
];
|
||||
place-within-backdrop = true;
|
||||
}
|
||||
];
|
||||
|
||||
window-rules = [
|
||||
{
|
||||
matches = [ { } ];
|
||||
geometry-corner-radius = {
|
||||
top-left = 20.0;
|
||||
top-right = 20.0;
|
||||
bottom-left = 20.0;
|
||||
bottom-right = 20.0;
|
||||
};
|
||||
clip-to-geometry = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
31
modules/home/programs/niri/scripts.nix
Normal file
31
modules/home/programs/niri/scripts.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
brightnessScript = pkgs.writeShellScriptBin "brightness" ''
|
||||
BUS=10
|
||||
STEP=5
|
||||
MIN=0
|
||||
MAX=100
|
||||
OSD_FILE="/tmp/brightness_osd_level"
|
||||
|
||||
current=$(ddcutil --bus=$BUS getvcp 10 | grep -oP "current value\\s*=\\s*\\K[0-9]+")
|
||||
new=$current
|
||||
|
||||
if [[ "$1" == "up" ]]; then
|
||||
new=$((current + STEP))
|
||||
(( new > MAX )) && new=$MAX
|
||||
elif [[ "$1" == "down" ]]; then
|
||||
new=$((current - STEP))
|
||||
(( new < MIN )) && new=$MIN
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ddcutil --bus=$BUS setvcp 10 "$new"
|
||||
echo "$new" > "$OSD_FILE"
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
brightnessScript
|
||||
];
|
||||
}
|
||||
155
modules/home/programs/niri/settings.nix
Normal file
155
modules/home/programs/niri/settings.nix
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.sessionVariables = {
|
||||
XDG_ICON_DIR = "${pkgs.whitesur-icon-theme}/share/icons/WhiteSur";
|
||||
GSETTINGS_SCHEMA_DIR = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas";
|
||||
XCURSOR_THEME = "Bibata-Original-Ice";
|
||||
XCURSOR_SIZE = "20";
|
||||
};
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri;
|
||||
settings = {
|
||||
environment = {
|
||||
# CLUTTER_BACKEND = "wayland";
|
||||
# DISPLAY = null;
|
||||
# MOZ_ENABLE_WAYLAND = "1";
|
||||
# NIXOS_OZONE_WL = "1";
|
||||
# QT_QPA_PLATFORM = "wayland;xcb";
|
||||
# QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
WLR_RENDERER = "vulkan";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
QT_QPA_PLATFORMTHEME = "qt6ct";
|
||||
GTK_IM_MODULE = "simple";
|
||||
# GDK_BACKEND = "wayland,x11";
|
||||
};
|
||||
spawn-at-startup = [
|
||||
{
|
||||
command = [
|
||||
"noctalia-shell"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
prefer-no-csd = true;
|
||||
|
||||
hotkey-overlay = {
|
||||
skip-at-startup = true;
|
||||
};
|
||||
switch-events = {
|
||||
lid-close.action.spawn = [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"lockScreen"
|
||||
"lock"
|
||||
];
|
||||
};
|
||||
|
||||
layout = {
|
||||
preset-column-widths = [
|
||||
{proportion = 1. / 3.;}
|
||||
{proportion = 1. / 2.;}
|
||||
{proportion = 2. / 3.;}
|
||||
];
|
||||
default-column-width = {
|
||||
proportion = 0.5;
|
||||
};
|
||||
|
||||
preset-window-heights = [
|
||||
{proportion = 1. / 3.;}
|
||||
{proportion = 1. / 2.;}
|
||||
{proportion = 2. / 3.;}
|
||||
];
|
||||
|
||||
background-color = "#00000000";
|
||||
|
||||
focus-ring = {
|
||||
enable = true;
|
||||
width = 3;
|
||||
active = {
|
||||
color = "#A8AEFF";
|
||||
};
|
||||
inactive = {
|
||||
color = "#505050";
|
||||
};
|
||||
};
|
||||
|
||||
gaps = 6;
|
||||
|
||||
struts = {
|
||||
left = 20;
|
||||
right = 20;
|
||||
top = 20;
|
||||
bottom = 20;
|
||||
};
|
||||
};
|
||||
|
||||
input = {
|
||||
touchpad = {
|
||||
click-method = "button-areas";
|
||||
dwt = true;
|
||||
dwtp = true;
|
||||
natural-scroll = true;
|
||||
scroll-method = "two-finger";
|
||||
tap = true;
|
||||
tap-button-map = "left-right-middle";
|
||||
middle-emulation = true;
|
||||
accel-profile = "adaptive";
|
||||
};
|
||||
focus-follows-mouse.enable = true;
|
||||
focus-follows-mouse.max-scroll-amount = "0%";
|
||||
warp-mouse-to-focus.enable = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
"eDP-1" = {
|
||||
mode = {
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
};
|
||||
scale = 1.0;
|
||||
position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
|
||||
"Microstep MSI MP161 E2 PB7H314B00225" = {
|
||||
mode = {
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
};
|
||||
scale = 1.0;
|
||||
position = {
|
||||
x = 0;
|
||||
y = -1080;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
size = 20;
|
||||
theme = "Adwaita";
|
||||
};
|
||||
|
||||
environment = {
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
GDK_BACKEND = "wayland,x11";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "niri";
|
||||
DISPLAY = ":0";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
12
modules/home/programs/pass.nix
Normal file
12
modules/home/programs/pass.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# ✨ password manager
|
||||
{pkgs, ...}: {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
tessen
|
||||
zbar
|
||||
];
|
||||
}
|
||||
54
modules/home/programs/starship.nix
Normal file
54
modules/home/programs/starship.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# A customizable prompt for shells.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
accent = "#${config.lib.stylix.colors.base0D}";
|
||||
background-alt = "#${config.lib.stylix.colors.base01}";
|
||||
in {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
format = lib.concatStrings [
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"$character"
|
||||
];
|
||||
directory = {
|
||||
style = accent;
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](${accent})";
|
||||
error_symbol = "[❯](red)";
|
||||
vimcmd_symbol = "[❮](cyan)";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
symbol = "[](${background-alt}) ";
|
||||
style = "fg:${accent} bg:${background-alt}";
|
||||
format = "on [$symbol$branch]($style)[](${background-alt}) ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed)]($style)";
|
||||
style = "cyan";
|
||||
conflicted = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
stashed = "≡";
|
||||
};
|
||||
|
||||
git_state = {
|
||||
format = "([$state( $progress_current/$progress_total)]($style)) ";
|
||||
style = "bright-black";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
126
modules/home/programs/yazi.nix
Normal file
126
modules/home/programs/yazi.nix
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
shellWrapperName = "y";
|
||||
plugins = {
|
||||
starship = pkgs.yaziPlugins.starship;
|
||||
full-border = pkgs.yaziPlugins.full-border;
|
||||
chmod = pkgs.yaziPlugins.chmod;
|
||||
compress = pkgs.yaziPlugins.compress;
|
||||
smart-paste = pkgs.yaziPlugins.smart-paste;
|
||||
smart-enter = pkgs.yaziPlugins.smart-enter;
|
||||
smart-filter = pkgs.yaziPlugins.smart-filter;
|
||||
};
|
||||
settings = {
|
||||
yazi = {
|
||||
ratio = [
|
||||
1
|
||||
4
|
||||
3
|
||||
];
|
||||
sort_by = "natural";
|
||||
sort_sensitive = true;
|
||||
sort_reverse = false;
|
||||
sort_dir_first = true;
|
||||
linemode = "none";
|
||||
show_hidden = true;
|
||||
show_symlink = true;
|
||||
};
|
||||
|
||||
preview = {
|
||||
image_filter = "lanczos3";
|
||||
image_quality = 90;
|
||||
tab_size = 1;
|
||||
max_width = 600;
|
||||
max_height = 900;
|
||||
cache_dir = "";
|
||||
ueberzug_scale = 1;
|
||||
ueberzug_offset = [
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
];
|
||||
};
|
||||
|
||||
tasks = {
|
||||
micro_workers = 5;
|
||||
macro_workers = 10;
|
||||
bizarre_retry = 5;
|
||||
};
|
||||
};
|
||||
initLua = ''
|
||||
require("starship"):setup()
|
||||
require("full-border"):setup()
|
||||
require("smart-enter"):setup {
|
||||
open_multi = true,
|
||||
}
|
||||
'';
|
||||
keymap = {
|
||||
mgr.prepend_keymap = [
|
||||
{
|
||||
on = [
|
||||
"c"
|
||||
"a"
|
||||
"a"
|
||||
];
|
||||
run = "plugin compress";
|
||||
desc = "Archive selected files";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"c"
|
||||
"a"
|
||||
"p"
|
||||
];
|
||||
run = "plugin compress -p";
|
||||
desc = "Archive selected files (password)";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"c"
|
||||
"a"
|
||||
"h"
|
||||
];
|
||||
run = "plugin compress -ph";
|
||||
desc = "Archive selected files (password+header)";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"c"
|
||||
"a"
|
||||
"l"
|
||||
];
|
||||
run = "plugin compress -l";
|
||||
desc = "Archive selected files (compression level)";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"c"
|
||||
"a"
|
||||
"u"
|
||||
];
|
||||
run = "plugin compress -phl";
|
||||
desc = "Archive selected files (password+header+level)";
|
||||
}
|
||||
{
|
||||
on = "p";
|
||||
run = "plugin smart-paste";
|
||||
desc = "Paste into the hovered directory or CWD";
|
||||
}
|
||||
{
|
||||
on = "l";
|
||||
run = "plugin smart-enter";
|
||||
desc = "Enter the child directory, or open the file";
|
||||
}
|
||||
{
|
||||
on = "F";
|
||||
run = "plugin smart-filter";
|
||||
desc = "Smart filter";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue