add core configuration

This commit is contained in:
Chance 2025-03-29 21:03:07 -04:00 committed by lily
parent 74c78e1c68
commit f40517cff1
Signed by: lily
GPG key ID: 601F3263FBCBC4B9
94 changed files with 2816 additions and 959 deletions

View file

@ -1,14 +0,0 @@
{ config, pkgs, ... }:
{
imports =
[
./packages/packages.nix
];
programs.home-manager.enable = true;
home.username = "luxzi";
home.homeDirectory = "/home/luxzi";
home.stateVersion = "24.05";
}

View file

@ -0,0 +1,27 @@
{
config,
lib,
...
}: let
cfg = config.lily.chromium;
in {
options.lily.chromium = {
enable = lib.mkEnableOption "activate chromium";
};
config = lib.mkIf cfg.enable {
programs.chromium = {
enable = true;
extensions = [
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # ublock origin
{id = "pkehgijcmpdhfbdbbnkijodmdjhbjlgp";} # privacy badger
{id = "ldpochfccmkkmhdbclfhpagapcfdljkj";} # decentraleyes
{id = "mnjggcdmjocbbbhaepdhchncahnbgone";} # sponsor block
{id = "gebbhagfogifgggkldgodflihgfeippi";} # return youtube dislike (just cuz)
];
commandLineArgs = [
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
];
};
};
}

View file

@ -0,0 +1,37 @@
{
config,
lib,
...
}: let
cfg = config.lily.ghostty;
in {
options.lily.ghostty = {
enable = lib.mkEnableOption "activate ghostty";
};
config = lib.mkIf cfg.enable {
home.file.".config/ghostty/shaders" = {
source = ./shaders;
recursive = true;
};
programs.ghostty = {
enable = true;
settings = {
background-blur-radius = 0;
#theme = "dark:catppuccin-mocha,light:catppuccin-latte";
window-theme = "dark";
background-opacity = 0.75;
minimum-contrast = 1.1;
window-padding-x = 5;
window-padding-y = 5;
gtk-adwaita = false;
gtk-titlebar = false;
# custom-shader = "shaders/crt.glsl";
# custom-shader = "shaders/glow.glsl";
confirm-close-surface = false;
custom-shader-animation = true;
};
};
};
}

View file

@ -0,0 +1,153 @@
// First it does a "chromatic aberration" by splitting the rgb signals by a product of sin functions
// over time, then it does a glow effect in a perceptual color space
// Based on kalgynirae's Ghostty passable glow shader and NickWest's Chromatic Aberration shader demo
// Passable glow: https://github.com/kalgynirae/dotfiles/blob/main/ghostty/glow.glsl
// "Chromatic Aberration": https://www.shadertoy.com/view/Mds3zn
// sRGB linear -> nonlinear transform from https://bottosson.github.io/posts/colorwrong/
float f(float x) {
if (x >= 0.0031308) {
return 1.055 * pow(x, 1.0 / 2.4) - 0.055;
} else {
return 12.92 * x;
}
}
float f_inv(float x) {
if (x >= 0.04045) {
return pow((x + 0.055) / 1.055, 2.4);
} else {
return x / 12.92;
}
}
// Oklab <-> linear sRGB conversions from https://bottosson.github.io/posts/oklab/
vec4 toOklab(vec4 rgb) {
vec3 c = vec3(f_inv(rgb.r), f_inv(rgb.g), f_inv(rgb.b));
float l = 0.4122214708 * c.r + 0.5363325363 * c.g + 0.0514459929 * c.b;
float m = 0.2119034982 * c.r + 0.6806995451 * c.g + 0.1073969566 * c.b;
float s = 0.0883024619 * c.r + 0.2817188376 * c.g + 0.6299787005 * c.b;
float l_ = pow(l, 1.0 / 3.0);
float m_ = pow(m, 1.0 / 3.0);
float s_ = pow(s, 1.0 / 3.0);
return vec4(
0.2104542553 * l_ + 0.7936177850 * m_ - 0.0040720468 * s_,
1.9779984951 * l_ - 2.4285922050 * m_ + 0.4505937099 * s_,
0.0259040371 * l_ + 0.7827717662 * m_ - 0.8086757660 * s_,
rgb.a
);
}
vec4 toRgb(vec4 oklab) {
vec3 c = oklab.rgb;
float l_ = c.r + 0.3963377774 * c.g + 0.2158037573 * c.b;
float m_ = c.r - 0.1055613458 * c.g - 0.0638541728 * c.b;
float s_ = c.r - 0.0894841775 * c.g - 1.2914855480 * c.b;
float l = l_ * l_ * l_;
float m = m_ * m_ * m_;
float s = s_ * s_ * s_;
vec3 linear_srgb = vec3(
4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
-0.0041960863 * l - 0.7034186147 * m + 1.7076147010 * s
);
return vec4(
clamp(f(linear_srgb.r), 0.0, 1.0),
clamp(f(linear_srgb.g), 0.0, 1.0),
clamp(f(linear_srgb.b), 0.0, 1.0),
oklab.a
);
}
// Bloom samples from https://gist.github.com/qwerasd205/c3da6c610c8ffe17d6d2d3cc7068f17f
const vec3[24] samples = {
vec3(0.1693761725038636, 0.9855514761735895, 1),
vec3(-1.333070830962943, 0.4721463328627773, 0.7071067811865475),
vec3(-0.8464394909806497, -1.51113870578065, 0.5773502691896258),
vec3(1.554155680728463, -1.2588090085709776, 0.5),
vec3(1.681364377589461, 1.4741145918052656, 0.4472135954999579),
vec3(-1.2795157692199817, 2.088741103228784, 0.4082482904638631),
vec3(-2.4575847530631187, -0.9799373355024756, 0.3779644730092272),
vec3(0.5874641440200847, -2.7667464429345077, 0.35355339059327373),
vec3(2.997715703369726, 0.11704939884745152, 0.3333333333333333),
vec3(0.41360842451688395, 3.1351121305574803, 0.31622776601683794),
vec3(-3.167149933769243, 0.9844599011770256, 0.30151134457776363),
vec3(-1.5736713846521535, -3.0860263079123245, 0.2886751345948129),
vec3(2.888202648340422, -2.1583061557896213, 0.2773500981126146),
vec3(2.7150778983300325, 2.5745586041105715, 0.2672612419124244),
vec3(-2.1504069972377464, 3.2211410627650165, 0.2581988897471611),
vec3(-3.6548858794907493, -1.6253643308191343, 0.25),
vec3(1.0130775986052671, -3.9967078676335834, 0.24253562503633297),
vec3(4.229723673607257, 0.33081361055181563, 0.23570226039551587),
vec3(0.40107790291173834, 4.340407413572593, 0.22941573387056174),
vec3(-4.319124570236028, 1.159811599693438, 0.22360679774997896),
vec3(-1.9209044802827355, -4.160543952132907, 0.2182178902359924),
vec3(3.8639122286635708, -2.6589814382925123, 0.21320071635561041),
vec3(3.3486228404946234, 3.4331800232609, 0.20851441405707477),
vec3(-2.8769733643574344, 3.9652268864187157, 0.20412414523193154)
};
float offsetFunction(float iTime) {
float amount = 1.0;
const float periods[4] = {6.0, 16.0, 19.0, 27.0};
for (int i = 0; i < 4; i++) {
amount *= 1.0 + 0.5 * sin(iTime*periods[i]);
}
//return amount;
return amount * periods[3];
}
const float DIM_CUTOFF = 0.35;
const float BRIGHT_CUTOFF = 0.65;
const float ABBERATION_FACTOR = 0.05;
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord.xy / iResolution.xy;
// Sample the original color
vec4 originalColor = texture(iChannel0, uv);
// Check if the pixel is part of the text (assuming alpha > 0.0)
if (originalColor.a > 0.0) {
float amount = offsetFunction(iTime);
vec3 col;
col.r = texture( iChannel0, vec2(uv.x-ABBERATION_FACTOR*amount / iResolution.x, uv.y) ).r;
col.g = texture( iChannel0, uv ).g;
col.b = texture( iChannel0, vec2(uv.x+ABBERATION_FACTOR*amount / iResolution.x, uv.y) ).b;
vec4 splittedColor = vec4(col, originalColor.a); // Keep the original alpha
vec4 source = toOklab(splittedColor);
vec4 dest = source;
if (source.x > DIM_CUTOFF) {
dest.x *= 1.2;
// dest.x = 1.2;
} else {
vec2 step = vec2(1.414) / iResolution.xy;
vec3 glow = vec3(0.0);
for (int i = 0; i < 24; i++) {
vec3 s = samples[i];
float weight = s.z;
vec4 c = toOklab(texture(iChannel0, uv + s.xy * step));
if (c.x > DIM_CUTOFF) {
glow.yz += c.yz * weight * 0.3;
if (c.x <= BRIGHT_CUTOFF) {
glow.x += c.x * weight * 0.05;
} else {
glow.x += c.x * weight * 0.10;
}
}
}
// float lightness_diff = clamp(glow.x - dest.x, 0.0, 1.0);
// dest.x = lightness_diff;
// dest.yz = dest.yz * (1.0 - lightness_diff) + glow.yz * lightness_diff;
dest.xyz += glow.xyz;
}
fragColor = toRgb(dest);
} else {
// If the pixel is background, set alpha to 0.0 for transparency
fragColor = vec4(originalColor.rgb, 0.0);
}
}

