Initial commit

This commit is contained in:
demenik
2025-12-01 18:24:34 +01:00
commit fc68fa5ce9
142 changed files with 6273 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
{
imports = [
./mail.nix
];
}

135
home/accounts/mail.nix Normal file
View File

@@ -0,0 +1,135 @@
{
lib,
pkgs,
...
}: {
home.packages = with pkgs; [
pass
];
accounts.email.accounts = let
getPass = address: "${lib.getExe pkgs.pass} show ${address}";
in {
"iCloud" = rec {
primary = true;
address = "dominik.bernroider@icloud.com";
userName = address;
realName = "Dominik Bernroider";
passwordCommand = getPass address;
imap = {
host = "imap.mail.me.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.mail.me.com";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
thunderbird.enable = true;
};
"Gmail" = rec {
address = "domerepu@gmail.com";
userName = address;
realName = "Dominik Bernroider";
flavor = "gmail.com";
passwordCommand = getPass address;
imap = {
host = "imap.gmail.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.gmail.com";
port = 465;
tls.enable = true;
};
thunderbird.enable = true;
};
"Uni-Ulm" = rec {
address = "dominik.bernroider@uni-ulm.de";
userName = "tct47";
realName = "Dominik Bernroider";
passwordCommand = getPass address;
imap = {
host = "imap.uni-ulm.de";
port = 993;
tls.enable = true;
};
smtp = {
host = "mail.uni-ulm.de";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
thunderbird.enable = true;
};
"Self-hosted" = rec {
address = "mail@demenik.tech";
userName = address;
realName = "Dominik Bernroider";
passwordCommand = getPass address;
imap = {
host = "mail.demenik.tech";
port = 993;
tls.enable = true;
};
smtp = {
host = "mail.demenik.tech";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
thunderbird.enable = true;
};
"Alte Gmail" = rec {
address = "domemc.netzwerk@gmail.com";
flavor = "gmail.com";
userName = address;
realName = "Dominik Bernroider";
passwordCommand = getPass address;
imap = {
host = "imap.gmail.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.gmail.com";
port = 465;
tls.enable = true;
};
thunderbird.enable = true;
};
};
}

33
home/demenik.nix Normal file
View File

@@ -0,0 +1,33 @@
{pkgs, ...}: {
imports = [
./global.nix
./xdg-desktop.nix
./accounts
./desktops/hyprland
./services/kanshi.nix
./services/bisync.nix
./shells/zsh
./terminals/kitty
./programs
./editors/nvim
./editors/intellij.nix
./editors/cursor.nix
];
home.file.".face" = {
source = pkgs.fetchurl {
url = "https://github.com/demenik.png";
hash = "sha256-+1ugmn5qeAvijj5Lm3Ye0rW9UEF9OCGxiSMfZKVjxI4=";
};
};
home.packages = with pkgs; [
mpvpaper
];
services.swww.enable = true;
}

21
home/desktops/global.nix Normal file
View File

@@ -0,0 +1,21 @@
{
pkgs,
inputs,
...
}: {
home = {
sessionVariables = {
GTK_USE_PORTAL = "1";
NIXOS_OZONE_WL = "1";
QT_SCALE_FACTOR = "1";
DISABLE_QT5_COMPAT = "0";
_JAVA_AWT_WM_NONREPARENTING = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
};
};
qt = {
enable = true;
platformTheme.name = "qtct";
};
}

View File

@@ -0,0 +1,2 @@
[
]

View File

@@ -0,0 +1,5 @@
# hyprlang
''
bind = SUPER, b, exec, [workspace 2] firefox
bind = SUPER, Return, exec, kitty-cwd
''

View File

@@ -0,0 +1,57 @@
{pkgs, ...}: {
wayland.windowManager.hyprland = {
settings = {
bind = let
numbers = [1 2 3 4 5 6 7 8 9];
workspace = num: "SUPER, ${toString num}, workspace, ${toString num}";
move-to-workspace = num: "SUPER SHIFT, ${toString num}, movetoworkspace, ${toString num}";
in
[
"SUPER SHIFT, q, exit"
"SUPER, x, killactive"
"SUPER, t, togglefloating"
"SUPER SHIFT, p, pin"
"SUPER, f, fullscreen, 0"
"SUPER, m, fullscreen, 1"
"SUPER SHIFT, f, fullscreenstate, -1 2"
"SUPER, 0, workspace, 10"
"SUPER SHIFT, 0, movetoworkspace, 10"
]
++ map move-to-workspace numbers
++ map workspace numbers;
bindm = [
"SUPER, mouse:272, movewindow"
"SUPER, mouse:273, resizewindow"
];
binde = let
volume-value = 5;
brightness-value = 5;
volume-cmd = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ ${toString volume-value}%";
in [
",XF86MonBrightnessUp, exec, light -A ${toString brightness-value}"
",XF86MonBrightnessDown, exec, light -U ${toString brightness-value}"
# TODO: these dont work on the ThinkPad
",XF86AudioRaiseVolume, exec, ${volume-cmd}+"
",XF86AudioLowerVolume, exec, ${volume-cmd}-"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
bindl = [
",XF86AudioPlay, exec, playerctl play-pause"
",XF86AudioNext, exec, playerctl next"
",XF86AudioPrev, exec, playerctl previous"
];
};
extraConfig = import ./vim-binds.nix + import ./app-binds.nix;
};
services.playerctld.enable = true;
home.packages = with pkgs; [light];
}

View File

@@ -0,0 +1,27 @@
# hyprlang
''
bind = SUPER, h, bringactivetotop
bind = SUPER, j, bringactivetotop
bind = SUPER, k, bringactivetotop
bind = SUPER, l, bringactivetotop
bind = SUPER, h, movefocus, l
bind = SUPER, j, movefocus, d
bind = SUPER, k, movefocus, u
bind = SUPER, l, movefocus, r
bind = SUPER ALT, h, swapwindow, l
bind = SUPER ALT, j, swapwindow, d
bind = SUPER ALT, k, swapwindow, u
bind = SUPER ALT, l, swapwindow, r
bind = SUPER CTRL, h, moveactive, l
bind = SUPER CTRL, j, moveactive, d
bind = SUPER CTRL, k, moveactive, u
bind = SUPER CTRL, l, moveactive, r
bind = SUPER SHIFT, h, resizeactive, -20 0
bind = SUPER SHIFT, j, resizeactive, 0 20
bind = SUPER SHIFT, k, resizeactive, 0 -20
bind = SUPER SHIFT, l, resizeactive, 20 0
''

View File

@@ -0,0 +1,75 @@
{pkgs, ...}: {
imports = [
../global.nix
../wayland.nix
./binds
./hyprlock.nix
./dunst.nix
];
home.packages = with pkgs; [
hyprland
hyprshade
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
];
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
xwayland.enable = true;
settings = let
rules = import ./rules.nix;
in {
monitor = [",preferred,auto,1"];
misc.disable_hyprland_logo = true;
misc.focus_on_activate = true;
xwayland.force_zero_scaling = true;
layerrule = rules.layer;
windowrulev2 = rules.window;
inherit (rules) workspace;
input = {
kb_layout = "de";
kb_variant = "nodeadkeys";
repeat_delay = 300;
touchpad = {
natural_scroll = true;
clickfinger_behavior = true;
disable_while_typing = false;
};
};
general = {
gaps_in = 5;
gaps_out = 5;
border_size = 2;
layout = "master";
};
decoration = {
rounding = 8;
blur = {
size = 4;
passes = 3;
};
dim_around = 0.6;
};
animation = import ./animations.nix;
};
};
services.hypridle = import ./hypridle.nix;
home.sessionVariables = {
XDG_SESSION_DESKTOP = "Hyprland";
XDG_CURRENT_DESKTOP = "Hyprland";
};
}

View File

@@ -0,0 +1,45 @@
{config, ...}: {
services.dunst = {
enable = true;
iconTheme = {
name = config.stylix.icons.dark;
inherit (config.stylix.icons) package;
};
settings = let
inherit (config.lib.stylix) colors;
in {
global = {
width = 400;
offset = "5x5";
corner_radius = 4;
progress_bar_min_width = 380;
progress_bar_max_width = 380;
progress_bar_corner_radius = 8;
padding = 10;
horizontal_padding = 10;
frame_width = 1;
gap_size = 3;
};
urgency_low = {
format = "<b><span>%s</span></b>\n%b";
};
urgency_normal = {
highlight = colors.base0A;
default_icon = "dialog-information";
format = "<b><span>%s</span></b>\n%b";
};
urgency_critical = {
highlight = colors.base08;
default_icon = "dialog-error";
format = "<b><span>%s</span></b>\n%b";
};
};
};
}

View File

@@ -0,0 +1,32 @@
{
enable = true;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "hyprlock";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 300; # 5min
on-timeout = "light -S 10";
on-resume = "brightnessctl -r";
}
{
timeout = 150; # 2.5min
on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";
on-resume = "brightnessctl -rd rgb:kbd_backlight";
}
{
timeout = 600; # 10min
on-timeout = "hyprlock";
}
{
timeout = 900; # 15min
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
}

View File

@@ -0,0 +1,107 @@
{
config,
lib,
...
}: {
programs.hyprlock = {
enable = true;
settings = let
profilePhoto = "$HOME/Pictures/pfp/bladee/egobaby.jpg";
wallpaper = "$HOME/Pictures/wallpapers/takopi/class.png";
font_family = config.stylix.fonts.sansSerif.name;
inherit (config.lib.stylix) colors;
text = colors.base05;
yellow = colors.base0A;
accent = colors.base0D;
in {
authentication.fingerprint.enabled = true;
background = {
monitor = "";
path = wallpaper;
blur_passes = 0;
blur_size = 8;
};
general = {
hide_cursor = true;
ignore_empty_input = true;
};
input-field = {
monitor = "";
size = "250, 60";
position = "0, -225";
outline_thickness = 2;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = lib.mkForce "rgba(0, 0, 0, 0)";
inner_color = lib.mkForce "rgba(100, 114, 125, 0.4)";
font_color = lib.mkForce "rgb(${text})";
fade_on_empty = false;
inherit font_family;
placeholder_text = "<span foreground=\"##${text}99\"><i>󰌾 Login as </i><span foreground=\"##${accent}ff\">$USER</span></span>";
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
capslock_color = "rgb(${yellow})";
check_color = lib.mkForce "rgb(${accent})";
};
label = [
# Layout
{
monitor = "";
text = "Layout: $LAYOUT";
color = "#rgb(${text})";
font_size = 12;
inherit font_family;
position = "30, -30";
halign = "left";
valign = "top";
}
# Time
{
monitor = "";
text = "cmd[update:1000] echo \"$(date +\"%H:%M\")\"";
color = "rgb(${text})";
font_size = 130;
inherit font_family;
position = "0, 240";
}
# Day-Month
{
monitor = "";
text = "cmd[update:43200000] echo -e \"$(date +\"%A, %d. %B %Y\")\"";
color = "rgb(${text})";
font_size = 30;
inherit font_family;
position = "0, 105";
}
# Fingerprint
{
monitor = "";
text = "$FPRINTPROMPT";
color = "rgb(${text})";
font_size = 14;
inherit font_family;
position = "0, -130";
}
];
# image = [
# # Profile Photo
# {
# monitor = "";
# path = profilePhoto;
# border_size = 0;
# size = 120;
# rounding = -1;
# rotate = 0;
# position = "0, -20";
# }
# ];
};
};
}

View File

@@ -0,0 +1,18 @@
{
layer = [];
window =
[
"float, class:^(hyprland-share-picker)$"
"workspace 3, class:^(Electron)$, title:^(BSC)$" # BetterSoundCloud
"workspace 3, class:^(opensoundcloud)$"
]
++ map (rule: "${rule}, class:^(xdg-desktop-portal-gtk)$") [
"float"
"size 800 600"
"center 1"
"dimaround"
];
workspace = [];
}

22
home/desktops/wayland.nix Normal file
View File

@@ -0,0 +1,22 @@
{pkgs, ...}: {
imports = [
./global.nix
];
home = {
packages = with pkgs; [
wl-clipboard
];
sessionVariables = {
GDK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland";
CLUTTER_BACKEND = "wayland";
SDL_VIDEODRIVER = "wayland";
XDG_SESSION_TYPE = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
};
};
services.clipman.enable = true;
}

3
home/editors/cursor.nix Normal file
View File

@@ -0,0 +1,3 @@
{pkgs, ...}: {
home.packages = with pkgs; [code-cursor-fhs];
}

View File

@@ -0,0 +1,5 @@
{pkgs, ...}: {
home.packages = with pkgs; [
jetbrains.idea-community
];
}

View File

@@ -0,0 +1,32 @@
{
programs.nixvim = {
colorscheme = "catppuccin";
colorschemes.catppuccin = {
enable = true;
settings = {
flavour = "mocha";
transparent_background = true;
integrations = {
cmp = true;
gitsigns = true;
mini = {
enable = true;
indentscope_color = "lavender";
};
nvimtree = true;
treesitter = true;
alpha = true;
fzf = true;
grug_far = true;
harpoon = true;
markdown = true;
noice = true;
copilot_vim = true;
lsp_trouble = true;
which_key = true;
};
};
};
};
}

View File

@@ -0,0 +1,47 @@
{inputs, ...}: {
imports = [
inputs.nixvim.homeModules.nixvim
./plugins
./colorschemes.nix
];
programs.nixvim = {
enable = true;
defaultEditor = true;
globals.mapleader = " ";
clipboard.register = "unnamedplus";
luaLoader.enable = true;
opts = import ./options.nix;
keymaps = import ./keymaps.nix;
extraConfigLua =
# lua
''
-- Disable netrw
g.loaded_netrw = 1
g.loaded_netrwPlugin = 1
-- Hide line numbers in terminal mode
vim.cmd [[ autocmd TermOpen * setlocal nonumber norelativenumber ]]
-- Disable arrow keys
-- vim.cmd [[ :map <Up> <Nop> ]]
-- vim.cmd [[ :map <Left> <Nop> ]]
-- vim.cmd [[ :map <Right> <Nop> ]]
-- vim.cmd [[ :map <Down> <Nop> ]]
-- Enable diagnostics virtual text
vim.diagnostic.config({ virtual_text = true })
-- Add filetypes
vim.filetype.add({
pattern = {
[".*%.arb"] = "json",
["%.sqruff"] = "toml",
},
})
'';
};
}

View File

@@ -0,0 +1,43 @@
let
toggle = key: action: {
key = "\\${key}";
options.desc = "Toggle ${action}";
action = "<cmd>setlocal ${action}!<cr>";
};
window-jump = key: {
key = "<c-${key}>";
action = "<c-w>${key}";
};
in
[
{
key = "<S-u>";
options.desc = "Redo";
action = "<C-r>";
}
{
key = "<c-c>";
options.desc = "Comment line";
action = "<cmd>normal gcc<cr>";
}
(toggle "w" "wrap")
(toggle "n" "number")
(toggle "r" "relativenumber")
(toggle "i" "ignorecase")
(toggle "c" "cursorline")
(toggle "C" "cursorcolumn")
{
key = "<s-h>";
options.desc = "Previous buffer";
action = "<cmd>bprevious<cr>";
}
{
key = "<s-l>";
options.desc = "Next Buffer";
action = "<cmd>bnext<cr>";
}
]
++ map window-jump ["h" "j" "k" "l"]

View File

@@ -0,0 +1,38 @@
{
# General
undofile = true;
backup = false;
writebackup = false;
mouse = "a";
# Appearance
breakindent = true;
cursorline = false;
linebreak = true;
number = true;
relativenumber = true;
# Editing
ignorecase = true;
incsearch = true;
infercase = true;
smartcase = true;
smartindent = true;
hidden = true;
title = true;
tabstop = 2;
scrolloff = 8;
shiftwidth = 2;
numberwidth = 4;
showcmd = true;
hlsearch = true;
swapfile = false;
expandtab = true;
updatetime = 100;
timeoutlen = 1000;
sidescrolloff = 8;
termguicolors = true;
splitkeep = "screen";
fileencoding = "utf-8";
}

View File

@@ -0,0 +1,56 @@
pkgs: let
build = {
version,
owner,
name,
rev,
hash,
}:
pkgs.vimUtils.buildVimPlugin {
pname = name;
inherit version;
src = pkgs.fetchFromGitHub {
repo = name;
inherit owner rev;
sha256 = hash;
};
};
in {
# INFO: Last update: 18. Aug. 2025 | Sort latest -> oldest
# https://github.com/SCJangra/table-nvim
table-nvim = build {
version = "27-09-2024";
owner = "SCJangra";
name = "table-nvim";
rev = "c044fd37169eb10376962b0d0cec5f94d58ca626";
hash = "1ygn4bvnpbd49gcgbkh0cdj3p75jsmwi87hby78w0fd22205pvmi";
};
# https://github.com/michaelrommel/nvim-silicon
silicon = build {
version = "09-01-2025";
owner = "michaelrommel";
name = "nvim-silicon";
rev = "7f66bda8f60c97a5bf4b37e5b8acb0e829ae3c32";
hash = "1zk6lgghvdcys20cqvh2g1kjf661q1w97niq5nx1zz4yppy2f9jy";
};
# https://github.com/b0o/incline.nvim
incline = build {
version = "05-06-2025";
owner = "b0o";
name = "incline.nvim";
rev = "0fd2d5a27504dba7fdc507a53275f22c081fe640";
hash = "19x35z2sj3hl3icrxzbs67xhxgq9d237vhgzqrz8ppdc74p8wgaz";
};
# https://github.com/Aasim-A/scrollEOF.nvim
scrollEOF = build {
version = "31-05-2025";
owner = "Aasim-A";
name = "scrollEOF.nvim";
rev = "2575109749b4bf3a0bf979a17947b3c1e8c5137e";
hash = "1s66v9n0arg81wgw1z8iv9s304j78cd506z522avpc88d3ji4yl4";
};
}

View File

@@ -0,0 +1,257 @@
{lib, ...}: {
plugins = {
cmp = {
enable = true;
autoEnableSources = true;
settings = {
experimental.ghost_text = true;
mapping.__raw = ''
cmp.mapping.preset.insert({
["<C-j>"] = cmp.mapping.scroll_docs(4),
["<C-k>"] = cmp.mapping.scroll_docs(-4),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true
}),
["<Tab>"] = cmp.mapping(function(fallback)
local luasnip = require("luasnip")
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.locally_jumpable(1) then
luasnip.jump(1)
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
local luasnip = require("luasnip")
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
})
'';
window = {
completion = {
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None";
col_offset = -3;
side_padding = 0;
};
documentation = {
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None";
col_offset = -3;
side_padding = 0;
};
};
snippet.expand =
# lua
''
function(args)
require'luasnip'.lsp_expand(args.body)
end
'';
formatting = {
# expandable_indicator = true;
fields = ["kind" "abbr" "menu"];
format =
lib.mkForce
# lua
''
function(entry, vim_item)
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 50 })(entry, vim_item)
local strings = vim.split(kind.kind, "%s", { trimempty = true })
kind.kind = " " .. (strings[1] or "") .. " "
kind.menu = " (" .. (strings[2] or "") .. ")"
return kind
end
'';
};
completion.completeopt = "menu,menuone,preview,noinsert";
sources = [
{name = "nvim_lsp";}
{name = "buffer";}
{name = "path";}
{name = "luasnip";}
];
};
cmdline = {
"/" = {
mapping.__raw = "cmp.mapping.preset.cmdline()";
sources = [{name = "buffer";}];
};
":" = {
mapping.__raw = "cmp.mapping.preset.cmdline()";
sources = [
{
name = "path";
}
{
name = "cmdline";
option.ignore_cmds = ["Man" "!"];
}
];
};
};
};
cmp-nvim-lsp.enable = true;
cmp-buffer.enable = true;
cmp-path.enable = true;
cmp-cmdline.enable = true;
cmp_luasnip.enable = true;
};
# TODO: fix (https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-get-types-on-the-left-and-offset-the-menu)
highlight = {
PmenuSel = {
bg = "#282C34";
fg = "NONE";
};
Pmenu = {
fg = "#C5CDD9";
bg = "#22252A";
};
CmpItemAbbrDeprecated = {
fg = "#7E8294";
bg = "NONE";
strikethrough = true;
};
CmpItemAbbrMatch = {
fg = "#82AAFF";
bg = "NONE";
bold = true;
};
CmpItemAbbrMatchFuzzy = {
fg = "#82AAFF";
bg = "NONE";
bold = true;
};
CmpItemMenu = {
fg = "#C792EA";
bg = "NONE";
italic = true;
};
CmpItemKindField = {
fg = "#EED8DA";
bg = "#B5585F";
};
CmpItemKindProperty = {
fg = "#EED8DA";
bg = "#B5585F";
};
CmpItemKindEvent = {
fg = "#EED8DA";
bg = "#B5585F";
};
CmpItemKindText = {
fg = "#C3E88D";
bg = "#9FBD73";
};
CmpItemKindEnum = {
fg = "#C3E88D";
bg = "#9FBD73";
};
CmpItemKindKeyword = {
fg = "#C3E88D";
bg = "#9FBD73";
};
CmpItemKindConstant = {
fg = "#FFE082";
bg = "#D4BB6C";
};
CmpItemKindConstructor = {
fg = "#FFE082";
bg = "#D4BB6C";
};
CmpItemKindReference = {
fg = "#FFE082";
bg = "#D4BB6C";
};
CmpItemKindFunction = {
fg = "#EADFF0";
bg = "#A377BF";
};
CmpItemKindStruct = {
fg = "#EADFF0";
bg = "#A377BF";
};
CmpItemKindClass = {
fg = "#EADFF0";
bg = "#A377BF";
};
CmpItemKindModule = {
fg = "#EADFF0";
bg = "#A377BF";
};
CmpItemKindOperator = {
fg = "#EADFF0";
bg = "#A377BF";
};
CmpItemKindVariable = {
fg = "#C5CDD9";
bg = "#7E8294";
};
CmpItemKindFile = {
fg = "#C5CDD9";
bg = "#7E8294";
};
CmpItemKindUnit = {
fg = "#F5EBD9";
bg = "#D4A959";
};
CmpItemKindSnippet = {
fg = "#F5EBD9";
bg = "#D4A959";
};
CmpItemKindFolder = {
fg = "#F5EBD9";
bg = "#D4A959";
};
CmpItemKindMethod = {
fg = "#DDE5F5";
bg = "#6C8ED4";
};
CmpItemKindValue = {
fg = "#DDE5F5";
bg = "#6C8ED4";
};
CmpItemKindEnumMember = {
fg = "#DDE5F5";
bg = "#6C8ED4";
};
CmpItemKindInterface = {
fg = "#D8EEEB";
bg = "#58B5A8";
};
CmpItemKindColor = {
fg = "#D8EEEB";
bg = "#58B5A8";
};
CmpItemKindTypeParameter = {
fg = "#D8EEEB";
bg = "#58B5A8";
};
};
}

