add config wrappers to everything in home manager
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
./waybar
|
||||
|
||||
./hypr
|
||||
./neovim
|
||||
./nvf
|
||||
./lf
|
||||
./zsh
|
||||
./ssh
|
||||
|
||||
@@ -4,17 +4,31 @@
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
# configure git
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "blake";
|
||||
userEmail = "me@blakedheld.xyz";
|
||||
extraConfig = {
|
||||
init.defaultBranch = "trunk";
|
||||
core.editor = "nvim";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
}:
|
||||
let
|
||||
program = "git";
|
||||
cfg = config.dots.${program};
|
||||
#sec = sops.secrets;
|
||||
in {
|
||||
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
|
||||
# configure git
|
||||
programs.${program} = {
|
||||
enable = true;
|
||||
userName = "blake";
|
||||
userEmail = "me@blakedheld.xyz";
|
||||
extraConfig = {
|
||||
init.defaultBranch = "trunk";
|
||||
core.editor = "nvim";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,18 +3,31 @@
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
}:
|
||||
let
|
||||
program = "gpg";
|
||||
cfg = config.dots.${program};
|
||||
#sec = sops.secrets;
|
||||
in {
|
||||
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentry.package = pkgs.pinentry-qt;
|
||||
pinentry.program = "pinentry-qt";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
programs.${program} = {
|
||||
enable = true;
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentry.package = pkgs.pinentry-qt;
|
||||
pinentry.program = "pinentry-qt";
|
||||
};
|
||||
# install pinentry programs conditionaly based on os
|
||||
home.packages =
|
||||
lib.optional pkgs.stdenv.isDarwin pkgs.pinentry_mac
|
||||
++ lib.optional pkgs.stdenv.isLinux pkgs.pinentry-qt;
|
||||
};
|
||||
# install pinentry programs conditionaly based on os
|
||||
home.packages =
|
||||
lib.optional pkgs.stdenv.isDarwin pkgs.pinentry_mac
|
||||
++ lib.optional pkgs.stdenv.isLinux pkgs.pinentry-qt;
|
||||
}
|
||||
|
||||
@@ -1,378 +1,393 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
nwg-displays
|
||||
posy-cursors
|
||||
hyprpicker
|
||||
];
|
||||
}:
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.variables = ["--all"];
|
||||
settings = {
|
||||
# --- displays ---
|
||||
source = [
|
||||
"~/.config/hypr/monitors.conf"
|
||||
"~/.config/hypr/workspaces.conf"
|
||||
];
|
||||
let
|
||||
program = "hypr";
|
||||
cfg = config.dots.${program};
|
||||
#sec = sops.secrets;
|
||||
in {
|
||||
|
||||
# --- environment variables ---
|
||||
env = [
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
];
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
|
||||
# --- input ---
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
numlock_by_default = true;
|
||||
follow_mouse = 2;
|
||||
sensitivity = -0.2;
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
nwg-displays
|
||||
posy-cursors
|
||||
hyprpicker
|
||||
];
|
||||
|
||||
touchpad = {
|
||||
disable_while_typing = true;
|
||||
natural_scroll = true;
|
||||
clickfinger_behavior = true;
|
||||
tap-to-click = true;
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.variables = ["--all"];
|
||||
settings = {
|
||||
# --- displays ---
|
||||
source = [
|
||||
"~/.config/hypr/monitors.conf"
|
||||
"~/.config/hypr/workspaces.conf"
|
||||
];
|
||||
|
||||
# --- environment variables ---
|
||||
env = [
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
];
|
||||
|
||||
# --- input ---
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
numlock_by_default = true;
|
||||
follow_mouse = 2;
|
||||
sensitivity = -0.2;
|
||||
|
||||
touchpad = {
|
||||
disable_while_typing = true;
|
||||
natural_scroll = true;
|
||||
clickfinger_behavior = true;
|
||||
tap-to-click = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# --- general ---
|
||||
general = {
|
||||
gaps_in = 2;
|
||||
gaps_out = 5;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
};
|
||||
# --- general ---
|
||||
general = {
|
||||
gaps_in = 2;
|
||||
gaps_out = 5;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
};
|
||||
|
||||
# --- decoration ---
|
||||
decoration = {
|
||||
rounding = 3;
|
||||
blur = {
|
||||
# --- decoration ---
|
||||
decoration = {
|
||||
rounding = 3;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
};
|
||||
};
|
||||
|
||||
# --- animations ---
|
||||
animations = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# --- animations ---
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
# --- dwindle ---
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace = "on";
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = -1;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
# --- window rules ---
|
||||
windowrulev2 = [
|
||||
];
|
||||
|
||||
# --- binds ---
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
# system
|
||||
"$mainMod CONTROL, Q, exec, loginctl lock-session"
|
||||
|
||||
# programs
|
||||
"$mainMod, Return, exec, kitty"
|
||||
"$mainMod, E, exec, kitty lf"
|
||||
"$mainMod, R, exec, tofi-drun --drun-launch=true --prompt-text=\"launch:\""
|
||||
"$mainMod, B, exec, librewolf"
|
||||
"$mainMod, G, exec, lutris"
|
||||
"$mainMod, M, exec, thunderbird"
|
||||
"$mainMod, D, exec, flatpak run com.discordapp.Discord"
|
||||
"$mainMod, K, exec, hyprpicker --autocopy --format=hex"
|
||||
"$mainMod, T, exec, cliphist list | tofi | cliphist decode | wl-copy"
|
||||
"$mainMod CONTROL, T, exec, cliphist wipe"
|
||||
|
||||
# screenshots
|
||||
"$mainMod SHIFT, C, exec, hyprshot --mode region --output-folder ~/pictures/screenshots"
|
||||
|
||||
# multimedia
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
|
||||
# brightness
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +10%"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 10%- --min-value"
|
||||
|
||||
# scratchpad
|
||||
"$mainMod, S, togglespecialworkspace, magic"
|
||||
"$mainMod SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# window management
|
||||
"$mainMod, Q, killactive"
|
||||
"$mainMod SHIFT, M, exit"
|
||||
"$mainMod, V, togglefloating"
|
||||
"$mainMod, F, fullscreen, 1"
|
||||
"$mainMod SHIFT, F, fullscreen, 0"
|
||||
"$mainMod, P, pseudo"
|
||||
"$mainMod, J, togglesplit"
|
||||
|
||||
# focus movement
|
||||
"$mainMod, tab, cyclenext"
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# move windows
|
||||
"$mainMod SHIFT, left, swapwindow, l"
|
||||
"$mainMod SHIFT, right, swapwindow, r"
|
||||
"$mainMod SHIFT, up, swapwindow, u"
|
||||
"$mainMod SHIFT, down, swapwindow, d"
|
||||
|
||||
# resize
|
||||
"$mainMod CTRL, left, resizeactive, -60 0"
|
||||
"$mainMod CTRL, right, resizeactive, 60 0"
|
||||
"$mainMod CTRL, up, resizeactive, 0 -60"
|
||||
"$mainMod CTRL, down, resizeactive, 0 60"
|
||||
|
||||
# workspace switching
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# move windows between workspaces
|
||||
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# waybar
|
||||
"$mainMod, N, exec, pkill -SIGUSR1 waybar"
|
||||
"$mainMod SHIFT, N, exec, pkill -SIGUSR2 waybar"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
|
||||
# --- dwindle ---
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace = "on";
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = -1;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
# --- window rules ---
|
||||
windowrulev2 = [
|
||||
];
|
||||
|
||||
# --- binds ---
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
# system
|
||||
"$mainMod CONTROL, Q, exec, loginctl lock-session"
|
||||
|
||||
# programs
|
||||
"$mainMod, Return, exec, kitty"
|
||||
"$mainMod, E, exec, kitty lf"
|
||||
"$mainMod, R, exec, tofi-drun --drun-launch=true --prompt-text=\"launch:\""
|
||||
"$mainMod, B, exec, librewolf"
|
||||
"$mainMod, G, exec, lutris"
|
||||
"$mainMod, M, exec, thunderbird"
|
||||
"$mainMod, D, exec, flatpak run com.discordapp.Discord"
|
||||
"$mainMod, K, exec, hyprpicker --autocopy --format=hex"
|
||||
"$mainMod, T, exec, cliphist list | tofi | cliphist decode | wl-copy"
|
||||
"$mainMod CONTROL, T, exec, cliphist wipe"
|
||||
|
||||
# screenshots
|
||||
"$mainMod SHIFT, C, exec, hyprshot --mode region --output-folder ~/pictures/screenshots"
|
||||
|
||||
# multimedia
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
|
||||
# brightness
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +10%"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 10%- --min-value"
|
||||
|
||||
# scratchpad
|
||||
"$mainMod, S, togglespecialworkspace, magic"
|
||||
"$mainMod SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# window management
|
||||
"$mainMod, Q, killactive"
|
||||
"$mainMod SHIFT, M, exit"
|
||||
"$mainMod, V, togglefloating"
|
||||
"$mainMod, F, fullscreen, 1"
|
||||
"$mainMod SHIFT, F, fullscreen, 0"
|
||||
"$mainMod, P, pseudo"
|
||||
"$mainMod, J, togglesplit"
|
||||
|
||||
# focus movement
|
||||
"$mainMod, tab, cyclenext"
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# move windows
|
||||
"$mainMod SHIFT, left, swapwindow, l"
|
||||
"$mainMod SHIFT, right, swapwindow, r"
|
||||
"$mainMod SHIFT, up, swapwindow, u"
|
||||
"$mainMod SHIFT, down, swapwindow, d"
|
||||
|
||||
# resize
|
||||
"$mainMod CTRL, left, resizeactive, -60 0"
|
||||
"$mainMod CTRL, right, resizeactive, 60 0"
|
||||
"$mainMod CTRL, up, resizeactive, 0 -60"
|
||||
"$mainMod CTRL, down, resizeactive, 0 60"
|
||||
|
||||
# workspace switching
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# move windows between workspaces
|
||||
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# waybar
|
||||
"$mainMod, N, exec, pkill -SIGUSR1 waybar"
|
||||
"$mainMod SHIFT, N, exec, pkill -SIGUSR2 waybar"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# enable polkit agent
|
||||
services.hyprpolkitagent.enable = true;
|
||||
# enable polkit agent
|
||||
services.hyprpolkitagent.enable = true;
|
||||
|
||||
# wallpaper
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = [ "~/.nix/users/blake/assets/wallpapers/antartica.png" ];
|
||||
wallpaper = [ ",~/.nix/users/blake/assets/wallpapers/antartica.png" ];
|
||||
ipc = "off";
|
||||
splash = false;
|
||||
};
|
||||
};
|
||||
|
||||
# screenlocker
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "~/.nix/users/blake/assets/wallpapers/antartica.png";
|
||||
blur_passes = 1;
|
||||
color = "rgb(0047ab)";
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:30000] echo \"$(date +'%R')\"";
|
||||
color = "rgb(ffffff)";
|
||||
font_size = 90;
|
||||
position = "-130, -100";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
shadow_passes = 1;
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:43200000] echo \"$(date +'%Y/%m/%d')\"";
|
||||
color = "$text";
|
||||
font_size = 25;
|
||||
position = "-130, -250";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "$LAYOUT";
|
||||
color = "rgb(ffffff)";
|
||||
font_size = 20;
|
||||
rotate = 0;
|
||||
position = "-130, -310";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
|
||||
image = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "~/.nix/users/blake/assets/pfps/pikacig.jpg";
|
||||
size = 350;
|
||||
border_color = "rgb(0047ab)";
|
||||
rounding = -1;
|
||||
position = "0, 85";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
monitor = "";
|
||||
size = "400, 70";
|
||||
outline_thickness = 4;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = true;
|
||||
outer_color = "$accent";
|
||||
inner_color = "$surface0";
|
||||
font_color = "$text";
|
||||
fade_on_empty = false;
|
||||
placeholder_text =
|
||||
"# <span foreground=\"##$textAlpha\"><i> Logged in as </i><span foreground=\"##$accentAlpha\">$USER</span></span>";
|
||||
hide_input = false;
|
||||
check_color = "rgb(0047ab)";
|
||||
fail_color = "rgb(ff0000)";
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
capslock_color = "rgb(ff0000)";
|
||||
position = "0, -185";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# idle daemon
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# --- general settings ---
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # avoid multiple instances
|
||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # wake display properly
|
||||
};
|
||||
|
||||
# --- dim screen ---
|
||||
listener = [
|
||||
{
|
||||
timeout = 150; # 2.5 min
|
||||
on-timeout = "brightnessctl -s set 1"; # dim monitor (avoid 0 on OLED)
|
||||
on-resume = "brightnessctl -r"; # restore brightness
|
||||
}
|
||||
|
||||
# --- blank screen ---
|
||||
{
|
||||
timeout = 330; # 5.5 min
|
||||
on-timeout = "hyprctl dispatch dpms off"; # turn off screen
|
||||
on-resume = "hyprctl dispatch dpms on"; # restore screen
|
||||
}
|
||||
|
||||
# --- lock screen ---
|
||||
{
|
||||
timeout = 900; # 15 min
|
||||
on-timeout = "loginctl lock-session"; # lock screen
|
||||
}
|
||||
|
||||
# --- suspend timeout ---
|
||||
{
|
||||
timeout = 1800; # 30 min
|
||||
on-timeout = "systemctl suspend"; # suspend computer
|
||||
}
|
||||
|
||||
# --- keyboard backlight (optional) ---
|
||||
# Uncomment if your keyboard supports it
|
||||
# {
|
||||
# timeout = 150;
|
||||
# on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";
|
||||
# on-resume = "brightnessctl -rd rgb:kbd_backlight";
|
||||
# }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
dotIcons.enable = false;
|
||||
enable = true;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
package = pkgs.posy-cursors;
|
||||
name = "Posy_Cursor_Black";
|
||||
size = 48;
|
||||
hyprcursor = {
|
||||
# wallpaper
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
size = 64;
|
||||
settings = {
|
||||
preload = [ "~/.nix/users/blake/assets/wallpapers/antartica.png" ];
|
||||
wallpaper = [ ",~/.nix/users/blake/assets/wallpapers/antartica.png" ];
|
||||
ipc = "off";
|
||||
splash = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#xdg.configFile."hypr/hyprland.conf" = {
|
||||
# source = config.lib.file.mkOutOfStoreSymlink "/home/blake/.nix/users/blake/dots/hypr/hyprland.conf";
|
||||
#};
|
||||
# screenlocker
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "~/.nix/users/blake/assets/wallpapers/antartica.png";
|
||||
blur_passes = 1;
|
||||
color = "rgb(0047ab)";
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:30000] echo \"$(date +'%R')\"";
|
||||
color = "rgb(ffffff)";
|
||||
font_size = 90;
|
||||
position = "-130, -100";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
shadow_passes = 1;
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:43200000] echo \"$(date +'%Y/%m/%d')\"";
|
||||
color = "$text";
|
||||
font_size = 25;
|
||||
position = "-130, -250";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "$LAYOUT";
|
||||
color = "rgb(ffffff)";
|
||||
font_size = 20;
|
||||
rotate = 0;
|
||||
position = "-130, -310";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
|
||||
image = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "~/.nix/users/blake/assets/pfps/pikacig.jpg";
|
||||
size = 350;
|
||||
border_color = "rgb(0047ab)";
|
||||
rounding = -1;
|
||||
position = "0, 85";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
monitor = "";
|
||||
size = "400, 70";
|
||||
outline_thickness = 4;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = true;
|
||||
outer_color = "$accent";
|
||||
inner_color = "$surface0";
|
||||
font_color = "$text";
|
||||
fade_on_empty = false;
|
||||
placeholder_text =
|
||||
"# <span foreground=\"##$textAlpha\"><i> Logged in as </i><span foreground=\"##$accentAlpha\">$USER</span></span>";
|
||||
hide_input = false;
|
||||
check_color = "rgb(0047ab)";
|
||||
fail_color = "rgb(ff0000)";
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
capslock_color = "rgb(ff0000)";
|
||||
position = "0, -185";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# idle daemon
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# --- general settings ---
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # avoid multiple instances
|
||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # wake display properly
|
||||
};
|
||||
|
||||
# --- dim screen ---
|
||||
listener = [
|
||||
{
|
||||
timeout = 150; # 2.5 min
|
||||
on-timeout = "brightnessctl -s set 1"; # dim monitor (avoid 0 on OLED)
|
||||
on-resume = "brightnessctl -r"; # restore brightness
|
||||
}
|
||||
|
||||
# --- blank screen ---
|
||||
{
|
||||
timeout = 330; # 5.5 min
|
||||
on-timeout = "hyprctl dispatch dpms off"; # turn off screen
|
||||
on-resume = "hyprctl dispatch dpms on"; # restore screen
|
||||
}
|
||||
|
||||
# --- lock screen ---
|
||||
{
|
||||
timeout = 900; # 15 min
|
||||
on-timeout = "loginctl lock-session"; # lock screen
|
||||
}
|
||||
|
||||
# --- suspend timeout ---
|
||||
{
|
||||
timeout = 1800; # 30 min
|
||||
on-timeout = "systemctl suspend"; # suspend computer
|
||||
}
|
||||
|
||||
# --- keyboard backlight (optional) ---
|
||||
# Uncomment if your keyboard supports it
|
||||
# {
|
||||
# timeout = 150;
|
||||
# on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";
|
||||
# on-resume = "brightnessctl -rd rgb:kbd_backlight";
|
||||
# }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
dotIcons.enable = false;
|
||||
enable = true;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
package = pkgs.posy-cursors;
|
||||
name = "Posy_Cursor_Black";
|
||||
size = 48;
|
||||
hyprcursor = {
|
||||
enable = true;
|
||||
size = 64;
|
||||
};
|
||||
};
|
||||
|
||||
#xdg.configFile."hypr/hyprland.conf" = {
|
||||
# source = config.lib.file.mkOutOfStoreSymlink "/home/blake/.nix/users/blake/dots/hypr/hyprland.conf";
|
||||
#};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.nvf.homeManagerModules.default
|
||||
];
|
||||
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim = {
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
};
|
||||
|
||||
vimAlias = true;
|
||||
|
||||
lsp.enable = true;
|
||||
statusline.lualine.enable = true;
|
||||
telescope.enable = true;
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
autopairs.nvim-autopairs.enable = true;
|
||||
|
||||
keymaps = [
|
||||
# visual line movement (insert mode)
|
||||
{
|
||||
key = "<Up>";
|
||||
mode = [ "i" ];
|
||||
action = "<C-o>gk";
|
||||
desc = "Visual Line Up (Insert)";
|
||||
}
|
||||
{
|
||||
key = "<Down>";
|
||||
mode = [ "i" ];
|
||||
action = "<C-o>gj";
|
||||
desc = "Visual Line Down (Insert)";
|
||||
}
|
||||
|
||||
# visual line movement (normal/visual)
|
||||
{
|
||||
key = "<Up>";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
action = "g<Up>";
|
||||
desc = "Visual Line Up";
|
||||
}
|
||||
{
|
||||
key = "<Down>";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
action = "g<Down>";
|
||||
desc = "Visual Line Down";
|
||||
}
|
||||
|
||||
# lsp
|
||||
#{ key = "gd"; mode = [ "n" ]; action = "<cmd>lua vim.lsp.buf.definition()<CR>"; desc = "Go to definition"; }
|
||||
#{ key = "K"; mode = [ "n" ]; action = "<cmd>lua vim.lsp.buf.hover()<CR>"; desc = "Hover info"; }
|
||||
#{ key = "<leader>f"; mode = [ "n" ]; action = "<cmd>lua vim.lsp.buf.format({ async = true })<CR>"; desc = "Format buffer"; }
|
||||
|
||||
{
|
||||
key = "gd";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.definition()<CR>";
|
||||
desc = "Go to definition";
|
||||
}
|
||||
# Hover info
|
||||
{
|
||||
key = "K";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.hover()<CR>";
|
||||
desc = "Hover info";
|
||||
}
|
||||
# Format buffer (Alejandra for Nix)
|
||||
{
|
||||
key = "<leader>F";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.format({ async = true })<CR>";
|
||||
desc = "Format buffer";
|
||||
}
|
||||
# Code actions / quickfix
|
||||
{
|
||||
key = "<leader>a";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.code_action()<CR>";
|
||||
desc = "Code action";
|
||||
}
|
||||
# Rename symbol
|
||||
{
|
||||
key = "<leader>r";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.rename()<CR>";
|
||||
desc = "Rename symbol";
|
||||
}
|
||||
# Diagnostics
|
||||
{
|
||||
key = "<leader>e";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.diagnostic.open_float()<CR>";
|
||||
desc = "Show diagnostic";
|
||||
}
|
||||
{
|
||||
key = "[d";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.diagnostic.goto_prev()<CR>";
|
||||
desc = "Previous diagnostic";
|
||||
}
|
||||
{
|
||||
key = "]d";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.diagnostic.goto_next()<CR>";
|
||||
desc = "Next diagnostic";
|
||||
}
|
||||
];
|
||||
|
||||
options = {
|
||||
clipboard = "unnamedplus";
|
||||
|
||||
# line numbers
|
||||
number = true;
|
||||
numberwidth = 2;
|
||||
relativenumber = true;
|
||||
|
||||
# tabs and indentation
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
softtabstop = -1;
|
||||
expandtab = true;
|
||||
smarttab = true;
|
||||
autoindent = true;
|
||||
|
||||
# search
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
# files and backups
|
||||
backup = false;
|
||||
writebackup = false;
|
||||
undofile = true;
|
||||
swapfile = true;
|
||||
|
||||
# wrapping
|
||||
wrap = true;
|
||||
linebreak = true;
|
||||
breakindent = true;
|
||||
|
||||
termguicolors = true;
|
||||
autoread = true;
|
||||
};
|
||||
|
||||
languages = {
|
||||
enableTreesitter = true;
|
||||
|
||||
nix = {
|
||||
enable = true;
|
||||
format = {
|
||||
enable = true;
|
||||
type = "alejandra";
|
||||
#type = "nixfmt";
|
||||
};
|
||||
};
|
||||
|
||||
markdown.enable = true;
|
||||
rust.enable = true;
|
||||
lua.enable = true;
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
201
users/blake/dots/nvf/default.nix
Normal file
201
users/blake/dots/nvf/default.nix
Normal file
@@ -0,0 +1,201 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
program = "nvf";
|
||||
cfg = config.dots.${program};
|
||||
#sec = sops.secrets;
|
||||
in {
|
||||
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
imports = [
|
||||
inputs.nvf.homeManagerModules.default
|
||||
];
|
||||
|
||||
programs.${program} = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim = {
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
};
|
||||
|
||||
vimAlias = true;
|
||||
|
||||
lsp.enable = true;
|
||||
statusline.lualine.enable = true;
|
||||
telescope.enable = true;
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
autopairs.nvim-autopairs.enable = true;
|
||||
|
||||
keymaps = [
|
||||
# visual line movement (insert mode)
|
||||
{
|
||||
key = "<Up>";
|
||||
mode = [ "i" ];
|
||||
action = "<C-o>gk";
|
||||
desc = "Visual Line Up (Insert)";
|
||||
}
|
||||
{
|
||||
key = "<Down>";
|
||||
mode = [ "i" ];
|
||||
action = "<C-o>gj";
|
||||
desc = "Visual Line Down (Insert)";
|
||||
}
|
||||
|
||||
# visual line movement (normal/visual)
|
||||
{
|
||||
key = "<Up>";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
action = "g<Up>";
|
||||
desc = "Visual Line Up";
|
||||
}
|
||||
{
|
||||
key = "<Down>";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
action = "g<Down>";
|
||||
desc = "Visual Line Down";
|
||||
}
|
||||
|
||||
# lsp
|
||||
#{ key = "gd"; mode = [ "n" ]; action = "<cmd>lua vim.lsp.buf.definition()<CR>"; desc = "Go to definition"; }
|
||||
#{ key = "K"; mode = [ "n" ]; action = "<cmd>lua vim.lsp.buf.hover()<CR>"; desc = "Hover info"; }
|
||||
#{ key = "<leader>f"; mode = [ "n" ]; action = "<cmd>lua vim.lsp.buf.format({ async = true })<CR>"; desc = "Format buffer"; }
|
||||
|
||||
{
|
||||
key = "gd";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.definition()<CR>";
|
||||
desc = "Go to definition";
|
||||
}
|
||||
# Hover info
|
||||
{
|
||||
key = "K";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.hover()<CR>";
|
||||
desc = "Hover info";
|
||||
}
|
||||
# Format buffer (Alejandra for Nix)
|
||||
{
|
||||
key = "<leader>F";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.format({ async = true })<CR>";
|
||||
desc = "Format buffer";
|
||||
}
|
||||
# Code actions / quickfix
|
||||
{
|
||||
key = "<leader>a";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.code_action()<CR>";
|
||||
desc = "Code action";
|
||||
}
|
||||
# Rename symbol
|
||||
{
|
||||
key = "<leader>r";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.rename()<CR>";
|
||||
desc = "Rename symbol";
|
||||
}
|
||||
# Diagnostics
|
||||
{
|
||||
key = "<leader>e";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.diagnostic.open_float()<CR>";
|
||||
desc = "Show diagnostic";
|
||||
}
|
||||
{
|
||||
key = "[d";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.diagnostic.goto_prev()<CR>";
|
||||
desc = "Previous diagnostic";
|
||||
}
|
||||
{
|
||||
key = "]d";
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.diagnostic.goto_next()<CR>";
|
||||
desc = "Next diagnostic";
|
||||
}
|
||||
];
|
||||
|
||||
options = {
|
||||
clipboard = "unnamedplus";
|
||||
|
||||
# line numbers
|
||||
number = true;
|
||||
numberwidth = 2;
|
||||
relativenumber = true;
|
||||
|
||||
# tabs and indentation
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
softtabstop = -1;
|
||||
expandtab = true;
|
||||
smarttab = true;
|
||||
autoindent = true;
|
||||
|
||||
# search
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
# files and backups
|
||||
backup = false;
|
||||
writebackup = false;
|
||||
undofile = true;
|
||||
swapfile = true;
|
||||
|
||||
# wrapping
|
||||
wrap = true;
|
||||
linebreak = true;
|
||||
breakindent = true;
|
||||
|
||||
termguicolors = true;
|
||||
autoread = true;
|
||||
};
|
||||
|
||||
languages = {
|
||||
enableTreesitter = true;
|
||||
|
||||
nix = {
|
||||
enable = true;
|
||||
format = {
|
||||
enable = true;
|
||||
type = "alejandra";
|
||||
#type = "nixfmt";
|
||||
};
|
||||
};
|
||||
|
||||
markdown.enable = true;
|
||||
rust.enable = true;
|
||||
lua.enable = true;
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,43 +1,57 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"git.blakedheld.xyz" = {
|
||||
user = "gitea";
|
||||
identityFile = "~/.ssh/id_snowbelle";
|
||||
}:
|
||||
let
|
||||
program = "ssh";
|
||||
cfg = config.dots.${program};
|
||||
#sec = sops.secrets;
|
||||
in {
|
||||
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"git.blakedheld.xyz" = {
|
||||
user = "gitea";
|
||||
identityFile = "~/.ssh/id_snowbelle";
|
||||
};
|
||||
"git.snowbelle.lan" = {
|
||||
user = "gitea";
|
||||
identityFile = "~/.ssh/id_snowbelle";
|
||||
};
|
||||
"bebe" = {
|
||||
hostname = "10.10.0.1";
|
||||
user = "root";
|
||||
identityFile = "~/.ssh/id_snowbelle";
|
||||
};
|
||||
};
|
||||
"git.snowbelle.lan" = {
|
||||
user = "gitea";
|
||||
identityFile = "~/.ssh/id_snowbelle";
|
||||
};
|
||||
|
||||
# import sshkeys from keyring
|
||||
#home.file.".ssh/id_snowbelle".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle;
|
||||
#home.file.".ssh/id_snowbelle.pub".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle.pub;
|
||||
|
||||
|
||||
# manage secrets with sops
|
||||
sops.secrets = {
|
||||
"id_snowbelle" = {
|
||||
mode = "0600";
|
||||
path = "/home/blake/.ssh/id_snowbelle";
|
||||
};
|
||||
"bebe" = {
|
||||
hostname = "10.10.0.1";
|
||||
user = "root";
|
||||
identityFile = "~/.ssh/id_snowbelle";
|
||||
"id_snowbelle.pub" = {
|
||||
mode = "644";
|
||||
path = "/home/blake/.ssh/id_snowbelle.pub";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# import sshkeys from keyring
|
||||
#home.file.".ssh/id_snowbelle".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle;
|
||||
#home.file.".ssh/id_snowbelle.pub".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle.pub;
|
||||
|
||||
|
||||
# manage secrets with sops
|
||||
sops.secrets = {
|
||||
"id_snowbelle" = {
|
||||
mode = "0600";
|
||||
path = "/home/blake/.ssh/id_snowbelle";
|
||||
};
|
||||
"id_snowbelle.pub" = {
|
||||
mode = "644";
|
||||
path = "/home/blake/.ssh/id_snowbelle.pub";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,20 @@
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [inputs.stylix.homeManagerModules.default];
|
||||
|
||||
let
|
||||
program = "stylix";
|
||||
cfg = config.dots.${program};
|
||||
#sec = sops.secrets;
|
||||
in {
|
||||
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
imports = [inputs.stylix.homeManagerModules.default];
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,293 +1,308 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
# just using the normal lfrc
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
}:
|
||||
let
|
||||
program = "waybar";
|
||||
cfg = config.dots.${program};
|
||||
#sec = sops.secrets;
|
||||
in {
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 25;
|
||||
margin-top = 0;
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ "hyprland/window" ];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"temperature"
|
||||
"backlight"
|
||||
"wireplumber"
|
||||
"battery"
|
||||
"bluetooth"
|
||||
"network"
|
||||
"idle_inhibitor"
|
||||
"clock"
|
||||
];
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
"on-scroll-up" = "hyprctl dispatch workspace e+1";
|
||||
"on-scroll-down" = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
# just using the normal lfrc
|
||||
programs.${program} = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
"hyprland/window" = {
|
||||
"max-length" = 200;
|
||||
"separate-outputs" = false;
|
||||
};
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 25;
|
||||
margin-top = 0;
|
||||
|
||||
tray = {
|
||||
"icon-size" = 17;
|
||||
spacing = 10;
|
||||
};
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ "hyprland/window" ];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"temperature"
|
||||
"backlight"
|
||||
"wireplumber"
|
||||
"battery"
|
||||
"bluetooth"
|
||||
"network"
|
||||
"idle_inhibitor"
|
||||
"clock"
|
||||
];
|
||||
|
||||
clock = {
|
||||
format = "{:%Y/%m/%d %a %H:%M}";
|
||||
interval = 30;
|
||||
"on-click" = "thunderbird -calendar";
|
||||
"on-scroll" = 1;
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
"on-scroll-up" = "hyprctl dispatch workspace e+1";
|
||||
"on-scroll-down" = "hyprctl dispatch workspace e-1";
|
||||
};
|
||||
|
||||
calendar = {
|
||||
mode = "month";
|
||||
"mode-mon-col" = 3;
|
||||
"weeks-pos" = "";
|
||||
"hyprland/window" = {
|
||||
"max-length" = 200;
|
||||
"separate-outputs" = false;
|
||||
};
|
||||
|
||||
tray = {
|
||||
"icon-size" = 17;
|
||||
spacing = 10;
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "{:%Y/%m/%d %a %H:%M}";
|
||||
interval = 30;
|
||||
"on-click" = "thunderbird -calendar";
|
||||
"on-scroll" = 1;
|
||||
"on-click-right" = "mode";
|
||||
format = {
|
||||
months = "<span color='#ffead3'><b>{}</b></span>";
|
||||
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
||||
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
|
||||
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
||||
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
|
||||
|
||||
calendar = {
|
||||
mode = "month";
|
||||
"mode-mon-col" = 3;
|
||||
"weeks-pos" = "";
|
||||
"on-scroll" = 1;
|
||||
"on-click-right" = "mode";
|
||||
format = {
|
||||
months = "<span color='#ffead3'><b>{}</b></span>";
|
||||
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
||||
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
|
||||
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
||||
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
|
||||
actions = {
|
||||
"on-click-right" = "mode";
|
||||
"on-scroll-up" = "shift_up";
|
||||
"on-scroll-down" = "shift_down";
|
||||
};
|
||||
|
||||
"tooltip-format" = "<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
|
||||
actions = {
|
||||
"on-click-right" = "mode";
|
||||
"on-scroll-up" = "shift_up";
|
||||
"on-scroll-down" = "shift_down";
|
||||
backlight = {
|
||||
device = "intel_backlight";
|
||||
format = "{icon} {percent}%";
|
||||
"format-icons" = [ "☼" "☼" "☀" "☀" ];
|
||||
interval = 60;
|
||||
};
|
||||
|
||||
"tooltip-format" = "<tt><small>{calendar}</small></tt>";
|
||||
};
|
||||
|
||||
backlight = {
|
||||
device = "intel_backlight";
|
||||
format = "{icon} {percent}%";
|
||||
"format-icons" = [ "☼" "☼" "☀" "☀" ];
|
||||
interval = 60;
|
||||
};
|
||||
|
||||
temperature = {
|
||||
"hwmon-path" = [ "/sys/class/hwmon/hwmon3/temp1_input" ];
|
||||
"critical-threshold" = 70;
|
||||
format = "";
|
||||
"format-critical" = " {temperatureC}°C";
|
||||
};
|
||||
|
||||
battery = {
|
||||
bat = "BAT0";
|
||||
states = {
|
||||
full = 99;
|
||||
good = 80;
|
||||
normal = 50;
|
||||
warning = 30;
|
||||
critical = 10;
|
||||
temperature = {
|
||||
"hwmon-path" = [ "/sys/class/hwmon/hwmon3/temp1_input" ];
|
||||
"critical-threshold" = 70;
|
||||
format = "";
|
||||
"format-critical" = " {temperatureC}°C";
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
"format-charging" = " {capacity}%";
|
||||
"format-icons" = [ "" "" "" "" "" ];
|
||||
interval = 30;
|
||||
};
|
||||
|
||||
network = {
|
||||
"format-wifi" = "";
|
||||
"format-ethernet" = "";
|
||||
"format-disconnected" = "";
|
||||
"tooltip-format-wifi" =
|
||||
"{ifname} / {essid}\n\n {ipaddr}\n\n {signalStrength}% / {frequency}\n\n {bandwidthUpBits} / {bandwidthDownBits}";
|
||||
"tooltip-format-ethernet" =
|
||||
"{ifname} / {gwaddr}\n\n {ipaddr}\n\n {bandwidthUpBits} / {bandwidthDownBits}";
|
||||
"tooltip-format-disconnected" = "Disconnected";
|
||||
interval = 5;
|
||||
"on-click" = "kitty nmtui";
|
||||
};
|
||||
battery = {
|
||||
bat = "BAT0";
|
||||
states = {
|
||||
full = 99;
|
||||
good = 80;
|
||||
normal = 50;
|
||||
warning = 30;
|
||||
critical = 10;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
"format-charging" = " {capacity}%";
|
||||
"format-icons" = [ "" "" "" "" "" ];
|
||||
interval = 30;
|
||||
};
|
||||
|
||||
wireplumber = {
|
||||
format = " {volume}%";
|
||||
"format-muted" = " Mute";
|
||||
"max-volume" = 150;
|
||||
"on-scroll-up" = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 1%+";
|
||||
"on-scroll-down" = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-";
|
||||
"on-click-right" = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"on-click" = "kitty pulsemixer";
|
||||
};
|
||||
network = {
|
||||
"format-wifi" = "";
|
||||
"format-ethernet" = "";
|
||||
"format-disconnected" = "";
|
||||
"tooltip-format-wifi" =
|
||||
"{ifname} / {essid}\n\n {ipaddr}\n\n {signalStrength}% / {frequency}\n\n {bandwidthUpBits} / {bandwidthDownBits}";
|
||||
"tooltip-format-ethernet" =
|
||||
"{ifname} / {gwaddr}\n\n {ipaddr}\n\n {bandwidthUpBits} / {bandwidthDownBits}";
|
||||
"tooltip-format-disconnected" = "Disconnected";
|
||||
interval = 5;
|
||||
"on-click" = "kitty nmtui";
|
||||
};
|
||||
|
||||
bluetooth = {
|
||||
"format-on" = "";
|
||||
"format-off" = "";
|
||||
"format-connected" = " {device_alias}";
|
||||
"format-connected-battery" = " {device_alias} ({device_battery_percentage}%)";
|
||||
"tooltip-format-off" = "Controller Powered Off";
|
||||
"tooltip-format" =
|
||||
"{controller_alias}\t{controller_address}\n\n{num_connections} connected";
|
||||
"tooltip-format-connected" =
|
||||
"{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
|
||||
"tooltip-format-enumerate-connected" =
|
||||
"{device_alias}\t{device_address}";
|
||||
"tooltip-format-enumerate-connected-battery" =
|
||||
"{device_alias}\t{device_address}\t{device_battery_percentage}%";
|
||||
"on-click" = "kitty bluetuith --no-warning";
|
||||
"on-click-right" =
|
||||
"if bluetoothctl show|grep -q 'Powered: yes';then bluetoothctl power off;else bluetoothctl power on;fi";
|
||||
};
|
||||
wireplumber = {
|
||||
format = " {volume}%";
|
||||
"format-muted" = " Mute";
|
||||
"max-volume" = 150;
|
||||
"on-scroll-up" = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 1%+";
|
||||
"on-scroll-down" = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-";
|
||||
"on-click-right" = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"on-click" = "kitty pulsemixer";
|
||||
};
|
||||
|
||||
idle_inhibitor = {
|
||||
what = "idle";
|
||||
format = "{icon}";
|
||||
"format-icons" = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
bluetooth = {
|
||||
"format-on" = "";
|
||||
"format-off" = "";
|
||||
"format-connected" = " {device_alias}";
|
||||
"format-connected-battery" = " {device_alias} ({device_battery_percentage}%)";
|
||||
"tooltip-format-off" = "Controller Powered Off";
|
||||
"tooltip-format" =
|
||||
"{controller_alias}\t{controller_address}\n\n{num_connections} connected";
|
||||
"tooltip-format-connected" =
|
||||
"{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
|
||||
"tooltip-format-enumerate-connected" =
|
||||
"{device_alias}\t{device_address}";
|
||||
"tooltip-format-enumerate-connected-battery" =
|
||||
"{device_alias}\t{device_address}\t{device_battery_percentage}%";
|
||||
"on-click" = "kitty bluetuith --no-warning";
|
||||
"on-click-right" =
|
||||
"if bluetoothctl show|grep -q 'Powered: yes';then bluetoothctl power off;else bluetoothctl power on;fi";
|
||||
};
|
||||
|
||||
idle_inhibitor = {
|
||||
what = "idle";
|
||||
format = "{icon}";
|
||||
"format-icons" = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
font-family: "UbuntuMono Nerd Font";
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
border-radius: 9px;
|
||||
background-color: rgba(50, 50, 50, 0.5);
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
border-radius: 9px;
|
||||
background-color: rgba(50, 50, 50, 0.5);
|
||||
padding: 0px 5px 0px 0px;
|
||||
}
|
||||
|
||||
/* --- window bar --- */
|
||||
|
||||
/* window title bar */
|
||||
window#waybar {
|
||||
border-radius: 9px;
|
||||
background-color: rgba(47, 23, 48, 0.70);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* hide window title when empty*/
|
||||
window#waybar.empty #window {
|
||||
background-color: transparent;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
/* change title bar background color when empty */
|
||||
window#waybar.empty {
|
||||
background-color: rgba(47, 23, 48, 0.70);
|
||||
}
|
||||
|
||||
/* --- left modules --- */
|
||||
|
||||
/* workspace buttons */
|
||||
#workspaces button {
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
padding: 0px 11px 0px 11px;
|
||||
min-width: 1px;
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
background: rgba(50, 50, 50, 0.55);
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
#workspaces button.active,
|
||||
#workspaces button.visible {
|
||||
padding: 0px 11px 0px 11px;
|
||||
background-color: rgba(50, 50, 50, 0.55);
|
||||
color: #e2c7c7;
|
||||
}
|
||||
|
||||
/* --- right modules --- */
|
||||
|
||||
#tray {
|
||||
margin: 0px 10px 0px 5px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin: 0px 3px 0px 13px;
|
||||
}
|
||||
|
||||
#idle_inhibitor,
|
||||
#network,
|
||||
#bluetooth,
|
||||
#battery,
|
||||
#wireplumber,
|
||||
#backlight,
|
||||
#temperature {
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
padding: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
|
||||
#bluetooth {
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
padding: 0px 4px 0px 10px;
|
||||
}
|
||||
|
||||
/* --- indicators --- */
|
||||
|
||||
/* blink red */
|
||||
#temperature.critical,
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: transparent;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.75s;
|
||||
animation-timing-function: steps(12);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
/* turn red */
|
||||
#network.disconnected,
|
||||
#wireplumber.muted,
|
||||
#bluetooth.off {
|
||||
color: #ff5555;
|
||||
}
|
||||
|
||||
/* --- animations --- */
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: transparent;
|
||||
color: #ff5555;
|
||||
}
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
font-family: "UbuntuMono Nerd Font";
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
border-radius: 9px;
|
||||
background-color: rgba(50, 50, 50, 0.5);
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
border-radius: 9px;
|
||||
background-color: rgba(50, 50, 50, 0.5);
|
||||
padding: 0px 5px 0px 0px;
|
||||
}
|
||||
|
||||
/* --- window bar --- */
|
||||
|
||||
/* window title bar */
|
||||
window#waybar {
|
||||
border-radius: 9px;
|
||||
background-color: rgba(47, 23, 48, 0.70);
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* hide window title when empty*/
|
||||
window#waybar.empty #window {
|
||||
background-color: transparent;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
/* change title bar background color when empty */
|
||||
window#waybar.empty {
|
||||
background-color: rgba(47, 23, 48, 0.70);
|
||||
}
|
||||
|
||||
/* --- left modules --- */
|
||||
|
||||
/* workspace buttons */
|
||||
#workspaces button {
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
padding: 0px 11px 0px 11px;
|
||||
min-width: 1px;
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
background: rgba(50, 50, 50, 0.55);
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
#workspaces button.active,
|
||||
#workspaces button.visible {
|
||||
padding: 0px 11px 0px 11px;
|
||||
background-color: rgba(50, 50, 50, 0.55);
|
||||
color: #e2c7c7;
|
||||
}
|
||||
|
||||
/* --- right modules --- */
|
||||
|
||||
#tray {
|
||||
margin: 0px 10px 0px 5px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin: 0px 3px 0px 13px;
|
||||
}
|
||||
|
||||
#idle_inhibitor,
|
||||
#network,
|
||||
#bluetooth,
|
||||
#battery,
|
||||
#wireplumber,
|
||||
#backlight,
|
||||
#temperature {
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
padding: 0px 10px 0px 10px;
|
||||
}
|
||||
|
||||
|
||||
#bluetooth {
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
padding: 0px 4px 0px 10px;
|
||||
}
|
||||
|
||||
/* --- indicators --- */
|
||||
|
||||
/* blink red */
|
||||
#temperature.critical,
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: transparent;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.75s;
|
||||
animation-timing-function: steps(12);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
/* turn red */
|
||||
#network.disconnected,
|
||||
#wireplumber.muted,
|
||||
#bluetooth.off {
|
||||
color: #ff5555;
|
||||
}
|
||||
|
||||
/* --- animations --- */
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: transparent;
|
||||
color: #ff5555;
|
||||
}
|
||||
}
|
||||
|
||||
'';
|
||||
# install it to userspace
|
||||
home.packages = with pkgs; [
|
||||
pulsemixer
|
||||
brightnessctl
|
||||
bluetuith
|
||||
bluez
|
||||
nerd-fonts.ubuntu
|
||||
nerd-fonts.ubuntu-mono
|
||||
];
|
||||
};
|
||||
|
||||
# install it to userspace
|
||||
home.packages = with pkgs; [
|
||||
pulsemixer
|
||||
brightnessctl
|
||||
bluetuith
|
||||
bluez
|
||||
nerd-fonts.ubuntu
|
||||
nerd-fonts.ubuntu-mono
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,35 +1,49 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [xdg-ninja];
|
||||
}:
|
||||
let
|
||||
program = "xdg";
|
||||
cfg = config.dots.${program};
|
||||
#sec = sops.secrets;
|
||||
in {
|
||||
|
||||
xdg = if pkgs.system == "x86_64-darwin" then {} else {
|
||||
enable = true;
|
||||
configHome = "/home/blake/.config";
|
||||
cacheHome = "/home/blake/.cache";
|
||||
dataHome = "/home/blake/.local/share";
|
||||
stateHome = "/home/blake/.local/state";
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
|
||||
userDirs = {
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
home.packages = with pkgs; [xdg-ninja];
|
||||
|
||||
xdg = if pkgs.system == "x86_64-darwin" then {} else {
|
||||
enable = true;
|
||||
# writes ~/.config/user-dirs.dirs
|
||||
desktop = "/home/blake/desktop";
|
||||
download = "/home/blake/downloads";
|
||||
documents = "/home/blake/documents";
|
||||
pictures = "/home/blake/pictures";
|
||||
videos = "/home/blake/videos";
|
||||
music = "/home/blake/music";
|
||||
publicShare = "/home/blake/public";
|
||||
templates = "/home/blake/templates";
|
||||
configHome = "/home/blake/.config";
|
||||
cacheHome = "/home/blake/.cache";
|
||||
dataHome = "/home/blake/.local/share";
|
||||
stateHome = "/home/blake/.local/state";
|
||||
|
||||
userDirs = {
|
||||
enable = true;
|
||||
# writes ~/.config/user-dirs.dirs
|
||||
desktop = "/home/blake/desktop";
|
||||
download = "/home/blake/downloads";
|
||||
documents = "/home/blake/documents";
|
||||
pictures = "/home/blake/pictures";
|
||||
videos = "/home/blake/videos";
|
||||
music = "/home/blake/music";
|
||||
publicShare = "/home/blake/public";
|
||||
templates = "/home/blake/templates";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# misc env variables to get things out of ~ (<3 xdg-ninja)
|
||||
home.sessionVariables = if pkgs.system == "x86_64-darwin" then {} else {
|
||||
GOPATH="$XDG_DATA_HOME/go";
|
||||
_JAVA_OPTIONS=''-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java'';
|
||||
};
|
||||
# misc env variables to get things out of ~ (<3 xdg-ninja)
|
||||
home.sessionVariables = if pkgs.system == "x86_64-darwin" then {} else {
|
||||
GOPATH="$XDG_DATA_HOME/go";
|
||||
_JAVA_OPTIONS=''-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,145 +1,159 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
# export some defaults
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
PAGER = "less";
|
||||
}:
|
||||
let
|
||||
program = "zsh";
|
||||
cfg = config.dots.${program};
|
||||
#sec = sops.secrets;
|
||||
in {
|
||||
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# export some defaults
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
PAGER = "less";
|
||||
};
|
||||
|
||||
autosuggestion = {
|
||||
programs.${program} = {
|
||||
enable = true;
|
||||
highlight = "underline";
|
||||
};
|
||||
dotDir = ".config/zsh";
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
save = 10000;
|
||||
share = true;
|
||||
append = true;
|
||||
extended = true;
|
||||
path = "$XDG_STATE_HOME/zsh/history";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
# --- zsh ---
|
||||
cfz = "nvim $HOME/.config/zsh/.zshrc";
|
||||
src = "source $HOME/.config/zsh/.zshrc";
|
||||
|
||||
# --- config editing ---
|
||||
cfh = "nvim $HOME/.config/hypr/hyprland.conf";
|
||||
cfl = "nvim $HOME/.config/lf/lfrc";
|
||||
|
||||
# --- navigation ---
|
||||
ls = "ls --color=auto --group-directories-first";
|
||||
ll = "ls -lh --color=auto --group-directories-first";
|
||||
la = "ls -Alh --color=auto --group-directories-first";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
fs = "du -h | sort -h";
|
||||
ds = "du -hs";
|
||||
|
||||
# --- shortcuts ---
|
||||
vswap = "cd ~/.local/state/nvim/swap";
|
||||
rswap = "rm ~/.local/state/nvim/swap/*";
|
||||
v = "nvim";
|
||||
sv = "sudo nvim";
|
||||
vim = "nvim";
|
||||
|
||||
# --- safety ---
|
||||
cp = "cp -iv";
|
||||
mv = "mv -iv";
|
||||
rm = "rm -Iv";
|
||||
|
||||
# --- colors ---
|
||||
grep = "grep --color=auto";
|
||||
fgrep = "fgrep --color=auto";
|
||||
egrep = "egrep --color=auto";
|
||||
|
||||
# --- scripts ---
|
||||
rebuild = "sh ~/.nix/bin/rebuild.sh";
|
||||
perms = "sudo sh ~/.nix/bin/perms.sh";
|
||||
bb = "sudo sh ~/.nix/bin/lf_borg.sh";
|
||||
|
||||
# --- git ---
|
||||
status = "git status";
|
||||
add = "git add";
|
||||
commit = "git commit -am";
|
||||
push = "git push";
|
||||
pull = "git pull";
|
||||
dotfiles = "/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME";
|
||||
dtf = "/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME";
|
||||
sec = "sops ~/.nix/secrets/secrets.yaml";
|
||||
|
||||
# --- systemd ---
|
||||
stat = "sudo systemctl status";
|
||||
restart = "sudo systemctl restart";
|
||||
start = "sudo systemctl start";
|
||||
stop = "sudo systemctl stop";
|
||||
jou = "sudo journalctl -xeu";
|
||||
live = "sudo journalctl -o short-iso -n 50 -fu";
|
||||
|
||||
# --- system ---
|
||||
peace = "systemctl poweroff";
|
||||
love = "systemctl reboot";
|
||||
lock = "loginctl lock-session";
|
||||
};
|
||||
|
||||
initContent = ''
|
||||
|
||||
# the prompt
|
||||
PS1='%F{0}%K{126}%B[%n@%m]%b%k%f:%F{015}%B[%~]%b%f%F{015}%S$%s%f '
|
||||
|
||||
# lf changes working dir on exit
|
||||
alias lf='lfcd'
|
||||
lfcd () {cd "$(command lf -print-last-dir "$@")"}
|
||||
|
||||
'';
|
||||
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
highlighters = ["main" "brackets" "pattern" "regexp" "cursor" "root"];
|
||||
styles = {
|
||||
"default" = "none";
|
||||
"unknown-token" = "fg=red";
|
||||
"reserved-word" = "fg=red";
|
||||
"alias" = "fg=cyan,underline";
|
||||
"suffix-alias" = "fg=cyan,underline";
|
||||
"builtin" = "fg=cyan";
|
||||
"function" = "fg=cyan";
|
||||
"command" = "fg=cyan,bold";
|
||||
"path" = "fg=cyan,underline";
|
||||
"precommand" = "fg=cyan,underline";
|
||||
"commandseparator" = "fg=white";
|
||||
"globbing" = "fg=white";
|
||||
"history-expansion" = "fg=white";
|
||||
"hashed-command" = "fg=magenta";
|
||||
"single-hyphen-option" = "fg=blue";
|
||||
"double-hyphen-option" = "fg=blue";
|
||||
"back-quoted-argument" = "fg=yellow";
|
||||
"single-quoted-argument" = "fg=white";
|
||||
"double-quoted-argument" = "fg=white";
|
||||
"dollar-double-quoted-argument" = "fg=blue";
|
||||
"back-double-quoted-argument" = "fg=blue";
|
||||
autosuggestion = {
|
||||
enable = true;
|
||||
highlight = "underline";
|
||||
};
|
||||
};
|
||||
|
||||
# zplug = {
|
||||
# enable = true;
|
||||
# zplugHome = "$XDG_STATE_HOME/zsh/zplug";
|
||||
# plugins = [
|
||||
# {name = "zsh-users/zsh-syntax-highlighting";}
|
||||
# ];
|
||||
# };
|
||||
history = {
|
||||
size = 10000;
|
||||
save = 10000;
|
||||
share = true;
|
||||
append = true;
|
||||
extended = true;
|
||||
path = "$XDG_STATE_HOME/zsh/history";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
# --- zsh ---
|
||||
cfz = "nvim $HOME/.config/zsh/.zshrc";
|
||||
src = "source $HOME/.config/zsh/.zshrc";
|
||||
|
||||
# --- config editing ---
|
||||
cfh = "nvim $HOME/.config/hypr/hyprland.conf";
|
||||
cfl = "nvim $HOME/.config/lf/lfrc";
|
||||
|
||||
# --- navigation ---
|
||||
ls = "ls --color=auto --group-directories-first";
|
||||
ll = "ls -lh --color=auto --group-directories-first";
|
||||
la = "ls -Alh --color=auto --group-directories-first";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
fs = "du -h | sort -h";
|
||||
ds = "du -hs";
|
||||
|
||||
# --- shortcuts ---
|
||||
vswap = "cd ~/.local/state/nvim/swap";
|
||||
rswap = "rm ~/.local/state/nvim/swap/*";
|
||||
v = "nvim";
|
||||
sv = "sudo nvim";
|
||||
vim = "nvim";
|
||||
|
||||
# --- safety ---
|
||||
cp = "cp -iv";
|
||||
mv = "mv -iv";
|
||||
rm = "rm -Iv";
|
||||
|
||||
# --- colors ---
|
||||
grep = "grep --color=auto";
|
||||
fgrep = "fgrep --color=auto";
|
||||
egrep = "egrep --color=auto";
|
||||
|
||||
# --- scripts ---
|
||||
rebuild = "sh ~/.nix/bin/rebuild.sh";
|
||||
perms = "sudo sh ~/.nix/bin/perms.sh";
|
||||
bb = "sudo sh ~/.nix/bin/lf_borg.sh";
|
||||
|
||||
# --- git ---
|
||||
status = "git status";
|
||||
add = "git add";
|
||||
commit = "git commit -am";
|
||||
push = "git push";
|
||||
pull = "git pull";
|
||||
dotfiles = "/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME";
|
||||
dtf = "/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME";
|
||||
sec = "sops ~/.nix/secrets/secrets.yaml";
|
||||
|
||||
# --- systemd ---
|
||||
stat = "sudo systemctl status";
|
||||
restart = "sudo systemctl restart";
|
||||
start = "sudo systemctl start";
|
||||
stop = "sudo systemctl stop";
|
||||
jou = "sudo journalctl -xeu";
|
||||
live = "sudo journalctl -o short-iso -n 50 -fu";
|
||||
|
||||
# --- system ---
|
||||
peace = "systemctl poweroff";
|
||||
love = "systemctl reboot";
|
||||
lock = "loginctl lock-session";
|
||||
};
|
||||
|
||||
initContent = ''
|
||||
|
||||
# the prompt
|
||||
PS1='%F{0}%K{126}%B[%n@%m]%b%k%f:%F{015}%B[%~]%b%f%F{015}%S$%s%f '
|
||||
|
||||
# lf changes working dir on exit
|
||||
alias lf='lfcd'
|
||||
lfcd () {cd "$(command lf -print-last-dir "$@")"}
|
||||
|
||||
'';
|
||||
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
highlighters = ["main" "brackets" "pattern" "regexp" "cursor" "root"];
|
||||
styles = {
|
||||
"default" = "none";
|
||||
"unknown-token" = "fg=red";
|
||||
"reserved-word" = "fg=red";
|
||||
"alias" = "fg=cyan,underline";
|
||||
"suffix-alias" = "fg=cyan,underline";
|
||||
"builtin" = "fg=cyan";
|
||||
"function" = "fg=cyan";
|
||||
"command" = "fg=cyan,bold";
|
||||
"path" = "fg=cyan,underline";
|
||||
"precommand" = "fg=cyan,underline";
|
||||
"commandseparator" = "fg=white";
|
||||
"globbing" = "fg=white";
|
||||
"history-expansion" = "fg=white";
|
||||
"hashed-command" = "fg=magenta";
|
||||
"single-hyphen-option" = "fg=blue";
|
||||
"double-hyphen-option" = "fg=blue";
|
||||
"back-quoted-argument" = "fg=yellow";
|
||||
"single-quoted-argument" = "fg=white";
|
||||
"double-quoted-argument" = "fg=white";
|
||||
"dollar-double-quoted-argument" = "fg=blue";
|
||||
"back-double-quoted-argument" = "fg=blue";
|
||||
};
|
||||
};
|
||||
|
||||
# zplug = {
|
||||
# enable = true;
|
||||
# zplugHome = "$XDG_STATE_HOME/zsh/zplug";
|
||||
# plugins = [
|
||||
# {name = "zsh-users/zsh-syntax-highlighting";}
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
# rid the world of ~/.zshenv
|
||||
#home.file.".zshenv".enable = false;
|
||||
};
|
||||
# rid the world of ~/.zshenv
|
||||
#home.file.".zshenv".enable = false;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,15 @@
|
||||
lf.enable = true;
|
||||
kitty.enable = true;
|
||||
librewolf.enable = true;
|
||||
waybar.enable = true;
|
||||
hypr.enable = true;
|
||||
nvf.enable = true;
|
||||
zsh.enable = true;
|
||||
ssh.enable = true;
|
||||
gpg.enable = true;
|
||||
git.enable = true;
|
||||
xdg.enable = true;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user