View file

@ -0,0 +1,145 @@
// First it does a "chromatic aberration" by splitting the rgb signals by a product of sin functions
// over time, then it does a glow effect in a perceptual color space
// Based on kalgynirae's Ghostty passable glow shader and NickWest's Chromatic Aberration shader demo
// Passable glow: https://github.com/kalgynirae/dotfiles/blob/main/ghostty/glow.glsl
// "Chromatic Aberration": https://www.shadertoy.com/view/Mds3zn
// sRGB linear -> nonlinear transform from https://bottosson.github.io/posts/colorwrong/
float f(float x) {
if (x >= 0.0031308) {
return 1.055 * pow(x, 1.0 / 2.4) - 0.055;
} else {
return 12.92 * x;
}
}
float f_inv(float x) {
if (x >= 0.04045) {
return pow((x + 0.055) / 1.055, 2.4);
} else {
return x / 12.92;
}
}
// Oklab <-> linear sRGB conversions from https://bottosson.github.io/posts/oklab/
vec4 toOklab(vec4 rgb) {
vec3 c = vec3(f_inv(rgb.r), f_inv(rgb.g), f_inv(rgb.b));
float l = 0.4122214708 * c.r + 0.5363325363 * c.g + 0.0514459929 * c.b;
float m = 0.2119034982 * c.r + 0.6806995451 * c.g + 0.1073969566 * c.b;
float s = 0.0883024619 * c.r + 0.2817188376 * c.g + 0.6299787005 * c.b;
float l_ = pow(l, 1.0 / 3.0);
float m_ = pow(m, 1.0 / 3.0);
float s_ = pow(s, 1.0 / 3.0);
return vec4(
0.2104542553 * l_ + 0.7936177850 * m_ - 0.0040720468 * s_,
1.9779984951 * l_ - 2.4285922050 * m_ + 0.4505937099 * s_,
0.0259040371 * l_ + 0.7827717662 * m_ - 0.8086757660 * s_,
rgb.a
);
}
vec4 toRgb(vec4 oklab) {
vec3 c = oklab.rgb;
float l_ = c.r + 0.3963377774 * c.g + 0.2158037573 * c.b;
float m_ = c.r - 0.1055613458 * c.g - 0.0638541728 * c.b;
float s_ = c.r - 0.0894841775 * c.g - 1.2914855480 * c.b;
float l = l_ * l_ * l_;
float m = m_ * m_ * m_;
float s = s_ * s_ * s_;
vec3 linear_srgb = vec3(
4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
-0.0041960863 * l - 0.7034186147 * m + 1.7076147010 * s
);
return vec4(
clamp(f(linear_srgb.r), 0.0, 1.0),
clamp(f(linear_srgb.g), 0.0, 1.0),
clamp(f(linear_srgb.b), 0.0, 1.0),
oklab.a
);
}
// Bloom samples from https://gist.github.com/qwerasd205/c3da6c610c8ffe17d6d2d3cc7068f17f
const vec3[24] samples = {
vec3(0.1693761725038636, 0.9855514761735895, 1),
vec3(-1.333070830962943, 0.4721463328627773, 0.7071067811865475),
vec3(-0.8464394909806497, -1.51113870578065, 0.5773502691896258),
vec3(1.554155680728463, -1.2588090085709776, 0.5),
vec3(1.681364377589461, 1.4741145918052656, 0.4472135954999579),
vec3(-1.2795157692199817, 2.088741103228784, 0.4082482904638631),
vec3(-2.4575847530631187, -0.9799373355024756, 0.3779644730092272),
vec3(0.5874641440200847, -2.7667464429345077, 0.35355339059327373),
vec3(2.997715703369726, 0.11704939884745152, 0.3333333333333333),
vec3(0.41360842451688395, 3.1351121305574803, 0.31622776601683794),
vec3(-3.167149933769243, 0.9844599011770256, 0.30151134457776363),
vec3(-1.5736713846521535, -3.0860263079123245, 0.2886751345948129),
vec3(2.888202648340422, -2.1583061557896213, 0.2773500981126146),
vec3(2.7150778983300325, 2.5745586041105715, 0.2672612419124244),
vec3(-2.1504069972377464, 3.2211410627650165, 0.2581988897471611),
vec3(-3.6548858794907493, -1.6253643308191343, 0.25),
vec3(1.0130775986052671, -3.9967078676335834, 0.24253562503633297),
vec3(4.229723673607257, 0.33081361055181563, 0.23570226039551587),
vec3(0.40107790291173834, 4.340407413572593, 0.22941573387056174),
vec3(-4.319124570236028, 1.159811599693438, 0.22360679774997896),
vec3(-1.9209044802827355, -4.160543952132907, 0.2182178902359924),
vec3(3.8639122286635708, -2.6589814382925123, 0.21320071635561041),
vec3(3.3486228404946234, 3.4331800232609, 0.20851441405707477),
vec3(-2.8769733643574344, 3.9652268864187157, 0.20412414523193154)
};
float offsetFunction(float iTime) {
float amount = 1.0;
const float periods[4] = {6.0, 16.0, 19.0, 27.0};
for (int i = 0; i < 4; i++) {
amount *= 1.0 + 0.5 * sin(iTime*periods[i]);
}
//return amount;
return amount * periods[3];
}
const float DIM_CUTOFF = 0.35;
const float BRIGHT_CUTOFF = 0.65;
const float ABBERATION_FACTOR = 0.05;
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord.xy / iResolution.xy;
float amount = offsetFunction(iTime);
vec3 col;
col.r = texture( iChannel0, vec2(uv.x-ABBERATION_FACTOR*amount / iResolution.x, uv.y) ).r;
col.g = texture( iChannel0, uv ).g;
col.b = texture( iChannel0, vec2(uv.x+ABBERATION_FACTOR*amount / iResolution.x, uv.y) ).b;
vec4 splittedColor = vec4(col, 1.0);
vec4 source = toOklab(splittedColor);
vec4 dest = source;
if (source.x > DIM_CUTOFF) {
dest.x *= 1.2;
// dest.x = 1.2;
} else {
vec2 step = vec2(1.414) / iResolution.xy;
vec3 glow = vec3(0.0);
for (int i = 0; i < 24; i++) {
vec3 s = samples[i];
float weight = s.z;
vec4 c = toOklab(texture(iChannel0, uv + s.xy * step));
if (c.x > DIM_CUTOFF) {
glow.yz += c.yz * weight * 0.3;
if (c.x <= BRIGHT_CUTOFF) {
glow.x += c.x * weight * 0.05;
} else {
glow.x += c.x * weight * 0.10;
}
}
}
// float lightness_diff = clamp(glow.x - dest.x, 0.0, 1.0);
// dest.x = lightness_diff;
// dest.yz = dest.yz * (1.0 - lightness_diff) + glow.yz * lightness_diff;
dest.xyz += glow.xyz;
dest.a = 0.5;
}
fragColor = toRgb(dest);
}