View File

@@ -0,0 +1,33 @@
{
enable = true;
settings = {
panel.enabled = false;
suggestion = {
autoTrigger = true;
keymap = {
accept = "<M-l>";
next = "<M-]>";
prev = "<M-[>";
dismiss = "<C-]>";
};
};
filetypes = {
yaml = true;
markdown = true;
javascript = true;
typescript = true;
help = false;
gitcommit = false;
gitrebase = false;
hgcommit = false;
svn = false;
cvs = false;
"." = false;
};
};
}

View File

@@ -0,0 +1,10 @@
{
imports = [
./cmp.nix
];
plugins = {
emmet.enable = true;
# copilot-lua = import ./copilot.nix;
};
}

View File

@@ -0,0 +1,10 @@
require("incline").setup {}
-- vim_current_word
vim.cmd [[
hi CurrentWord guifg=#cba6f7
let g:vim_current_word#hightlight_twins = 0
let g:vim_current_word#excluded_filetypes = ["minifiles", "netrw", "alpha"]
]]
local g = vim.g

View File

@@ -0,0 +1,17 @@
{pkgs, ...}: {
extraPlugins = let
builds = import ../builds.nix pkgs;
in
with builds;
with pkgs.vimPlugins; [
incline
scrollEOF
vim-hexokinase
vim_current_word
];
plugins.noice.enable = true;
extraConfigLua = builtins.readFile ./config.lua;
}

View File

@@ -0,0 +1,26 @@
{pkgs, ...}: {
imports = [
./lsp
];
programs.nixvim = {
# TODO: make these hm level
imports = [
./cmp
./decoration
./editing
./formatting
./git
./lang
./snippet
./treesitter
./utils
];
plugins.mini.enable = true;
plugins.web-devicons.enable = true;
extraPlugins = with pkgs.vimPlugins; [plenary-nvim dressing-nvim];
};
}

View File

