mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-08-21 10:45:49 +02:00
@@ -1,61 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cursorShaders = pkgs.fetchFromGitHub {
|
||||
owner = "sahaj-b";
|
||||
repo = "ghostty-cursor-shaders";
|
||||
rev = "06d4e90fb5410e9c4d0b3131584060adddf89406";
|
||||
hash = "sha256-G/UIr1bKnxn1AcHl/4FL/jou6b7M2VeREslYVELxdmw=";
|
||||
};
|
||||
c = config.lib.stylix.colors;
|
||||
in {
|
||||
home.sessionVariables = {
|
||||
TERMINAL = "ghostty";
|
||||
TERM = "ghostty";
|
||||
};
|
||||
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
installVimSyntax = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
window-padding-x = 10;
|
||||
confirm-close-surface = false;
|
||||
window-padding-y = 10;
|
||||
# Reuse a single background daemon (started at login, see hyprland exec-once)
|
||||
# so every window opens instantly instead of cold-starting a new process.
|
||||
gtk-single-instance = true;
|
||||
clipboard-read = "allow";
|
||||
clipboard-write = "allow";
|
||||
copy-on-select = "clipboard";
|
||||
app-notifications = false;
|
||||
custom-shader = "${cursorShaders}/cursor_warp.glsl";
|
||||
custom-shader-animation = "always";
|
||||
keybind = [
|
||||
"shift+ctrl+tab=new_tab"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".config/ilovetui/config.yaml".text = ''
|
||||
colors:
|
||||
base00: "#${c.base00}" # Background
|
||||
base01: "#${c.base01}" # Lighter Background / Status Bars
|
||||
base02: "#${c.base02}" # Selection Background
|
||||
base03: "#${c.base03}" # Comments / Invisibles
|
||||
base04: "#${c.base04}" # Dark Foreground / Status Bars
|
||||
base05: "#${c.base05}" # Default Foreground
|
||||
base06: "#${c.base06}" # Light Foreground
|
||||
base07: "#${c.base07}" # Light Background
|
||||
base08: "#${c.base08}" # Variables / Errors / Diff Deleted
|
||||
base09: "#${c.base09}" # Integers / Constants / Booleans
|
||||
base0a: "#${c.base0A}" # Classes / Warnings / Search Background
|
||||
base0b: "#${c.base0B}" # Strings / Success / Diff Inserted
|
||||
base0c: "#${c.base0C}" # Support / Regex / Escape Characters
|
||||
base0d: "#${c.base0D}" # Functions / Methods / Headings / Accent
|
||||
base0e: "#${c.base0E}" # Keywords / Storage / Diff Changed
|
||||
base0f: "#${c.base0F}" # Embedded / Misc
|
||||
'';
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
}:
|
||||
(with pkgs; [
|
||||
go
|
||||
claude-code
|
||||
])
|
||||
++ (with pkgs-stable; [
|
||||
nodejs
|
||||
air
|
||||
duckdb
|
||||
python3
|
||||
jq
|
||||
nix-prefetch-github
|
||||
rsync
|
||||
])
|
||||
@@ -3,5 +3,18 @@
|
||||
pkgs-stable,
|
||||
...
|
||||
}: {
|
||||
home.packages = import ./dev-packages.nix {inherit pkgs pkgs-stable;};
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
go
|
||||
claude-code
|
||||
]
|
||||
++ (with pkgs-stable; [
|
||||
nodejs
|
||||
air
|
||||
duckdb
|
||||
python3
|
||||
jq
|
||||
nix-prefetch-github
|
||||
rsync
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
devPackages = import ./dev-packages.nix {inherit pkgs pkgs-stable;};
|
||||
cyberPackages = import ./cybersecurity-packages.nix {inherit pkgs pkgs-stable;};
|
||||
in {
|
||||
packages.${system} = {
|
||||
dev = pkgs.buildEnv {
|
||||
name = "dev-tools";
|
||||
paths = devPackages;
|
||||
};
|
||||
cybersecurity = pkgs.buildEnv {
|
||||
name = "cybersecurity-tools";
|
||||
paths = cyberPackages;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{pkgs-stable, ...}: {
|
||||
home.packages = with pkgs-stable; [
|
||||
tty-solitaire
|
||||
bastet
|
||||
peaclock
|
||||
cbonsai
|
||||
pipes
|
||||
cmatrix
|
||||
fastfetch
|
||||
];
|
||||
}
|
||||
@@ -111,7 +111,7 @@ in {
|
||||
|
||||
xdg.desktopEntries.helium = {
|
||||
name = "Helium";
|
||||
genericName = "Navigateur Web";
|
||||
genericName = "Web Browser";
|
||||
exec = "${config.programs.helium.package}/bin/helium %U";
|
||||
icon = "${config.programs.helium.package}/share/icons/hicolor/256x256/apps/helium.png";
|
||||
terminal = false;
|
||||
@@ -128,7 +128,7 @@ in {
|
||||
|
||||
xdg.desktopEntries.helium-private = {
|
||||
name = "Helium (Private window)";
|
||||
genericName = "Navigateur Web";
|
||||
genericName = "Web Browser";
|
||||
exec = "${config.programs.helium.package}/bin/helium --incognito %U";
|
||||
icon = "${config.programs.helium.package}/share/icons/hicolor/256x256/apps/helium.png";
|
||||
terminal = false;
|
||||
@@ -0,0 +1,16 @@
|
||||
{pkgs-stable, ...}: {
|
||||
home.packages = with pkgs-stable; [
|
||||
vlc # Video player
|
||||
obsidian # Note taking app
|
||||
textpieces # Manipulate texts
|
||||
resources # Resource monitor
|
||||
gnome-clocks # Clocks app
|
||||
gnome-text-editor # Basic graphic text editor
|
||||
ticktick # Todo app
|
||||
pinta # Image editor
|
||||
switcheroo # Convert images between different formats
|
||||
onlyoffice-desktopeditors # Office suite
|
||||
blanket # Listen to different sounds
|
||||
signal-desktop # Messaging app
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
# Ghostty is a terminal emulator
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cursorShaders = pkgs.fetchFromGitHub {
|
||||
owner = "sahaj-b";
|
||||
repo = "ghostty-cursor-shaders";
|
||||
rev = "06d4e90fb5410e9c4d0b3131584060adddf89406";
|
||||
hash = "sha256-G/UIr1bKnxn1AcHl/4FL/jou6b7M2VeREslYVELxdmw=";
|
||||
};
|
||||
c = config.lib.stylix.colors;
|
||||
in {
|
||||
home.sessionVariables = {
|
||||
TERMINAL = "ghostty";
|
||||
TERM = "ghostty";
|
||||
};
|
||||
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
installVimSyntax = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
window-padding-x = 10;
|
||||
confirm-close-surface = false;
|
||||
window-padding-y = 10;
|
||||
gtk-single-instance = true;
|
||||
clipboard-read = "allow";
|
||||
clipboard-write = "allow";
|
||||
copy-on-select = "clipboard";
|
||||
app-notifications = false;
|
||||
custom-shader = "${cursorShaders}/cursor_warp.glsl";
|
||||
custom-shader-animation = "always";
|
||||
keybind = [
|
||||
"shift+ctrl+tab=new_tab"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -16,6 +16,8 @@ in {
|
||||
"node_modules"
|
||||
"result"
|
||||
"result-*"
|
||||
".superpowers/"
|
||||
"docs/superpowers/"
|
||||
];
|
||||
settings = {
|
||||
user.name = username;
|
||||
@@ -40,13 +42,10 @@ in {
|
||||
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`";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
{config, ...}: let
|
||||
c = config.lib.stylix.colors;
|
||||
in {
|
||||
home.file.".config/ilovetui/config.yaml".text = ''
|
||||
colors:
|
||||
base00: "#${c.base00}" # Background
|
||||
base01: "#${c.base01}" # Lighter Background / Status Bars
|
||||
base02: "#${c.base02}" # Selection Background
|
||||
base03: "#${c.base03}" # Comments / Invisibles
|
||||
base04: "#${c.base04}" # Dark Foreground / Status Bars
|
||||
base05: "#${c.base05}" # Default Foreground
|
||||
base06: "#${c.base06}" # Light Foreground
|
||||
base07: "#${c.base07}" # Light Background
|
||||
base08: "#${c.base08}" # Variables / Errors / Diff Deleted
|
||||
base09: "#${c.base09}" # Integers / Constants / Booleans
|
||||
base0a: "#${c.base0A}" # Classes / Warnings / Search Background
|
||||
base0b: "#${c.base0B}" # Strings / Success / Diff Inserted
|
||||
base0c: "#${c.base0C}" # Support / Regex / Escape Characters
|
||||
base0d: "#${c.base0D}" # Functions / Methods / Headings / Accent
|
||||
base0e: "#${c.base0E}" # Keywords / Storage / Diff Changed
|
||||
base0f: "#${c.base0F}" # Embedded / Misc
|
||||
'';
|
||||
}
|
||||
@@ -4,19 +4,6 @@
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs-stable; [
|
||||
vlc # Video player
|
||||
obsidian # Note taking app
|
||||
textpieces # Manipulate texts
|
||||
resources # Ressource monitor
|
||||
gnome-clocks # Clocks app
|
||||
gnome-text-editor # Basic graphic text editor
|
||||
ticktick # Todo app
|
||||
pinta # Image editor
|
||||
switcheroo # Convert images between different formats
|
||||
onlyoffice-desktopeditors # Office suite
|
||||
blanket # Listen to different sounds
|
||||
signal-desktop # Messaging app
|
||||
|
||||
# I love TUIs
|
||||
caligula # User-friendly, lightweight TUI for disk imaging (ISO, USB BOOT)
|
||||
dysk # A terminal-based disk usage analyzer
|
||||
@@ -40,5 +27,14 @@
|
||||
pastel # Command-line tool to generate, analyze, convert and manipulate colors
|
||||
imagemagick # Image manipulation tool
|
||||
chafa # Image to ANSI/Unicode converter and more.
|
||||
|
||||
# Just cool
|
||||
tty-solitaire
|
||||
bastet
|
||||
peaclock
|
||||
cbonsai
|
||||
pipes
|
||||
cmatrix
|
||||
fastfetch
|
||||
];
|
||||
}
|
||||
@@ -104,7 +104,7 @@
|
||||
alias -s {csv,tsv,parquet,pqt,arrow,db,sqlite,xls,xlsx,xlsm,xlsb,fwf}=tw
|
||||
alias -s {png,jpg,jpeg,gif,pdf}=xdg-open
|
||||
|
||||
# 3. Global Aliases (Remplacés n'importe où dans la commande, pas seulement au début)
|
||||
# 3. Global Aliases (expanded anywhere in the command, not just at the start)
|
||||
alias -g G="| grep"
|
||||
alias -g L="| less"
|
||||
alias -g V="| nvim"
|
||||
@@ -114,7 +114,7 @@
|
||||
alias -g C="| wl-copy"
|
||||
alias -g NE="2>/dev/null"
|
||||
alias -g ND=">/dev/null"
|
||||
alias -g NUL=">/dev/null 2>1"
|
||||
alias -g NUL=">/dev/null 2>&1"
|
||||
|
||||
# search history based on what's typed in the prompt
|
||||
autoload -U history-search-end
|
||||
@@ -403,4 +403,14 @@ in {
|
||||
};
|
||||
|
||||
stylix.targets.swaync.enable = false;
|
||||
|
||||
# GTK 4.22 defaults to the Vulkan renderer, which compiles its graphics
|
||||
# pipelines lazily on the first frame. The control center has many distinct
|
||||
# visual elements, so the first open triggers a big burst of pipeline
|
||||
# compilation (a multi-second stall on a cold boot) while later opens reuse
|
||||
# the in-process cache. The GL (ngl) renderer avoids this: it stays
|
||||
# GPU-accelerated and benefits from Mesa's on-disk shader cache, so the
|
||||
# first open is as fast as the rest. Scoped to swaync so other GTK4 apps
|
||||
# keep the Vulkan renderer.
|
||||
systemd.user.services.swaync.Service.Environment = ["GSK_RENDERER=ngl"];
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
fi
|
||||
'';
|
||||
|
||||
# Résout $src : source par défaut, sinon première source disponible.
|
||||
# Certaines machines n'ont pas de source audio par défaut (@DEFAULT_AUDIO_SOURCE@ non résolu).
|
||||
# Resolve $src: the default source, otherwise the first available source.
|
||||
# Some machines have no default audio source (@DEFAULT_AUDIO_SOURCE@ unresolved).
|
||||
micSource = ''
|
||||
src=$(${pkgs.wireplumber}/bin/wpctl inspect @DEFAULT_AUDIO_SOURCE@ 2>/dev/null | sed -n 's/^id \([0-9]*\),.*/\1/p')
|
||||
if [ -z "$src" ]; then
|
||||
@@ -42,8 +42,8 @@
|
||||
fi
|
||||
'';
|
||||
|
||||
# tofi en mode dmenu vertical : la config globale est un lanceur horizontal de
|
||||
# 36px de haut, inutilisable pour une liste. On surcharge la géométrie.
|
||||
# tofi in vertical dmenu mode: the global config is a 36px-tall horizontal
|
||||
# launcher, unusable for a list, so override the geometry here.
|
||||
tofiMenu = "${pkgs.tofi}/bin/tofi --horizontal false --anchor center --width 700 --height 500 --margin-top 0 --margin-left 0 --margin-right 0 --num-results 10";
|
||||
in {
|
||||
bluetoothScript = pkgs.writeShellScript "waybar-bluetooth" ''
|
||||
@@ -264,7 +264,7 @@ in {
|
||||
jq=${pkgs.jq}/bin/jq
|
||||
pwdump=${pkgs.pipewire}/bin/pw-dump
|
||||
|
||||
# IDs des sinks dans l'ordre de pw-dump.
|
||||
# Sink IDs in pw-dump order.
|
||||
ids=($("$pwdump" | "$jq" -r '.[] | select(.info.props."media.class"=="Audio/Sink") | .id'))
|
||||
n=''${#ids[@]}
|
||||
[ "$n" -eq 0 ] && exit 0
|
||||
@@ -291,7 +291,7 @@ in {
|
||||
jq=${pkgs.jq}/bin/jq
|
||||
pwdump=${pkgs.pipewire}/bin/pw-dump
|
||||
|
||||
# IDs des sources dans l'ordre de pw-dump.
|
||||
# Source IDs in pw-dump order.
|
||||
ids=($("$pwdump" | "$jq" -r '.[] | select(.info.props."media.class"=="Audio/Source") | .id'))
|
||||
n=''${#ids[@]}
|
||||
[ "$n" -eq 0 ] && exit 0
|
||||
@@ -314,7 +314,7 @@ in {
|
||||
'';
|
||||
|
||||
color-pick = pkgs.writeShellScriptBin "color-pick" ''
|
||||
# hyprpicker -a copie déjà la couleur dans le presse-papier.
|
||||
# hyprpicker -a already copies the color to the clipboard.
|
||||
color=$(${pkgs.hyprpicker}/bin/hyprpicker -a 2>/dev/null)
|
||||
if [ -n "$color" ]; then
|
||||
OSD_TEXT=" $color"
|
||||
@@ -359,7 +359,7 @@ in {
|
||||
'';
|
||||
|
||||
airplane-toggle = pkgs.writeShellScriptBin "airplane-toggle" ''
|
||||
# Réutilise nmcli + bluetoothctl (sans privilège) plutôt que rfkill.
|
||||
# Reuse nmcli + bluetoothctl (unprivileged) instead of rfkill.
|
||||
on=false
|
||||
nmcli radio wifi 2>/dev/null | grep -q enabled && on=true
|
||||
bluetoothctl show 2>/dev/null | grep -q "Powered: yes" && on=true
|
||||
@@ -390,7 +390,7 @@ in {
|
||||
'';
|
||||
|
||||
caffeine-toggle = pkgs.writeShellScriptBin "caffeine-toggle" ''
|
||||
# Met hypridle en pause (reste éveillé) ou le réactive.
|
||||
# Pause hypridle (stay awake) or resume it.
|
||||
if systemctl --user is-active --quiet hypridle; then
|
||||
systemctl --user stop hypridle
|
||||
OSD_TEXT=" Keep Awake On"
|
||||
@@ -400,6 +400,4 @@ in {
|
||||
fi
|
||||
${updateOsd}
|
||||
'';
|
||||
|
||||
# TODO: Run in background
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
networkScript,
|
||||
bluetoothScript,
|
||||
@@ -7,6 +8,7 @@
|
||||
}: let
|
||||
gaps-out = config.theme.gaps-out;
|
||||
c = config.lib.stylix.colors;
|
||||
hasBattery = config.var.hasBattery or false;
|
||||
in {
|
||||
programs.waybar.settings = [
|
||||
{
|
||||
@@ -14,7 +16,9 @@ in {
|
||||
position = "top";
|
||||
height = config.theme.bar-height;
|
||||
margin = "${toString gaps-out} ${toString gaps-out} 0";
|
||||
modules-center = ["custom/osd" "custom/osd-sep" "clock" "tray" "hyprland/workspaces" "custom/network" "custom/bluetooth" "battery"];
|
||||
modules-center =
|
||||
["custom/osd" "custom/osd-sep" "clock" "tray" "hyprland/workspaces" "custom/network" "custom/bluetooth"]
|
||||
++ lib.optional hasBattery "battery";
|
||||
|
||||
# ── Modules ─────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user