View file

@ -0,0 +1,33 @@
{
config,
lib,
...
}: let
cfg = config.lily.git;
in {
options.lily.git = {
enable = lib.mkEnableOption "activate git";
};
config = lib.mkIf cfg.enable {
programs.git = {
enable = true;
lfs.enable = true;
extraConfig = {
user = {
name = "Lily";
email = "Caznix01@gmail.com";
signingKey = "Caznix";
};
commit.gpgsign = true;
init.defaultBranch = "main";
merge = {
ff = "no";
no-commit = "yes";
};
pull.ff = "only";
push = {autoSetupRemote = true;};
};
};
};
}

View file

@ -0,0 +1,116 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.lily.hyprland;
in {
options.lily.hyprland = {
enable = lib.mkEnableOption "activate hyprland";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
wl-clipboard
];
programs.kitty.enable = true; # required for the default Hyprland config
wayland.windowManager.hyprland = {
enable = true;
settings = {
decoration = {
rounding = 10;
# rounding_power = 2;
blur = {
enabled = true;
size = 10;
passes = 3;
popups = true;
xray = true;
};
};
blurls = "waybar";
dwindle = {
pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # You probably want this
};
general = {
resize_on_border = true; # Enables resizing by dragging window borders
extend_border_grab_area = 15; # Extends the clickable area around the border for resizing
hover_icon_on_border = true; # Shows a cursor icon when
layout = "dwindle";
"col.active_border" = "rgba(C55900ee) rgba(FFAA63ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
border_size = 2;
gaps_out = 10;
};
exec-once = [
"${pkgs.kdePackages.kwallet-pam}/libexec/pam_kwallet_init"
"${pkgs.networkmanagerapplet}/bin/nm-applet"
"${pkgs.blueman}/bin/blueman-applet"
];
"$super" = "SUPER";
"$alt_super" = "CTRL";
bind = [
"$super, Q, killactive"
"$alt_super $super,Q,exit"
# Screenshot region
"$super SHIFT,S, exec, GRIM_DEFAULT_DIR=${config.home.homeDirectory}/Pictures/Screenshots/ ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | wl-copy "
"$super,T, exec, ghostty"
"$super, L,exec, hyprlock --immediate"
"$super, B,exec, chromium"
"$super,F,fullscreen"
"$super SHIFT,F,togglefloating"
"$super,E,exec,kate"
"ALT,SPACE,exec, rofi -show drun"
"$super, P, pseudo,"
"$super, 1, workspace, 1"
"$super, 2, workspace, 2"
"$super, 3, workspace, 3"
"$super, 4, workspace, 4"
"$super, 5, workspace, 5"
"$super, 6, workspace, 6"
"$super, 7, workspace, 7"
"$super, 8, workspace, 8"
"$super, 9, workspace, 9"
"$super, 0, workspace, 10"
# Move active window to a workspace iwth mainMod + SHIFT + j
"$super SHIFT, 1, movetoworkspace, 1"
"$super SHIFT, 2, movetoworkspace, 2"
"$super SHIFT, 3, movetoworkspace, 3"
"$super SHIFT, 4, movetoworkspace, 4"
"$super SHIFT, 5, movetoworkspace, 5"
"$super SHIFT, 6, movetoworkspace, 6"
"$super SHIFT, 7, movetoworkspace, 7"
"$super SHIFT, 8, movetoworkspace, 8"
"$super SHIFT, 9, movetoworkspace, 9"
"$super SHIFT, 0, movetoworkspace, 10"
"$super, J, togglesplit"
"$super, left, movefocus, l"
"$super, right, movefocus, r"
"$super, up, movefocus, u"
"$super, down, movefocus, d"
];
bindm = [
"$super, mouse:272, movewindow"
"$super, mouse:273, resizewindow"
];
bindel = [
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 10%+"
",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 10%-"
];
};
};
};
}