@@ -0,0 +1,38 @@
{
plugins = {
nvim-autopairs = {
enable = true;
settings = {
mapBs = false;
checkTs = true;
tsConfig = {
lua = ["string" "source"];
javascript = ["string" "template_string"];
};
disabledFiletypes = ["minifiles"];
};
};
mini = {
modules = {
move = {};
splitjoin = {};
# surround = {};
trailspace = {};
};
};
rainbow-delimiters.enable = true;
twilight.enable = true;
zen-mode.enable = true;
nvim-tree = {
enable = true;
settings = {
renderer = {
group_empty = true;
};
};
};
};
}

View File

@@ -0,0 +1,128 @@
{pkgs, ...}: {
extraPackages = with pkgs; [
shfmt
shellcheck
stylua
alejandra
prettier
prettierd
sqruff
yamlfmt
black
go
gotools
google-java-format
ktlint
rustfmt
clang-tools
cmake-format
kdePackages.qtdeclarative # qmlformat
];
plugins.conform-nvim = {
enable = true;
settings = {
notifyOnError = true;
formatters_by_ft = let
prettier = {
__unkeyed-1 = "prettierd";
__unkeyed-2 = "prettier";
timeout_ms = 2000;
stop_after_first = true;
};
in {
sh = ["shellcheck" "shfmt"];
lua = ["stylua"];
nix = ["alejandra"];
html = prettier;
css = prettier;
javascript = prettier;
typescript = prettier;
javascriptreact = prettier;
typescriptreact = prettier;
sql = ["sqruff"];
json = prettier;
yaml = ["yamlfmt"];
python = ["black"];
go = ["goimports" "gofmt"];
java = ["google-java-format"];
kotlin = ["ktlint"];
rust = ["rustfmt"];
c = ["clang_format"];
cmake = ["cmake_format"];
cpp = ["clang_format"];
qml = ["qmlformat"];
qmljs = ["qmlformat"];
"_" = ["trim_whitespace" "trim_newlines"];
};
formatters = {
prettier = {
command = "prettier";
prepend_args = ["-w"];
};
prettierd = {
command = "prettierd";
prepend_args = ["-w"];
};
};
format_on_save =
# lua
''
function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
if vim.g.slow_format_filetypes[vim.bo[bufnr].filetype] then
return
end
local function on_format(err)
if err and err:match("timeout$") then
slow_format_filetypes[vim.bo[bufnr].filetype] = true
end
end
return { timeout_ms = 200, lsp_fallback = true }, on_format
end
'';
format_after_save =
# lua
''
function (bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
if not vim.g.slow_format_filetypes[vim.bo[bufnr].filetype] then
return
end
return { lsp_fallback = true }
end
'';
};
};
extraConfigLua = ''
vim.g.slow_format_filetypes = {};
'';
}

View File

@@ -0,0 +1,32 @@
{
imports = [./conform.nix];
plugins.mini = {
modules = {
align = {};
indentscope = {
symbol = "";
draw.delay = 0;
options.try_as_border = true;
};
};
};
extraConfigLua =
# lua
''
vim.api.nvim_create_autocmd("FileType", {
desc = "Disable indentscope for certain filetypes",
pattern = {
"alpha",
"help",
"NvimTree",
"toggleterm",
"Trouble",
},
callback = function()
vim.b.miniindentscope_disable = true
end,
})
'';
}

View File

@@ -0,0 +1,14 @@
{
plugins = {
fugitive.enable = true;
diffview.enable = true;
gitmessenger = {
enable = true;
settings = {
include_diff = "current";
no_default_mappings = true;
};
};
gitsigns = import ./gitsigns.nix;
};
}

View File

@@ -0,0 +1,23 @@
{
enable = true;
settings = {
numhl = true;
current_line_blame = true;
signs = {
add.text = "";
change.text = "";
delete.text = "";
topdelete.text = "";
changedelete.text = "";
untracked.text = "";
};
signs_staged = {
add.text = "";
change.text = "";
delete.text = "";
topdelete.text = "";
changedelete.text = "";
};
};
}

View File

@@ -0,0 +1,8 @@
{
imports = [
./docs
./flutter.nix
./tailwind.nix
./rust.nix
];
}

View File

@@ -0,0 +1,6 @@
{
imports = [
./latex.nix
./markdown.nix
];
}

View File

@@ -0,0 +1,22 @@
{pkgs, ...}: {
extraPackages = with pkgs; [sioyek tectonic];
plugins.vimtex.enable = true;
extraConfigLua = ''
vim.g["vimtex_view_method"] = "sioyek"
vim.g["vimtex_quickfix_mode"] = 0 -- supress error reporting on save and build
vim.g["vimtex_mappings_enable"] = 0 -- ignore mappings
vim.g["vimtex_indent_enabled"] = 0 -- auto indent
vim.g["tex_flavor"] = "latex" -- how to read tex files
vim.g["tex_indent_items"] = 0 -- turn off enumerate indent
vim.g["tex_indent_brace"] = 0 -- turn off brace indent
vim.g["vimtex_compiler_method"] = "tectonic" -- tex compiler
vim.g["vimtex_log_ignore"] = ({ -- Error supression:
"Underfull",
"Overfull",
"specifier changed to",
"Token not allowed in a PDF string",
})
'';
}

View File

@@ -0,0 +1,23 @@
{pkgs, ...}: {
plugins = {
markdown-preview = {
enable = true;
settings = {
auto_close = 0;
browser = "firefox";
page_title = "Markdown Preview";
};
};
render-markdown = {
enable = true;
settings = {
pipe_table.border = ["" "" "" "" "" "" "" "" "" "" ""];
};
};
};
extraPlugins = let
builds = import ../../builds.nix pkgs;
in [builds.table-nvim];
}

View File

@@ -0,0 +1,3 @@
{
plugins.flutter-tools.enable = true;
}

View File

@@ -0,0 +1,23 @@
{pkgs, ...}: {
plugins = {
crates.enable = true;
rustaceanvim = {
enable = false;
settings = {
server.cmd = ["rust-analyzer"];
dap.adapter.__raw = let
codelldb = pkgs.vscode-extensions.vadimcn.vscode-lldb;
extensionPath = "${codelldb}/share/vscode/extensions/vadimcn.vscode-lldb";
codelldbPath = "${extensionPath}/adapter/codelldb";
liblldbPath = "${extensionPath}/lldb/lib/liblldb.so";
in ''
require("rustaceanvim.config").get_codelldb_adapter(
"${codelldbPath}",
"${liblldbPath}"
)
'';
};
};
};
}

View File

@@ -0,0 +1,3 @@
{
plugins.tailwind-tools.enable = true;
}

View File

@@ -0,0 +1,31 @@
{
imports = [./servers.nix ./lint.nix];
programs.nixvim = {
plugins = {
lspkind = import ./lspkind.nix;
lspconfig.enable = true;
trouble.enable = true;
};
keymaps = let
trouble-lsp = key: action: {
mode = "";
inherit key;
options.desc = action;
action = "<cmd>Trouble lsp_${action}<cr>";
};
in [
{
mode = "";
key = "K";
options.desc = "Hover";
action = "<cmd>Lspsaga hover_doc<cr>";
}
(trouble-lsp "gd" "definitions")
(trouble-lsp "gr" "references")
(trouble-lsp "gi" "implementations")
];
};
}

View File

@@ -0,0 +1,93 @@
{
stdenv,
lib,
fetchzip,
makeWrapper,
unzip,
jdk17_headless,
}:
stdenv.mkDerivation rec {
pname = "kotlin-lsp";
version = "0.253.10629";
src = fetchzip {
url = "https://download-cdn.jetbrains.com/kotlin-lsp/${version}/kotlin-${version}.zip";
hash = "sha256-LCLGo3Q8/4TYI7z50UdXAbtPNgzFYtmUY/kzo2JCln0=";
stripRoot = false;
};
nativeBuildInputs = [
makeWrapper
unzip
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/libexec/kotlin-lsp
cp -r $src/* $out/libexec/kotlin-lsp/
makeWrapper ${jdk17_headless}/bin/java $out/bin/kotlin-lsp \
--add-flags "--add-opens java.base/java.io=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.lang=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.lang.ref=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.lang.reflect=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.net=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.nio=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.nio.charset=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.text=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.time=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.util=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.util.concurrent=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED" \
--add-flags "--add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED" \
--add-flags "--add-opens java.base/jdk.internal.vm=ALL-UNNAMED" \
--add-flags "--add-opens java.base/sun.net.dns=ALL-UNNAMED" \
--add-flags "--add-opens java.base/sun.nio.ch=ALL-UNNAMED" \
--add-flags "--add-opens java.base/sun.nio.fs=ALL-UNNAMED" \
--add-flags "--add-opens java.base/sun.security.ssl=ALL-UNNAMED" \
--add-flags "--add-opens java.base/sun.security.util=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/com.apple.eawt=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/com.apple.eawt.event=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/com.apple.laf=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/com.sun.java.swing=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/java.awt=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/java.awt.dnd.peer=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/java.awt.event=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/java.awt.font=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/java.awt.image=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/java.awt.peer=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/javax.swing=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/javax.swing.plaf.basic=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/javax.swing.text=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/javax.swing.text.html=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/sun.awt=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/sun.awt.X11=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/sun.awt.datatransfer=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/sun.awt.image=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/sun.awt.windows=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/sun.font=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/sun.java2d=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/sun.lwawt=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/sun.lwawt.macosx=ALL-UNNAMED" \
--add-flags "--add-opens java.desktop/sun.swing=ALL-UNNAMED" \
--add-flags "--add-opens java.management/sun.management=ALL-UNNAMED" \
--add-flags "--add-opens jdk.attach/sun.tools.attach=ALL-UNNAMED" \
--add-flags "--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" \
--add-flags "--add-opens jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED" \
--add-flags "--add-opens jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED" \
--add-flags "--enable-native-access=ALL-UNNAMED" \
--add-flags "-Djdk.lang.Process.launchMechanism=FORK" \
--add-flags "-cp \"$out/libexec/kotlin-lsp/lib/*\" com.jetbrains.ls.kotlinLsp.KotlinLspServerKt"
runHook postInstall
'';
meta = {
description = "Kotlin Language Server (Standalone Binary)";
homepage = "https://github.com/Kotlin/kotlin-lsp";
license = lib.licenses.asl20;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,56 @@
{pkgs, ...}: {
programs.nixvim = {
extraPackages = with pkgs; [
statix
selene
eslint_d
stylelint
yamllint
sqlfluff
markdownlint-cli2
ruff
rubocop
checkstyle
golangci-lint
python312Packages.flake8
clippy
cppcheck
cmake-lint
];
plugins.lint = {
enable = true;
lintersByFt = {
bash = ["bash"];
nix = ["statix"];
lua = ["selene"];
css = ["stylelint"];
javascript = ["eslint_d"];
javascriptreact = ["eslint_d"];
typescript = ["eslint_d"];
typescriptreact = ["eslint_d"];
sql = ["sqlfluff"];
yaml = ["yamllint"];
markdown = ["markdownlint-cli2"];
python = ["ruff"];
ruby = ["rubocop"];
go = ["golangcilint"];
java = ["checkstyle"];
rust = ["clippy"];
cpp = ["cppcheck"];
cmake = ["cmakelint"];
};
};
};
}

View File

@@ -0,0 +1,53 @@
{
enable = true;
settings = {
preset = "colorful";
symbolMap = {
Copilot = "";
Text = "󰉿";
Method = "󰆧";
Function = "󰊕";
Constructor = "";
Field = "󰜢";
Variable = "󰀫";
Class = "󰠱";
Interface = "";
Module = "";
Property = "󰜢";
Unit = "󰑭";
Value = "󰎠";
Enum = "";
Keyword = "󰌋";
Snippet = "";
Color = "󰏘";
File = "󰈙";
Reference = "󰈇";
Folder = "󰉋";
EnumMember = "";
Constant = "󰏿";
Struct = "󰙅";
Event = "";
Operator = "󰆕";
TypeParameter = "";
};
extraOptions = {
maxwidth = 50;
mode = "symbol";
ellipsisChar = "...";
menu = {
path = "[Path]";
cmdline = "[CMD]";
nvim_lsp = "[LSP]";
buffer = "[Buffer]";
luasnip = "[Snippet]";
};
show_labelDetails = true;
before.__raw = ''
require'tailwind-tools.cmp'.lspkind_format
'';
};
};
}

View File

@@ -0,0 +1,123 @@
{pkgs, ...}: {
programs.nixvim = {
extraPlugins = with pkgs.vimPlugins; [SchemaStore-nvim];
extraPackages = let
kotlin-lsp = pkgs.callPackage ./kotlin-lsp.nix {};
in [kotlin-lsp];
plugins = {
jdtls.enable = true;
};
lsp.servers = {
"*".config = {
root_markers = [
".git"
"flake.nix"
];
};
bashls.enable = true;
nixd.enable = true;
lua_ls = {
enable = true;
config.on_init.__raw =
# lua
''
function(client)
if client.workspace_folders then
local path = client.workspace_folders[1].name
if
path ~= vim.fn.stdpath('config')
and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc'))
then
return
end
end
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
runtime = {
version = 'LuaJIT',
path = {
'lua/?.lua',
'lua/?/init.lua',
},
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME
}
}
})
end
'';
};
typos_lsp = {
enable = true;
config.init_options.diagnosticSeverity = "Hint";
};
html.enable = true;
ts_ls.enable = true;
cssls.enable = true;
eslint.enable = true;
tailwindcss.enable = true;
taplo.enable = true;
jsonls = {
enable = true;
config.json = {
schemas.__raw = "require('schemastore').json.schemas()";
validate.enable = true;
};
};
yamlls = {
enable = true;
config.yaml = {
schemaStore = {
enable = false;
url = "";
};
schemas.__raw = "require('schemastore').yaml.schemas()";
};
};
texlab.enable = true;
marksman.enable = true;
sqruff = {
enable = true;
config.sqruff.indentation = {
indent_unit = "space";
tab_space_size = 2;
};
};
graphql.enable = true;
dockerls.enable = true;
docker_compose_language_service.enable = true;
gopls.enable = true;
dartls.enable = true;
pylyzer.enable = true;
solargraph.enable = true;
jdtls.enable = true;
kotlin_lsp.enable = true;
# also see lang/rust.nix
rust_analyzer = {
enable = true;
packageFallback = true;
};
clangd.enable = true;
cmake.enable = true;
glslls.enable = true;
qmlls.enable = true;
};
};
}

View File

@@ -0,0 +1,84 @@
{pkgs, ...}: {
plugins.luasnip = {
enable = true;
settings = {
enable_autosnippets = true;
store_selection_keys = "<Tab>";
};
fromVscode = [
{
lazyLoad = true;
paths = pkgs.vimPlugins.friendly-snippets;
}
];
};
extraConfigLua = let
snippets = {
nix = import ./nix;
};
escape = text: pkgs.lib.generators.toLua {} text;
escapeLines = text: pkgs.lib.generators.toLua {} (pkgs.lib.strings.splitString "\n" text);
escapeLua = pkgs.lib.escape ["\\" "\"" "\n"];
generateSnippetBody = {
template,
placeholders ? {},
delimiters ? "<>",
...
}:
if placeholders == {}
then "t(${escapeLines template})"
else let
templateStr = escape template;
generatePlaceholderEntry = index: defaultValue: let
node =
if defaultValue == null
then "i(${index})"
else "i(${index}, \"${escapeLua defaultValue}\")";
in "[${index}] = ${node}";
placeholderEntries = pkgs.lib.attrsets.mapAttrsToList generatePlaceholderEntry placeholders;
placeholderTable = "{ ${pkgs.lib.strings.concatStringsSep ", " placeholderEntries} }";
delimitersTable = "{ delimiters = \"${escapeLua delimiters}\" }";
in "fmt(${templateStr}, ${placeholderTable}, ${delimitersTable})";
generateLanguageSnippets = langSnippets: let
snippetEntries =
pkgs.lib.attrsets.mapAttrsToList (
name: definition: let
snippetName = escapeLua name;
snippetBody = generateSnippetBody definition;
in " s(\"${snippetName}\", ${snippetBody})"
)
langSnippets;
in
pkgs.lib.strings.concatStringsSep ",\n" snippetEntries;
buildLuasnipConfig = snippets: let
languageBlocks =
pkgs.lib.attrsets.mapAttrsToList (
langName: langSnippets: ''
ls.add_snippets("${langName}", {
${generateLanguageSnippets langSnippets}
})
''
)
snippets;
allLanguageBlocks = pkgs.lib.strings.concatStringsSep "\n\n" languageBlocks;
in ''
local ls = require("luasnip")
local s = ls.snippet
local i = ls.insert_node
local t = ls.text_node
local fmt = require("luasnip.extras.fmt").fmt
${allLanguageBlocks}
'';
in
buildLuasnipConfig snippets;
}

View File

@@ -0,0 +1,84 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
ags = {
url = "github:aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
flake-utils,
ags,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
name = "<1>";
version = "<2>";
entry = "<3>";
watchScript = pkgs.writeShellScriptBin "watch" ''
set -euo pipefail
export FILES=$(find . -not \( -path "./node_modules*" -o -path "./@girs*" \) -type f -name "*.ts*")
echo "$FILES" | ${pkgs.lib.getExe pkgs.entr} -crs 'echo "Change detected, restarting..." && ags run ./main.tsx'
'';
astalPackages = with ags.packages.${system}; [
io
astal4
<0>
];
buildInputs = with pkgs; [
gjs
watchScript
];
extraPackages = with pkgs; [
libadwaita
libsoup_3
];
in {
packages.default = pkgs.stdenv.mkDerivation {
inherit name version;
src = ./.;
nativeBuildInputs = with pkgs; [
wrapGAppsHook3
gobject-introspection
ags.packages.${system}.default
];
buildInputs =
astalPackages
++ buildInputs
++ extraPackages;
installPhase = ''
mkdir -p $out/bin $out/share
cp -r * $out/share
ags bundle ${entry} $out/bin/${name} -d "SRC='$out/share'"
'';
};
apps.default = flake-utils.lib.mkApp {
drv = self.packages.${system}.default;
};
devShells.default = pkgs.mkShell {
buildInputs =
[
(ags.packages.${system}.default.override {
extraPackages = astalPackages ++ extraPackages;
})
]
++ buildInputs;
};
});
}

View File

@@ -0,0 +1,116 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
crane.url = "github:ipetkov/crane";
};
outputs = {
nixpkgs,
fenix,
crane,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
pname = "<1>";
version = "<2>";
rust-toolchain = with fenix.packages.${system};
combine [
stable.rustc
stable.cargo
stable.rust-src
stable.rust-analyzer
];
bevyDeps = with pkgs; [
pkg-config
# Audio
alsa-lib
# Vulkan
vulkan-loader
vulkan-tools
libudev-zero
# X11
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
# Wayland
wayland
libxkbcommon
# linker
lld
];
runtimeLibs = pkgs.lib.makeLibraryPath bevyDeps;
craneLib = (crane.mkLib pkgs).overrideToolchain rust-toolchain;
cargoArtifacts = craneLib.buildDepsOnly {
pname = "${pname}-deps";
src = craneLib.cleanCargoSource (craneLib.path ./.);
nativeBuildInputs = with pkgs; [pkg-config];
buildInputs = bevyDeps;
};
in {
packages.default = craneLib.buildPackage {
inherit pname version;
src = craneLib.cleanCargoSource (craneLib.path ./.);
inherit cargoArtifacts;
nativeBuildInputs = with pkgs; [
pkg-config
rust-toolchain
lld
makeWrapper
];
buildInputs = bevyDeps;
CARGO_PROFILE_RELEASE_LTO = "thin";
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = 1;
CARGO_PROFILE_RELEASE_STRIP = true;
RUSTFLAGS = "-C link-arg=-fuse-ld=lld";
postInstall = ''
wrapProgram "$out/bin/${pname}" \
--prefix LD_LIBRARY_PATH : ${runtimeLibs}
'';
meta = with pkgs.lib; {
description = "<3>";
license = licenses.mit;
};
};
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
pkg-config
lld
];
packages = with pkgs;
[
rust-toolchain
cargo-watch
cargo-edit
cargo-tarpaulin
]
++ bevyDeps;
shellHook = ''
export RUST_SRC_PATH=${fenix.packages.${system}.stable.rust-src}/lib/rustlib/src/rust/library
export LD_LIBRARY_PATH=${runtimeLibs}:$LD_LIBRARY_PATH
'';
};
formatter = pkgs.nixpkgs-fmt;
});
}

View File

@@ -0,0 +1,44 @@
{
flake = {
template = builtins.readFile ./flake.nix;
placeholders = {
"0" = null;
};
};
flaketauri.template = builtins.readFile ./tauri.flake.nix;
flakeflutter.template = builtins.readFile ./flutter.flake.nix;
flakeags = {
template = builtins.readFile ./ags.flake.nix;
placeholders = {
"1" = "project-name";
"2" = "0.1.0";
"3" = "main.tsx";
"0" = null;
};
};
flakerust = {
template = builtins.readFile ./rust.flake.nix;
placeholders = {
"1" = "rust-app";
"2" = "0.1.0";
"3" = "A Rust application";
"0" = null;
};
};
flakebevy = {
template = builtins.readFile ./bevy.flake.nix;
placeholders = {
"1" = "bevy-app";
"2" = "0.1.0";
"3" = "A Bevy application";
};
};
flakemaven = {
template = builtins.readFile ./maven.flake.nix;
placeholders."0" = "25";
};
flakegradle = {
template = builtins.readFile ./gradle.flake.nix;
placeholders."0" = "25";
};
}

View File

@@ -0,0 +1,17 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
in {
<0>
});
}

View File

@@ -0,0 +1,46 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
};
buildToolsVersion = "35.0.0";
androidComposition = pkgs.androidenv.composeAndroidPackages {
buildToolsVersions = [buildToolsVersion "28.0.3"];
platformVersions = ["36" "28"];
abiVersions = ["armeabi-v7a" "arm64-v8a"];
includeNDK = true;
ndkVersions = ["27.0.12077973"];
cmakeVersions = ["3.22.1"];
};
androidSdk = androidComposition.androidsdk;
jdk = pkgs.jdk17;
in {
devShells.default = pkgs.mkShell rec {
buildImports = with pkgs; [
flutter
androidSdk
jdk
];
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle";
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/${buildToolsVersion}/aapt2";
};
});
}

View File

@@ -0,0 +1,22 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
jdk = pkgs.jdk <0>;
in {
devShells.default = pkgs.mkShell {
buildInputs = [pkgs.gradle jdk];
JAVA_HOME = jdk.home;
GRADLE_OPTS = "-Dorg.gradle.java.installations.auto-download=false -Dorg.gradle.java.installations.fromEnv=true";
};
});
}

View File

@@ -0,0 +1,21 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
jdk = pkgs.jdk<0>;
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = [pkgs.maven jdk];
JAVA_HOME = jdk.home;
};
});
}

View File

@@ -0,0 +1,39 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
name = "npm-app";
version = "0.1.0";
buildInputs = with pkgs; [
nodejs
];
in {
packages.default = pkgs.buildNpmPackage {
inherit name version buildInputs;
npmDeps = pkgs.importNpmLock {
npmRoot = ./.;
};
inherit (pkgs.importNpmLock) npmConfigHook;
installPhase = ''
# ...
'';
};
devShells.default = pkgs.mkShell {
packages = buildInputs;
};
});
}

View File

@@ -0,0 +1,81 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
crane.url = "github:ipetkov/crane";
};
outputs = {
nixpkgs,
fenix,
crane,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
pname = "<1>";
version = "<2>";
rust-toolchain = with fenix.packages.${system};
combine [
stable.rustc
stable.cargo
stable.rust-src
stable.rust-analyzer
];
craneLib = (crane.mkLib pkgs).overrideToolchain rust-toolchain;
cargoArtifacts = craneLib.buildDepsOnly {
pname = "${pname}-deps";
src = craneLib.cleanCargoSource (craneLib.path ./.);
};
in {
packages.default = craneLib.buildPackage {
inherit pname version;
src = craneLib.cleanCargoSource (craneLib.path ./.);
inherit cargoArtifacts;
nativeBuildInputs = [rust-toolchain pkgs.lld];
buildInputs = with pkgs;
[
<0>
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
RUSTFLAGS = "-C link-arg=-fuse-ld=lld";
meta = with pkgs.lib; {
description = "<3>";
license = licenses.mit;
};
};
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
lld
];
buildInputs = with pkgs; [
rust-toolchain
cargo-watch
cargo-edit
cargo-tarpaulin
];
shellHook = ''
export RUST_SRC_PATH=${fenix.packages.${system}.stable.rust-src}/lib/rustlib/src/rust/library
'';
};
formatter = pkgs.nixpkgs-fmt;
});
}

View File

@@ -0,0 +1,51 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
rust-overlay,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {inherit system overlays;};
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = ["rust-src"];
};
linuxDeps = with pkgs; [
webkitgtk_4_1
gtk3
cairo
gdk-pixbuf
glib
dbus
openssl
pkg-config
librsvg
];
in {
devShells.default = pkgs.mkShell {
buildInputs = with pkgs;
[
rustToolchain
rust-analyzer
nodejs
cargo-tauri
]
++ linuxDeps;
shellHook = ''
export WEBKIT_DISABLE_COMPOSITING_MODE=1
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath linuxDeps}"
'';
};
});
}

View File

@@ -0,0 +1,14 @@
{
plugins = {
treesitter = {
enable = true;
folding = false;
nixGrammars = true;
nixvimInjections = true;
settings = import ./settings.nix;
};
ts-autotag.enable = true;
treesitter-textobjects = import ./textobjects.nix;
};
}

View File

@@ -0,0 +1,83 @@
{
indent.enable = true;
highlight.enable = true;
ensureInstalled = [
"bash"
"lua"
"nix"
"c"
"cpp"
"make"
"cmake"
"rust"
"dockerfile"
"go"
"gomod"
"gosum"
"css"
"html"
"templ"
"tsx"
"astro"
"javascript"
"typescript"
"xml"
"json"
"yaml"
"toml"
"sql"
"http"
"graphql"
"python"
"requirements"
"regex"
"comment"
"latex"
"markdown"
"markdown_inline"
"diff"
"gitignore"
"git_config"
"gitattributes"
"dart"
"java"
"hyprlang"
];
refactor = {
highlight_definitions.enable = true;
highlight_current_scope = true;
};
endwise.enable = true;
matchup = {
enable = true;
include_match_words = true;
};
incremental_selection = {
enable = true;
keymaps = {
init_selection = "<C-Space>";
node_incremental = "v";
scope_incremental = false;
node_decremental = "V";
};
};
playground.enable = true;
}

View File

@@ -0,0 +1,47 @@
{
enable = true;
settings = {
select = {
enable = true;
lookahead = true;
keymaps = {
"af" = "@function.outer";
"if" = "@function.inner";
"ac" = "@class.outer";
"ic" = "@class.inner";
"a," = "@parameter.outer";
"i," = "@parameter.inner";
};
};
move = {
enable = true;
setJumps = true;
gotoNextStart = {
"]f" = "@function.outer";
"]c" = "@class.outer";
"]," = "@parameter.inner";
};
gotoNextEnd = {
"]F" = "@function.outer";
"]C" = "@function.outer";
};
gotoPreviousStart = {
"[f" = "@function.outer";
"[c" = "@class.outer";
"[," = "@parameter.inner";
};
gotoPreviousEnd = {
"[F" = "@function.outer";
"[C" = "@class.outer";
};
};
swap = {
enable = true;
swapNext = {">," = "@parameter.inner";};
swapPrevious = {"<," = "@parameter.inner";};
};
};
}

View File

@@ -0,0 +1,61 @@
let
themes = import ./themes.nix;
theme = themes.dg_baby;
in {
plugins.alpha = {
enable = true;
settings = {
layout = [
{
type = "padding";
val = 2;
}
{
type = "text";
val = theme.image;
opts = {
position = "center";
hl = "Type";
};
}
{
type = "padding";
val = 2;
}
{
type = "group";
val = let
button = shortcut: val: {
type = "button";
inherit val;
opts = {
position = "center";
inherit shortcut;
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
};
in [
(button "󱁐 ff" "󰱼 Find file")
(button "󱁐 fo" "󱋡 Recently opened files")
(button "󱁐 fl" " Live-Grep")
];
}
{
type = "padding";
val = 2;
}
{
type = "text";
val = theme.quote;
opts = {
position = "center";
hl = "Keyword";
};
}
];
};
};
}

View File

@@ -0,0 +1,53 @@
{
rei = {
quote = "";
image = [
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
];
};
dg_baby = {
quote = "Official Drain © Licensed Product";
image = [
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
""
];
};
}

View File

@@ -0,0 +1,45 @@
{
plugins.neotest.enable = true;
extraConfigLua =
# lua
''
-- require("neotest").setup({
-- adapters = {
-- require("rustaceanvim.neotest")
-- },
-- })
'';
plugins.dap = {
enable = true;
signs = {
dapBreakpoint = {
text = "";
texthl = "DiagnosticError";
numhl = "DapBreakpoint";
};
dapBreakpointCondition = {
text = "";
texthl = "DiagnosticWarn";
numhl = "DiagnosticWarn";
};
dapLogPoint = {
text = "󱂅";
texthl = "Comment";
numhl = "Comment";
};
dapStopped = {
text = "";
texthl = "IncSearch";
linehl = "CursorLine";
numhl = "IncSearch";
};
dapBreakpointRejected = {
text = "";
texthl = "DiagnosticError";
numhl = "DiagnosticError";
};
};
};
}

View File

@@ -0,0 +1,33 @@
{
imports = [
./alpha
./lualine
./toggleterm.nix
./which-key
./fzf-lua.nix
./grug-far.nix
./presence.nix
./silicon.nix
./todo-comments.nix
./debugging.nix
];
plugins = {
nix-develop = {
enable = true;
ignoredVariables = {
SHELL = false;
};
};
wakatime.enable = true;
};
extraConfigLua =
#lua
''
vim.api.nvim_create_autocmd("VimEnter", {
desc = "Automatically enter Nix devshell",
command = "NixDevelop",
})
'';
}

View File

@@ -0,0 +1,12 @@
{
plugins.fzf-lua = {
enable = true;
settings = {
winopts = {};
files = {
git_icons = true;
file_icons = true;
};
};
};
}

View File

@@ -0,0 +1,3 @@
{
plugins.grug-far.enable = true;
}

View File

@@ -0,0 +1,14 @@
{
bg = "#1e1e2e";
fg = "#cdd6f4";
yellow = "#f9e2af";
cyan = "#89dceb";
green = "#a6e3a1";
orange = "#fab387";
violet = "#b4befe";
blue = "#89b4fa";
red = "#f38ba8";
magenta = "#cba6f7";
grey = "#585b70";
pink = "#f5c2e7";
}

View File

@@ -0,0 +1,78 @@
{
extraConfigLua = builtins.readFile ./hide_statusbar.lua;
plugins.lualine = let
colors = import ./colors.nix;
in {
enable = true;
settings = {
options = {
section_separators = "";
component_separators = "";
theme = {
normal.c = {
bg = "";
inherit (colors) fg;
};
inactive.c = {
bg = "";
inherit (colors) fg;
};
};
refresh.events = [
"WinEnter"
"BufEnter"
"BufWritePost"
"SessionLoadPost"
"FileChangedShellPost"
"VimResized"
"Filetype"
"CursorMoved"
"CursorMovedI"
"ModeChanged"
"RecordingEnter"
"RecordingLeave"
];
};
# to be visible, change laststatus option value at options.nix
sections = {
# these are to remove the defaults
lualine_a = [{}];
lualine_b = [{}];
lualine_c = [{}];
lualine_x = [{}];
lualine_y = [{}];
lualine_z = [{}];
};
inactive_sections = {
# these are to remove the defaults
lualine_a = [{}];
lualine_b = [{}];
lualine_c = [{}];
lualine_x = [{}];
lualine_y = [{}];
lualine_z = [{}];
};
tabline = import ./tabline.nix;
};
};
keymaps = let
buffers = bind: let
num =
if (bind == 0)
then 10
else bind;
in {
key = "<M-${toString bind}>";
mode = ["n" "i" "v" "s" "t" "o"];
options.desc = "Buffer ${toString num}";
action = "<cmd>LualineBuffersJump ${toString num}<cr>";
};
in
map buffers [1 2 3 4 5 6 7 8 9 10];
}

View File

@@ -0,0 +1,4 @@
vim.api.nvim_create_autocmd('WinEnter', {
once = true,
command = [[ set laststatus=0 ]],
})

View File

@@ -0,0 +1,48 @@
colors: get-mode-color: [
{
__unkeyed-1 = "mode";
color.__raw = get-mode-color;
}
{
__unkeyed-1.__raw = ''
function()
local reg_rec = vim.fn.reg_recording()
if reg_rec ~= "" then
return "󰑊 rec (" .. reg_rec .. ")"
else
return ""
end
end
'';
color = {
fg = colors.red;
gui = "bold";
};
}
{
icon = "";
__unkeyed-1 = "branch";
color = {
fg = colors.violet;
gui = "bold";
};
}
{
mode = 2;
__unkeyed-1 = "buffers";
symbols = {
modified = "";
alternate_file = "";
};
buffers_color = {
inactive.fg = colors.grey;
active = {
fg = colors.magenta;
gui = "bold";
};
};
}
]

View File

@@ -0,0 +1,64 @@
colors: get-mode-color: [
{
path = 1;
shorting_target = 150;
color.fg = colors.grey;
__unkeyed-1 = "filename";
disabled_buftypes = ["terminal"];
}
{
sources = ["nvim_lsp"];
__unkeyed-1 = "diagnostics";
diagnostics_color = {
color_error.fg = colors.red;
color_warn.fg = colors.yellow;
color_info.fg = colors.blue;
color_hint.fg = colors.cyan;
};
symbols = {
error = " ";
warn = " ";
info = " ";
};
}
{
__unkeyed-1 = "lsp_status";
icon = "lsp:";
disabled_buftypes = ["terminal"];
color = {
fg = colors.magenta;
gui = "bold";
};
ignore_lsp = [
"typos_lsp"
];
}
{
__unkeyed-1 = "diff";
symbols = {
added = " ";
modified = "󰝤 ";
removed = " ";
};
diff_color = {
added.fg = colors.green;
removed.fg = colors.red;
modified.fg = colors.orange;
};
}
{
# icon = ""; # NOTE: IDK why it shows twice
icon = "";
padding.right = 1;
color.fg = colors.violet;
__unkeyed-1 = "gh-actions";
}
{
color.fg = colors.pink;
__unkeyed-1 = "progress";
}
]

View File

@@ -0,0 +1,39 @@
let
colors = import ./colors.nix;
get-mode-color =
# lua
"
function()
local mode_color = {
n = '${colors.blue}',
i = '${colors.green}',
v = '${colors.violet}',
[''] = '${colors.violet}',
V = '${colors.violet}',
c = '${colors.magenta}',
no = '${colors.red}',
s = '${colors.orange}',
S = '${colors.orange}',
[''] = '${colors.orange}',
ic = '${colors.yellow}',
R = '${colors.magenta}',
Rv = '${colors.magenta}',
cv = '${colors.red}',
ce = '${colors.red}',
r = '${colors.cyan}',
rm = '${colors.cyan}',
['r?'] = '${colors.cyan}',
['!'] = '${colors.red}',
t = '${colors.pink}',
}
return { fg = mode_color[vim.fn.mode()] }
end
";
in {
lualine_c = import ./section-left.nix colors get-mode-color;
lualine_x = import ./section-right.nix colors get-mode-color;
}

View File

@@ -0,0 +1,23 @@
{
plugins.presence = {
enable = true;
settings = {
neovim_image_text = "Neovim";
main_image = "file";
buttons.__raw = ''
function (buffer, repo_url)
local buttons = {}
if repo_url ~= nil then
table.insert(buttons, {
label = "Git Repository",
url = repo_url
})
end
return buttons
end
'';
};
};
}

View File

@@ -0,0 +1,24 @@
{pkgs, ...}: let
theme = "Catppuccin";
font = "JetBrainsMono Nerd Font=32;Noto Color Emoji=34";
in {
extraPackages = with pkgs; [
silicon
jetbrains-mono
noto-fonts-color-emoji
];
extraPlugins = let
builds = import ../builds.nix pkgs;
in
with builds; [silicon];
extraConfigLua = ''
require 'nvim-silicon'.setup {
font = '${font}',
theme = '${theme}',
no_line_number = true,
no_window_controls = true,
}
'';
}

View File

@@ -0,0 +1,22 @@
{
plugins.todo-comments = {
enable = true;
settings.keywords = let
word = icon: color: {inherit icon color;};
hint = icon: word icon "hint";
info = icon: word icon "info";
test = icon: word icon "test";
in {
NOTE = hint "";
TODO = hint "";
REFACTOR = hint "";
INFO = info "";
DOCS = info "";
LINK = info "";
GITHUB = info "";
TEST = test "󰙨";
};
};
}

View File

@@ -0,0 +1,14 @@
{
plugins.toggleterm = {
enable = true;
settings = {
float_opts = {};
persistent_size = true;
direction = "horizontal";
open_mapping = "[[<M-CR>]]";
shade_filetypes = ["lazygit"];
highlights.FloatBorder.guifg = "#7b8496";
};
};
}

View File

@@ -0,0 +1,227 @@
local wk = require "which-key"
local gitsigns = require "gitsigns"
local Terminal = require("toggleterm.terminal").Terminal
local set_key = {
cmd = function(key, action, desc, hidden)
return {
"<leader>" .. key,
type(action) == "string" and "<cmd>" .. action .. "<cr>" or action,
desc = desc:gsub("^%l", string.upper),
hidden = hidden or false,
}
end,
}
local function smart_buffer_delete()
local current_buf = vim.api.nvim_get_current_buf()
pcall(vim.cmd.bnext)
if current_buf == vim.api.nvim_get_current_buf() then
vim.cmd.enew()
end
pcall(vim.cmd, "bdelete " .. current_buf)
end
wk.add {
set_key.cmd("e", require("nvim-tree.api").tree.toggle, "Files"),
set_key.cmd("w", "w!", "Write buffer"),
set_key.cmd("d", smart_buffer_delete, "Delete buffer"),
set_key.cmd("Q", "qa", "Quit all", true),
set_key.cmd("q", "quit", "Quit window", true),
}
set_key.git_signs = function(key, action, desc)
return set_key.cmd("g" .. key, function()
gitsigns[action]()
end, desc)
end
local function lazygit_toggle()
local lazygit = Terminal:new {
cmd = "lazygit",
hidden = true,
direction = "float",
}
lazygit:toggle()
end
wk.add {
{ "<leader>g", group = "Git" },
-- Gitsigns --
set_key.git_signs("s", "stage_buffer", "Stage buffer"),
set_key.git_signs("R", "reset_buffer", "Reset buffer"),
set_key.git_signs("t", "toggle_signs", "Toggle signs"),
set_key.git_signs("n", "toggle_numhl", "Toggle numhl"),
set_key.git_signs("L", "toggle_linehl", "Toggle linehl"),
set_key.git_signs("d", "toggle_deleted", "Toggle deleted"),
set_key.cmd("gg", lazygit_toggle, "Lazygit"),
set_key.cmd("gH", "GhActions", "Github Actions"),
set_key.cmd("gm", "GitMessenger", "Show Message"),
{ "<leader>gh", group = "Hunk" },
set_key.git_signs("hs", "stage_hunk", "Stage"),
set_key.git_signs("hr", "reset_hunk", "Reset"),
set_key.git_signs("hv", "preview_hunk", "Preview"),
set_key.git_signs("hu", "undo_stage_hunk", "Undo Stage"),
set_key.cmd("ghn", function()
gitsigns.nav_hunk "next"
end, "Next"),
set_key.cmd("ghp", function()
gitsigns.nav_hunk "prev"
end, "Previous"),
set_key.git_signs("hd", "diffthis", "Diff this"),
set_key.cmd("ghD", function()
gitsigns.diffthis "~"
end, "Diff this"),
}
--- LSP keys ---
set_key.lsp = function(key, action)
return set_key.cmd("l" .. key, "Lsp" .. action, action)
end
set_key.lsp_saga = function(key, action, desc)
return set_key.cmd("l" .. key, "Lspsaga " .. action, desc or action)
end
wk.add {
{ "<leader>l", group = "Lsp" },
set_key.lsp("i", "Info"),
set_key.lsp("R", "Restart"),
set_key.lsp("s", "Start"),
set_key.lsp("x", "Stop"),
set_key.cmd("lf", require("conform").format, "Format"),
set_key.cmd("lF", "ConformInfo", "Format"),
set_key.lsp_saga("r", "rename"),
set_key.lsp_saga("o", "outline"),
set_key.lsp_saga("a", "code_action", "Code Action"),
}
--- FZF keys ---
set_key.fzf = function(key, action, desc)
return set_key.cmd("f" .. key, function()
local fzf = require "fzf-lua"
fzf[action]()
end, desc or action)
end
wk.add {
{ "<leader>f", group = "FZF" },
set_key.fzf("f", "files", "Files"),
set_key.fzf("o", "oldfiles", "Old files"),
set_key.fzf("l", "live_grep", "Live grep"),
set_key.fzf("b", "buffers", "Buffers"),
set_key.fzf("k", "keymaps", "Keymaps"),
set_key.fzf("j", "jumps", "Jumps"),
set_key.fzf("c", "commands", "Commands"),
set_key.fzf("C", "colorschemes", "Colorschemes"),
set_key.fzf("t", "tabs", "Tabs"),
set_key.fzf("T", "treesitter", "Treesitter"),
-- set_key.cmd("fh", "FzfHarpoon", "Harpoon"),
set_key.fzf("s", "spell_suggest", "Spelling suggest"),
{ "<leader>fg", group = "Git" },
set_key.fzf("gg", "git_files", "Files"),
set_key.fzf("gs", "git_status", "Status"),
set_key.fzf("gb", "git_bcommits", "Buffer commits"),
set_key.fzf("gB", "git_branches", "Branches"),
{ "<leader>fL", group = "LSP" },
set_key.fzf("Lr", "lsp_references", "References"),
set_key.fzf("Ld", "lsp_definitions", "Definitions"),
set_key.fzf("LD", "lsp_declarations", "Declarations"),
set_key.fzf("Lt", "lsp_typedefs", "Type definitions"),
set_key.fzf("Li", "lsp_implementations", "Implementations"),
set_key.fzf("Ls", "lsp_document_symbols", "Symbols"),
set_key.fzf("LS", "lsp_workspace_symbols", "Workspace symbols"),
-- set_key.fzf("LS", "lsp_live_workspace_symbols", "Live workspace symbols"),
set_key.fzf("LI", "lsp_incoming_calls", "Incoming calls"),
set_key.fzf("Lc", "lsp_code_actions", "Code actions"),
set_key.fzf("Lf", "lsp_finder", "Finder"),
set_key.fzf("Lo", "lsp_outgoing_calls", "Outgoing calls"),
-- set_key.fzf("LD", "diagnostics_document", "Diagnostics document"),
-- set_key.fzf("LD", "diagnostics_workspace", "Diagnostics workspace"),
}
set_key.trouble = function(key, action, desc)
return set_key.cmd("x" .. key, "Trouble " .. action .. " focus=true win.position=bottom", desc)
end
wk.add {
{ "<leader>x", group = "Trouble" },
set_key.trouble("x", "diagnostics filter.buf=0", "Buffer Diagnostics"),
set_key.trouble("X", "diagnostics", "Diagnostics"),
set_key.trouble("t", "todo", "Todo"),
set_key.trouble("q", "qflist", "QuickFix List"),
set_key.trouble("L", "loclist", "Location List"),
set_key.cmd("xv", function()
local current_value = vim.diagnostic.config().virtual_text
vim.diagnostic.config({ virtual_text = not current_value })
end, "Toggle virtual text"),
--- LSP ---
set_key.trouble("l", "lsp", "LSP"),
set_key.trouble("D", "lsp_declarations", "declarations"),
set_key.trouble("d", "lsp_definitions", "definitions"),
set_key.trouble("s", "symbols", "Symbols"),
set_key.trouble("i", "lsp_implementations", "implementations"),
set_key.trouble("I", "lsp_incoming_calls", "Incoming calls"),
set_key.trouble("O", "lsp_outgoing_calls", "Outgoing calls"),
set_key.trouble("r", "lsp_references", "references"),
set_key.trouble("T", "lsp_type_definitions", "type definitions"),
}
set_key.latex = function(key, action)
return set_key.cmd("L" .. key, "Vimtex" .. action, action)
end
wk.add {
{ "<leader>m", group = "Markdown" },
set_key.cmd("mr", "RenderMarkdown toggle", "Toggle render"),
set_key.cmd("mv", "MarkdownPreviewToggle", "Browser preview"),
--- Snap (Silicon) --
{ "<leader>S", group = "Snap(Silicon)" },
set_key.cmd("Ss", require("silicon").file, "Save as file"),
set_key.cmd("Sc", require("silicon").clip, "Copy to clipboard"),
--- Latex (Vimtex) --
{ "<leader>L", group = "Latex" },
set_key.latex("v", "View"),
set_key.latex("e", "Errors"),
set_key.latex("r", "Reload"),
set_key.latex("c", "Compile"),
set_key.cmd("r", require("grug-far").open, "Replace"),
set_key.cmd("z", function()
vim.wo.number = false
require("zen-mode").toggle()
end, "Zen Mode"),
set_key.cmd("u", "UndotreeToggle", "Undo Tree"),
set_key.cmd("H", "HexokinaseToggle", "Hexokinase"),
}
wk.add {
{ "<leader>t", group = "Debugging" },
--- dap ---
set_key.cmd("tb", "DapToggleBreakpoint", "Toggle Breakpoint"),
set_key.cmd("td", "DapContinue", "Continue Debug Session"),
set_key.cmd("tD", "DapNew", "New Debug Session"),
set_key.cmd("ts", "DapStepInto", "Step Into"),
set_key.cmd("tS", "DapStepOver", "Step Over"),
set_key.cmd("tr", function()
require("dap").repl.toggle()
end, "Toggle Debug REPL"),
--- neotest ---
set_key.cmd("tt", function()
require("neotest").run.run()
end, "Run nearest test"),
set_key.cmd("tT", function()
require("neotest").run.run({strategy = "dap"})
end, "Debug nearest test"),
set_key.cmd("ta", function()
require("neotest").run.run(vim.fn.expand("%"))
end, "Run all tests in file"),
}

View File

@@ -0,0 +1,17 @@
{pkgs, ...}: {
extraPackages = with pkgs; [lazygit];
plugins.which-key = {
enable = true;
settings = {
preset = "helix"; # "classic" | "modern" | "helix"
sort = ["manual"];
win = {
border = "rounded";
};
icon.mappings = false;
};
};
extraConfigLua = builtins.readFile ./config.lua;
}

View File

@@ -0,0 +1,2 @@
quote_style = "AutoPreferSignle"
call_parentheses = "None"

53
home/global.nix Normal file
View File

@@ -0,0 +1,53 @@
{
user,
pkgs,
stateVersion,
lib,
...
}: {
nixpkgs.config.allowUnfree = true;
nix = {
package = lib.mkDefault pkgs.nix;
settings.experimental-features = ["nix-command" "flakes"];
};
programs = {
home-manager.enable = true;
git = {
enable = true;
settings = {
commit.gpgsign = true;
url = {
"ssh://git@gitlab.uni-ulm.de".insteadOf = "https://gitlab.uni-ulm.de";
"ssh://git@github.com".insteadOf = "https://github.com";
};
user = {
email = "dominik.bernroider@icloud.com";
name = "demenik";
signingkey = "D3EC91B5457F4864";
};
"includeIf \"hasconfig:remote.*.url:git@gitlab.uni-ulm.de:*/**\"" = {
path = "${pkgs.writeText ".gitconfig-gitlab.uni-ulm.de" ''
[user]
email = "dominik.bernroider@uni-ulm.de"
name = "Dominik Bernroider"
''}";
};
init.defaultBranch = "main";
};
};
gpg.enable = true;
};
home = {
inherit stateVersion;
username = lib.mkDefault user;
homeDirectory = lib.mkDefault "/home/${user}";
sessionPath = ["$HOME/.local/bin"];
};
}

