Restructure repo
This commit is contained in:
80
modules/home-manager/accounts/calendar.nix
Normal file
80
modules/home-manager/accounts/calendar.nix
Normal file
@@ -0,0 +1,80 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.pimsync.enable = true;
|
||||
services.pimsync.enable = true;
|
||||
|
||||
accounts.calendar = {
|
||||
basePath = "${config.xdg.dataHome}/calendars";
|
||||
accounts = {
|
||||
"radicale" = {
|
||||
primary = true;
|
||||
primaryCollection = "personal";
|
||||
|
||||
local = {
|
||||
type = "filesystem";
|
||||
fileExt = ".ics";
|
||||
};
|
||||
|
||||
remote = {
|
||||
url = "https://radicale.jelles.net/";
|
||||
type = "caldav";
|
||||
userName = "kiri";
|
||||
# TODO: Bitwarden
|
||||
passwordCommand = [
|
||||
"${pkgs.coreutils}/bin/cat"
|
||||
config.sops.secrets.radicale_pass.path
|
||||
];
|
||||
};
|
||||
|
||||
pimsync = {
|
||||
enable = true;
|
||||
extraPairDirectives = [
|
||||
{
|
||||
name = "collections";
|
||||
params = [ "from b" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
"university" = {
|
||||
remote = {
|
||||
type = "http";
|
||||
};
|
||||
|
||||
local = {
|
||||
type = "filesystem";
|
||||
fileExt = ".ics";
|
||||
};
|
||||
|
||||
pimsync = {
|
||||
enable = true;
|
||||
|
||||
extraRemoteStorageDirectives = [
|
||||
{
|
||||
name = "collection_id";
|
||||
params = [ "events" ];
|
||||
}
|
||||
{
|
||||
name = "url";
|
||||
children = [
|
||||
{
|
||||
name = "cmd";
|
||||
params = [
|
||||
"${pkgs.coreutils}/bin/cat"
|
||||
config.sops.secrets.university_calendar_url.path
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
extraPairDirectives = [
|
||||
{
|
||||
name = "collection";
|
||||
params = [ "events" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/home-manager/accounts/default.nix
Normal file
6
modules/home-manager/accounts/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./email.nix
|
||||
./calendar.nix
|
||||
];
|
||||
}
|
||||
87
modules/home-manager/accounts/email.nix
Normal file
87
modules/home-manager/accounts/email.nix
Normal file
@@ -0,0 +1,87 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
# Global enablement
|
||||
programs.mbsync.enable = true;
|
||||
programs.msmtp.enable = true;
|
||||
programs.notmuch.enable = true;
|
||||
services.mbsync.enable = true;
|
||||
|
||||
accounts.email.maildirBasePath = "${config.xdg.dataHome}/mail";
|
||||
|
||||
accounts.email.accounts = {
|
||||
main = {
|
||||
enable = true;
|
||||
primary = true;
|
||||
address = "mail@jelles.net";
|
||||
imap = {
|
||||
authentication = "plain";
|
||||
host = "taylor.mxrouting.net";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
realName = "Jelle Spreeuwenberg";
|
||||
smtp = {
|
||||
authentication = "plain";
|
||||
host = "taylor.mxrouting.net";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
userName = "mail@jelles.net";
|
||||
passwordCommand = "rbw get \"Main E-Mail\"";
|
||||
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
patterns = [ "*" ];
|
||||
};
|
||||
msmtp.enable = true;
|
||||
notmuch.enable = true;
|
||||
};
|
||||
|
||||
old = {
|
||||
enable = true;
|
||||
address = "mail@jellespreeuwenberg.nl";
|
||||
imap = {
|
||||
authentication = "plain";
|
||||
host = "taylor.mxrouting.net";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
realName = "Jelle Spreeuwenberg";
|
||||
smtp = {
|
||||
authentication = "plain";
|
||||
host = "taylor.mxrouting.net";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
userName = "mail@jellespreeuwenberg.nl";
|
||||
passwordCommand = "rbw get \"Old E-Mail\"";
|
||||
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
patterns = [ "*" ];
|
||||
};
|
||||
msmtp.enable = true;
|
||||
notmuch.enable = true;
|
||||
};
|
||||
|
||||
uni = {
|
||||
enable = true;
|
||||
flavor = "outlook.office365.com";
|
||||
address = "j.spreeuwenberg@student.tue.nl";
|
||||
realName = "Jelle Spreeuwenberg";
|
||||
userName = "j.spreeuwenberg@student.tue.nl";
|
||||
};
|
||||
|
||||
work = {
|
||||
enable = true;
|
||||
flavor = "outlook.office365.com";
|
||||
address = "jelle.spreeuwenberg@yookr.org";
|
||||
realName = "Jelle Spreeuwenberg";
|
||||
userName = "jelle.spreeuwenberg@yookr.org";
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/home-manager/aerc.nix
Normal file
23
modules/home-manager/aerc.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.aerc = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
general.unsafe-accounts-conf = true;
|
||||
filters = {
|
||||
"text/html" = "${pkgs.w3m}/bin/w3m -I UTF-8 -T text/html";
|
||||
"text/ical" = "${pkgs.bat}/bin/bat -fP --style=plain --language=ical";
|
||||
"text/*" = "${pkgs.bat}/bin/bat -fP --style=plain";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
accounts.email.accounts = {
|
||||
main = {
|
||||
aerc.enable = true;
|
||||
};
|
||||
old = {
|
||||
aerc.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
11
modules/home-manager/bitwarden.nix
Normal file
11
modules/home-manager/bitwarden.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.rbw = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base_url = "https://vault.jelles.net";
|
||||
email = "mail@jelles.net";
|
||||
pinentry = pkgs.pinentry-gnome3;
|
||||
};
|
||||
};
|
||||
}
|
||||
7
modules/home-manager/direnv.nix
Normal file
7
modules/home-manager/direnv.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
7
modules/home-manager/discord.nix
Normal file
7
modules/home-manager/discord.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
# Discord is a popular chat application.
|
||||
{ inputs, ... }:
|
||||
{
|
||||
programs.discord = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
23
modules/home-manager/ghostty.nix
Normal file
23
modules/home-manager/ghostty.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
installVimSyntax = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
font-feature = "-calt, -liga, -dlig";
|
||||
window-padding-x = 10;
|
||||
window-padding-y = 10;
|
||||
keybind = [
|
||||
"ctrl+j=goto_split:left"
|
||||
"ctrl+i=goto_split:up"
|
||||
"ctrl+k=goto_split:down"
|
||||
"ctrl+l=goto_split:right"
|
||||
"shift+ctrl+j=new_split:left"
|
||||
"shift+ctrl+i=new_split:up"
|
||||
"shift+ctrl+k=new_split:down"
|
||||
"shift+ctrl+l=new_split:right"
|
||||
"shift+ctrl+tab=new_tab"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
55
modules/home-manager/git.nix
Normal file
55
modules/home-manager/git.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
# Git configuration
|
||||
{config, ...}: let
|
||||
username = config.var.git.username;
|
||||
email = config.var.git.email;
|
||||
in {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
ignores = [
|
||||
".cache/"
|
||||
".DS_Store"
|
||||
".idea/"
|
||||
"*.swp"
|
||||
"*.elc"
|
||||
"auto-save-list"
|
||||
".direnv/"
|
||||
"node_modules"
|
||||
"result"
|
||||
"result-*"
|
||||
];
|
||||
settings = {
|
||||
user.name = username;
|
||||
user.email = email;
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = "false";
|
||||
push.autoSetupRemote = true;
|
||||
color.ui = "1";
|
||||
alias = {
|
||||
essa = "push --force";
|
||||
co = "checkout";
|
||||
fuck = "commit --amend -m";
|
||||
c = "commit -m";
|
||||
ca = "commit -am";
|
||||
forgor = "commit --amend --no-edit";
|
||||
graph = "log --all --decorate --graph --oneline";
|
||||
oops = "checkout --";
|
||||
l = "log";
|
||||
r = "rebase";
|
||||
s = "status --short";
|
||||
ss = "status";
|
||||
d = "diff";
|
||||
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)";
|
||||
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)";
|
||||
af = "!git add $(git ls-files -m -o --exclude-standard | sk -m)";
|
||||
st = "status";
|
||||
br = "branch";
|
||||
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}";
|
||||
hist = ''
|
||||
log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
|
||||
llog = ''
|
||||
log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative'';
|
||||
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/home-manager/gpg.nix
Normal file
20
modules/home-manager/gpg.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
homedir = "${config.xdg.dataHome}/gnupg";
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
enableZshIntegration = true;
|
||||
pinentry = {
|
||||
package = pkgs.pinentry-gnome3;
|
||||
};
|
||||
sshKeys = ["CD848796822630B280FC6DFA55F24A20040F22B5"];
|
||||
};
|
||||
}
|
||||
52
modules/home-manager/hyprland/animations.nix
Normal file
52
modules/home-manager/hyprland/animations.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{config, ...}: let
|
||||
animationSpeed = config.theme.animation-speed;
|
||||
|
||||
animationDuration =
|
||||
if animationSpeed == "slow"
|
||||
then "4"
|
||||
else if animationSpeed == "medium"
|
||||
then "2.5"
|
||||
else "1.5";
|
||||
borderDuration =
|
||||
if animationSpeed == "slow"
|
||||
then "10"
|
||||
else if animationSpeed == "medium"
|
||||
then "6"
|
||||
else "3";
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"linear, 0, 0, 1, 1"
|
||||
"md3_standard, 0.2, 0, 0, 1"
|
||||
"md3_decel, 0.05, 0.7, 0.1, 1"
|
||||
"md3_accel, 0.3, 0, 0.8, 0.15"
|
||||
"overshot, 0.05, 0.9, 0.1, 1.1"
|
||||
"crazyshot, 0.1, 1.5, 0.76, 0.92"
|
||||
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
|
||||
"menu_decel, 0.1, 1, 0, 1"
|
||||
"menu_accel, 0.38, 0.04, 1, 0.07"
|
||||
"easeInOutCirc, 0.85, 0, 0.15, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutExpo, 0.16, 1, 0.3, 1"
|
||||
"softAcDecel, 0.26, 0.26, 0.15, 1"
|
||||
"md2, 0.4, 0, 0.2, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windows, 1, ${animationDuration}, md3_decel, popin 60%"
|
||||
"windowsIn, 1, ${animationDuration}, md3_decel, popin 60%"
|
||||
"windowsOut, 1, ${animationDuration}, md3_accel, popin 60%"
|
||||
"border, 1, ${borderDuration}, default"
|
||||
"fade, 1, ${animationDuration}, md3_decel"
|
||||
"layersIn, 1, ${animationDuration}, menu_decel, slide"
|
||||
"layersOut, 1, ${animationDuration}, menu_accel"
|
||||
"fadeLayersIn, 1, ${animationDuration}, menu_decel"
|
||||
"fadeLayersOut, 1, ${animationDuration}, menu_accel"
|
||||
"workspaces, 1, ${animationDuration}, menu_decel, slide"
|
||||
"specialWorkspace, 1, ${animationDuration}, md3_decel, slidevert"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
75
modules/home-manager/hyprland/bindings.nix
Normal file
75
modules/home-manager/hyprland/bindings.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [
|
||||
"$mod, return, exec, uwsm app -- ${pkgs.kitty}/bin/kitty" # Ghostty (terminal)
|
||||
#"$mod,E, exec, uwsm app -- ${pkgs.xfce.thunar}/bin/thunar" # Thunar
|
||||
"$mod, b, exec, uwsm app -- ${pkgs.brave}/bin/brave" # Brave Browser
|
||||
"$mod, m, exec, uwsm app -- ${pkgs.thunderbird}/bin/thunderbird" # Proton Mail
|
||||
#"$mod,L, exec, uwsm app -- ${pkgs.hyprlock}/bin/hyprlock" # Lock
|
||||
"$mod, space, exec, vicinae toggle" # Launcher FIXME: broken
|
||||
#"$mod,X, exec, powermenu" # Powermenu
|
||||
#"$mod, space, exec, menu" # Launcher
|
||||
|
||||
"$shiftMod, space, exec, hyprfocus-toggle" # Toggle HyprFocus
|
||||
|
||||
"$mod, q, killactive," # Close window
|
||||
"$mod, t, togglefloating," # Toggle Floating
|
||||
"$mod, f, fullscreen" # Toggle Fullscreen
|
||||
|
||||
"$mod, j, layoutmsg, cyclenext" # Move focus Down
|
||||
"$mod, k, layoutmsg, cycleprev" # Move focus Up
|
||||
"$altMod, j, layoutmsg, swapnext" # Move focus Down
|
||||
"$altMod, k, layoutmsg, swapprev" # Move focus Up
|
||||
|
||||
"$mod, x, focusmonitor, +1" # Focus next monitor
|
||||
"$altMod, x, movewindow, mon:+1"
|
||||
"$altMod, h, layoutmsg, addmaster" # Add to master
|
||||
"$altMod, l, layoutmsg, removemaster" # Remove from master
|
||||
|
||||
"$mod, print, exec, screenshot region" # Screenshot region
|
||||
", PRINT, exec, screenshot monitor" # Screenshot monitor
|
||||
|
||||
"$mod, w, workspace, 1"
|
||||
"$mod, e, workspace, 2"
|
||||
"$mod, r, workspace, 3"
|
||||
"$mod, i, workspace, 11"
|
||||
"$mod, o, workspace, 12"
|
||||
"$mod, p, workspace, 13"
|
||||
|
||||
"$altMod, w, movetoworkspace, 1"
|
||||
"$altMod, e, movetoworkspace, 2"
|
||||
"$altMod, r, movetoworkspace, 3"
|
||||
"$altMod, i, movetoworkspace, 11"
|
||||
"$altMod, o, movetoworkspace, 12"
|
||||
"$altMod, p, movetoworkspace, 13"
|
||||
|
||||
"$mod, z, togglespecialworkspace, scratchpad"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow" # Move Window (mouse)
|
||||
"$mod, mouse:274, resizewindow" # Resize Window (mouse)
|
||||
];
|
||||
|
||||
binde = [
|
||||
"$mod, h, layoutmsg, mfact -0.01" # Move focus left
|
||||
"$mod, l, layoutmsg, mfact +0.01" # Move focus Right
|
||||
];
|
||||
|
||||
bindl = [
|
||||
",XF86AudioMute, exec, sound-toggle" # Toggle Mute
|
||||
",XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause" # Play/Pause Song
|
||||
",XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next" # Next Song
|
||||
",XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous" # Previous Song
|
||||
",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock when closing Lid
|
||||
];
|
||||
|
||||
bindle = [
|
||||
",XF86AudioRaiseVolume, exec, sound-up" # Sound Up
|
||||
",XF86AudioLowerVolume, exec, sound-down" # Sound Down
|
||||
",XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
|
||||
",XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
|
||||
];
|
||||
};
|
||||
}
|
||||
184
modules/home-manager/hyprland/default.nix
Normal file
184
modules/home-manager/hyprland/default.nix
Normal file
@@ -0,0 +1,184 @@
|
||||
# Hyprland is a dynamic tiling Wayland compositor that is highly customizable and performant.
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
border-size = config.theme.border-size;
|
||||
gaps-in = config.theme.gaps-in;
|
||||
gaps-out = config.theme.gaps-out;
|
||||
active-opacity = config.theme.active-opacity;
|
||||
inactive-opacity = config.theme.inactive-opacity;
|
||||
rounding = config.theme.rounding;
|
||||
blur = config.theme.blur;
|
||||
keyboardLayout = config.var.keyboardLayout;
|
||||
background = "rgb(" + config.lib.stylix.colors.base00 + ")";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./animations.nix
|
||||
./bindings.nix
|
||||
./polkitagent.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
libsForQt5.qt5ct
|
||||
qt6Packages.qt6ct
|
||||
hyprshot
|
||||
hyprpicker
|
||||
swappy
|
||||
imv
|
||||
wf-recorder
|
||||
wlr-randr
|
||||
wl-clipboard
|
||||
brightnessctl
|
||||
gnome-themes-extra
|
||||
libva
|
||||
dconf
|
||||
wayland-utils
|
||||
wayland-protocols
|
||||
glib
|
||||
direnv
|
||||
meson
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
systemd = {
|
||||
enable = false;
|
||||
variables = [
|
||||
"--all"
|
||||
]; # https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#programs-dont-work-in-systemd-services-but-do-on-the-terminal
|
||||
};
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
|
||||
settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$shiftMod" = "SUPER_SHIFT";
|
||||
"$altMod" = "SUPER_ALT";
|
||||
|
||||
exec-once = [
|
||||
"systemctl --user enable --now hyprpaper.service &"
|
||||
];
|
||||
|
||||
monitor = config.var.hyprland.monitor;
|
||||
|
||||
env = [
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"ANKI_WAYLAND,1"
|
||||
"DISABLE_QT5_COMPAT,0"
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
||||
"QT_QPA_PLATFORM=wayland,xcb"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||
"__GL_GSYNC_ALLOWED,0"
|
||||
"__GL_VRR_ALLOWED,0"
|
||||
"DISABLE_QT5_COMPAT,0"
|
||||
"DIRENV_LOG_FORMAT,"
|
||||
"WLR_DRM_NO_ATOMIC,1"
|
||||
"WLR_BACKEND,vulkan"
|
||||
"WLR_RENDERER,vulkan"
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"CLUTTER_BACKEND,wayland"
|
||||
];
|
||||
|
||||
workspace = config.var.hyprland.workspace ++ [
|
||||
"special:scratchpad, on-created-empty:[float; size monitor_w/1.5 monitor_h/1.5; center] $TERMINAL"
|
||||
];
|
||||
|
||||
cursor = {
|
||||
no_hardware_cursors = true;
|
||||
default_monitor = "0";
|
||||
};
|
||||
|
||||
general = {
|
||||
resize_on_border = true;
|
||||
gaps_in = gaps-in;
|
||||
gaps_out = gaps-out;
|
||||
border_size = border-size;
|
||||
layout = "master";
|
||||
"col.inactive_border" = lib.mkForce background;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
dim_special = 0.3;
|
||||
active_opacity = active-opacity;
|
||||
inactive_opacity = inactive-opacity;
|
||||
rounding = rounding;
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 20;
|
||||
render_power = 3;
|
||||
};
|
||||
blur = {
|
||||
enabled = if blur then "true" else "false";
|
||||
size = 18;
|
||||
};
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = true;
|
||||
allow_small_split = true;
|
||||
mfact = 0.65;
|
||||
};
|
||||
|
||||
misc = {
|
||||
vfr = true;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
disable_autoreload = false;
|
||||
focus_on_activate = true;
|
||||
on_focus_under_fullscreen = 2;
|
||||
};
|
||||
|
||||
windowrule = [
|
||||
"match:title hyprpanel-settings, float on"
|
||||
"match:class xdg-desktop-portal-gtk, float on, center on, size monitor_w/2 monitor_h/2"
|
||||
# Bitwarden extension
|
||||
|
||||
# idle inhibit while watching videos
|
||||
#"idleinhibit focus, class:^(mpv|.+exe|celluloid)$"
|
||||
#"idleinhibit focus, class:^(zen)$, title:^(.*YouTube.*)$"
|
||||
#"idleinhibit fullscreen, class:^(zen)$"
|
||||
|
||||
#"dimaround, class:^(gcr-prompter)$"
|
||||
#"dimaround, class:^(xdg-desktop-portal-gtk)$"
|
||||
#"dimaround, class:^(polkit-gnome-authentication-agent-1)$"
|
||||
#"dimaround, class:^(zen)$, title:^(File Upload)$"
|
||||
];
|
||||
|
||||
layerrule = [
|
||||
"match:namespace vicinae, no_anim on, blur on, ignore_alpha 0"
|
||||
#"no_anim, launcher"
|
||||
#"no_anim, ^ags-.*"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = keyboardLayout;
|
||||
|
||||
kb_options = "caps:escape";
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0.5;
|
||||
repeat_delay = 300;
|
||||
repeat_rate = 50;
|
||||
numlock_by_default = true;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
clickfinger_behavior = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/home-manager/hyprland/polkitagent.nix
Normal file
6
modules/home-manager/hyprland/polkitagent.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
# HyprPolkitAgent is a simple polkit agent for wayland compositors
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [hyprpolkitagent];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
|
||||
}
|
||||
249
modules/home-manager/hyprpanel.nix
Normal file
249
modules/home-manager/hyprpanel.nix
Normal file
@@ -0,0 +1,249 @@
|
||||
# Hyprpanel is the bar on top of the screen
|
||||
# Display information like workspaces, battery, wifi, ...
|
||||
{ config, ... }:
|
||||
let
|
||||
transparentButtons = config.theme.bar.transparentButtons;
|
||||
|
||||
accent = "#${config.lib.stylix.colors.base0D}";
|
||||
accent-alt = "#${config.lib.stylix.colors.base03}";
|
||||
background = "#${config.lib.stylix.colors.base00}";
|
||||
background-alt = "#${config.lib.stylix.colors.base01}";
|
||||
foreground = "#${config.lib.stylix.colors.base05}";
|
||||
foregroundOnWallpaper = "#${config.theme.textColorOnWallpaper}";
|
||||
font = "${config.stylix.fonts.serif.name}";
|
||||
fontSizeForHyprpanel = "${toString config.stylix.fonts.sizes.desktop}px";
|
||||
|
||||
rounding = config.theme.rounding;
|
||||
border-size = config.theme.border-size;
|
||||
|
||||
gaps-out = config.theme.gaps-out;
|
||||
gaps-in = config.theme.gaps-in;
|
||||
|
||||
floating = config.theme.bar.floating;
|
||||
transparent = config.theme.bar.transparent;
|
||||
position = config.theme.bar.position; # "top" ou "bottom"
|
||||
|
||||
notificationOpacity = 90;
|
||||
|
||||
location = config.var.location;
|
||||
|
||||
homeDir = "/home/${config.var.username}";
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.exec-once = [ "hyprpanel" ];
|
||||
|
||||
programs.hyprpanel = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
bar.layouts = {
|
||||
"*" = {
|
||||
left = [
|
||||
"dashboard"
|
||||
"workspaces"
|
||||
"windowtitle"
|
||||
];
|
||||
middle = [
|
||||
"media"
|
||||
];
|
||||
right = [
|
||||
"systray"
|
||||
"volume"
|
||||
"bluetooth"
|
||||
"battery"
|
||||
"network"
|
||||
"clock"
|
||||
"notifications"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
theme.font.name = font;
|
||||
theme.font.size = fontSizeForHyprpanel;
|
||||
|
||||
theme.bar.outer_spacing = if floating && transparent then "0px" else "8px";
|
||||
theme.bar.buttons.y_margins = if floating && transparent then "0px" else "8px";
|
||||
theme.bar.buttons.spacing = "0.3em";
|
||||
theme.bar.buttons.radius =
|
||||
(if transparent then toString rounding else toString (rounding - 8)) + "px";
|
||||
theme.bar.floating = floating;
|
||||
theme.bar.buttons.padding_x = "0.8rem";
|
||||
theme.bar.buttons.padding_y = "0.4rem";
|
||||
|
||||
theme.bar.margin_top = (if position == "top" then toString (gaps-in * 2) else "0") + "px";
|
||||
theme.bar.margin_bottom = (if position == "top" then "0" else toString (gaps-in * 2)) + "px";
|
||||
theme.bar.margin_sides = toString gaps-out + "px";
|
||||
theme.bar.border_radius = toString rounding + "px";
|
||||
theme.bar.transparent = transparent;
|
||||
theme.bar.location = position;
|
||||
theme.bar.dropdownGap = "4.5em";
|
||||
theme.bar.menus.shadow = if transparent then "0 0 0 0" else "0px 0px 3px 1px #16161e";
|
||||
theme.bar.buttons.style = "default";
|
||||
theme.bar.buttons.monochrome = true;
|
||||
theme.bar.menus.monochrome = true;
|
||||
theme.bar.menus.card_radius = toString rounding + "px";
|
||||
theme.bar.menus.border.size = toString border-size + "px";
|
||||
theme.bar.menus.border.radius = toString rounding + "px";
|
||||
theme.bar.menus.menu.media.card.tint = 90;
|
||||
|
||||
bar.launcher.icon = "";
|
||||
bar.workspaces.show_numbered = false;
|
||||
bar.workspaces.workspaces = 3;
|
||||
bar.workspaces.numbered_active_indicator = "color";
|
||||
bar.workspaces.monitorSpecific = true;
|
||||
bar.workspaces.applicationIconEmptyWorkspace = "";
|
||||
bar.workspaces.showApplicationIcons = true;
|
||||
bar.workspaces.showWsIcons = true;
|
||||
bar.workspaces.ignored = "-98"; # NOTE: Ignore special:scratchpad workspace. Hyprpanel only supports workspace numbers
|
||||
#bar.workspaces.ignoredWorkspaces = "/scratchpad/i";
|
||||
#bar.workspaces.ignored_workspaces = "/scratchpad/i";
|
||||
|
||||
bar.windowtitle.label = true;
|
||||
bar.volume.label = false;
|
||||
bar.network.truncation_size = 12;
|
||||
bar.bluetooth.label = false;
|
||||
bar.clock.format = "%a %b %d %H:%M";
|
||||
bar.notifications.show_total = true;
|
||||
bar.media.show_active_only = true;
|
||||
|
||||
bar.customModules.updates.pollingInterval = 1440000;
|
||||
|
||||
notifications.position = "top right";
|
||||
notifications.showActionsOnHover = true;
|
||||
theme.notification.opacity = notificationOpacity;
|
||||
theme.notification.enableShadow = true;
|
||||
theme.notification.border_radius = toString rounding + "px";
|
||||
|
||||
theme.osd.enable = true;
|
||||
theme.osd.orientation = "vertical";
|
||||
theme.osd.location = "left";
|
||||
theme.osd.radius = toString rounding + "px";
|
||||
theme.osd.margins = "0px 0px 0px 10px";
|
||||
theme.osd.muted_zero = true;
|
||||
|
||||
menus.clock.weather.location = location;
|
||||
menus.clock.weather.unit = "metric";
|
||||
menus.dashboard.powermenu.confirmation = false;
|
||||
menus.dashboard.powermenu.avatar.image = "~/.face.icon";
|
||||
|
||||
menus.dashboard.shortcuts.left.shortcut1.icon = "";
|
||||
menus.dashboard.shortcuts.left.shortcut1.command = "zen";
|
||||
menus.dashboard.shortcuts.left.shortcut1.tooltip = "Zen";
|
||||
menus.dashboard.shortcuts.left.shortcut2.icon = "";
|
||||
menus.dashboard.shortcuts.left.shortcut2.command = "caffeine";
|
||||
menus.dashboard.shortcuts.left.shortcut2.tooltip = "Caffeine";
|
||||
menus.dashboard.shortcuts.left.shortcut3.icon = "";
|
||||
menus.dashboard.shortcuts.left.shortcut3.command = "night-shift";
|
||||
menus.dashboard.shortcuts.left.shortcut3.tooltip = "Night-shift";
|
||||
menus.dashboard.shortcuts.left.shortcut4.icon = "";
|
||||
menus.dashboard.shortcuts.left.shortcut4.command = "menu";
|
||||
menus.dashboard.shortcuts.left.shortcut4.tooltip = "Search Apps";
|
||||
|
||||
menus.dashboard.shortcuts.right.shortcut1.icon = "";
|
||||
menus.dashboard.shortcuts.right.shortcut1.command = "hyprpicker -a";
|
||||
menus.dashboard.shortcuts.right.shortcut1.tooltip = "Color Picker";
|
||||
|
||||
menus.dashboard.shortcuts.right.shortcut3.icon = "";
|
||||
menus.dashboard.shortcuts.right.shortcut3.command = "screenshot region swappy";
|
||||
menus.dashboard.shortcuts.right.shortcut3.tooltip = "Screenshot";
|
||||
|
||||
menus.dashboard.directories.left.directory1.label = " Home";
|
||||
menus.dashboard.directories.left.directory1.command = "xdg-open ${homeDir}";
|
||||
|
||||
menus.dashboard.directories.left.directory2.label = " Documents";
|
||||
menus.dashboard.directories.left.directory2.command = "xdg-open ${homeDir}/Documents";
|
||||
|
||||
menus.dashboard.directories.left.directory3.label = " Downloads";
|
||||
menus.dashboard.directories.left.directory3.command = "xdg-open ${homeDir}/Downloads";
|
||||
|
||||
menus.dashboard.directories.right.directory1.label = " Desktop";
|
||||
menus.dashboard.directories.right.directory1.command = "xdg-open ${homeDir}/Desktop";
|
||||
|
||||
menus.dashboard.directories.right.directory2.label = " Videos";
|
||||
menus.dashboard.directories.right.directory2.command = "xdg-open ${homeDir}/Videos";
|
||||
|
||||
menus.dashboard.directories.right.directory3.label = " Pictures";
|
||||
menus.dashboard.directories.right.directory3.command = "xdg-open ${homeDir}/Pictures";
|
||||
|
||||
menus.power.lowBatteryNotification = true;
|
||||
|
||||
wallpaper.enable = false;
|
||||
|
||||
# theme.bar.buttons.workspaces.hover = accent-alt;
|
||||
# theme.bar.buttons.workspaces.active = accent;
|
||||
# theme.bar.buttons.workspaces.available = accent-alt;
|
||||
# theme.bar.buttons.workspaces.occupied = accent-alt;
|
||||
#
|
||||
# theme.bar.menus.background = background;
|
||||
# theme.bar.menus.cards = background-alt;
|
||||
# theme.bar.menus.label = foreground;
|
||||
# theme.bar.menus.text = foreground;
|
||||
# theme.bar.menus.border.color = accent;
|
||||
# theme.bar.menus.popover.text = foreground;
|
||||
# theme.bar.menus.popover.background = background-alt;
|
||||
# theme.bar.menus.listitems.active = accent;
|
||||
# theme.bar.menus.icons.active = accent;
|
||||
# theme.bar.menus.switch.enabled = accent;
|
||||
# theme.bar.menus.check_radio_button.active = accent;
|
||||
# theme.bar.menus.buttons.default = accent;
|
||||
# theme.bar.menus.buttons.active = accent;
|
||||
# theme.bar.menus.iconbuttons.active = accent;
|
||||
# theme.bar.menus.progressbar.foreground = accent;
|
||||
# theme.bar.menus.slider.primary = accent;
|
||||
# theme.bar.menus.tooltip.background = background-alt;
|
||||
# theme.bar.menus.tooltip.text = foreground;
|
||||
# theme.bar.menus.dropdownmenu.background = background-alt;
|
||||
# theme.bar.menus.dropdownmenu.text = foreground;
|
||||
|
||||
# theme.bar.background =
|
||||
# background
|
||||
# + (
|
||||
# if transparentButtons && transparent
|
||||
# then "00"
|
||||
# else ""
|
||||
# );
|
||||
# theme.bar.buttons.text =
|
||||
# if transparent && transparentButtons
|
||||
# then foregroundOnWallpaper
|
||||
# else foreground;
|
||||
# theme.bar.buttons.background =
|
||||
# (
|
||||
# if transparent
|
||||
# then background
|
||||
# else background-alt
|
||||
# )
|
||||
# + (
|
||||
# if transparentButtons
|
||||
# then "00"
|
||||
# else ""
|
||||
# );
|
||||
# theme.bar.buttons.icon = accent;
|
||||
#
|
||||
# theme.bar.buttons.notifications.background = background-alt;
|
||||
# theme.bar.buttons.hover = background;
|
||||
# theme.bar.buttons.notifications.hover = background;
|
||||
# theme.bar.buttons.notifications.total = accent;
|
||||
# theme.bar.buttons.notifications.icon = accent;
|
||||
#
|
||||
# theme.osd.bar_color = accent;
|
||||
# theme.osd.bar_overflow_color = accent-alt;
|
||||
# theme.osd.icon = background;
|
||||
# theme.osd.icon_container = accent;
|
||||
# theme.osd.label = accent;
|
||||
# theme.osd.bar_container = background-alt;
|
||||
#
|
||||
# theme.bar.menus.menu.media.background.color = background-alt;
|
||||
# theme.bar.menus.menu.media.card.color = background-alt;
|
||||
#
|
||||
# theme.notification.background = background-alt;
|
||||
# theme.notification.actions.background = accent;
|
||||
# theme.notification.actions.text = foreground;
|
||||
# theme.notification.label = accent;
|
||||
# theme.notification.border = background-alt;
|
||||
# theme.notification.text = foreground;
|
||||
# theme.notification.labelicon = accent;
|
||||
# theme.notification.close_button.background = background-alt;
|
||||
# theme.notification.close_button.label = "#f38ba8";
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home-manager/hyprpaper.nix
Normal file
14
modules/home-manager/hyprpaper.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
# Hyprpaper is used to set the wallpaper on the system
|
||||
{lib, ...}: {
|
||||
# The wallpaper is set by stylix
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
splash_offset = 2.0;
|
||||
};
|
||||
};
|
||||
systemd.user.services.hyprpaper.Unit.After =
|
||||
lib.mkForce "graphical-session.target";
|
||||
}
|
||||
22
modules/home-manager/hyprsunset.nix
Normal file
22
modules/home-manager/hyprsunset.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
services = {
|
||||
hyprsunset = {
|
||||
enable = true;
|
||||
settings = {
|
||||
max-gamma = 150;
|
||||
|
||||
profile = [
|
||||
{
|
||||
time = "7:30";
|
||||
identity = true;
|
||||
}
|
||||
{
|
||||
time = "23:00";
|
||||
temperature = 2000;
|
||||
gamma = 0.8;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
modules/home-manager/khal.nix
Normal file
26
modules/home-manager/khal.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.khal = {
|
||||
enable = true;
|
||||
locale = {
|
||||
timeformat = "%H:%M";
|
||||
dateformat = "%m-%d";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.calendar.accounts = {
|
||||
"radicale" = {
|
||||
khal = {
|
||||
enable = true;
|
||||
type = "discover";
|
||||
color = "light blue";
|
||||
};
|
||||
};
|
||||
"university" = {
|
||||
khal = {
|
||||
enable = true;
|
||||
color = "#c72125";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
24
modules/home-manager/kitty.nix
Normal file
24
modules/home-manager/kitty.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
# Kitty is a fast, featureful, GPU based terminal emulator
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
scrollback_lines = 10000;
|
||||
initial_window_width = 1200;
|
||||
initial_window_height = 600;
|
||||
update_check_interval = 0;
|
||||
enable_audio_bell = false;
|
||||
confirm_os_window_close = "0";
|
||||
remember_window_size = "no";
|
||||
disable_ligatures = "always";
|
||||
url_style = "curly";
|
||||
copy_on_select = "clipboard";
|
||||
cursor_shape = "Underline";
|
||||
cursor_underline_thickness = 3;
|
||||
window_padding_width = 10;
|
||||
open_url_with = "default";
|
||||
allow_remote_control = "yes";
|
||||
listen_on = "unix:/tmp/mykitty";
|
||||
};
|
||||
};
|
||||
}
|
||||
38
modules/home-manager/lazygit.nix
Normal file
38
modules/home-manager/lazygit.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
# Lazygit is a simple terminal UI for git commands.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
accent = "#${config.lib.stylix.colors.base0D}";
|
||||
muted = "#${config.lib.stylix.colors.base03}";
|
||||
in
|
||||
{
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = lib.mkForce {
|
||||
disableStartupPopups = true;
|
||||
notARepository = "skip";
|
||||
promptToReturnFromSubprocess = false;
|
||||
update.method = "never";
|
||||
git = {
|
||||
parseEmoji = true;
|
||||
};
|
||||
gui = {
|
||||
theme = {
|
||||
activeBorderColor = [
|
||||
accent
|
||||
"bold"
|
||||
];
|
||||
inactiveBorderColor = [ muted ];
|
||||
};
|
||||
showListFooter = false;
|
||||
showRandomTip = false;
|
||||
showCommandLog = false;
|
||||
showBottomLine = false;
|
||||
nerdFontsVersion = "3";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
98
modules/home-manager/mime.nix
Normal file
98
modules/home-manager/mime.nix
Normal file
@@ -0,0 +1,98 @@
|
||||
# Mime type associations for the system.
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
defaultApps = {
|
||||
# check desktop files here: `ls $(echo $XDG_DATA_DIRS| sed "s/:/ /g")`
|
||||
browser = [ "brave-browser.desktop" ];
|
||||
text = [ "nixCats.desktop" ];
|
||||
image = [ "imv-dir.desktop" ];
|
||||
audio = [ "mpv.desktop" ];
|
||||
video = [ "mpv.desktop" ];
|
||||
directory = [ "thunar.desktop" ];
|
||||
office = [ "libreoffice.desktop" ];
|
||||
pdf = [ "org.pwmt.zathura.desktop" ];
|
||||
terminal = [ "kitty.desktop" ];
|
||||
discord = [ "discord.desktop" ];
|
||||
archive = [ "xarchiver.desktop" ];
|
||||
};
|
||||
|
||||
mimeMap = {
|
||||
text = [ "text/plain" ];
|
||||
image = [
|
||||
"image/bmp"
|
||||
"image/gif"
|
||||
"image/jpeg"
|
||||
"image/jpg"
|
||||
"image/png"
|
||||
"image/svg+xml"
|
||||
"image/tiff"
|
||||
"image/vnd.microsoft.icon"
|
||||
"image/webp"
|
||||
];
|
||||
audio = [
|
||||
"audio/aac"
|
||||
"audio/mpeg"
|
||||
"audio/ogg"
|
||||
"audio/opus"
|
||||
"audio/wav"
|
||||
"audio/webm"
|
||||
"audio/x-matroska"
|
||||
];
|
||||
video = [
|
||||
"video/mp2t"
|
||||
"video/mp4"
|
||||
"video/mpeg"
|
||||
"video/ogg"
|
||||
"video/webm"
|
||||
"video/x-flv"
|
||||
"video/x-matroska"
|
||||
"video/x-msvideo"
|
||||
];
|
||||
directory = [ "inode/directory" ];
|
||||
browser = [
|
||||
"text/html"
|
||||
"x-scheme-handler/about"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
"x-scheme-handler/unknown"
|
||||
];
|
||||
office = [
|
||||
"application/vnd.oasis.opendocument.text"
|
||||
"application/vnd.oasis.opendocument.spreadsheet"
|
||||
"application/vnd.oasis.opendocument.presentation"
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
||||
"application/msword"
|
||||
"application/vnd.ms-excel"
|
||||
"application/vnd.ms-powerpoint"
|
||||
"application/rtf"
|
||||
];
|
||||
pdf = [ "application/pdf" ];
|
||||
terminal = [ "terminal" ];
|
||||
archive = [
|
||||
"application/zip"
|
||||
"application/rar"
|
||||
"application/7z"
|
||||
"application/*tar"
|
||||
];
|
||||
discord = [ "x-scheme-handler/discord" ];
|
||||
};
|
||||
|
||||
associations =
|
||||
with lists;
|
||||
listToAttrs (
|
||||
flatten (mapAttrsToList (key: map (type: attrsets.nameValuePair type defaultApps."${key}")) mimeMap)
|
||||
);
|
||||
in
|
||||
{
|
||||
xdg = {
|
||||
configFile."mimeapps.list".force = true;
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
associations.added = associations;
|
||||
defaultApplications = associations;
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/home-manager/nh.nix
Normal file
6
modules/home-manager/nh.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{config, ...}: {
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "/home/kiri/.config/nixos"; # Assuming this is the flake root
|
||||
};
|
||||
}
|
||||
2
modules/home-manager/nixCats/.stylua.toml
Normal file
2
modules/home-manager/nixCats/.stylua.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
157
modules/home-manager/nixCats/default.nix
Normal file
157
modules/home-manager/nixCats/default.nix
Normal file
@@ -0,0 +1,157 @@
|
||||
{ inputs, config, ... }:
|
||||
let
|
||||
inherit (inputs.nixCats) utils;
|
||||
luaPath = ./.;
|
||||
categoryDefinitions =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# to define and use a new category, simply add a new list to a set here,
|
||||
# and later, you will include categoryname = true; in the set you
|
||||
# provide when you build the package using this builder function.
|
||||
# see :help nixCats.flake.outputs.packageDefinitions for info on that section.
|
||||
|
||||
# lspsAndRuntimeDeps:
|
||||
# this section is for dependencies that should be available
|
||||
# at RUN TIME for plugins. Will be available to PATH within neovim terminal
|
||||
# this includes LSPs
|
||||
lspsAndRuntimeDeps = {
|
||||
general = with pkgs; [
|
||||
universal-ctags
|
||||
stdenv.cc.cc
|
||||
ripgrep
|
||||
fd
|
||||
|
||||
stylua
|
||||
lua-language-server
|
||||
|
||||
nixd
|
||||
nix-doc
|
||||
nixfmt
|
||||
|
||||
dafny
|
||||
|
||||
typescript
|
||||
typescript-language-server
|
||||
|
||||
rust-analyzer
|
||||
rustfmt
|
||||
|
||||
markdownlint-cli2
|
||||
|
||||
basedpyright
|
||||
black
|
||||
isort
|
||||
|
||||
astro-language-server
|
||||
];
|
||||
};
|
||||
|
||||
startupPlugins = {
|
||||
general = with pkgs.vimPlugins; [
|
||||
lz-n
|
||||
plenary-nvim
|
||||
catppuccin-nvim
|
||||
];
|
||||
};
|
||||
|
||||
optionalPlugins = {
|
||||
general = with pkgs.vimPlugins; [
|
||||
nvim-treesitter.withAllGrammars
|
||||
nvim-treesitter-textobjects
|
||||
nvim-treesitter-context
|
||||
trouble-nvim
|
||||
|
||||
guess-indent-nvim
|
||||
gitsigns-nvim
|
||||
which-key-nvim
|
||||
|
||||
telescope-nvim
|
||||
telescope-fzf-native-nvim
|
||||
telescope-ui-select-nvim
|
||||
|
||||
conform-nvim
|
||||
blink-cmp
|
||||
luasnip
|
||||
friendly-snippets
|
||||
|
||||
todo-comments-nvim
|
||||
mini-nvim
|
||||
|
||||
nvim-lspconfig
|
||||
lazydev-nvim
|
||||
nvim-autopairs
|
||||
indent-blankline-nvim
|
||||
nvim-lint
|
||||
|
||||
render-markdown-nvim
|
||||
|
||||
colorful-menu-nvim
|
||||
];
|
||||
};
|
||||
|
||||
sharedLibraries = {
|
||||
general = with pkgs; [ ];
|
||||
};
|
||||
|
||||
environmentVariables = { };
|
||||
extraWrapperArgs = { };
|
||||
python3.libraries = {
|
||||
test = (_: [ ]);
|
||||
};
|
||||
extraLuaPackages = {
|
||||
general = [ (_: [ ]) ];
|
||||
};
|
||||
extraCats = { };
|
||||
};
|
||||
|
||||
packageDefinitions = {
|
||||
nixCats =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
settings = {
|
||||
suffix-path = true;
|
||||
suffix-LD = true;
|
||||
aliases = [
|
||||
"nvim"
|
||||
"vim"
|
||||
"vi"
|
||||
];
|
||||
wrapRc = true;
|
||||
configDirName = "nixCats";
|
||||
hosts.python3.enable = true;
|
||||
hosts.node.enable = true;
|
||||
};
|
||||
|
||||
categories = {
|
||||
general = true;
|
||||
};
|
||||
|
||||
extra = {
|
||||
nixdExtras = {
|
||||
nixpkgs = ''import ${pkgs.path} {}'';
|
||||
nixos_options = ''(builtins.getFlake "path:///home/kiri/.config/nixos").nixosConfigurations.${toString config.var.hostname}.options'';
|
||||
home_manager_options = ''(builtins.getFlake "path:///home/kiri/.config/nixos").nixosConfigurations.${toString config.var.hostname}.options.home-manager.users.type.getSubOptions []'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
defaultPackageName = "nixCats";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(utils.mkHomeModules {
|
||||
inherit
|
||||
defaultPackageName
|
||||
luaPath
|
||||
categoryDefinitions
|
||||
packageDefinitions
|
||||
;
|
||||
inherit (inputs) nixpkgs;
|
||||
dependencyOverlays = [ (utils.standardPluginOverlay inputs) ];
|
||||
})
|
||||
];
|
||||
|
||||
nixCats.enable = true;
|
||||
}
|
||||
5
modules/home-manager/nixCats/init.lua
Normal file
5
modules/home-manager/nixCats/init.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
require("options")
|
||||
require("plugins.ui")
|
||||
require("plugins.editor")
|
||||
require("plugins.coding")
|
||||
require("plugins.lsp")
|
||||
133
modules/home-manager/nixCats/lua/options.lua
Normal file
133
modules/home-manager/nixCats/lua/options.lua
Normal file
@@ -0,0 +1,133 @@
|
||||
-- Set <space> as the leader key
|
||||
-- See `:help mapleader`
|
||||
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.o`
|
||||
-- NOTE: You can change these options as you wish!
|
||||
-- For more options, you can see `:help option-list`
|
||||
|
||||
-- Make line numbers default
|
||||
vim.o.number = true
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
-- Experiment for yourself to see if you like it!
|
||||
-- vim.o.relativenumber = true
|
||||
|
||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||
vim.o.mouse = "a"
|
||||
|
||||
-- Don't show the mode, since it's already in the status line
|
||||
vim.o.showmode = false
|
||||
|
||||
vim.opt.shortmess:append("Wc")
|
||||
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
||||
-- Remove this option if you want your OS clipboard to remain independent.
|
||||
-- See `:help 'clipboard'`
|
||||
vim.schedule(function()
|
||||
vim.o.clipboard = "unnamedplus"
|
||||
end)
|
||||
|
||||
-- Enable break indent
|
||||
vim.o.breakindent = true
|
||||
|
||||
-- Save undo history
|
||||
vim.o.undofile = true
|
||||
|
||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
|
||||
-- Keep signcolumn on by default
|
||||
vim.o.signcolumn = "yes"
|
||||
|
||||
-- Decrease update time
|
||||
vim.o.updatetime = 250
|
||||
|
||||
-- Decrease mapped sequence wait time
|
||||
vim.o.timeoutlen = 300
|
||||
|
||||
-- Configure how new splits should be opened
|
||||
vim.o.splitright = true
|
||||
vim.o.splitbelow = true
|
||||
|
||||
-- Sets how neovim will display certain whitespace characters in the editor.
|
||||
-- See `:help 'list'`
|
||||
-- and `:help 'listchars'`
|
||||
--
|
||||
-- Notice listchars is set using `vim.opt` instead of `vim.o`.
|
||||
-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables.
|
||||
-- See `:help lua-options`
|
||||
-- and `:help lua-options-guide`
|
||||
vim.o.list = true
|
||||
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
||||
|
||||
-- Preview substitutions live, as you type!
|
||||
vim.o.inccommand = "split"
|
||||
|
||||
-- Show which line your cursor is on
|
||||
vim.o.cursorline = true
|
||||
|
||||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
vim.o.scrolloff = 10
|
||||
|
||||
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
||||
-- instead raise a dialog asking if you wish to save the current file(s)
|
||||
-- See `:help 'confirm'`
|
||||
vim.o.confirm = true
|
||||
|
||||
-- [[ Basic Keymaps ]]
|
||||
-- See `:help vim.keymap.set()`
|
||||
|
||||
-- Clear highlights on search when pressing <Esc> in normal mode
|
||||
-- See `:help hlsearch`
|
||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
|
||||
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||
-- is not what someone will guess without a bit more experience.
|
||||
--
|
||||
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
|
||||
-- or just use <C-\><C-n> to exit terminal mode
|
||||
vim.keymap.set("t", "<Esc><Esc>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
|
||||
|
||||
-- TIP: Disable arrow keys in normal mode
|
||||
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
|
||||
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- Keybinds to make split navigation easier.
|
||||
-- Use CTRL+<hjkl> to switch between windows
|
||||
--
|
||||
-- See `:help wincmd` for a list of all window commands
|
||||
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
|
||||
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
|
||||
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
|
||||
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
|
||||
|
||||
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
|
||||
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
|
||||
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
|
||||
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
|
||||
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
|
||||
|
||||
-- [[ Basic Autocommands ]]
|
||||
-- See `:help lua-guide-autocommands`
|
||||
|
||||
-- Highlight when yanking (copying) text
|
||||
-- Try it with `yap` in normal mode
|
||||
-- See `:help vim.hl.on_yank()`
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
desc = "Highlight when yanking (copying) text",
|
||||
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
|
||||
callback = function()
|
||||
vim.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
263
modules/home-manager/nixCats/lua/plugins/coding.lua
Normal file
263
modules/home-manager/nixCats/lua/plugins/coding.lua
Normal file
@@ -0,0 +1,263 @@
|
||||
require("lz.n").load({
|
||||
-- {
|
||||
-- "nvim-treesitter-context",
|
||||
-- event = "BufReadPost",
|
||||
-- after = function()
|
||||
-- require("treesitter-context").setup({
|
||||
-- enable = true,
|
||||
-- max_lines = 3, -- How many lines the window should span
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
"nvim-lint",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
after = function()
|
||||
local lint = require("lint")
|
||||
lint.linters_by_ft = {
|
||||
markdown = { "markdownlint-cli2" },
|
||||
}
|
||||
|
||||
-- Create autocommand which carries out the actual linting
|
||||
-- on the specified events.
|
||||
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
-- Only run the linter in buffers that you can modify in order to
|
||||
-- avoid superfluous noise, notably within the handy LSP pop-ups that
|
||||
-- describe the hovered symbol using Markdown.
|
||||
if vim.bo.modifiable then
|
||||
lint.try_lint()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
after = function()
|
||||
require("nvim-autopairs").setup({
|
||||
check_ts = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-treesitter",
|
||||
dep_of = "render-markdown.nvim",
|
||||
-- cmd = { "" },
|
||||
event = "DeferredUIEnter",
|
||||
-- ft = "",
|
||||
-- keys = "",
|
||||
-- colorscheme = "",
|
||||
load = function(name)
|
||||
vim.cmd.packadd(name)
|
||||
vim.cmd.packadd("nvim-treesitter-textobjects")
|
||||
end,
|
||||
after = function()
|
||||
-- [[ Configure Treesitter ]]
|
||||
-- See `:help nvim-treesitter`
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<c-space>",
|
||||
node_incremental = "<c-space>",
|
||||
scope_incremental = "<c-s>",
|
||||
node_decremental = "<M-space>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["aa"] = "@parameter.outer",
|
||||
["ia"] = "@parameter.inner",
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
["]m"] = "@function.outer",
|
||||
["]]"] = "@class.outer",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]M"] = "@function.outer",
|
||||
["]["] = "@class.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[m"] = "@function.outer",
|
||||
["[["] = "@class.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[M"] = "@function.outer",
|
||||
["[]"] = "@class.outer",
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["<leader>a"] = "@parameter.inner",
|
||||
},
|
||||
swap_previous = {
|
||||
["<leader>A"] = "@parameter.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"conform.nvim",
|
||||
event = "BufWritePre",
|
||||
cmd = "ConformInfo",
|
||||
keys = {
|
||||
{
|
||||
"<leader>f",
|
||||
function()
|
||||
require("conform").format({ async = true, lsp_format = "fallback" })
|
||||
end,
|
||||
mode = "",
|
||||
desc = "[F]ormat buffer",
|
||||
},
|
||||
},
|
||||
after = function()
|
||||
require("conform").setup({
|
||||
notify_on_error = true,
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||
-- have a well standardized coding style. You can add additional
|
||||
-- languages here or re-enable it for the disabled ones.
|
||||
local disable_filetypes = { c = true, cpp = true }
|
||||
if disable_filetypes[vim.bo[bufnr].filetype] then
|
||||
return nil
|
||||
else
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback",
|
||||
}
|
||||
end
|
||||
end,
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- Conform can also run multiple formatters sequentially
|
||||
python = { "isort", "black" },
|
||||
--
|
||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"friendly-snippets",
|
||||
},
|
||||
{
|
||||
"luasnip",
|
||||
before = function()
|
||||
require("lz.n").trigger_load("friendly-snippets")
|
||||
end,
|
||||
after = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"blink.cmp",
|
||||
before = function()
|
||||
-- Trigger lazydev so it's ready for blink source
|
||||
require("lz.n").trigger_load({ "lazydev.nvim", "luasnip" })
|
||||
end,
|
||||
event = "VimEnter",
|
||||
after = function()
|
||||
require("blink.cmp").setup({
|
||||
keymap = {
|
||||
preset = "default",
|
||||
|
||||
-- [Up/Down]
|
||||
["<C-j>"] = { "select_next", "fallback" },
|
||||
["<C-k>"] = { "select_prev", "fallback" }, -- Overrides Signature Help
|
||||
|
||||
-- [Insert Suggestion]
|
||||
["<C-l>"] = { "select_and_accept", "fallback" },
|
||||
|
||||
-- [Remap Signature Help]
|
||||
-- Since we took <C-k>, let's move signature help to <C-g> (optional)
|
||||
["<C-g>"] = { "show_signature", "hide_signature", "fallback" },
|
||||
},
|
||||
|
||||
appearance = {
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
|
||||
completion = {
|
||||
-- By default, you may press `<c-space>` to show the documentation.
|
||||
-- Optionally, set `auto_show = true` to show the documentation after a delay.
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 500,
|
||||
window = {
|
||||
border = "rounded",
|
||||
},
|
||||
},
|
||||
menu = {
|
||||
border = "rounded",
|
||||
draw = {
|
||||
columns = { { "kind_icon" }, { "label", gap = 1 } },
|
||||
components = {
|
||||
label = {
|
||||
text = function(ctx)
|
||||
return require("colorful-menu").blink_components_text(ctx)
|
||||
end,
|
||||
highlight = function(ctx)
|
||||
return require("colorful-menu").blink_components_highlight(ctx)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
cmdline = {
|
||||
completion = {
|
||||
menu = {
|
||||
auto_show = true,
|
||||
},
|
||||
},
|
||||
keymap = { preset = "inherit" },
|
||||
},
|
||||
|
||||
sources = {
|
||||
default = {
|
||||
"lsp",
|
||||
"path",
|
||||
"snippets",
|
||||
"lazydev",
|
||||
},
|
||||
providers = {
|
||||
lazydev = { module = "lazydev.integrations.blink", score_offset = 100 },
|
||||
},
|
||||
},
|
||||
|
||||
snippets = { preset = "luasnip" },
|
||||
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||
|
||||
-- Shows a signature help window while you type arguments for a function
|
||||
signature = {
|
||||
window = { border = "rounded" },
|
||||
enabled = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
170
modules/home-manager/nixCats/lua/plugins/editor.lua
Normal file
170
modules/home-manager/nixCats/lua/plugins/editor.lua
Normal file
@@ -0,0 +1,170 @@
|
||||
require("lz.n").load({
|
||||
{
|
||||
"guess-indent.nvim",
|
||||
event = "BufReadPre",
|
||||
after = function()
|
||||
require("guess-indent").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
after = function()
|
||||
require("gitsigns").setup({
|
||||
signs = {
|
||||
add = { text = "▎" },
|
||||
change = { text = "▎" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "" },
|
||||
changedelete = { text = "▎" },
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local gitsigns = require("gitsigns")
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map("n", "]c", function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ "]c", bang = true })
|
||||
else
|
||||
gitsigns.nav_hunk("next")
|
||||
end
|
||||
end, { desc = "Jump to next git [c]hange" })
|
||||
|
||||
map("n", "[c", function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal({ "[c", bang = true })
|
||||
else
|
||||
gitsigns.nav_hunk("prev")
|
||||
end
|
||||
end, { desc = "Jump to previous git [c]hange" })
|
||||
|
||||
-- Actions
|
||||
-- visual mode
|
||||
map("v", "<leader>hs", function()
|
||||
gitsigns.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end, { desc = "git [s]tage hunk" })
|
||||
map("v", "<leader>hr", function()
|
||||
gitsigns.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end, { desc = "git [r]eset hunk" })
|
||||
-- normal mode
|
||||
map("n", "<leader>hs", gitsigns.stage_hunk, { desc = "git [s]tage hunk" })
|
||||
map("n", "<leader>hr", gitsigns.reset_hunk, { desc = "git [r]eset hunk" })
|
||||
map("n", "<leader>hS", gitsigns.stage_buffer, { desc = "git [S]tage buffer" })
|
||||
map("n", "<leader>hu", gitsigns.stage_hunk, { desc = "git [u]ndo stage hunk" })
|
||||
map("n", "<leader>hR", gitsigns.reset_buffer, { desc = "git [R]eset buffer" })
|
||||
map("n", "<leader>hp", gitsigns.preview_hunk, { desc = "git [p]review hunk" })
|
||||
map("n", "<leader>hb", gitsigns.blame_line, { desc = "git [b]lame line" })
|
||||
map("n", "<leader>hd", gitsigns.diffthis, { desc = "git [d]iff against index" })
|
||||
map("n", "<leader>hD", function()
|
||||
gitsigns.diffthis("@")
|
||||
end, { desc = "git [D]iff against last commit" })
|
||||
-- Toggles
|
||||
map("n", "<leader>tb", gitsigns.toggle_current_line_blame, { desc = "[T]oggle git show [b]lame line" })
|
||||
map("n", "<leader>tD", gitsigns.preview_hunk_inline, { desc = "[T]oggle git show [D]eleted" })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"telescope.nvim",
|
||||
event = "VimEnter",
|
||||
after = function()
|
||||
local actions = require("telescope.actions")
|
||||
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
path_display = { "truncate" },
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = {
|
||||
prompt_position = "top",
|
||||
},
|
||||
sorting_strategy = "ascending",
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-k>"] = actions.move_selection_previous, -- Move up with Ctrl-k
|
||||
["<C-j>"] = actions.move_selection_next, -- Move down with Ctrl-j
|
||||
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, -- Send to quickfix
|
||||
},
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown(),
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Enable Telescope extensions if they are installed
|
||||
pcall(require("telescope").load_extension, "fzf")
|
||||
pcall(require("telescope").load_extension, "ui-select")
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
|
||||
vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
|
||||
vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" })
|
||||
vim.keymap.set("n", "<leader>ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" })
|
||||
vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
|
||||
vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
|
||||
vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
|
||||
vim.keymap.set("n", "<leader>sr", builtin.resume, { desc = "[S]earch [R]esume" })
|
||||
vim.keymap.set("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
|
||||
|
||||
-- Slightly advanced example of overriding default behavior and theme
|
||||
vim.keymap.set("n", "<leader>/", function()
|
||||
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
|
||||
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
}))
|
||||
end, { desc = "[/] Fuzzily search in current buffer" })
|
||||
|
||||
-- It's also possible to pass additional configuration options.
|
||||
-- See `:help telescope.builtin.live_grep()` for information about particular keys
|
||||
vim.keymap.set("n", "<leader>s/", function()
|
||||
builtin.live_grep({
|
||||
grep_open_files = true,
|
||||
prompt_title = "Live Grep in Open Files",
|
||||
})
|
||||
end, { desc = "[S]earch [/] in Open Files" })
|
||||
|
||||
-- Shortcut for searching your Neovim configuration files
|
||||
vim.keymap.set("n", "<leader>sn", function()
|
||||
builtin.find_files({ cwd = vim.fn.stdpath("config") })
|
||||
end, { desc = "[S]earch [N]eovim files" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"trouble.nvim",
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
||||
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)" },
|
||||
},
|
||||
after = function()
|
||||
require("trouble").setup({
|
||||
focus = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"todo-comments.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
keys = {
|
||||
{ "<leader>st", "<cmd>TodoTelescope<cr>", desc = "[S]earch [T]odos" },
|
||||
{ "<leader>xt", "<cmd>TodoTrouble<cr>", desc = "Todo (Trouble)" },
|
||||
},
|
||||
after = function()
|
||||
require("todo-comments").setup({
|
||||
signs = false,
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
168
modules/home-manager/nixCats/lua/plugins/lsp.lua
Normal file
168
modules/home-manager/nixCats/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,168 @@
|
||||
require("lz.n").load({
|
||||
{
|
||||
{
|
||||
-- lazydev makes your lsp way better in your config without needing extra lsp configuration.
|
||||
"lazydev.nvim",
|
||||
cmd = "LazyDev",
|
||||
ft = "lua",
|
||||
after = function()
|
||||
require("lazydev").setup({
|
||||
library = {
|
||||
{ words = { "nixCats" }, path = (nixCats.nixCatsPath or "") .. "/lua" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
after = function()
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
|
||||
callback = function(args)
|
||||
-- Get the client and buffer from the event arguments [cite: 119]
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
local bufnr = args.buf
|
||||
|
||||
local map = function(keys, func, desc, mode)
|
||||
mode = mode or "n"
|
||||
vim.keymap.set(mode, keys, func, { buffer = bufnr, desc = "LSP: " .. desc })
|
||||
end
|
||||
|
||||
-- Mappings (Standard LSP functions from lsp-defaults) [cite: 20-23]
|
||||
map("grn", vim.lsp.buf.rename, "[R]e[n]ame")
|
||||
map("gra", vim.lsp.buf.code_action, "[G]oto Code [A]ction", { "n", "x" })
|
||||
map("grD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||
|
||||
-- Telescope Mappings
|
||||
map("grr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||
map("gri", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
|
||||
map("grd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
|
||||
map("gO", require("telescope.builtin").lsp_document_symbols, "Open Document Symbols")
|
||||
map("gW", require("telescope.builtin").lsp_dynamic_workspace_symbols, "Open Workspace Symbols")
|
||||
map("grt", require("telescope.builtin").lsp_type_definitions, "[G]oto [T]ype Definition")
|
||||
|
||||
-- Highlight references (Document Highlight)
|
||||
if client and client:supports_method("textDocument/documentHighlight", bufnr) then
|
||||
local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false })
|
||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||
buffer = bufnr,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||
buffer = bufnr,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("LspDetach", {
|
||||
group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }),
|
||||
callback = function(event)
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event.buf })
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- Inlay Hints
|
||||
if client and client:supports_method("textDocument/inlayHint", bufnr) then
|
||||
map("<leader>th", function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }))
|
||||
end, "[T]oggle Inlay [H]ints")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- 1. Setup Diagnostics (Visuals)
|
||||
vim.diagnostic.config({
|
||||
severity_sort = true,
|
||||
float = { border = "rounded", source = "if_many" },
|
||||
underline = { severity = vim.diagnostic.severity.ERROR },
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = " ",
|
||||
[vim.diagnostic.severity.WARN] = " ",
|
||||
[vim.diagnostic.severity.INFO] = " ",
|
||||
[vim.diagnostic.severity.HINT] = " ",
|
||||
},
|
||||
},
|
||||
virtual_text = {
|
||||
source = "if_many",
|
||||
spacing = 4,
|
||||
prefix = "●",
|
||||
format = function(diagnostic)
|
||||
local diagnostic_message = {
|
||||
[vim.diagnostic.severity.ERROR] = diagnostic.message,
|
||||
[vim.diagnostic.severity.WARN] = diagnostic.message,
|
||||
[vim.diagnostic.severity.INFO] = diagnostic.message,
|
||||
[vim.diagnostic.severity.HINT] = diagnostic.message,
|
||||
}
|
||||
return diagnostic_message[diagnostic.severity]
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = { version = "LuaJIT" },
|
||||
signatureHelp = { enabled = true },
|
||||
diagnostics = { globals = { "nixCats", "vim" } },
|
||||
telemetry = { enabled = false },
|
||||
completion = { callSnippet = "Replace" },
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.enable("lua_ls")
|
||||
|
||||
-- Nix
|
||||
vim.lsp.config("nixd", {
|
||||
settings = {
|
||||
nixd = {
|
||||
nixpkgs = { expr = nixCats.extra("nixdExtras.nixpkgs") },
|
||||
options = {
|
||||
nixos = { expr = nixCats.extra("nixdExtras.nixos_options") },
|
||||
["home-manager"] = { expr = nixCats.extra("nixdExtras.home_manager_options") },
|
||||
},
|
||||
formatting = { command = { "nixfmt" } },
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.enable("nixd")
|
||||
|
||||
-- Dafny
|
||||
vim.lsp.enable("dafny")
|
||||
|
||||
-- TypeScript/JS
|
||||
vim.lsp.enable("ts_ls")
|
||||
|
||||
-- Rust
|
||||
vim.lsp.enable("rust_analyzer")
|
||||
|
||||
-- Python
|
||||
vim.lsp.config("basedpyright", {
|
||||
settings = {
|
||||
basedpyright = {
|
||||
analysis = {
|
||||
autoSearchPaths = true,
|
||||
useLibraryCodeForTypes = true,
|
||||
diagnosticMode = "openFilesOnly",
|
||||
typeCheckingMode = "standard",
|
||||
inlayHints = {
|
||||
variableTypes = true,
|
||||
callArgumentNames = true,
|
||||
functionReturnTypes = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
vim.lsp.enable("basedpyright")
|
||||
|
||||
vim.lsp.enable("astro")
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
||||
158
modules/home-manager/nixCats/lua/plugins/ui.lua
Normal file
158
modules/home-manager/nixCats/lua/plugins/ui.lua
Normal file
@@ -0,0 +1,158 @@
|
||||
require("lz.n").load({
|
||||
{
|
||||
"catppuccin-nvim",
|
||||
event = "VimEnter",
|
||||
after = function()
|
||||
require("catppuccin").setup({
|
||||
flavour = "mocha",
|
||||
term_colors = true,
|
||||
dim_inactive = {
|
||||
enabled = true,
|
||||
shade = "dark",
|
||||
percentage = 0.15,
|
||||
},
|
||||
integrations = {
|
||||
gitsigns = true,
|
||||
telescope = true,
|
||||
treesitter = true,
|
||||
treesitter_context = true,
|
||||
markdown = true,
|
||||
which_key = true,
|
||||
blink_cmp = {
|
||||
style = "bordered",
|
||||
},
|
||||
},
|
||||
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
virtual_text = {
|
||||
errors = { "italic" },
|
||||
hints = { "italic" },
|
||||
warnings = { "italic" },
|
||||
information = { "italic" },
|
||||
},
|
||||
underlines = {
|
||||
errors = { "underline" },
|
||||
hints = { "underline" },
|
||||
warnings = { "underline" },
|
||||
information = { "underline" },
|
||||
},
|
||||
inlay_hints = {
|
||||
background = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"colorful-menu.nvim",
|
||||
after = function()
|
||||
require("colorful-menu").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"indent-blankline.nvim",
|
||||
event = "User FileOpened",
|
||||
after = function()
|
||||
require("ibl").setup({
|
||||
indent = { char = "|" },
|
||||
scope = {
|
||||
enabled = false,
|
||||
show_start = false,
|
||||
show_end = false,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"render-markdown.nvim",
|
||||
before = function()
|
||||
require("lz.n").trigger_load({ "nvim-treesitter", "mini.nvim" })
|
||||
end,
|
||||
after = function()
|
||||
require("render-markdown").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"which-key.nvim",
|
||||
event = "VimEnter",
|
||||
before = function()
|
||||
require("lz.n").trigger_load("nvim-web-devicons")
|
||||
end,
|
||||
after = function()
|
||||
require("which-key").setup({
|
||||
preset = "modern",
|
||||
delay = 200,
|
||||
win = {
|
||||
border = "rounded",
|
||||
},
|
||||
icons = {
|
||||
-- set icon mappings to true if you have a Nerd Font
|
||||
mappings = true,
|
||||
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
|
||||
-- default which-key.nvim defined Nerd Font icons, otherwise define a string table
|
||||
keys = {},
|
||||
},
|
||||
|
||||
-- Document existing key chains
|
||||
spec = {
|
||||
{ "<leader>s", group = "[S]earch" },
|
||||
{ "<leader>t", group = "[T]oggle" },
|
||||
{ "<leader>h", group = "Git [H]unk", mode = { "n", "v" } },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mini.nvim",
|
||||
after = function()
|
||||
-- Better Around/Inside textobjects
|
||||
require("mini.ai").setup({ n_lines = 500 })
|
||||
|
||||
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||
require("mini.surround").setup()
|
||||
|
||||
-- Simple and easy statusline.
|
||||
local statusline = require("mini.statusline")
|
||||
statusline.setup({ use_icons = true })
|
||||
statusline.section_location = function()
|
||||
return "%2l:%-2v"
|
||||
end
|
||||
|
||||
local files = require("mini.files")
|
||||
files.setup()
|
||||
vim.keymap.set("n", "<leader>e", function()
|
||||
if not files.close() then
|
||||
files.open(vim.api.nvim_buf_get_name(0))
|
||||
end
|
||||
end, { desc = "File [E]xplorer" })
|
||||
|
||||
local icons = require("mini.icons")
|
||||
icons.setup()
|
||||
icons.mock_nvim_web_devicons()
|
||||
|
||||
local hipatterns = require("mini.hipatterns")
|
||||
hipatterns.setup({
|
||||
highlighters = {
|
||||
-- Highlight hex color strings (#rrggbb) using that color
|
||||
hex_color = hipatterns.gen_highlighter.hex_color(),
|
||||
},
|
||||
})
|
||||
|
||||
local indentscope = require("mini.indentscope")
|
||||
indentscope.setup({
|
||||
symbol = "│",
|
||||
-- draw = { animation = indentscope.gen_animation.linear({}) },
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
|
||||
callback = function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
35
modules/home-manager/rclone.nix
Normal file
35
modules/home-manager/rclone.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
programs.rclone = {
|
||||
enable = true;
|
||||
remotes = {
|
||||
gdrive = {
|
||||
config = {
|
||||
type = "drive";
|
||||
scope = "drive";
|
||||
|
||||
root_folder_id = "";
|
||||
};
|
||||
|
||||
secrets = {
|
||||
token = "/home/kiri/.config/rclone/gdrive_token";
|
||||
|
||||
client_id = "/home/kiri/.config/rclone/gdrive_client_id";
|
||||
client_secret = "/home/kiri/.config/rclone/gdrive_client_secret"; #TODO: sops?
|
||||
};
|
||||
|
||||
mounts = {
|
||||
"/" = {
|
||||
enable = true;
|
||||
mountPoint = "/home/kiri/gdrive";
|
||||
|
||||
options = {
|
||||
dir-cache-time = "5000h";
|
||||
poll-interval = "10s";
|
||||
vfs-cache-mode = "full";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
36
modules/home-manager/scripts/brightness.nix
Normal file
36
modules/home-manager/scripts/brightness.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
# - ## Brightness
|
||||
#-
|
||||
#- This module provides a set of scripts to control the brightness of the screen.
|
||||
#-
|
||||
#- - `brightness-up` increases the brightness by 5%.
|
||||
#- - `brightness-down` decreases the brightness by 5%.
|
||||
#- - `brightness-set [value]` sets the brightness to the given value.
|
||||
#- - `brightness-change [up|down] [value]` increases or decreases the brightness by the given value.
|
||||
{pkgs, ...}: let
|
||||
increments = "5";
|
||||
|
||||
brightness-change = pkgs.writeShellScriptBin "brightness-change" ''
|
||||
[[ $1 == "up" ]] && ${pkgs.brightnessctl}/bin/brightnessctl set ''${2-${increments}}%+
|
||||
[[ $1 == "down" ]] && ${pkgs.brightnessctl}/bin/brightnessctl set ''${2-${increments}}%-
|
||||
'';
|
||||
|
||||
brightness-set = pkgs.writeShellScriptBin "brightness-set" ''
|
||||
${pkgs.brightnessctl}/bin/brightnessctl set ''${1-100}%
|
||||
'';
|
||||
|
||||
brightness-up = pkgs.writeShellScriptBin "brightness-up" ''
|
||||
brightness-change up ${increments}
|
||||
'';
|
||||
|
||||
brightness-down = pkgs.writeShellScriptBin "brightness-down" ''
|
||||
brightness-change down ${increments}
|
||||
'';
|
||||
in {
|
||||
home.packages = [
|
||||
pkgs.brightnessctl
|
||||
brightness-change
|
||||
brightness-up
|
||||
brightness-down
|
||||
brightness-set
|
||||
];
|
||||
}
|
||||
26
modules/home-manager/scripts/caffeine.nix
Normal file
26
modules/home-manager/scripts/caffeine.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
# - ## Caffeine
|
||||
#-
|
||||
#- Caffeine is a simple script that toggles hypridle (disable suspend & screenlock).
|
||||
#-
|
||||
#- - `caffeine-status` - Check if hypridle is running. (0/1)
|
||||
#- - `caffeine-status-icon` - Check if hypridle is running. (icon)
|
||||
#- - `caffeine` - Toggle hypridle.
|
||||
{pkgs, ...}: let
|
||||
caffeine-status = pkgs.writeShellScriptBin "caffeine-status" ''
|
||||
[[ $(pidof "hypridle") ]] && echo "0" || echo "1"
|
||||
'';
|
||||
|
||||
caffeine-status-icon = pkgs.writeShellScriptBin "caffeine-status-icon" ''
|
||||
[[ $(pidof "hypridle") ]] && echo "" || echo ""
|
||||
'';
|
||||
|
||||
caffeine = pkgs.writeShellScriptBin "caffeine" ''
|
||||
if [[ $(pidof "hypridle") ]]; then
|
||||
systemctl --user stop hypridle.service
|
||||
${pkgs.swayosd}/bin/swayosd-client --custom-message="Caffeine On" --custom-icon="emblem-default"
|
||||
else
|
||||
systemctl --user start hypridle.service
|
||||
${pkgs.swayosd}/bin/swayosd-client --custom-message="Caffeine Off" --custom-icon="emblem-default"
|
||||
fi
|
||||
'';
|
||||
in {home.packages = [caffeine-status caffeine caffeine-status-icon];}
|
||||
15
modules/home-manager/scripts/default.nix
Normal file
15
modules/home-manager/scripts/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
imports = [
|
||||
./nixy.nix
|
||||
./sounds.nix
|
||||
./brightness.nix
|
||||
./caffeine.nix
|
||||
./hyprpanel.nix
|
||||
./hyprfocus.nix
|
||||
./night-shift.nix
|
||||
./screenshot.nix
|
||||
./nerdfont-fzf.nix
|
||||
./notification.nix
|
||||
./system.nix
|
||||
];
|
||||
}
|
||||
52
modules/home-manager/scripts/hyprfocus.nix
Normal file
52
modules/home-manager/scripts/hyprfocus.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
# - ## Hyprfocus
|
||||
#-
|
||||
#- A simple script to toggle focus on few windows in Hyprland.
|
||||
#- (disable gaps, border, shadow, opacity, etc.)
|
||||
#-
|
||||
#- - `hyprfocus-on` - Enable hyprfocus.
|
||||
#- - `hyprfocus-off` - Disable hyprfocus.
|
||||
#- - `hyprfocus-toggle` - Toggle hyprfocus.
|
||||
{pkgs, ...}: let
|
||||
hyprfocus-on =
|
||||
pkgs.writeShellScriptBin "hyprfocus-on"
|
||||
# bash
|
||||
''
|
||||
hyprpanel-hide
|
||||
|
||||
hyprctl --batch "\
|
||||
keyword animations:enabled 0;\
|
||||
keyword decoration:shadow:enabled 0;\
|
||||
keyword decoration:blur:enabled 0;\
|
||||
keyword general:gaps_in 0;\
|
||||
keyword general:gaps_out 0;\
|
||||
keyword general:border_size 1;\
|
||||
keyword decoration:rounding 0;\
|
||||
keyword decoration:inactive_opacity 1;\
|
||||
keyword decoration:active_opacity 1"
|
||||
|
||||
echo "1" > /tmp/hyprfocus
|
||||
${pkgs.swayosd}/bin/swayosd-client --custom-message="Hyprfocus On" --custom-icon="emblem-default"
|
||||
'';
|
||||
|
||||
hyprfocus-off =
|
||||
pkgs.writeShellScriptBin "hyprfocus-off"
|
||||
# bash
|
||||
''
|
||||
hyprctl reload
|
||||
hyprpanel-show
|
||||
rm /tmp/hyprfocus
|
||||
|
||||
${pkgs.swayosd}/bin/swayosd-client --custom-message="Hyprfocus Off" --custom-icon="emblem-default"
|
||||
'';
|
||||
|
||||
hyprfocus-toggle =
|
||||
pkgs.writeShellScriptBin "hyprfocus-toggle"
|
||||
# bash
|
||||
''
|
||||
if [ -f /tmp/hyprfocus ]; then
|
||||
hyprfocus-off
|
||||
else
|
||||
hyprfocus-on
|
||||
fi
|
||||
'';
|
||||
in {home.packages = [hyprfocus-on hyprfocus-off hyprfocus-toggle];}
|
||||
45
modules/home-manager/scripts/hyprpanel.nix
Normal file
45
modules/home-manager/scripts/hyprpanel.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
# - ## Hyprpanel
|
||||
#-
|
||||
#- Quick scripts to toggle, reload, hide & show hyprpanel.
|
||||
#-
|
||||
#- - `hyprpanel-toggle` - Toggle hyprpanel (hide/show).
|
||||
#- - `hyprpanel-show` - Show hyprpanel.
|
||||
#- - `hyprpanel-hide` - Hide hyprpanel.
|
||||
#- - `hyprpanel-reload` - Reload hyprpanel.
|
||||
{pkgs, ...}: let
|
||||
hyprpanel-toggle = pkgs.writeShellScriptBin "hyprpanel-toggle" ''
|
||||
hyprpanel toggleWindow bar-0
|
||||
hyprpanel toggleWindow bar-1
|
||||
hyprpanel toggleWindow bar-2
|
||||
hyprpanel toggleWindow bar-3
|
||||
'';
|
||||
|
||||
hyprpanel-hide = pkgs.writeShellScriptBin "hyprpanel-hide" ''
|
||||
status=$(hyprpanel isWindowVisible bar-0)
|
||||
if [[ $status == "true" ]]; then
|
||||
hyprpanel toggleWindow bar-0
|
||||
fi
|
||||
status=$(hyprpanel isWindowVisible bar-1)
|
||||
if [[ $status == "true" ]]; then
|
||||
hyprpanel toggleWindow bar-1
|
||||
fi
|
||||
'';
|
||||
|
||||
hyprpanel-show = pkgs.writeShellScriptBin "hyprpanel-show" ''
|
||||
status=$(hyprpanel isWindowVisible bar-0)
|
||||
if [[ $status == "false" ]]; then
|
||||
hyprpanel toggleWindow bar-0
|
||||
fi
|
||||
status=$(hyprpanel isWindowVisible bar-1)
|
||||
if [[ $status == "false" ]]; then
|
||||
hyprpanel toggleWindow bar-1
|
||||
fi
|
||||
'';
|
||||
|
||||
hyprpanel-reload = pkgs.writeShellScriptBin "hyprpanel-reload" ''
|
||||
[ $(pgrep "hyprpanel") ] && pkill hyprpanel
|
||||
hyprctl dispatch exec hyprpanel
|
||||
'';
|
||||
in {
|
||||
home.packages = [hyprpanel-toggle hyprpanel-reload hyprpanel-hide hyprpanel-show];
|
||||
}
|
||||
31
modules/home-manager/scripts/nerdfont-fzf.nix
Normal file
31
modules/home-manager/scripts/nerdfont-fzf.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
# - ## Nerdfont FZF
|
||||
#-
|
||||
#- This module provides a script to search for Nerd Fonts icons using fzf.
|
||||
#-
|
||||
#- - `nerdfont-fzf` - Search for Nerd Fonts icons using fzf.
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
nerdfont-fzf = pkgs.writeShellScriptBin "nerdfont-fzf" ''
|
||||
icons=$(${pkgs.jq}/bin/jq -r 'to_entries[] | "\(.key):\(.value.char)"' "/home/${config.var.username}/.config/nerdfont_glyphnames.json" | awk -F: '{print "\033[95m "$2" \033[0m "$1}')
|
||||
fzf_result=$(echo "$icons" | ${pkgs.fzf}/bin/fzf --ansi --border none | awk '{print $1}')
|
||||
if [ -z "$fzf_result" ]; then
|
||||
echo "No icon selected"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Copied to clipboard: $fzf_result"
|
||||
${pkgs.wl-clipboard}/bin/wl-copy "$fzf_result"
|
||||
'';
|
||||
in {
|
||||
home.packages = [nerdfont-fzf];
|
||||
|
||||
xdg.configFile."nerdfont_glyphnames.json" = {
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/ryanoasis/nerd-fonts/384b1825ea0037b0314f7f9c660a80c1ecdb219a/glyphnames.json";
|
||||
hash = "sha256-Ps0dyFcMs51RMTthBOVSOf/lafPV/53JxuNSKlmZ7cc=";
|
||||
};
|
||||
};
|
||||
}
|
||||
71
modules/home-manager/scripts/night-shift.nix
Normal file
71
modules/home-manager/scripts/night-shift.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
# - ## Night-Shift
|
||||
#-
|
||||
#- Night-Shift is a feature that reduces the amount of blue light emitted by your screen, which can help reduce eye strain and improve sleep quality. This module provides a set of scripts to control Night-Shift on your system.
|
||||
#- It use hyprsunset to control the screen temperature.
|
||||
#-
|
||||
#- - `night-shift-on` activates Night-Shift.
|
||||
#- - `night-shift-off` deactivates Night-Shift.
|
||||
#- - `night-shift` toggles Night-Shift.
|
||||
#- - `night-shift-status` checks if Night-Shift is active. (0/1)
|
||||
#- - `night-shift-status-icon` checks if Night-Shift is active. (icon)
|
||||
{pkgs, ...}: let
|
||||
value = "4500"; # Default value for night-shift temperature
|
||||
|
||||
night-shift-on =
|
||||
pkgs.writeShellScriptBin "night-shift-on"
|
||||
# bash
|
||||
''
|
||||
${pkgs.hyprsunset}/bin/hyprsunset -t ${value} &
|
||||
${pkgs.swayosd}/bin/swayosd-client --custom-message="Night-Shift On" --custom-icon="emblem-default"
|
||||
'';
|
||||
|
||||
night-shift-off =
|
||||
pkgs.writeShellScriptBin "night-shift-off"
|
||||
# bash
|
||||
''
|
||||
pkill hyprsunset
|
||||
${pkgs.swayosd}/bin/swayosd-client --custom-message="Night-Shift Off" --custom-icon="emblem-default"
|
||||
'';
|
||||
|
||||
night-shift =
|
||||
pkgs.writeShellScriptBin "night-shift"
|
||||
# bash
|
||||
''
|
||||
if pidof "hyprsunset"; then
|
||||
night-shift-off
|
||||
else
|
||||
night-shift-on
|
||||
fi
|
||||
'';
|
||||
|
||||
night-shift-status =
|
||||
pkgs.writeShellScriptBin "night-shift-status"
|
||||
# bash
|
||||
''
|
||||
if pidof "hyprsunset"; then
|
||||
echo "1"
|
||||
else
|
||||
echo "0"
|
||||
fi
|
||||
'';
|
||||
|
||||
night-shift-status-icon =
|
||||
pkgs.writeShellScriptBin "night-shift-status-icon"
|
||||
# bash
|
||||
''
|
||||
if pidof "hyprsunset"; then
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
home.packages = [
|
||||
pkgs.hyprsunset
|
||||
night-shift-on
|
||||
night-shift-off
|
||||
night-shift
|
||||
night-shift-status
|
||||
night-shift-status-icon
|
||||
];
|
||||
}
|
||||
77
modules/home-manager/scripts/nixy.nix
Normal file
77
modules/home-manager/scripts/nixy.nix
Normal file
@@ -0,0 +1,77 @@
|
||||
# - ## Nixy
|
||||
#-
|
||||
#- Nixy is a simple script that I use to manage my NixOS system. It's a simple script that provides a menu to rebuild, test, update, collect garbage, clean boot menu, etc.
|
||||
#-
|
||||
#- - `nixy` - UI wizard to manage the system.
|
||||
#- - `nixy rebuild` - Rebuild the system.
|
||||
#- - `nixy ...` - ... see the script for more commands.
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
configDirectory = config.var.configDirectory;
|
||||
|
||||
nixy = pkgs.writeShellScriptBin "nixy"
|
||||
# bash
|
||||
''
|
||||
function exec() {
|
||||
$@
|
||||
}
|
||||
|
||||
function ui(){
|
||||
DEFAULT_ICON=""
|
||||
|
||||
# "icon;name;command"[]
|
||||
apps=(
|
||||
";Rebuild;nixy rebuild"
|
||||
";Test;nixy test"
|
||||
";Update;nixy update"
|
||||
";Collect Garbage;nixy gc"
|
||||
";Clean Boot Menu;nixy cb"
|
||||
";List generation;nixy listgen"
|
||||
";Hyprland Keybindings;nvim ${configDirectory}/docs/KEYBINDINGS-HYPRLAND.md"
|
||||
";Wallpapers;zen https://github.com/anotherhadi/nixy-wallpapers"
|
||||
)
|
||||
|
||||
# Apply default icons if empty:
|
||||
for i in "''${!apps[@]}"; do
|
||||
apps[i]=$(echo "''${apps[i]}" | sed 's/^;/'$DEFAULT_ICON';/')
|
||||
done
|
||||
|
||||
fzf_result=$(printf "%s\n" "''${apps[@]}" | awk -F ';' '{print $1" "$2}' | fzf)
|
||||
[[ -z $fzf_result ]] && exit 0
|
||||
fzf_result=''${fzf_result/ /;}
|
||||
line=$(printf "%s\n" "''${apps[@]}" | grep "$fzf_result")
|
||||
command=$(echo "$line" | sed 's/^[^;]*;//;s/^[^;]*;//')
|
||||
|
||||
exec "$command"
|
||||
exit $?
|
||||
}
|
||||
|
||||
[[ $1 == "" ]] && ui
|
||||
|
||||
if [[ $1 == "rebuild" ]];then
|
||||
cd ${configDirectory} && git add . && sudo nixos-rebuild switch --flake
|
||||
elif [[ $1 == "test" ]];then
|
||||
cd ${configDirectory} && git add . && sudo nixos-rebuild test --flake
|
||||
elif [[ $1 == "update" ]];then
|
||||
cd ${configDirectory} && nix flake update
|
||||
elif [[ $1 == "gc" ]];then
|
||||
echo "Starting Nix garbage collection..."
|
||||
cd ${configDirectory} && \
|
||||
echo "Cleaning up system garbage..." && \
|
||||
sudo nix-collect-garbage -d && \
|
||||
echo "Cleaning up user garbage..." && \
|
||||
nix-collect-garbage -d && \
|
||||
echo "Collecting garbage from Nix store..." && \
|
||||
nix-store --gc && \
|
||||
echo "Optimizing Nix store..." && \
|
||||
nix-store --optimise
|
||||
echo "Nix garbage collection complete."
|
||||
elif [[ $1 == "cb" ]];then
|
||||
sudo /run/current-system/bin/switch-to-configuration boot
|
||||
elif [[ $1 == "listgen" ]];then
|
||||
sudo nix-env -p /nix/var/nix/profiles/system --list-generations
|
||||
else
|
||||
echo "Unknown argument"
|
||||
fi
|
||||
'';
|
||||
in { home.packages = [ nixy ]; }
|
||||
31
modules/home-manager/scripts/notification.nix
Normal file
31
modules/home-manager/scripts/notification.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
# - ## Notif
|
||||
#-
|
||||
# This file provides a script to send custom notifications using `notify-send`.
|
||||
#-
|
||||
#- - `notif {id} {title} {description}` - Sends a notification
|
||||
{pkgs, ...}: let
|
||||
notif =
|
||||
pkgs.writeShellScriptBin "notif" # bash
|
||||
|
||||
''
|
||||
# Shell script to send custom notifications
|
||||
# Usage: notif "sender_id" "message" ["description"]
|
||||
NOTIF_FOLDER="/tmp/notif"
|
||||
sender_id=$1 # To overwrite existing notifications
|
||||
title=$2
|
||||
description=$3
|
||||
|
||||
[[ -d "$NOTIF_FOLDER" ]] || mkdir $NOTIF_FOLDER
|
||||
[[ -f "$NOTIF_FOLDER/$sender_id" ]] || (echo "0" > "$NOTIF_FOLDER/$sender_id")
|
||||
|
||||
old_notification_id=$(cat "$NOTIF_FOLDER/$sender_id")
|
||||
[[ -z "$old_notification_id" ]] && old_notification_id=0
|
||||
|
||||
${pkgs.libnotify}/bin/notify-send \
|
||||
--replace-id="$old_notification_id" --print-id \
|
||||
--app-name="$sender_id" \
|
||||
"$title" \
|
||||
"$description" \
|
||||
> "$NOTIF_FOLDER/$sender_id"
|
||||
'';
|
||||
in {home.packages = [pkgs.libnotify notif];}
|
||||
32
modules/home-manager/scripts/screenshot.nix
Normal file
32
modules/home-manager/scripts/screenshot.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
# - ## Screenshot
|
||||
#-
|
||||
#- This module provides a script to take screenshots using `grimblast` and `swappy`.
|
||||
#-
|
||||
#- - `screenshot [region|window|monitor] [swappy]` - Take a screenshot of the region, window, or monitor. Optionally, use `swappy` to copy the screenshot to the clipboard.
|
||||
{pkgs, ...}: let
|
||||
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
||||
if [[ $2 == "swappy" ]];then
|
||||
folder="/tmp"
|
||||
else
|
||||
folder="$HOME/Pictures"
|
||||
fi
|
||||
filename="$(date +%Y-%m-%d_%H:%M:%S).png"
|
||||
|
||||
if [[ $1 == "window" ]];then
|
||||
mode="active"
|
||||
elif [[ $1 == "region" ]];then
|
||||
mode="area"
|
||||
elif [[ $1 == "monitor" ]];then
|
||||
mode="output"
|
||||
fi
|
||||
|
||||
${pkgs.grimblast}/bin/grimblast --notify --freeze copysave $mode "$folder/$filename" || exit 1
|
||||
|
||||
if [[ $2 == "swappy" ]];then
|
||||
${pkgs.swappy}/bin/swappy -f "$folder/$filename" -o "$HOME/Pictures/$filename"
|
||||
exit 0
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
home.packages = [ screenshot pkgs.grim pkgs.grimblast ];
|
||||
}
|
||||
36
modules/home-manager/scripts/sounds.nix
Normal file
36
modules/home-manager/scripts/sounds.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
# - ## Sound
|
||||
#-
|
||||
#- This module provides a set of scripts to control the volume of the default audio sink using `wpctl`.
|
||||
#-
|
||||
#- - `sound-up` increases the volume by 5%.
|
||||
#- - `sound-down` decreases the volume by 5%.
|
||||
#- - `sound-set [value]` sets the volume to the given value.
|
||||
#- - `sound-toggle` toggles the mute state of the default audio sink.
|
||||
{pkgs, ...}: let
|
||||
increments = "5";
|
||||
|
||||
sound-change = pkgs.writeShellScriptBin "sound-change" ''
|
||||
[[ $1 == "mute" ]] && wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
[[ $1 == "up" ]] && wpctl set-volume @DEFAULT_AUDIO_SINK@ ''${2-${increments}}%+
|
||||
[[ $1 == "down" ]] && wpctl set-volume @DEFAULT_AUDIO_SINK@ ''${2-${increments}}%-
|
||||
[[ $1 == "set" ]] && wpctl set-volume @DEFAULT_AUDIO_SINK@ ''${2-100}%
|
||||
'';
|
||||
|
||||
sound-up = pkgs.writeShellScriptBin "sound-up" ''
|
||||
sound-change up ${increments}
|
||||
'';
|
||||
|
||||
sound-set = pkgs.writeShellScriptBin "sound-set" ''
|
||||
sound-change set ''${1-100}
|
||||
'';
|
||||
|
||||
sound-down = pkgs.writeShellScriptBin "sound-down" ''
|
||||
sound-change down ${increments}
|
||||
'';
|
||||
|
||||
sound-toggle = pkgs.writeShellScriptBin "sound-toggle" ''
|
||||
sound-change mute
|
||||
'';
|
||||
in {
|
||||
home.packages = [sound-change sound-up sound-down sound-toggle sound-set];
|
||||
}
|
||||
69
modules/home-manager/scripts/system.nix
Normal file
69
modules/home-manager/scripts/system.nix
Normal file
@@ -0,0 +1,69 @@
|
||||
# - ## System
|
||||
#-
|
||||
#- Usefull quick scripts
|
||||
#-
|
||||
#- - `lock` - Lock the screen. (hyprlock)
|
||||
#- - `powermode-toggle` - Toggle between performance and balanced power mode. (powerprofilesctl)
|
||||
{pkgs, ...}: let
|
||||
menu =
|
||||
pkgs.writeShellScriptBin "menu"
|
||||
# bash
|
||||
''
|
||||
if pgrep wofi; then
|
||||
pkill wofi
|
||||
else
|
||||
wofi -p "Apps" --show drun
|
||||
fi
|
||||
'';
|
||||
powermenu =
|
||||
pkgs.writeShellScriptBin "powermenu"
|
||||
# bash
|
||||
''
|
||||
if pgrep wofi >/dev/null; then
|
||||
pkill wofi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
declare -A actions=(
|
||||
[" Lock"]="hyprlock"
|
||||
[" Logout"]="hyprctl dispatch exit"
|
||||
[" Suspend"]="systemctl suspend"
|
||||
[" Reboot"]="systemctl reboot"
|
||||
[" Shutdown"]="systemctl poweroff"
|
||||
)
|
||||
|
||||
selected_option=$(
|
||||
printf '%s\n' "''${!actions[@]}" | wofi -p "Powermenu" --dmenu
|
||||
)
|
||||
|
||||
if [[ -n "$selected_option" ]]; then
|
||||
|
||||
action_command=''${actions["''$selected_option"]}
|
||||
|
||||
if [[ -n "$action_command" ]]; then
|
||||
eval "$action_command"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
|
||||
lock =
|
||||
pkgs.writeShellScriptBin "lock"
|
||||
# bash
|
||||
''
|
||||
${pkgs.hyprlock}/bin/hyprlock
|
||||
'';
|
||||
|
||||
powermode-toggle =
|
||||
pkgs.writeShellScriptBin "powermode-toggle"
|
||||
# bash
|
||||
''
|
||||
current_profile=$(powerprofilesctl get)
|
||||
if [ "$current_profile" = "performance" ]; then
|
||||
powerprofilesctl set balanced
|
||||
${pkgs.swayosd}/bin/swayosd-client --custom-message="Powermode set to balanced" --custom-icon="emblem-default"
|
||||
else
|
||||
powerprofilesctl set performance
|
||||
${pkgs.swayosd}/bin/swayosd-client --custom-message="Powermode set to performance" --custom-icon="emblem-default"
|
||||
fi
|
||||
'';
|
||||
in {home.packages = [lock powermode-toggle menu powermenu];}
|
||||
4
modules/home-manager/shell/default.nix
Normal file
4
modules/home-manager/shell/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
# Import all shell configurations
|
||||
{
|
||||
imports = [./fzf.nix ./zsh.nix ./starship.nix ./zoxide.nix ./eza.nix];
|
||||
}
|
||||
13
modules/home-manager/shell/eza.nix
Normal file
13
modules/home-manager/shell/eza.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
# Eza is a ls replacement
|
||||
{
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
icons = "auto";
|
||||
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--no-quotes"
|
||||
"--icons=always"
|
||||
];
|
||||
};
|
||||
}
|
||||
33
modules/home-manager/shell/fzf.nix
Normal file
33
modules/home-manager/shell/fzf.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
# Fzf is a general-purpose command-line fuzzy finder.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
accent = "#" + config.lib.stylix.colors.base0D;
|
||||
foreground = "#" + config.lib.stylix.colors.base05;
|
||||
muted = "#" + config.lib.stylix.colors.base03;
|
||||
in {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
colors = lib.mkForce {
|
||||
"fg+" = accent;
|
||||
"bg+" = "-1";
|
||||
"fg" = foreground;
|
||||
"bg" = "-1";
|
||||
"prompt" = muted;
|
||||
"pointer" = accent;
|
||||
};
|
||||
defaultOptions = [
|
||||
"--margin=1"
|
||||
"--layout=reverse"
|
||||
"--border=none"
|
||||
"--info='hidden'"
|
||||
"--header=''"
|
||||
"--prompt='/ '"
|
||||
"-i"
|
||||
"--no-bold"
|
||||
];
|
||||
};
|
||||
}
|
||||
72
modules/home-manager/shell/starship.nix
Normal file
72
modules/home-manager/shell/starship.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
# starship is a minimal, fast, and extremely customizable prompt for any shell!
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
accent = "#${config.lib.stylix.colors.base0D}";
|
||||
background-alt = "#${config.lib.stylix.colors.base01}";
|
||||
in
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
|
||||
format = lib.concatStrings [
|
||||
"$nix_shell"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"$line_break"
|
||||
"$character"
|
||||
];
|
||||
|
||||
directory = {
|
||||
style = accent;
|
||||
truncation_length = 99;
|
||||
truncate_to_repo = false;
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](${accent})";
|
||||
error_symbol = "[❯](red)";
|
||||
vimcmd_symbol = "[❮](${accent})";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
format = "[$symbol]($style) ";
|
||||
symbol = "🐚";
|
||||
style = "";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
symbol = "[](${background-alt}) ";
|
||||
style = "fg:${accent} bg:${background-alt}";
|
||||
format = "on [$symbol$branch]($style)[](${background-alt}) ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed)]($style)";
|
||||
style = "cyan";
|
||||
conflicted = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
stashed = "≡";
|
||||
};
|
||||
|
||||
git_state = {
|
||||
format = "([$state( $progress_current/$progress_total)]($style)) ";
|
||||
style = "bright-black";
|
||||
};
|
||||
|
||||
line_break = {
|
||||
disabled = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
7
modules/home-manager/shell/zoxide.nix
Normal file
7
modules/home-manager/shell/zoxide.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
# Zoxide is a cd replacement
|
||||
{
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
214
modules/home-manager/shell/zsh.nix
Normal file
214
modules/home-manager/shell/zsh.nix
Normal file
@@ -0,0 +1,214 @@
|
||||
# My shell configuration
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
fetch = config.theme.fetch; # neofetch, nerdfetch, pfetch
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
bat
|
||||
ripgrep
|
||||
tldr
|
||||
sesh
|
||||
];
|
||||
|
||||
# Add go binaries to the PATH
|
||||
home.sessionPath = [ "$HOME/go/bin" ];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
highlighters = [
|
||||
"main"
|
||||
"brackets"
|
||||
"pattern"
|
||||
"regexp"
|
||||
"root"
|
||||
"line"
|
||||
];
|
||||
};
|
||||
historySubstringSearch.enable = true;
|
||||
|
||||
history = {
|
||||
ignoreDups = true;
|
||||
save = 10000;
|
||||
size = 10000;
|
||||
};
|
||||
|
||||
profileExtra = lib.optionalString (config.home.sessionPath != [ ]) ''
|
||||
export PATH="$PATH''${PATH:+:}${lib.concatStringsSep ":" config.home.sessionPath}"
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
c = "clear";
|
||||
clera = "clear";
|
||||
celar = "clear";
|
||||
e = "exit";
|
||||
cd = "z";
|
||||
ls = "eza --icons=always --no-quotes";
|
||||
tree = "eza --icons=always --tree --no-quotes";
|
||||
sl = "ls";
|
||||
open = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||
cat = "bat --theme=base16 --color=always --paging=never --tabs=2 --wrap=never --plain";
|
||||
mkdir = "mkdir -p";
|
||||
|
||||
obsidian-no-gpu = "env ELECTRON_OZONE_PLATFORM_HINT=auto obsidian --ozone-platform=x11";
|
||||
wireguard-import = "nmcli connection import type wireguard file";
|
||||
|
||||
notes = "nvim ~/notes/index.md --cmd 'cd ~/notes' -c ':lua Snacks.picker.smart()'";
|
||||
note = "notes";
|
||||
tmp = "nvim /tmp/$(date | sed 's/ //g;s/\\.//g').md";
|
||||
|
||||
nix-shell = "nix-shell --command zsh";
|
||||
|
||||
# git
|
||||
g = "lazygit";
|
||||
ga = "git add";
|
||||
gc = "git commit";
|
||||
gcu = "git add . && git commit -m 'Update'";
|
||||
gp = "git push";
|
||||
gpl = "git pull";
|
||||
gs = "git status";
|
||||
gd = "git diff";
|
||||
gco = "git checkout";
|
||||
gcb = "git checkout -b";
|
||||
gbr = "git branch";
|
||||
grs = "git reset HEAD~1";
|
||||
grh = "git reset --hard HEAD~1";
|
||||
|
||||
gaa = "git add .";
|
||||
gcm = "git commit -m";
|
||||
};
|
||||
|
||||
initContent =
|
||||
# bash
|
||||
''
|
||||
bindkey -v
|
||||
export KEYTIMEOUT=1
|
||||
|
||||
${
|
||||
if fetch == "neofetch" then
|
||||
pkgs.neofetch + "/bin/neofetch"
|
||||
else if fetch == "nerdfetch" then
|
||||
"nerdfetch"
|
||||
else if fetch == "pfetch" then
|
||||
"echo; ${pkgs.pfetch}/bin/pfetch"
|
||||
else
|
||||
""
|
||||
}
|
||||
|
||||
function sesh-sessions() {
|
||||
session=$(sesh list -t -c | fzf --height 70% --reverse)
|
||||
[[ -z "$session" ]] && return
|
||||
sesh connect $session
|
||||
}
|
||||
|
||||
function chatgptfolder(){
|
||||
echo "################################"
|
||||
echo "### TREE ###"
|
||||
echo "################################"
|
||||
${pkgs.eza}/bin/eza --tree -aF --icons never
|
||||
echo -e "\n\n"
|
||||
echo "##############################"
|
||||
echo "### CONTENT ###"
|
||||
echo "##############################"
|
||||
find . -type f -not -path '*/.git/*' -print0 | while IFS= read -r -d "" file; do
|
||||
echo -e "\n--- DEBUT: $file ---\n"
|
||||
cat "$file"
|
||||
echo -e "\n--- FIN: $file ---\n"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
function n4c() {
|
||||
category=''${1:-all}
|
||||
shift
|
||||
args=''${*}
|
||||
nix develop "github:nix4cyber/n4c#''${category}" ''${args} -c zsh
|
||||
}
|
||||
|
||||
zle -N sesh-sessions
|
||||
bindkey -M emacs '\es' sesh-sessions
|
||||
bindkey -M vicmd '\es' sesh-sessions
|
||||
bindkey -M viins '\es' sesh-sessions
|
||||
|
||||
# search history based on what's typed in the prompt
|
||||
autoload -U history-search-end
|
||||
zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
bindkey "^[OA" history-beginning-search-backward-end
|
||||
bindkey "^[OB" history-beginning-search-forward-end
|
||||
|
||||
# General completion behavior
|
||||
zstyle ':completion:*' completer _extensions _complete _approximate
|
||||
|
||||
# Use cache
|
||||
zstyle ':completion:*' use-cache on
|
||||
zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache"
|
||||
|
||||
# Complete the alias
|
||||
zstyle ':completion:*' complete true
|
||||
|
||||
# Autocomplete options
|
||||
zstyle ':completion:*' complete-options true
|
||||
|
||||
# Completion matching control
|
||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*' keep-prefix true
|
||||
|
||||
# Group matches and describe
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' list-grouped false
|
||||
zstyle ':completion:*' list-separator '''
|
||||
zstyle ':completion:*' group-name '''
|
||||
zstyle ':completion:*' verbose yes
|
||||
zstyle ':completion:*:matches' group 'yes'
|
||||
zstyle ':completion:*:warnings' format '%F{red}%B-- No match for: %d --%b%f'
|
||||
zstyle ':completion:*:messages' format '%d'
|
||||
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
|
||||
zstyle ':completion:*:descriptions' format '[%d]'
|
||||
|
||||
# Colors
|
||||
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
|
||||
|
||||
# case insensitive tab completion
|
||||
zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||
zstyle ':completion:*:*:cd:*:directory-stack' menu yes select
|
||||
zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand'
|
||||
zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands
|
||||
zstyle ':completion:*' special-dirs true
|
||||
zstyle ':completion:*' squeeze-slashes true
|
||||
|
||||
# Sort
|
||||
zstyle ':completion:*' sort false
|
||||
zstyle ":completion:*:git-checkout:*" sort false
|
||||
zstyle ':completion:*' file-sort modification
|
||||
zstyle ':completion:*:eza' sort false
|
||||
zstyle ':completion:complete:*:options' sort false
|
||||
zstyle ':completion:files' sort false
|
||||
|
||||
${lib.optionalString config.services.gpg-agent.enable ''
|
||||
gnupg_path=$(ls $XDG_RUNTIME_DIR/gnupg)
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/$gnupg_path/S.gpg-agent.ssh"
|
||||
''}
|
||||
|
||||
# Allow foot to pipe command output
|
||||
function precmd {
|
||||
if ! builtin zle; then
|
||||
print -n "\e]133;D\e\\"
|
||||
fi
|
||||
}
|
||||
function preexec {
|
||||
print -n "\e]133;C\e\\"
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
44
modules/home-manager/spicetify.nix
Normal file
44
modules/home-manager/spicetify.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
# Spicetify is a spotify client customizer
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||
accent = "${config.lib.stylix.colors.base0D}";
|
||||
background = "${config.lib.stylix.colors.base00}";
|
||||
in
|
||||
{
|
||||
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
|
||||
|
||||
stylix.targets.spicetify.enable = false;
|
||||
|
||||
programs.spicetify = {
|
||||
enable = true;
|
||||
theme = lib.mkForce spicePkgs.themes.dribbblish;
|
||||
|
||||
colorScheme = "custom";
|
||||
|
||||
customColorScheme = {
|
||||
button = accent;
|
||||
button-active = accent;
|
||||
tab-active = accent;
|
||||
player = background;
|
||||
main = background;
|
||||
sidebar = background;
|
||||
};
|
||||
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
playlistIcons
|
||||
lastfm
|
||||
historyShortcut
|
||||
hidePodcasts
|
||||
adblock
|
||||
fullAppDisplay
|
||||
keyboardShortcut
|
||||
];
|
||||
};
|
||||
}
|
||||
9
modules/home-manager/ssh.nix
Normal file
9
modules/home-manager/ssh.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
includes = [
|
||||
config.sops.secrets.ssh_config_orion.path
|
||||
];
|
||||
};
|
||||
}
|
||||
137
modules/home-manager/thunar.nix
Normal file
137
modules/home-manager/thunar.nix
Normal file
@@ -0,0 +1,137 @@
|
||||
# Thunar is a file explorer
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
user = config.var.username;
|
||||
in {
|
||||
# ctrl + m to toggle the menubar
|
||||
home.packages = with pkgs; [
|
||||
xfce.thunar
|
||||
xfce.xfconf
|
||||
xfce.tumbler
|
||||
xfce.thunar-archive-plugin
|
||||
xfce.thunar-volman
|
||||
xfce.thunar-media-tags-plugin
|
||||
p7zip
|
||||
xarchiver
|
||||
];
|
||||
|
||||
gtk = {
|
||||
iconTheme = {
|
||||
name = "WhiteSur";
|
||||
package = pkgs.whitesur-icon-theme.override {
|
||||
boldPanelIcons = true;
|
||||
alternativeIcons = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_ICON_DIR = "${pkgs.whitesur-icon-theme}/share/icons/WhiteSur";
|
||||
};
|
||||
|
||||
# bookmarks for the side pane
|
||||
gtk.gtk3.bookmarks = [
|
||||
"file:///home/${user}/Downloads Downloads"
|
||||
"file:///home/${user}/Pictures Pictures"
|
||||
"file:///home/${user}/.config/nixos NixOS"
|
||||
"file:///home/${user}/dev Development"
|
||||
];
|
||||
|
||||
home.file.".config/xarchiver/xarchiverrc".text = ''
|
||||
[xarchiver]
|
||||
preferred_format=0
|
||||
prefer_unzip=true
|
||||
confirm_deletion=true
|
||||
sort_filename_content=false
|
||||
advanced_isearch=true
|
||||
auto_expand=true
|
||||
store_output=false
|
||||
icon_size=2
|
||||
show_archive_comment=false
|
||||
show_sidebar=true
|
||||
show_location_bar=true
|
||||
show_toolbar=true
|
||||
preferred_custom_cmd=
|
||||
preferred_temp_dir=/tmp
|
||||
preferred_extract_dir=/home/${user}/Downloads
|
||||
allow_sub_dir=0
|
||||
ensure_directory=true
|
||||
overwrite=false
|
||||
full_path=2
|
||||
touch=false
|
||||
fresh=false
|
||||
update=false
|
||||
store_path=false
|
||||
updadd=true
|
||||
freshen=false
|
||||
recurse=true
|
||||
solid_archive=false
|
||||
remove_files=false
|
||||
'';
|
||||
|
||||
home.file.".config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml".text = ''
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<channel name="thunar" version="1.0">
|
||||
<property name="last-view" type="string" value="ThunarIconView"/>
|
||||
<property name="last-icon-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_100_PERCENT"/>
|
||||
<property name="last-window-maximized" type="bool" value="true"/>
|
||||
<property name="last-separator-position" type="int" value="170"/>
|
||||
<property name="last-statusbar-visible" type="bool" value="false"/>
|
||||
<property name="last-menubar-visible" type="bool" value="false"/>
|
||||
<property name="misc-single-click" type="bool" value="false"/>
|
||||
<property name="shortcuts-icon-emblems" type="bool" value="true"/>
|
||||
<property name="tree-icon-emblems" type="bool" value="true"/>
|
||||
<property name="misc-file-size-binary" type="bool" value="true"/>
|
||||
<property name="misc-thumbnail-draw-frames" type="bool" value="false"/>
|
||||
<property name="misc-text-beside-icons" type="bool" value="true"/>
|
||||
<property name="misc-change-window-icon" type="bool" value="true"/>
|
||||
<property name="hidden-bookmarks" type="array">
|
||||
<value type="string" value="computer:///"/>
|
||||
<value type="string" value="recent:///"/>
|
||||
<value type="string" value="file:///"/>
|
||||
<value type="string" value="network:///"/>
|
||||
</property>
|
||||
<property name="hidden-devices" type="array">
|
||||
<value type="string" value="52FEA905FEA8E309"/>
|
||||
</property>
|
||||
<property name="last-toolbar-item-order" type="string" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
|
||||
<property name="last-toolbar-visible-buttons" type="string" value="0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0"/>
|
||||
<property name="last-location-bar" type="string" value="ThunarLocationButtons"/>
|
||||
<property name="last-show-hidden" type="bool" value="false"/>
|
||||
<property name="last-details-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_38_PERCENT"/>
|
||||
<property name="last-details-view-column-widths" type="string" value="50,50,127,50,50,50,50,50,751,50,50,75,50,145"/>
|
||||
<property name="last-toolbar-items" type="string" value="menu:1,back:1,forward:0,open-parent:0,open-home:0,undo:0,redo:0,zoom-in:0,zoom-out:0,zoom-reset:0,view-as-icons:0,view-as-detailed-list:0,view-as-compact-list:0,toggle-split-view:0,location-bar:1,reload:0,search:1,uca-action-1710183590071525-1:0,new-tab:0,new-window:0,view-switcher:0"/>
|
||||
</channel>
|
||||
'';
|
||||
|
||||
xdg.configFile."Thunar/uca.xml".text = ''
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<actions>
|
||||
<action>
|
||||
<icon>utilities-terminal</icon>
|
||||
<name>Open Terminal Here</name>
|
||||
<unique-id>1700000000000001</unique-id>
|
||||
<command>kitty -d %f</command>
|
||||
<description>Opens Kitty terminal in the selected folder</description>
|
||||
<patterns>*</patterns>
|
||||
<startup-notify/>
|
||||
<directories/>
|
||||
</action>
|
||||
<action>
|
||||
<icon></icon>
|
||||
<name>Extract here</name>
|
||||
<submenu></submenu>
|
||||
<unique-id>1689618425925956-3</unique-id>
|
||||
<command>xarchiver -x . %f</command>
|
||||
<description>Extracts the archive into the directory it is located in.</description>
|
||||
<range>*</range>
|
||||
<patterns>*.tar.bz2;*.tar.gz;*.tar.xz;*.tar.Z;*.tar;*.taz;*.tb2;*.tbz;*.tbz2;*.tgz;*.txz;*.zip;*.bz2;*.docx;*.apk;*.gz;*.odt;</patterns>
|
||||
<other-files/>
|
||||
</action>
|
||||
</actions>
|
||||
'';
|
||||
}
|
||||
59
modules/home-manager/thunderbird.nix
Normal file
59
modules/home-manager/thunderbird.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.kiri = {
|
||||
isDefault = true;
|
||||
withExternalGnupg = true;
|
||||
settings = {
|
||||
# LAYOUT: Force 3-Pane Vertical View (Folders | List | Message)
|
||||
"mail.ui.display.message_pane_vertical" = true;
|
||||
|
||||
# APPEARANCE: Enable "Cards View" (modern multi-line list)
|
||||
# Note: 'cards' is the value for the new view
|
||||
"mail.ui.display.thread_pane_view_type" = "cards";
|
||||
|
||||
# DENSITY: "Compact" is usually cleaner for tech-savvy users
|
||||
"mail.uidensity" = 1; # 0=Default, 1=Compact, 2=Touch
|
||||
|
||||
# PRIVACY & CLEANUP
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"mail.server.server2.hidden" = true; # Hide "Local Folders"
|
||||
|
||||
# Start page disable for faster boot
|
||||
"mailnews.start_page.enabled" = false;
|
||||
|
||||
# Disable the "Get a new email address" feature in account manager
|
||||
"mail.provider.enabled" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enable Thunderbird for specific accounts
|
||||
accounts.email.accounts = {
|
||||
main = {
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
old = {
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
uni = {
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
settings = id: {
|
||||
"mail.smtpserver.smtp_${id}.authMethod" = 10;
|
||||
"mail.server.server_${id}.authMethod" = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
work = {
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
settings = id: {
|
||||
"mail.smtpserver.smtp_${id}.authMethod" = 10;
|
||||
"mail.server.server_${id}.authMethod" = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
12
modules/home-manager/todoman.nix
Normal file
12
modules/home-manager/todoman.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.todoman ];
|
||||
|
||||
xdg.configFile."todoman/config.py".text = ''
|
||||
path = "${config.xdg.dataHome}/calendars/*/*"
|
||||
date_format = "%d-%m-%Y"
|
||||
time_format = "%H:%M"
|
||||
default_list = "personal"
|
||||
default_due = 48
|
||||
'';
|
||||
}
|
||||
8
modules/home-manager/udiskie.nix
Normal file
8
modules/home-manager/udiskie.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
# Udiskie is a simple daemon that uses udisks to automatically mount removable storage devices.
|
||||
{
|
||||
services.udiskie = {
|
||||
enable = true;
|
||||
notify = true;
|
||||
automount = true;
|
||||
};
|
||||
}
|
||||
13
modules/home-manager/vicinae.nix
Normal file
13
modules/home-manager/vicinae.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [ inputs.vicinae.homeManagerModules.default ];
|
||||
|
||||
services.vicinae = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"systemctl enable --now --user vicinae.service"
|
||||
];
|
||||
}
|
||||
102
modules/home-manager/wofi.nix
Normal file
102
modules/home-manager/wofi.nix
Normal file
@@ -0,0 +1,102 @@
|
||||
# Wofi is a launcher for Wayland, inspired by rofi.
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
accent = "#${config.lib.stylix.colors.base0D}";
|
||||
background = "#${config.lib.stylix.colors.base00}";
|
||||
background-alt = "#${config.lib.stylix.colors.base01}";
|
||||
foreground = "#${config.lib.stylix.colors.base05}";
|
||||
font = config.stylix.fonts.serif.name;
|
||||
rounding = config.theme.rounding;
|
||||
font-size = config.stylix.fonts.sizes.popups;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [ wofi-emoji ];
|
||||
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
allow_markup = true;
|
||||
width = 450;
|
||||
show = "drun";
|
||||
prompt = "Apps";
|
||||
normal_window = true;
|
||||
height = 305;
|
||||
allow_images = true;
|
||||
image_size = 24;
|
||||
insensitive = true;
|
||||
hide_scroll = true;
|
||||
no_actions = true;
|
||||
gtk_dark = true;
|
||||
};
|
||||
|
||||
style =
|
||||
lib.mkForce
|
||||
# css
|
||||
''
|
||||
* {
|
||||
font-family: "${font}";
|
||||
font-weight: 500;
|
||||
font-size: ${toString font-size}px;
|
||||
}
|
||||
|
||||
#window {
|
||||
background-color: ${background};
|
||||
color: ${foreground};
|
||||
border-radius: ${toString rounding}px;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
#input {
|
||||
background-color: ${background-alt};
|
||||
border: 0px solid ${accent};
|
||||
color: ${foreground};
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#inner-box {}
|
||||
|
||||
#img {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
#text {
|
||||
color: ${foreground};
|
||||
}
|
||||
|
||||
#text:selected {
|
||||
color: ${foreground};
|
||||
}
|
||||
|
||||
#entry {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: ${accent};
|
||||
color: ${foreground};
|
||||
}
|
||||
|
||||
#unselected {}
|
||||
|
||||
#selected {}
|
||||
|
||||
#input,
|
||||
#entry:selected {
|
||||
border-radius: ${toString rounding}px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
14
modules/home-manager/zathura.nix
Normal file
14
modules/home-manager/zathura.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
# Zathura is a PDF viewer
|
||||
{
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
|
||||
options = {
|
||||
guioptions = "v";
|
||||
adjust-open = "width";
|
||||
statusbar-basename = true;
|
||||
render-loading = false;
|
||||
scroll-step = 120;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user