View file

@ -0,0 +1,42 @@
{...}: {
programs.nixvim = {
colorschemes.catppuccin = {
enable = true;
settings = {
flavour = "mocha";
background = {
light = "latte";
dark = "mocha";
};
transparent_background = true;
show_end_of_buffer = false;
term_colors = false;
dim_inactive.enabled = false;
no_italic = false;
no_bold = false;
styles = {
comments = ["italic"];
conditionals = ["italic"];
loops = null;
functions = null;
keywords = null;
strings = null;
variables = null;
numbers = null;
booleans = null;
properties = null;
types = null;
operators = null;
};
integrations = {
cmp = true;
gitsigns = true;
nvimtree = true;
telescope = true;
notify = false;
mini = false;
};
};
};
};
}

View file

@ -0,0 +1,32 @@
{
pkgs,
nixvim,
config,
lib,
...
}: let
cfg = config.lily.neovim;
in {
imports = [
# ./colorscheme.nix
./plugins
./keybinds.nix
];
options.lily.neovim = {
enable = lib.mkEnableOption "activate neovim";
};
config = lib.mkIf cfg.enable {
programs.nixvim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
performance = {
byteCompileLua.enable = true;
combinePlugins = {};
};
};
};
}

View file

@ -0,0 +1,32 @@
{...}: {
programs.nixvim = {
globals = {
mapleader = " ";
maplocalleader = " ";
};
keymaps = [
{
mode = ["n" "v"];
key = "<SPACE>";
action = "<NOP>";
options.silent = true;
}
{
mode = "n";
key = "<LEADER>,";
action = "A,<ESC>";
options.silent = true;
}
{
mode = "n";
key = "<LEADER>sf";
action.__raw = "require('telescope.builtin').find_files";
options = {
silent = true;
desc = "[S]earch [F]iles";
};
}
];
};
}

View file

@ -0,0 +1,24 @@
{...}: {
imports = [
./telescope.nix
./lualine.nix
./treesitter.nix
./gitsigns.nix
./tree.nix
./lsp
# ./dap.nix
];
programs.nixvim.plugins = {
sleuth.enable = true;
comment.enable = true;
indent-blankline.enable = true;
web-devicons.enable = true;
fugitive.enable = true;
markdown-preview.enable = true;
git-worktree = {
enable = true;
enableTelescope = true;
};
};
}

View file

@ -0,0 +1,45 @@
{...}: {
programs.nixvim.plugins.gitsigns = {
enable = true;
settings = {
signs = {
add.text = "";
change.text = "";
delete.text = "";
topdelete.text = "";
changedelete.text = "";
};
signs_staged_enable = true;
signcolumn = true;
numhl = false;
linehl = false;
word_diff = false;
watch_gitdir = {
interval = 1000;
follow_files = true;
};
attach_to_untracked = true;
current_line_blame = false;
current_line_blame_opts = {
virt_text = true;
virt_text_pos = "eol";
delay = 100;
ignore_whitespace = true;
};
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> <summary>";
sign_priority = 6;
status_formatter = null;
update_debounce = 200;
max_file_length = 40000;
preview_config = {
border = "rounded";
style = "minimal";
relative = "cursor";
row = 0;
col = 1;
};
};
};
}

View file