5
home/programs/cli/ai.nix Normal file
View File

@@ -0,0 +1,5 @@
{pkgs, ...}: {
home.packages = with pkgs; [
gemini-cli
];
}

21
home/programs/cli/bat.nix Normal file
View File

@@ -0,0 +1,21 @@
{pkgs, ...}: {
programs.bat = {
enable = true;
# config.theme = "Catppuccin Mocha";
themes = {
"Catppuccin Mocha" = {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "6810349";
sha256 = "1y5sfi7jfr97z1g6vm2mzbsw59j1jizwlmbadvmx842m0i5ak5ll";
};
file = "themes/Catppuccin Mocha.tmTheme";
};
};
};
programs.zsh.shellAliases = {
cat = "bat";
};
}

View File

@@ -0,0 +1,15 @@
{pkgs, ...}: {
programs.btop = {
enable = true;
# settings = {
# color_theme = "catppuccin-mocha";
# theme_background = false;
# };
themes = {
catppuccin-mocha = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/btop/f437574b600f1c6d932627050b15ff5153b58fa3/themes/catppuccin_mocha.theme";
sha256 = "0i263xwkkv8zgr71w13dnq6cv10bkiya7b06yqgjqa6skfmnjx2c";
};
};
};
}

View File

@@ -0,0 +1,5 @@
{pkgs, ...}: {
home.packages = with pkgs; [
vscode-extensions.vadimcn.vscode-lldb
];
}