@ -0,0 +1,85 @@
{...}: {
programs.nixvim.plugins = {
cmp = {
autoEnableSources = false;
enable = true;
settings = {
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
formatting = {
fields = ["kind" "abbr" "menu"];
format = ''
function(entry, vim_item)
local kind_icons = {
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 = " ",
Misc = " ",
}
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
vim_item.abbr = vim_item.abbr .. " " .. (vim_item.menu and vim_item.menu or "")
if vim.fn.strchars(vim_item.abbr) > 50 then
vim_item.abbr = vim.fn.strcharpart(vim_item.abbr, 0, 50) .. "..."
end
vim_item.menu = ({
nvim_lsp = "[LSP]",
luasnip = "[Snippet]",
buffer = "[Buffer]",
path = "[Path]"
})[entry.source.name]
return vim_item
end
'';
};
mapping.__raw = '' cmp.mapping.preset.insert({
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
["<S-TAB>"] = cmp.mapping.select_prev_item(),
["<TAB>"] = cmp.mapping.select_next_item(),
})'';
window = {
completion.__raw = "cmp.config.window.bordered()";
documentation.__raw = "cmp.config.window.bordered()";
};
sources = [
{name = "nvim_lsp";}
{name = "luasnip";}
{name = "path";}
{name = "buffer";}
{name = "crates";}
];
};
};
cmp_luasnip.enable = true;
cmp-buffer.enable = true;
cmp-path.enable = true;
cmp-nvim-lsp.enable = true;
luasnip.enable = true;
};
}

View file

@ -0,0 +1,192 @@
{pkgs, ...}: {
imports = [
./cmp.nix
];
programs.nixvim.plugins = {
crates.enable = true; # Does not work
dressing.enable = true;
};
programs.nixvim.extraConfigVim = ''
augroup unrecognized_filetypes
autocmd!
autocmd BufRead,BufNewFile *.vert set filetype=glsl
autocmd BufRead,BufNewFile *.tesc set filetype=glsl
autocmd BufRead,BufNewFile *.tese set filetype=glsl
autocmd BufRead,BufNewFile *.frag set filetype=glsl
autocmd BufRead,BufNewFile *.geom set filetype=glsl
autocmd BufRead,BufNewFile *.comp set filetype=glsl
autocmd BufRead,BufNewFile *.qml set filetype=qml
autocmd BufRead,BufNewFile *.slint set filetype=slint
autocmd BufRead,BufNewFile *.typ set filetype=typst
augroup END
'';
programs.nixvim.plugins.lsp = {
enable = true;
capabilities = ''
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
capabilities.textDocument.completion.completionItem.snippetSupport = true'';
preConfig = ''
local border = {
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" }
}
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
'';
inlayHints = true;
servers = {
clangd = {
enable = true;
settings.arguments = [
"--clang-tidy"
"--background-index"
"--completion-style=detailed"
"--cross-file-rename"
"--header-insertion=iwyu"
"--all-scopes-completion"
];
};
# jdtls.enable = true;
emmet_ls.enable = true;
ts_ls.enable = true;
cssls.enable = true;
# glsl_analyzer.enable = true;
glslls.enable = true;
pyright.enable = true;
nixd.enable = true;
lua_ls = {
enable = true;
settings = {
telemetry.enable = false;
workspace.checkThirdParty = false;
};
};
svelte = {
enable = true;
settings.enable_ts_plugin = true;
};
slint_lsp.enable = true;
zls.enable = true;
rust_analyzer = {
enable = true;
installRustc = false;
installCargo = false;
settings = {
imports = {
granularity.group = "crate";
prefix = "self";
preferNoStd = true;
};
check = {
command = "clippy";
allTargets = true;
};
completion = {
fullFunctionSignatures.enable = false;
autoimport.enable = true;
};
cargo = {
allTargets = true;
features = "all";
};
procMacro.enable = true;
};
};
};
keymaps = {
silent = true;
extra = [
{
mode = "n";
key = "<leader>rn";
action.__raw = "vim.lsp.buf.rename";
}
{
mode = "n";
key = "<leader>ca";
action.__raw = "vim.lsp.buf.code_action";
}
{
mode = "n";
key = "<leader>di";
action.__raw = "vim.diagnostic.open_float";
}
{
mode = "n";
key = "<leader>dv";
action.__raw = "require('telescope.builtin').diagnostics";
}
{
mode = "n";
key = "gd";
action.__raw = "vim.lsp.buf.definition";
}
{
mode = "n";
key = "gr";
action.__raw = "require('telescope.builtin').lsp_references";
}
{
mode = "n";
key = "gI";
action.__raw = "vim.lsp.buf.implementation";
}
{
mode = "n";
key = "<leader>D";
action.__raw = "vim.lsp.buf.type_definition";
}
{
mode = "n";
key = "<leader>ds";
action.__raw = "require('telescope.builtin').lsp_document_symbols";
}
{
mode = "n";
key = "<leader>ws";
action.__raw = "require('telescope.builtin').lsp_dynamic_workspace_symbols";
}
{
mode = "n";
key = "<leader>K";
action.__raw = "vim.lsp.buf.hover";
}
{
mode = "n";
key = "<leader>k";
action.__raw = "vim.lsp.buf.signature_help";
}
{
mode = "n";
key = "<leader>gD";
action.__raw = "vim.lsp.buf.declaration";
}
{
mode = "n";
key = "<leader>wa";
action.__raw = "vim.lsp.buf.add_workspace_folder";
}
{
mode = "n";
key = "<leader>wr";
action.__raw = "vim.lsp.buf.remove_workspace_folder";
}
{
mode = "n";
key = "<leader>wl";
action.__raw = "function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end";
}
];
};
};
}

View file

@ -0,0 +1,21 @@
{...}: {
programs.nixvim.plugins.lualine = {
enable = true;
settings = {
options = {
icons_enabled = true;
component_seperators = {
left = "|";
right = "|";
};
section_seperators = {
left = "";
right = "";
};
disabled_filetypes.statusline = ["NvimTree" "alpha"];
disabled_filetypes.winbar = ["NvimTree" "alpha"];
theme = null;
};
};
};
}

View file