View File

@@ -0,0 +1,13 @@
{
imports = [
./zoxide.nix
./bat.nix
./eza.nix
./btop.nix
./ssh.nix
./fastfetch.nix
./jq.nix
./ai.nix
./debugging.nix
];
}

21
home/programs/cli/eza.nix Normal file
View File

@@ -0,0 +1,21 @@
{pkgs, ...}: {
programs.eza = {
enable = true;
enableZshIntegration = true;
colors = "auto";
extraOptions = [
"--classify"
"--group-directories-first"
];
theme = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/eza-community/eza-themes/17095bff4792eecd7f4f1ed8301b15000331c906/themes/catppuccin.yml";
sha256 = "0hpchiiadyxfl5rx12msww94jbj5hvqma5b2jgcvllv1b2pd1ghd";
};
};
programs.zsh.shellAliases = {
ls = "eza";
};
}

View File

@@ -0,0 +1,47 @@
{
programs.fastfetch = {
enable = true;
settings = {
display = {
separator = " = ";
};
modules = let
mkLiteral = type: key: format: {
inherit type;
key = " ${key}";
format = "${format};";
};
mkString = type: key: format: mkLiteral type key "\"${format}\"";
emptyLine = {
type = "custom";
format = "";
};
in [
{
type = "title";
format = "{host-name-colored}.users.{user-name-colored} = "; #
}
(mkString "host" "host" "{family}")
(mkString "cpu" "cpu" "{name} ({cores-physical}C/{cores-logical}T) @ {freq-max}")
(mkString "memory" "memory" "{used}/{total} ({percentage})")
(mkString "disk" "disk" "{name} ({filesystem}) {size-used}/{size-total} ({size-percentage})")
(mkString "os" "os" "{name} {release}")
(mkString "kernel" "kernel" "{sysname} {arch} {display-version}")
(mkString "localip" "ip" "{ipv4} {ifname}") # last seen
emptyLine
(mkString "wm" "wm" "{pretty-name} {version} ({protocol-name})")
(mkString "editor" "editor" "{name} {version}")
{
type = "custom";
format = "};";
}
];
};
};
}

3
home/programs/cli/jq.nix Normal file
View File

@@ -0,0 +1,3 @@
{
programs.jq.enable = true;
}

32
home/programs/cli/ssh.nix Normal file
View File

@@ -0,0 +1,32 @@
{
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
identityFile = "~/.ssh/id_rsa";
};
"homelab" = {
hostname = "46.5.154.149";
user = "nix";
};
"hyperion" = {
hostname = "192.168.178.55";
user = "demenik";
};
"sgi-uni-ulm" = {
hostname = "login.informatik.uni-ulm.de";
user = "db56";
};
"github.com" = {
user = "git";
identitiesOnly = true;
};
"gitlab.uni-ulm.de" = {
user = "git";
identitiesOnly = true;
};
};
};
}

View File

@@ -0,0 +1,10 @@
{
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
programs.zsh.shellAliases = {
cd = "z";
};
}

44
home/programs/default.nix Normal file
View File

@@ -0,0 +1,44 @@
{
inputs,
pkgs,
...
}: {
imports = [
./cli
./firefox.nix
./qbittorrent.nix
./nmgui.nix
./overskride.nix
./rofi.nix
./emulator.nix
./vpn.nix
./spicetify.nix
./thunderbird.nix
./obsidian.nix
./office.nix
./vesktop.nix
];
home.packages = with pkgs; [
inputs.bettersoundcloud.packages.${system}.default
gimp
aseprite
nautilus
nautilus-open-any-terminal
rquickshare
flameshot
openvpn3
libreoffice
prismlauncher
];
}