@ -0,0 +1,47 @@
{...}: {
programs.nixvim.plugins.telescope = {
enable = true;
extensions = {
fzf-native.enable = true;
file-browser.enable = true;
};
settings = {
theme = "dropdown";
defaults = {
prompt_prefix = " ";
selection_caret = " ";
entry_prefix = " ";
initial_mode = "insert";
selection_strategy = "reset";
layout_config = {};
mappings.i = {
"<C-u>" = false;
"<C-d>" = false;
};
file_ignore_patters = {};
path_display = "smart";
winblend = 0;
border = {};
borderchars = null;
color_devicons = true;
set_env = {COLORTERM = "truecolor";};
};
pickers = {
planets = {
show_pluto = true;
show_moon = true;
};
git_files = {
hidden = true;
show_untracked = true;
};
colorscheme = {
enable_preview = true;
};
find_files = {
hidden = true;
};
};
};
};
}

View file

@ -0,0 +1,17 @@
{
programs.nixvim.plugins.nvim-tree = {
enable = true;
disableNetrw = true;
hijackNetrw = true;
diagnostics.enable = true;
preferStartupRoot = false;
syncRootWithCwd = true;
view = {
side = "left";
width = 30;
};
renderer.groupEmpty = true;
actions.openFile.resizeWindow = true;
git.ignore = false;
};
}

View file

@ -0,0 +1,19 @@
{config, ...}: {
programs.nixvim.plugins.treesitter = {
enable = true;
nixvimInjections = true;
settings = {
indent.enable = true;
incremental_selection = {
enable = true;
# keymaps = {
# init_selection = "<c-space>";
# node_incremental = "<c-space>";
# scope_incremental = "<c-s";
# node_decremental = "<c-backspace>";
# };
};
highlight.enable = true;
};
};
}

View file

@ -0,0 +1,20 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.lily.rofi;
in {
options.lily.rofi = {
enable = lib.mkEnableOption "activate rofi";
};
config = lib.mkIf cfg.enable {
programs.rofi = {
package = pkgs.rofi-wayland;
enable = true;
plugins = [pkgs.rofi-calc];
};
};
}

View file

@ -0,0 +1,84 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.lily.vscode;
in {
options.lily.vscode = {
enable = lib.mkEnableOption "activate vscode";
};
config = lib.mkIf cfg.enable {
programs.vscode = {
enable = true;
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
mutableExtensionsDir = false;
package = pkgs.vscode.overrideAttrs (attrs: {
buildInputs = with pkgs;
attrs.buildInputs
++ [
bun
gcc
cmake
ninja
];
});
extensions = with pkgs.vscode-extensions; [
github.copilot
github.copilot-chat
rust-lang.rust-analyzer
svelte.svelte-vscode
bradlc.vscode-tailwindcss
ms-vsliveshare.vsliveshare
ms-vscode.cmake-tools
ms-python.python
vadimcn.vscode-lldb
bierner.markdown-preview-github-styles
bierner.markdown-checkbox
bierner.markdown-emoji
bierner.markdown-footnotes
bierner.markdown-mermaid
denoland.vscode-deno
ziglang.vscode-zig
# geequlim.godot-tools
gruntfuggly.todo-tree
mhutchie.git-graph
fill-labs.dependi
bbenoist.nix
tamasfe.even-better-toml
twxs.cmake
llvm-vs-code-extensions.vscode-clangd
mkhl.direnv
(pkgs.vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "darcula-solid";
publisher = "jussiemion";
version = "1.2.1";
hash = "sha256-tIfCkOR1Z/uRWiZhrBfOQCZT3Cu6yNjAnxjn0UJFO2U=";
};
})
];
userSettings = {
"editor.cursorSmoothCaretAnimation" = "on";
"editor.smoothScrolling" = true;
"editor.cursorBlinking" = "expand";
"workbench.colorTheme" = "Darcula Solid";
"clangd.path" = "${pkgs.clang-tools}/bin/clangd";
"clangd.arguments" = [
"--clang-tidy"
"--background-index"
"--completion-style=detailed"
"--cross-file-rename"
"--header-insertion=iwyu"
"--all-scopes-completion"
];
"editor.fontFamily" = "JetBrainsMono Nerd Font";
"zig.path" = "${pkgs.zls}/bin/zls";
};
};
};
}

View file

@ -0,0 +1,18 @@
{
config,
lib,
...
}: let
cfg = config.lily.waybar;
in {
options.lily.waybar = {
enable = lib.mkEnableOption "activate waybar";
};
config = lib.mkIf cfg.enable {
programs.waybar = {
enable = true;
systemd.enable = true;
};
};
}

View file

@ -0,0 +1,103 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.lily.zed;
in {
options.lily.zed = {
enable = lib.mkEnableOption "activate zed";
};
config = lib.mkIf cfg.enable {
programs.zed-editor = {
enable = true;
extensions = ["nix" "toml" "elixir" "make"];
## everything inside of these brackets are Zed options.
userSettings = {
assistant = {
enabled = true;
version = "2";
default_open_ai_model = null;
### PROVIDER OPTIONS
### zed.dev models { claude-3-5-sonnet-latest } requires github connected
### anthropic models { claude-3-5-sonnet-latest claude-3-haiku-latest claude-3-opus-latest } requires API_KEY
### copilot_chat models { gpt-4o gpt-4 gpt-3.5-turbo o1-preview } requires github connected
default_model = {
provider = "zed.dev";
model = "claude-3-5-sonnet-latest";
};
# inline_alternatives = [
# {
# provider = "copilot_chat";
# model = "gpt-3.5-turbo";
# }
# ];
};
node = {
path = lib.getExe pkgs.nodejs;
npm_path = lib.getExe' pkgs.nodejs "npm";
};
hour_format = "hour24";
auto_update = false;
terminal = {
alternate_scroll = "off";
blinking = "off";
copy_on_select = false;
dock = "bottom";
detect_venv = {
on = {
directories = [".env" "env" ".venv" "venv"];
activate_script = "default";
};
};
font_family = "JetBrains Mono";
font_features = null;
font_size = null;
line_height = "comfortable";
option_as_meta = false;
button = false;
shell = {
program = "zsh";
};
toolbar = {
title = true;
};
working_directory = "current_project_directory";
};
lsp = {
rust-analyzer = {
binary = {
path = "/run/current-system/sw/bin/rust-analyzer";
path_lookup = false;
};
};
nix = {
binary = {
path = "${pkgs.nixd}/bin/nixd";
path_lookup = false;
};
};
};
vim_mode = false; # Not yet...
load_direnv = "shell_hook";
base_keymap = "VSCode";
theme = {
mode = "system";
light = "One Light";
dark = "Andromeda";
};
show_whitespaces = "all";
ui_font_size = 16;
buffer_font_size = 16;
};
};
};
}