View File

@@ -0,0 +1,7 @@
{
wayland.windowManager.hyprland.settings.windowrulev2 = map (rule: "${rule}, class:^(Emulator)$") [
"float"
"keepaspectratio"
"pin"
];
}

155
home/programs/firefox.nix Normal file
View File

@@ -0,0 +1,155 @@
{lib, ...}: {
home.sessionVariables."BROWSER" = "firefox";
wayland.windowManager.hyprland.settings = {
env = ["BROWSER,firefox"];
windowrulev2 =
[
"workspace 2, class:^(firefox)$"
"fullscreenstate -1 2, class:^(firefox)$"
"float, title:^(Firefox - Sharing Indicator)$"
"suppressevent maximize, class:^(firefox)$"
]
++ map (rule: "${rule}, class:^(firefox)$, title:^(Picture-in-Picture)$") [
"float"
"keepaspectratio"
"pin"
"move 100%-w-5 100%-w-5"
];
};
xdg = {
mimeApps.defaultApplications = builtins.listToAttrs (builtins.map (key: {
name = key;
value = ["firefox.desktop"];
}) [
"x-scheme-handler/http"
"x-scheme-handler/https"
"text/html"
"text/xml"
"application/pdf"
]);
};
programs.firefox = {
enable = true;
profiles.default = {
name = "Default";
settings = {
"extensions.pocket.enabled" = false;
"browser.uidensity" = 0;
"browser.urlbar.suggest.engines" = false;
"browser.urlbar.suggest.openpage" = false;
"browser.urlbar.suggest.bookmark" = true;
"browser.toolbars.bookmarks.visibility" = "only show on new tab";
"browser.urlbar.suggest.addons" = false;
"browser.urlbar.suggest.pocket" = false;
"widget.use-xdg-desktop-portal.file-picker" = 1;
"browser.formfill.enable" = false;
"extensions.formautofill.addresses.enabled" = false;
};
search = {
force = true;
default = "ud";
order = [
"ud"
"no"
"np"
"hm"
"nv"
"lsp"
"crates"
];
engines = let
mkParams = lib.mapAttrsToList (name: value: {
inherit name value;
});
mkEngine = {
icon,
template,
params ? {},
definedAliases ? [],
}: {
inherit icon definedAliases;
urls = [
{
inherit template;
params = mkParams params;
}
];
};
in {
ud = mkEngine {
icon = "https://www.gstatic.com/images/branding/searchlogo/ico/favicon.ico";
template = "https://unduck.demenik.tech";
params = {q = "{searchTerms}";};
};
np = mkEngine {
icon = "https://search.nixos.org/images/nix-logo.png";
definedAliases = ["@np"];
template = "https://search.nixos.org/packages";
params = {
type = "packages";
channel = "unstable";
query = "{searchTerms}";
};
};
no = mkEngine {
icon = "https://search.nixos.org/images/nix-logo.png";
definedAliases = ["@no"];
template = "https://search.nixos.org/options";
params = {
channel = "unstable";
query = "{searchTerms}";
};
};
hm = mkEngine {
icon = "https://home-manager-options.extranix.com/images/favicon.png";
definedAliases = ["@hm"];
template = "https://home-manager-options.extranix.com";
params = {
release = "master";
query = "{searchTerms}";
};
};
nv = mkEngine {
icon = "https://raw.githubusercontent.com/nix-community/nixvim/main/assets/nixvim_logo.svg";
definedAliases = ["@nv"];
template = "https://nix-community.github.io/nixvim/";
params = {
search = "{searchTerms}";
};
};
lsp = mkEngine {
icon = "https://github.com/neovim.png";
definedAliases = ["@lsp"];
template = "https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md#{searchTerms}";
};
crates = mkEngine {
icon = "https://crates.io/assets/cargo.png";
definedAliases = ["@crates"];
template = "https://crates.io/search";
params = {
q = "{searchTerms}";
};
};
};
};
};
};
}

11
home/programs/nmgui.nix Normal file
View File

@@ -0,0 +1,11 @@
{pkgs, ...}: {
home.packages = with pkgs; [
nmgui
];
wayland.windowManager.hyprland.settings.windowrulev2 = map (rule: "${rule}, class:^(com.network.manager)$") [
"float"
"size 500 600"
"center"
];
}

View File

@@ -0,0 +1,7 @@
{pkgs, ...}: {
home.packages = with pkgs; [obsidian];
wayland.windowManager.hyprland.settings.windowrulev2 = [
"workspace 1, class:^(obsidian)$"
];
}

64
home/programs/office.nix Normal file
View File

@@ -0,0 +1,64 @@
{
pkgs,
config,
...
}: let
catppuccin = {
flavour = "mocha";
accent = "mauve";
socHash = "sha256-c7BIwKlwUpD+rLKQQi43mHi2s/hlNkxPE+eX7iWb2vI=";
};
themeName = "catppuccin-${catppuccin.flavour}-${catppuccin.accent}";
themeUrl = "https://raw.githubusercontent.com/catppuccin/libreoffice/main/themes/${catppuccin.flavour}/${catppuccin.accent}/${themeName}.soc";
themeFile = pkgs.fetchurl {
url = themeUrl;
hash = catppuccin.socHash;
};
in {
home.packages = with pkgs; [libreoffice];
xdg.configFile."libreoffice/4/user/config/catppuccin-mocha-mauve.soc" = {
source = themeFile;
executable = false;
};
# https://github.com/catppuccin/libreoffice/blob/main/scripts/install_theme.sh (edited for nix)
# home.activation.installCatppuccinLibreofficeTheme = ''
# PATH=${pkgs.lib.makeBinPath [pkgs.gawk pkgs.gnugrep pkgs.findutils pkgs.coreutils pkgs.gettext]}
# echo "Applying Catppuccin theme to LibreOffice..."
# configFile=$(find "${config.xdg.configHome}/libreoffice" -path '*/user/registrymodifications.xcu' -print -quit)
# if [[ -z "$configFile" || ! -f "$configFile" ]]; then
# echo "LibreOffice registrymodifications.xcu not found. Skipping."
# exit 0
# fi
# echo "Found config at: $configFile"
# if grep -q 'oor:name="${themeName}"' "$configFile"; then
# echo "Theme '${themeName}' is already installed. Nothing to do."
# exit 0
# fi
# echo "Injecting theme '${themeName}' into $configFile..."
# gawk -i inplace -v themePath="${themeFile}" '
# BEGIN {
# while ((getline line < themePath) > 0) {
# themeContent = themeContent line "\n"
# }
# close(themePath)
# }
# /<\/oor:items>/ {
# printf "%s", themeContent
# }
# { print }
# ' "$configFile"
# echo "Successfully applied theme."
# '';
}

View File

@@ -0,0 +1,11 @@
{pkgs, ...}: {
home.packages = with pkgs; [
overskride
];
wayland.windowManager.hyprland.settings.windowrulev2 = map (rule: "${rule}, class:^(io.github.kaii_lb.Overskride)$") [
"float"
"size 850 650"
"center"
];
}

View File

@@ -0,0 +1,22 @@
{pkgs, ...}: {
home.packages = with pkgs; [qbittorrent];
xdg.mimeApps = {
enable = true;
defaultApplications = {
"x-scheme-handler/magnet" = ["org.qbittorrent.qBittorrent.desktop"];
};
};
programs.firefox.policies.Handlers = {
schemes.magnet = {
action = "useHelperApp";
handlers = [
{
name = "qBittorrent";
path = "${pkgs.qbittorrent}/share/application/org.qbittorrent.qBittorrent.desktop";
}
];
};
};
}

123
home/programs/rofi.nix Normal file
View File

@@ -0,0 +1,123 @@
{config, ...}: {
wayland.windowManager.hyprland.settings = {
bind = [
"SUPER, Space, exec, rofi -show drun -show-icons"
];
windowrulev2 = map (rule: "${rule}, class:^(Rofi)$") [
"float"
"dimaround"
"pin"
"stayfocused"
"persistentsize"
"decorate 0"
"center 1"
];
};
stylix.targets.rofi.enable = false;
programs.rofi = {
enable = true;
extraConfig = {
modi = "drun,run";
display-drun = "drun";
display-run = "run";
};
font = "sans-serif 12";
theme = let
inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = let
inherit (config.lib.stylix) colors;
in {
bg0 = mkLiteral "#${colors.base00}F2";
bg1 = mkLiteral "#${colors.base01}";
bg2 = mkLiteral "#${colors.base02}";
bg3 = mkLiteral "#${colors.base0E}";
fg0 = mkLiteral "#${colors.base05}";
fg1 = mkLiteral "#${colors.base04}";
fg2 = mkLiteral "#${colors.base03}";
fg3 = mkLiteral "#${colors.base02}";
background-color = mkLiteral "transparent";
text-color = mkLiteral "@fg0";
margin = mkLiteral "0px";
padding = mkLiteral "0px";
spacing = mkLiteral "0px";
};
"window" = {
location = mkLiteral "north";
y-offset = mkLiteral "calc(50% - 176px)";
width = 480;
border-radius = mkLiteral "8px";
background-color = mkLiteral "@bg0";
};
"mainbox".padding = mkLiteral "12px";
"inputbar" = {
background-color = mkLiteral "@bg1";
border-color = mkLiteral "@bg3";
border = mkLiteral "2px";
border-radius = mkLiteral "8px";
padding = mkLiteral "8px 16px";
spacing = mkLiteral "8px";
children = map mkLiteral ["prompt" "entry"];
};
"prompt".text-color = mkLiteral "@fg2";
"entry" = {
placeholder = " Search...";
placeholder-color = mkLiteral "@fg3";
};
"message" = {
margin = mkLiteral "12px 0 0";
border-radius = mkLiteral "8px";
border-color = mkLiteral "@bg2";
background-color = mkLiteral "@bg2";
};
"textbox".padding = mkLiteral "8px 24px";
"listview" = {
background-color = mkLiteral "transparent";
margin = mkLiteral "12px 0 0";
lines = 8;
columns = 1;
fixed-height = true;
};
"element" = {
padding = mkLiteral "8px 16px";
spacing = mkLiteral "8px";
border-radius = mkLiteral "8px";
};
"element normal active".text-color = mkLiteral "@bg3";
"element alternate active".text-color = mkLiteral "@bg3";
"element selected normal, element selected active" = {
text-color = mkLiteral "@bg0";
background-color = mkLiteral "@bg3";
};
"element-icon" = {
size = mkLiteral "1em";
vertical-align = mkLiteral "0.5";
};
"element-text".text-color = mkLiteral "inherit";
};
};
}

View File

@@ -0,0 +1,34 @@
{
inputs,
pkgs,
...
}: let
inherit (inputs) spicetify-nix;
in {
imports = [spicetify-nix.homeManagerModules.default];
programs.spicetify = let
spicePkgs = spicetify-nix.legacyPackages.${pkgs.system};
in {
enable = true;
spotifyLaunchFlags = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
enabledExtensions = with spicePkgs.extensions; [
keyboardShortcut
shuffle
groupSession
fullAlbumDate
showQueueDuration
betterGenres
lastfm
playNext
volumePercentage
allOfArtist
];
};
wayland.windowManager.hyprland.settings.windowrulev2 = [
"workspace 3, class:^(Spotify)$"
];
}

View File

@@ -0,0 +1,34 @@
{pkgs, ...}: {
programs.thunderbird = {
enable = true;
profiles.default = {
isDefault = true;
settings = {
"mail.ui.folderpane.view" = 2;
# "mail.account.special_folders.global_inbox" = 1;
"extensions.autoDisableScopes" = 0;
};
extensions = let
catppuccin-theme = pkgs.stdenv.mkDerivation {
name = "catppuccin-thunderbird";
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "thunderbird";
rev = "0289f3bd9566f9666682f66a3355155c0d0563fc";
hash = "sha256-07gT37m1+OhRTbUk51l0Nhx+I+tl1il5ayx2ow23APY=";
};
installPhase = ''
mkdir -p $out
cp -r $src/themes/mocha/mocha-mauve.xpi $out/catppuccin-mocha-mauve.xpi
'';
};
in [
catppuccin-theme
];
};
};
}

369
home/programs/vesktop.nix Normal file
View File

@@ -0,0 +1,369 @@
{config, ...}: let
inherit (config.lib.stylix) colors;
in {
stylix.targets.vesktop.enable = false;
wayland.windowManager.hyprland.settings.windowrulev2 =
[
"workspace 4, class:^(vesktop)$"
]
++ map (rule: "${rule}, class:^(vesktop)$, title:^(Discord Popout)$") [
"float"
"size 640 360"
"keepaspectratio"
"pin"
"move 100%-w-5 100%-w-5"
];
programs.vesktop = {
enable = true;
settings = {
discordBranch = "stable";
minimizeToTray = false;
arRPC = true;
splashColor = "#${colors.base0E}";
splashBackground = "#${colors.base00}";
};
vencord = {
settings = {
autoUpdate = true;
autpUpdateNotification = true;
useQuickCss = true;
eagerPatches = false;
enableReactDevtools = true;
frameless = false;
transparent = true;
winCtrlQ = false;
disableMinSize = true;
winNativeTitleBar = false;
themeLinks = [
"https://catppuccin.github.io/discord/dist/catppuccin-mocha-mauve.theme.css"
];
notifications = {
timeout = 5000;
position = "bottom-right";
useNative = "not-focused";
logLimit = 50;
};
cloud = {
authenticated = false;
url = "https://api.vencord.dev/";
settingsSync = false;
settingsSyncVersion = 0;
};
plugins = {
ChatInputButtonAPI.enabled = true;
CommandsAPI.enabled = true;
DynamicImageModalAPI.enabled = true;
MemberListDecoratorsAPI.enabled = true;
MessageAccessoriesAPI.enabled = true;
MessageDecorationsAPI.enabled = true;
MessageEventsAPI.enabled = true;
MessagePopoverAPI.enabled = true;
UserSettingsAPI.enabled = true;
AlwaysTrust = {
enabled = true;
domain = true;
file = true;
};
AnonymiseFileNames = {
enabled = true;
anonymiseByDefault = true;
method = 2;
randomisedLength = 7;
consistent = "image";
};
BetterFolders = {
enabled = true;
sidebarAnim = false;
sidebar = true;
closeAllFolders = false;
closeAllHomeButton = false;
closeOthers = false;
forceOpen = false;
keepIcons = false;
showFolderIcon = 1;
};
BetterGifAltText.enabled = true;
BetterGifPicker.enabled = true;
BetterSettings = {
enabled = true;
disableFade = true;
organizeMenu = true;
eagerLoad = true;
};
BetterUploadButton.enabled = true;
BiggerStreamPreview.enabled = true;
BlurNSFW = {
enabled = true;
blurAmount = 10;
};
CallTimer = {
enabled = true;
format = "stopwatch";
};
ClearURLs.enabled = true;
ConsoleJanitor = {
enabled = true;
disableLoggers = false;
disableSpotifyLogger = true;
whitelistedLoggers = "GatewaySocket; Routing/Utils";
};
CopyEmojiMarkdown.enabled = true;
CopyFileContents.enabled = true;
CopyUserURLs.enabled = true;
CrashHandler.enabled = true;
Decor.enabled = true;
DisableCallIdle.enabled = true;
DontRoundMyTimestamps.enabled = true;
FakeNitro = {
enabled = true;
enableEmojiBypass = true;
emojiSize = 48;
transformEmojis = true;
enableStickerBypass = true;
stickerSize = 160;
transformStickers = true;
transformCompoundSentence = false;
enableStreamQualityBypass = true;
useHyperLinks = true;
hyperLinkText = "{{NAME}}";
disableEmbedPermissionCheck = false;
};
FakeProfileThemes = {
enabled = true;
nitroFirst = true;
};
FavoriteEmojiFirst.enabled = true;
FavoriteGifSearch.enabled = true;
FixCodeblockGap.enabled = true;
FixImagesQuality.enabled = true;
FixSpotifyEmbeds = {
enabled = true;
volume = 10;
};
ForceOwnerCrown.enabled = true;
FriendInvites.enabled = true;
FriendsSince.enabled = true;
FullSearchContext.enabled = true;
GameActivityToggle = {
enabled = true;
oldIcon = false;
};
GifPaste.enabled = true;
GreetStickerPicker = {
enabled = true;
greetMode = "Greet";
};
iLoveSpam.enabled = true;
IgnoreActivities = {
enabled = false;
listMode = 0;
idsList = "";
ignorePlaying = false;
ignoreStreaming = false;
ignoreListening = false;
ignoreWatching = false;
ignoreCompeting = false;
};
ImplicitRelationships = {
enabled = true;
sortByAffinity = true;
};
MemberCount = {
enabled = true;
toolTip = true;
memberList = true;
};
MessageClickActions = {
enabled = true;
enableDeleteOnClick = true;
enableDoubleClickToEdit = true;
enableDoubleClickToReply = true;
requireModifier = false;
};
MessageLogger.enabled = true;
MoreCommands.enabled = true;
MoreKaomoji.enabled = true;
MutualGroupDMs.enabled = true;
NewGuildSettings = {
enabled = true;
guild = true;
messages = 3;
everyone = true;
role = true;
highlights = true;
events = true;
showAllChannels = true;
};
NoDevtoolsWarning.enabled = true;
NoMaskedUrlPaste.enabled = true;
NoMosaic = {
enabled = false;
inlineVideo = true;
};
NoOnboardingDelay.enabled = true;
NoPendingCount = {
enabled = true;
friendRequest = false;
messageRequest = false;
};
NoUnblockToJump.enabled = true;
NSFWGateBypass.enabled = true;
OnePingPerDM = {
enabled = true;
channelToAffect = "both_dms";
allowMentions = false;
allowEveryone = false;
};
OpenInApp = {
enabled = true;
spotify = true;
steam = true;
epic = true;
tidal = true;
itunes = true;
};
PauseInvitesForever.enabled = true;
PermissionFreeWill = {
enabled = true;
lockout = true;
onboarding = true;
};
PermissionsViewer.enabled = true;
petpet.enabled = true;
PictureInPicture.enabled = true;
PinDMs.enabled = true;
PlatformIndicators = {
enabled = true;
colorMobileIndicator = true;
list = true;
badges = true;
messages = true;
};
ReactErrorDecoder.enabled = true;
ReadAllNotificationsButton.enabled = true;
RelationshipNotifier = {
enabled = true;
offlineRemovals = true;
groups = true;
servers = true;
friends = true;
friendRequestCancels = true;
};
ReverseImageSearch.enabled = true;
ReviewDB = {
enabled = true;
notifyReviews = true;
showWarning = true;
hideTimestamps = false;
hideBlockedUsers = true;
};
ServerInfo.enabled = true;
ShikiCodeblocks = {
enabled = true;
theme = "https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json";
tryHljs = "SECONDARY";
useDevIcon = "COLOR";
bgOpacity = 100;
customTheme = "";
};
ShowConnections.enabled = true;
ShowHiddenChannels = {
enabled = true;
hideUnreads = true;
showMode = 0;
defaultAllowedUsersAndRolesDropdownState = true;
};
ShowTimeoutDuration = {
enabled = true;
displayStyle = "ssalggnikool";
};
SilentTyping = {
enabled = true;
showIcon = false;
contextMenu = true;
isEnabled = true;
};
SpotifyCrack = {
enabled = true;
noSpotifyAutoPause = true;
keepSpotifyActivityOnIdle = false;
};
SpotifyShareCommands.enabled = true;
ThemeAttributes.enabled = true;
Translate = {
enabled = true;
showChatBarButton = true;
service = "google";
deeplApiKey = "";
autoTranslate = false;
showAutoTranslateTooltip = true;
receivedInput = "auto";
receivedOutput = "en";
sentInput = "auto";
sentOutput = "zh-CN";
showAutoTranslateAlert = false;
};
TypingIndicator.enabled = true;
Unindent.enabled = true;
UnlockedAvatarZoom.enabled = true;
UnsuppressEmbeds.enabled = true;
UserMessagesPronouns = {
enabled = true;
pronounsFormat = "LOWERCASE";
showSelf = true;
};
UserVoiceShow = {
enabled = true;
showInUserProfileModal = true;
showInMemberList = true;
showInMessages = true;
};
USRBG = {
enabled = true;
nitroFirst = true;
voiceBackground = true;
};
ValidReply.enabled = true;
ValidUser.enabled = true;
ViewIcons.enabled = true;
VoiceDownload.enabled = true;
VoiceMessages = {
enabled = true;
noiseSuppression = true;
echoCancellation = true;
};
VolumeBooster = {
enabled = true;
multiplier = 2;
};
WebKeybinds.enabled = true;
WebScreenShareFixes.enabled = true;
YoutubeAdblock.enabled = true;
NoTrack = {
enabled = true;
disableAnalytics = true;
};
WebContextMenus = {
enabled = true;
addBack = true;
};
Settings = {
enabled = true;
settingsLocation = "aboveNitro";
};
SupportHelper.enabled = true;
FullUserInChatbox.enabled = true;
BadgeAPI.enabled = true;
};
};
};
};
}

Some files were not shown because too many files have changed in this diff Show More