View file

@ -0,0 +1,53 @@
{
config,
lib,
...
}: let
cfg = config.lily.zsh;
in {
options.lily.zsh = {
enable = lib.mkEnableOption "activate zsh";
};
config = lib.mkIf cfg.enable {
programs.zsh = {
enable = true;
autocd = true;
autosuggestion.enable = true;
autosuggestion.strategy = [
"completion"
"history"
];
shellAliases = {
nix-switch = "sudo nixos-rebuild switch --flake $HOME/.dotfiles";
ls = "eza";
cd = "z";
};
syntaxHighlighting.enable = true;
antidote = {
enable = true;
plugins = [
"zsh-users/zsh-autosuggestions"
"mattmc3/ez-compinit"
"zdharma-continuum/fast-syntax-highlighting kind:defer"
"zsh-users/zsh-completions kind:fpath path:src"
"getantidote/use-omz" # handle OMZ dependencies
"ohmyzsh/ohmyzsh path:lib" # load OMZ's library
"ohmyzsh/ohmyzsh path:plugins/colored-man-pages" # load OMZ plugins
"ohmyzsh/ohmyzsh path:plugins/magic-enter"
];
};
};
programs.zoxide = {
enable = true;
};
programs.starship.enable = true;
programs.eza = {
enable = true;
colors = "always";
icons = "always";
git = true;
};
};
}

85
home-manager/nix/home.nix Normal file
View file

@ -0,0 +1,85 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
outputs,
pkgs,
...
}: {
# You can import other home-manager modules here
imports = [
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules.default
# You can also split up your configuration and import pieces of it here:
# ./nvim.nix
../applications/git.nix
../applications/chromium.nix
../applications/git.nix
../applications/zsh.nix
../applications/direnv.nix
../applications/vscode.nix
../applications/ghostty
../applications/hyprland
../applications/neovim
inputs.nixvim.homeManagerModules.nixvim
];
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
home = {
username = "lily";
homeDirectory = "/home/lily";
packages = with pkgs; # installs a package
[
vesktop
(prismlauncher.override {
jdks = [jdk23 jdk8 jdk17 jdk21];
})
itch
inputs.nix-gaming.packages.${pkgs.system}.viper
kdePackages.kate
];
};
# Add stuff for your user as you see fit:
# programs.neovim.enable = true;
# home.packages = with pkgs; [ steam ];
# Enable home-manager and git
programs.home-manager.enable = true;
programs.git.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "24.11";
}

View file

@ -1,100 +0,0 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional.
;; (setq user-full-name "John Doe"
;; user-mail-address "john@doe.com")
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-symbol-font' -- for symbols
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 12 :weight 'semi-light)
doom-variable-pitch-font (font-spec :family "Liberation Sans" :size 13))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'catppuccin)
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type 'relative)
;; Modeline config
(setq doom-modeline-height 28)
(setq doom-modeline-modal t)
(setq doom-modeline-modal-icon t)
(setq doom-modeline-modal-modern-icon nil)
(setq doom-modeline-enable-word-count nil)
(setq doom-modeline-total-line-number t)
(setq doom-modeline-buffer-file-name-style 'truncate-with-project)
(setq doom-modeline-persp-name t)
(setq doom-modeline-persp-icon t)
(setq doom-modeline-major-mode-icon t)
(setq doom-modeline-major-mode-color-icon t)
(setq doom-modeline-buffer-state-icon t)
(setq doom-modeline-buffer-modification-icon t)
(setq doom-modeline-lsp-icon t)
(setq doom-modeline-always-show-macro-register t)
(setq doom-modeline-time t)
(setq doom-modeline-time-icon t)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
(setq pixel-scroll-precision-large-scroll-height 40)
(setq pixel-scroll-precision-mode 1)
(setq catppuccin-flavor 'mocha)
(setq evil-want-integration t)
;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
;; (after! PACKAGE
;; (setq x y))
;;
;; The exceptions to this rule:
;;
;; - Setting file/directory variables (like `org-directory')
;; - Setting variables which explicitly tell you to set them before their
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
;; - Setting doom variables (which start with 'doom-' or '+').
;;
;; Here are some additional functions/macros that will help you configure Doom.
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
;; etc).
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.

View file

@ -1,13 +0,0 @@
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
'("4825b816a58680d1da5665f8776234d4aefce7908594bea75ec9d7e3dc429753" "8d3ef5ff6273f2a552152c7febc40eabca26bae05bd12bc85062e2dc224cde9a" "da75eceab6bea9298e04ce5b4b07349f8c02da305734f7c0c8c6af7b5eaa9738" "014cb63097fc7dbda3edf53eb09802237961cbb4c9e9abd705f23b86511b0a69" "d481904809c509641a1a1f1b1eb80b94c58c210145effc2631c1a7f2e4a2fdf4" "77fff78cc13a2ff41ad0a8ba2f09e8efd3c7e16be20725606c095f9a19c24d3d" "aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8" default)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

View file

@ -1,191 +0,0 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
;;(corfu +orderless) ; complete with cap(f), cape and a flying feather!
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
;;ivy ; a search engine for love and life
vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
;;tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
(vc-gutter +pretty) ; vcs diff in the fringe
;;vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
term ; basic terminal emulator for Emacs
;;vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
lookup ; navigate your code and its documentation
lsp ; M-x vscode
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
;;pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
;;json ; At least it ain't XML
;;(java +lsp) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
;;yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
:config
;;literate
(default +bindings +smartparens))

View file

@ -1,63 +0,0 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;; (package! some-package)
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/radian-software/straight.el#the-recipe-format
;; (package! another-package
;; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;; (package! this-package
;; :recipe (:host github :repo "username/repo"
;; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;; (package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;; (package! builtin-package :recipe (:nonrecursive t))
;; (package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see radian-software/straight.el#279)
;; (package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;; (package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;; (unpin! pinned-package)
;; ...or multiple packages
;; (unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;; (unpin! t)
(package! elcord)
(package! catppuccin-theme)
(package! org-view-mode)
(package! org-superstar)
(package! lsp-ui)
(package! svelte-mode)
(package! typescript-mode)
(setq lsp-log-io t)
(add-hook 'org-mode-hook
(lambda ()
(org-superstar-mode 1)))

View file

@ -1 +0,0 @@
!.doom.d/

View file

@ -1,23 +0,0 @@
{ pkgs, config, lib, ... }:
{
programs.emacs = {
enable = true;
package = pkgs.emacs;
};
home.activation = {
cloneDoomEmacs = ''
if [ ! -d "$HOME/.emacs.d" ]; then
${pkgs.git}/bin/git clone https://github.com/doomemacs/doomemacs $HOME/.emacs.d
fi
'';
};
home.file.".doom.d" = {
source = ./doom-emacs/.doom.d;
recursive = true;
onChange = "${config.home.homeDirectory}/.emacs.d/bin/doom sync";
force = true;
};
}

View file

@ -1,22 +0,0 @@
{ ... }:
{
programs.git = {
enable = true;
userName = "luxzi";
userEmail = "lesson085@gmail.com";
aliases = {
pf = "push --force";
kl = "log --show-signature";
};
signing = {
key = "C90237A70F2FDD53";
signByDefault = true;
};
extraConfig = {
init.defaultBranch = "main";
core.symlinks = true;
commit.gpgsign = true;
};
};
}

View file

@ -1,17 +0,0 @@
{ pkgs, ... }:
{
programs.kitty = {
enable = true;
font = {
name = "FiraCode Nerd Font";
package = pkgs.nerd-fonts.fira-code;
size = 14;
};
settings = {
window_padding_width = 4;
background_opacity = "0.65";
background_blur = 1;
};
};
}

View file

@ -1,30 +0,0 @@
{ pkgs, ... }:
{
imports =
[
./zsh.nix
./git.nix
./emacs.nix
./kitty.nix
];
home.packages = with pkgs; [
hyfetch
nix-output-monitor
firefox
tree
vesktop
fzf
tor-browser
nix-search-cli
mpv
element-desktop
mission-center
nvtop
alacritty
nerd-fonts.fira-code
];
nixpkgs.config.allowUnfree = true;
}

View file

@ -1,99 +0,0 @@
{ ... }:
{
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
autocd = true;
shellAliases = {
hm-switch = "home-manager switch --flake $HOME/.dotfiles";
nx-switch = "sudo nixos-rebuild switch --flake $HOME/.dotfiles";
nx-boot = "sudo nixos-rebuild boot --flake $HOME/.dotfiles";
nx-clean = "sudo nix-collect-garbage --delete-old && nix-collect-garbage --delete-old";
hm-clean = "home-manager remove-generations";
gl-switch = "sudo nixos-rebuild switch --flake $HOME/.dotfiles && home-manager switch --flake $HOME/.dotfiles";
gl-clean = "sudo nix-collect-garbage --delete-old && nix-collect-garbage --delete-old && home-manager remove-generations";
snv = "sudo -E nvim";
sen = "sudo -E";
emacs-config = "emacs --chdir $HOME/.dotfiles/home-manager/packages/doom-emacs/.doom.d &";
};
zplug = {
enable = true;
plugins = [
{ name = "Aloxaf/fzf-tab"; }
];
};
history = {
size = 5000;
save = 5000;
ignoreAllDups = true;
ignoreDups = true;
ignoreSpace = true;
share = true;
};
initExtra = ''
bindkey -v
bindkey '^k' history-search-backward
bindkey '^j' history-search-forward
setopt appendHistory
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
eval "$(fzf --zsh)"
'';
};
programs.starship = {
enable = true;
settings = {
format = "$username$hostname$directory$git_branch$git_state$git_status$nix_shell$cmd_duration$line_break$python$character";
directory = {
style = "blue";
};
character = {
success_symbol = "[](white)";
error_symbol = "[](red)";
vimcmd_symbol = "[](green)";
};
git_branch = {
format = "[$branch]($style)";
style = "green";
};
git_status = {
format = "[[($conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)";
style = "cyan";
conflicted = "!";
untracked = "u";
modified = "*";
staged = "+";
renamed = "r";
deleted = "d";
stashed = "";
};
git_state = {
format = "\([$state( $progress_current/$progress_total)]($style)\) ";
style = "bright-black";
};
cmd_duration = {
format = "[$duration]($style) ";
style = "yellow";
};
python = {
format = "[$virtualenv]($style) ";
style = "bright-black";
};
};
};
}

View file

@ -0,0 +1,22 @@
{pkgs, ...}: {
imports = [
./main.nix
];
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
lily = {
hyprland.enable = true;
ghostty.enable = true;
neovim.enable = true;
rofi.enable = true;
vscode.enable = true;
zed.enable = true;
waybar.enable = true;
chromium.enable = true;
};
home.packages = with pkgs; [
vesktop
];
}

View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
home.stateVersion = "24.11";
programs.home-manager.enable = true;
nixpkgs.config.allowUnfree = true;
lily = {
zsh.enable = true;
git.enable = true;
};
}