Add new server modules and configurations for various services

- Introduced `default-creds` module for managing default credentials with Umami integration.
- Added `fail2ban` module for brute-force attack protection with configurable ban times.
- Created `firewall` module to enable and configure basic firewall settings.
- Implemented `gitea` module for self-hosted Git service with PostgreSQL backend.
- Developed `glance` module for a customizable dashboard with various widgets and themes.
- Added `iknowyou` module for a self-hosted password manager with production and demo environments.
- Introduced `kernel-hardening` module for enhancing kernel security settings.
- Created `mazanoke` module for a simple web application with Nginx integration.
- Added `mealie` module for a self-hosted meal planning application.
- Implemented `stirling-pdf` module for PDF generation service.
- Developed `umami` module for self-hosted analytics with secret management.
- Added `ssh` module for secure SSH configuration with user restrictions.
- Introduced `nixy` theme for a customized aesthetic experience across services.
This commit is contained in:
KptltD00M
2026-06-16 23:03:39 +02:00
commit 5082521524
140 changed files with 9740 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
{
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;
clipboard-read = "allow";
clipboard-write = "allow";
copy-on-select = "clipboard";
app-notifications = false;
custom-shader = "${cursorShaders}/cursor_warp.glsl";
custom-shader-animation = "always";
keybind = [
# "ctrl+j=goto_split:left"
# "ctrl+i=goto_split:up"
# "ctrl+k=goto_split:down"
# "ctrl+l=goto_split:right"
# "shift+ctrl+h=new_split:left"
# "shift+ctrl+j=new_split:down"
# "shift+ctrl+k=new_split:up"
# "shift+ctrl+l=new_split:right"
"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
'';
}
+53
View File
@@ -0,0 +1,53 @@
# 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`";
};
};
};
}
+38
View 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 = {
commit.signOff = true;
overrideGpg = true;
parseEmoji = true;
};
gui = {
theme = {
activeBorderColor = [
accent
"bold"
];
inactiveBorderColor = [muted];
};
showListFooter = false;
showRandomTip = false;
showCommandLog = false;
showBottomLine = false;
nerdFontsVersion = "3";
};
};
};
}
+15
View File
@@ -0,0 +1,15 @@
# This file is used to sign git commits using an SSH key.
{
# CHANGEME: change this to your own SSH key.
home.file.".ssh/allowed_signers".text = "* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINhWby7lUUXQNKbRu9/UOrGjWDf3fvoAwGHomWv/+lL";
programs.git = {
signing.format = "openpgp";
settings = {
commit.gpgsign = true;
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
gpg.format = "ssh";
user.signingkey = "~/.ssh/key.pub";
};
};
}
+45
View File
@@ -0,0 +1,45 @@
{
pkgs,
pkgs-stable,
pkgs-nur-hadi,
...
}: {
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
librewolf # Backup browser
# I love TUIs
caligula # User-friendly, lightweight TUI for disk imaging (ISO, USB BOOT)
browsh # A modern text-based browser that renders anything that a modern browser can. It runs in a terminal and can be used remotely over SSH
dysk # A terminal-based disk usage analyzer
wikiman # Offline search engine for manual pages (arch wiki, tldr)
tealdeer # Fast tldr client
sttr # Minimalist "cyberchef" like. Cross-platform, cli app to perform various operations on string
wiremix # Simple TUI mixer for PipeWire
slides # A terminal-based presentation tool that allows you to create and deliver presentations directly from the command line
pom # Pomodoro timer in your terminal
pkgs.wifitui # TUI for managing wifi
pkgs-nur-hadi.usbguard-tui # TUI for managing USBGuard rules
pkgs-nur-hadi.sheets # Terminal based spreadsheet tool
# I love CLIs
httpie # Command-line HTTP client, a user-friendly cURL replacement
gh # GitHub
gh-dash # A terminal dashboard for GitHub
figlet # Transform text into ASCII art
pastel # Command-line tool to generate, analyze, convert and manipulate colors
imagemagick # Image manipulation tool
chafa # Image to ANSI/Unicode converter and more.
];
}
@@ -0,0 +1,48 @@
{
pkgs,
pkgs-stable,
pkgs-nur-hadi,
}:
(with pkgs-stable; [
# Web
dirb
ffuf
katana
whatweb
# Hashes
hashcat
haiti
hydra
john
# Databases
mariadb
redis
sqlmap
nosqli
# Network
inetutils
termshark # wireshark in TUI
dnsrecon
whois
dig
nmap
samba
# Misc
metasploit
nuclei
openvpn
# Secrets
trufflehog
# Forensics
binwalk
])
++ (with pkgs-nur-hadi; [
spilltea
jwt-tui
])
+45
View File
@@ -0,0 +1,45 @@
{
pkgs,
pkgs-stable,
pkgs-nur-hadi,
...
}: {
home.packages = import ./cybersecurity-packages.nix {
inherit pkgs pkgs-stable pkgs-nur-hadi;
};
systemd.user.tmpfiles.rules = [
"d %h/Cyber/tmp 0755 - - -"
"d %h/Cyber/wordlists 0755 - - -"
"d %h/Cyber/wordlists/rules 0755 - - -"
];
home.file = {
"Cyber/wordlists/seclists".source = pkgs.fetchFromGitHub {
owner = "danielmiessler";
repo = "SecLists";
rev = "47aa98053fce8670c6489e4f6fb57dc34881d8bd";
hash = "sha256-ojXLB/TXap1Qi0MtV5/WJlJpjNIDYx/sLY2KHm0uFKI=";
};
"Cyber/wordlists/fuzz4bounty".source = pkgs.fetchFromGitHub {
owner = "0xPugal";
repo = "fuzz4bounty";
rev = "a805f6b434033f054312da0ddc2bc3021cc9a3b0";
hash = "sha256-wMhx1CcxIyw2E7gJXQxXAFc7m5nYt0FXNkoTZqFMQh4=";
};
# RULES
"Cyber/wordlists/rules/oneruletorulethemstill".source = pkgs.fetchFromGitHub {
owner = "stealthsploit";
repo = "oneruletorulethemstill";
rev = "4bfb7322e189305b5f35bb7fcd4e9cc233c3d3c6";
hash = "sha256-h7MeymIXS/6wlPRt4lzsIEqOOssP0lDx9nQip65cwZw=";
};
"Cyber/wordlists/rules/best64.rule".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/CarlosLannister/OwadeReborn/refs/heads/master/owade/fileAnalyze/hashcatLib/best64.rule%7E";
hash = "sha256-T0XkMHJZQiy63/j25nGTkaiDFjc+blmgEVGTAFgVylU=";
};
};
}
+17
View File
@@ -0,0 +1,17 @@
{
pkgs,
pkgs-stable,
}:
(with pkgs; [
go
claude-code
])
++ (with pkgs-stable; [
nodejs
air
duckdb
python3
jq
nix-prefetch-github
rsync
])
+7
View File
@@ -0,0 +1,7 @@
{
pkgs,
pkgs-stable,
...
}: {
home.packages = import ./dev-packages.nix {inherit pkgs pkgs-stable;};
}
+22
View File
@@ -0,0 +1,22 @@
{
inputs,
pkgs,
pkgs-stable,
pkgs-nur-hadi,
system,
...
}: let
devPackages = import ./dev-packages.nix {inherit pkgs pkgs-stable;};
cyberPackages = import ./cybersecurity-packages.nix {inherit pkgs pkgs-stable pkgs-nur-hadi;};
in {
packages.${system} = {
dev = pkgs.buildEnv {
name = "dev-tools";
paths = devPackages;
};
cybersecurity = pkgs.buildEnv {
name = "cybersecurity-tools";
paths = cyberPackages;
};
};
}
+16
View File
@@ -0,0 +1,16 @@
{
pkgs-stable,
pkgs-nur-hadi,
inputs,
...
}: {
home.packages = with pkgs-stable; [
tty-solitaire
bastet
peaclock
cbonsai
pipes
cmatrix
fastfetch
];
}
+459
View File
@@ -0,0 +1,459 @@
{
config,
lib,
pkgs,
...
}: let
bookmarkList =
(import ./general.nix)
++ (import ./tools.nix)
++ (import ./entertainment.nix)
++ (import ./infosec.nix)
++ (import ./other.nix)
++ (import ./jack.nix);
c = config.lib.stylix.colors;
stripProtocol = url: lib.removePrefix "https://" (lib.removePrefix "http://" url);
stripDomain = url: builtins.head (lib.splitString "/" (stripProtocol url));
mkCard = item: let
domain = stripDomain item.url;
initial = builtins.substring 0 1 item.name;
in ''
<a href="${item.url}" class="card">
<div class="favicon-wrapper">
<img class="favicon" src="https://icons.duckduckgo.com/ip3/${domain}.ico" alt="" aria-hidden="true" loading="lazy" onerror="this.style.display='none';this.nextElementSibling.style.display='flex'">
<span class="favicon-fallback" style="display:none">${initial}</span>
</div>
<div class="card-info">
<span class="card-name">${item.name}</span>
<span class="card-url">${stripProtocol item.url}</span>
</div>
</a>'';
mkFolderContent = items: let
step = acc: item:
if item ? url
then acc // {pending = acc.pending ++ [item];}
else {
chunks =
acc.chunks
++ lib.optional (acc.pending != []) {
isCards = true;
items = acc.pending;
}
++ [
{
isCards = false;
folder = item;
}
];
pending = [];
};
result =
lib.foldl' step {
chunks = [];
pending = [];
}
items;
chunks =
result.chunks
++ lib.optional (result.pending != []) {
isCards = true;
items = result.pending;
};
in
lib.concatMapStrings (
chunk:
if chunk.isCards
then ''
<div class="cards">
${lib.concatMapStrings mkCard chunk.items}
</div>''
else mkFolder chunk.folder
)
chunks;
mkFolder = folder: let
iconHtml =
if folder ? icon
then ''<span class="material-symbols-outlined folder-icon" aria-hidden="true">${folder.icon}</span>''
else "";
in ''
<details class="folder-section" open>
<summary class="folder-title">
${iconHtml}<span class="folder-name">${folder.name}</span>
<svg class="chevron" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>
</summary>
<div class="folder-content">
${mkFolderContent folder.bookmarks}
</div>
</details>'';
grouped = let
step = acc: item:
if item ? url
then acc // {pending = acc.pending ++ [item];}
else {
groups =
acc.groups
++ lib.optional (acc.pending != []) {
isRoot = true;
items = acc.pending;
}
++ [
{
isRoot = false;
inherit item;
}
];
pending = [];
};
result =
lib.foldl' step {
groups = [];
pending = [];
}
bookmarkList;
in
result.groups
++ lib.optional (result.pending != []) {
isRoot = true;
items = result.pending;
};
mkSection = group:
if group.isRoot
then ''
<div class="root-section">
<div class="cards">
${lib.concatMapStrings mkCard group.items}
</div>
</div>''
else mkFolder group.item;
in {
home.file.".local/share/helium-startpage/index.html".text = ''
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bookmarks</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20,300,0,0">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
background-color: #${c.base00};
color: #${c.base05};
font-family: 'Source Sans Pro', sans-serif;
font-size: 14px;
min-height: 100vh;
padding: 2.5rem 2rem;
}
.header {
max-width: 1100px;
margin: 0 auto 2rem;
display: flex;
align-items: center;
gap: 1.5rem;
}
.page-title {
font-size: 1.3rem;
font-weight: 700;
color: #${c.base0D};
letter-spacing: -0.01em;
flex-shrink: 0;
}
.search-bar {
flex: 1;
background-color: #${c.base01};
border: 1px solid #${c.base02};
border-radius: 8px;
color: #${c.base05};
font-family: 'Source Sans Pro', sans-serif;
font-size: 0.9rem;
padding: 0.5rem 0.9rem;
outline: none;
transition: border-color 0.15s ease;
}
.search-bar::placeholder { color: #${c.base03}; }
.search-bar:focus { border-color: #${c.base0D}; }
.collapse-btn {
flex-shrink: 0;
background: none;
border: 1px solid #${c.base02};
border-radius: 8px;
color: #${c.base03};
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
padding: 0.47rem;
transition: color 0.15s ease, border-color 0.15s ease;
}
.collapse-btn:hover {
color: #${c.base0D};
border-color: #${c.base0D};
}
.collapse-btn svg { width: 16px; height: 16px; }
.bookmarks-container {
max-width: 1100px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.root-section { margin-bottom: 1rem; }
details.folder-section { border-radius: 8px; }
details.folder-section > summary {
list-style: none;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.45rem 0.5rem;
border-radius: 8px;
user-select: none;
transition: background-color 0.12s ease;
}
details.folder-section > summary::-webkit-details-marker { display: none; }
details.folder-section > summary:hover {
background-color: #${c.base01};
color: #${c.base0D};
}
details.folder-section > summary:hover .folder-name { color: #${c.base0D}; }
details.folder-section > summary:hover .folder-icon { color: #${c.base0D}; }
.folder-icon {
font-size: 14px;
line-height: 1;
flex-shrink: 0;
color: #${c.base04};
user-select: none;
}
.folder-name {
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
color: #${c.base03};
flex: 1;
}
.chevron {
width: 13px;
height: 13px;
color: #${c.base03};
transition: transform 0.2s ease;
flex-shrink: 0;
}
details[open] > summary > .chevron { transform: rotate(180deg); }
.folder-content {
padding: 0.4rem 0 0.5rem 0;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.folder-content > details.folder-section > summary { padding-left: 1.2rem; }
.folder-content > details.folder-section > .folder-content { padding-left: 1rem; }
.cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 0.4rem;
}
.card {
display: flex;
align-items: center;
gap: 0.7rem;
padding: 0.6rem 0.8rem;
background-color: #${c.base01};
border: 1px solid #${c.base02};
border-radius: 10px;
text-decoration: none;
transition: background-color 0.12s ease, border-color 0.12s ease;
overflow: hidden;
}
.card:hover {
background-color: #${c.base02};
border-color: #${c.base0D};
}
.favicon-wrapper { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.favicon {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: contain;
border-radius: 3px;
}
.favicon-fallback {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background-color: #${c.base02};
border-radius: 4px;
color: #${c.base04};
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
user-select: none;
}
.card-info {
display: flex;
flex-direction: column;
gap: 0.05rem;
overflow: hidden;
flex: 1;
}
.card-name {
color: #${c.base05};
font-size: 0.86rem;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: color 0.12s ease;
}
.card:hover .card-name { color: #${c.base0D}; }
.card-url {
color: #${c.base03};
font-family: 'Maple Mono NF', monospace;
font-size: 0.7rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.no-results {
color: #${c.base03};
font-size: 0.9rem;
padding: 0.5rem 0.2rem;
display: none;
}
</style>
</head>
<body>
<div class="header">
<h1 class="page-title">Bookmarks</h1>
<input id="search" class="search-bar" type="text" placeholder="Search" autocomplete="off" spellcheck="false">
<button id="collapse-btn" class="collapse-btn" title="Collapse all folders" aria-label="Collapse all folders">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="10" y1="14" x2="3" y2="21"/><line x1="21" y1="3" x2="14" y2="10"/>
</svg>
</button>
</div>
<div class="bookmarks-container">
<p id="no-results" class="no-results">No results</p>
${lib.concatMapStrings mkSection grouped}
</div>
<script>
window.addEventListener('DOMContentLoaded', function () {
const input = document.getElementById('search');
const noResults = document.getElementById('no-results');
const collapseBtn = document.getElementById('collapse-btn');
input.focus();
collapseBtn.addEventListener('click', function () {
document.querySelectorAll('details.folder-section').forEach(function (d) {
d.open = false;
});
});
input.addEventListener('input', function () {
const query = this.value.toLowerCase().trim();
let anyVisible = false;
if (query) {
document.querySelectorAll('details.folder-section').forEach(function (d) {
d.open = true;
});
}
document.querySelectorAll('.folder-section, .root-section').forEach(function (section) {
let sectionVisible = false;
section.querySelectorAll('.card').forEach(function (card) {
const name = card.querySelector('.card-name').textContent.toLowerCase();
const url = card.querySelector('.card-url').textContent.toLowerCase();
const match = !query || name.includes(query) || url.includes(query);
card.style.display = match ? ''' : 'none';
if (match) { sectionVisible = true; anyVisible = true; }
});
section.style.display = sectionVisible ? ''' : 'none';
});
noResults.style.display = anyVisible || !query ? 'none' : 'block';
});
input.addEventListener('keydown', function (e) {
if (e.key === 'Enter') {
const val = this.value.trim();
const isUrl = /^https?:\/\//i.test(val) || /^[a-zA-Z0-9-]+(\.[a-zA-Z]{2,})(\/.*)?$/.test(val);
if (isUrl) {
location.href = /^https?:\/\//i.test(val) ? val : 'https://' + val;
} else {
const first = document.querySelector('.card:not([style*="none"])');
if (first) {
location.href = first.href;
} else {
const q = encodeURIComponent(val);
if (q) location.href = 'https://duckduckgo.com/?q=' + q;
}
}
}
if (e.key === 'Escape') {
this.value = ''';
this.dispatchEvent(new Event('input'));
}
});
});
</script>
</body>
</html>
'';
systemd.user.services.helium-startpage = {
Unit = {
Description = "Helium startpage HTTP server";
After = ["network.target"];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.darkhttpd}/bin/darkhttpd %h/.local/share/helium-startpage --port 8888 --addr 127.0.0.1 --no-listing";
Restart = "on-failure";
};
Install.WantedBy = ["default.target"];
};
}
@@ -0,0 +1,50 @@
[
{
name = "Entertainment";
icon = "movie";
bookmarks = [
{
name = "Youtube";
url = "https://youtube.com";
}
{
name = "Jellyfin";
url = "https://media.hadi.icu";
}
{
name = "Seerr";
url = "https://demandemedia.hadi.icu";
}
{
name = "Social Media";
icon = "group";
bookmarks = [
{
name = "Medium";
url = "https://medium.com";
}
{
name = "Bluesky";
url = "https://bsky.app";
}
{
name = "Reddit";
url = "https://reddit.com";
}
{
name = "Instagram";
url = "https://instagram.com";
}
{
name = "Discord";
url = "https://discord.com/channels/@me/";
}
{
name = "Gitlab";
url = "https://gitlab.com/";
}
];
}
];
}
]
@@ -0,0 +1,14 @@
[
{
name = "Proton Mail";
url = "https://mail.proton.me";
}
{
name = "Proton Drive";
url = "https://drive.proton.me";
}
{
name = "Github";
url = "https://github.com";
}
]
@@ -0,0 +1,56 @@
[
{
name = "Infosec";
icon = "terminal";
bookmarks = [
{
name = "Nix 4 Cyber";
url = "https://n4c.hadi.icu";
}
{
name = "Infosec Notes - Anotherhadi";
url = "https://hadi.icu/notes";
}
{
name = "Cyberchef";
url = "https://cyberchef.hadi.icu";
}
{
name = "TryHackMe";
url = "https://tryhackme.com";
}
{
name = "Root-Me";
url = "https://root-me.org";
}
{
name = "Hack The Box";
url = "https://hackthebox.com";
}
{
name = "Iknowyou";
url = "https://iknowyou-prod.hadi.icu";
}
{
name = "Exploit-DB";
url = "https://exploit-db.com";
}
{
name = "Reverse Shell Generator";
url = "https://revshells.com";
}
{
name = "GTFOBins";
url = "https://gtfobins.org/";
}
{
name = "Crack Station";
url = "https://crackstation.net";
}
{
name = "Osint Tracker";
url = "https://app.osintracker.com";
}
];
}
]
+80
View File
@@ -0,0 +1,80 @@
[
{
name = "Jack";
icon = "dns";
bookmarks = [
{
name = "Glance";
url = "https://home.hadi.icu";
}
{
name = "Blog";
url = "https://hadi.icu";
}
{
name = "Gitea";
url = "https://git.hadi.icu";
}
{
name = "Mealie";
url = "https://mealie.hadi.icu";
}
{
name = "Wallpapers";
url = "https://wallpapers.hadi.icu";
}
{
name = "Default Creds";
url = "https://default-creds.hadi.icu";
}
{
name = "Media";
icon = "subscriptions";
bookmarks = [
{
name = "Radarr";
url = "https://radarr.hadi.icu";
}
{
name = "Sonarr";
url = "https://sonarr.hadi.icu";
}
{
name = "Bazarr";
url = "https://bazarr.hadi.icu";
}
{
name = "Prowlarr";
url = "https://prowlarr.hadi.icu";
}
{
name = "Transmission";
url = "https://transmission.hadi.icu";
}
];
}
{
name = "Infrastructure";
icon = "construction";
bookmarks = [
{
name = "AdGuard";
url = "https://adguard.hadi.icu";
}
{
name = "Umami";
url = "https://umami.hadi.icu";
}
{
name = "Cloudflare";
url = "https://dash.cloudflare.com";
}
{
name = "Cloudflare Zero Trust";
url = "https://one.dash.cloudflare.com";
}
];
}
];
}
]
+50
View File
@@ -0,0 +1,50 @@
[
{
name = "Other";
icon = "category";
bookmarks = [
{
name = "Documentation";
icon = "menu_book";
bookmarks = [
{
name = "Hyprland Wiki";
url = "https://wiki.hypr.land";
}
{
name = "NVF Options";
url = "https://nvf.notashelf.dev/";
}
{
name = "Stylix Wiki";
url = "https://nix-community.github.io/stylix/";
}
{
name = "Nixpkgs";
url = "https://github.com/NixOS/nixpkgs";
}
{
name = "tldr";
url = "https://tldr.inbrowser.app/";
}
];
}
{
name = "Startpage Config";
url = "https://www.startpage.com/do/mypage.pl?prfe=45d331deb05471d659dba933e7400df51d952bb103da6f6125c0e769a6be1d65610456a479f495ceeee7e97311cf227d7c1bb198de0ceeb193d8cddf9c455c19a409cc35c3e3f542ee27bd7cecd3";
}
{
name = "Feedly";
url = "https://feedly.com";
}
{
name = "MyNixOS";
url = "https://mynixos.com";
}
{
name = "Amazon";
url = "https://amazon.fr";
}
];
}
]
+48
View File
@@ -0,0 +1,48 @@
[
{
name = "Tools";
icon = "handyman";
bookmarks = [
{
name = "Maps";
url = "https://maps.apple.com";
}
{
name = "Excalidraw";
url = "https://excalidraw.com";
}
{
name = "Cobalt (downloader)";
url = "https://cobalt.meowing.de";
}
{
name = "Mazanoke (image)";
url = "https://mazanoke.hadi.icu";
}
{
name = "Vert";
url = "https://vert.sh";
}
{
name = "Markdown to PDF";
url = "https://md2file.com";
}
{
name = "Image to Vector";
url = "https://www.vectorcascade.com/";
}
{
name = "PrivateBin";
url = "https://privatebin.net";
}
{
name = "Claude";
url = "https://claude.ai";
}
{
name = "Gemini";
url = "https://gemini.google.com";
}
];
}
]
+138
View File
@@ -0,0 +1,138 @@
{
inputs,
config,
pkgs,
lib,
...
}: let
c = config.lib.stylix.colors;
rgb = base: map lib.strings.toInt [c."${base}-rgb-r" c."${base}-rgb-g" c."${base}-rgb-b"];
themeId = "abcadngacjlikcpkhleafekcdjmddegk";
themeKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6t46VoE3mdV1QNMgybpmQLi5PtYHejnNrSj4DkBZyiTzMzs7Yyvg64f78w3QubZA5cTXSQ7FVhVHvv30I8ym/jNzsSN6reh1t4PtKsFjFRugAty8bfKJGD404HZLOFN2z3G9UPVLBBgzDH3DWbb/kcOq60Mlo/QDCIjsieZg0G3EYMl4efoThzYPWoyv0UEoiliwrE/AChxbgipQetUZ48bFhTCsmnYzCze7clssfTobzWtJJG0qFx76LauHKymRS5OTFfgsovKqHUSFJ202Q53vFdUPP/j8PjSPr1kZeg1NYc7Ba3MoA49EwtJf5ol9oYu05EEnSQ5+1AoYVmdE8QIDAQAB";
themeManifest = builtins.toJSON {
manifest_version = 2;
name = "Stylix Theme";
version = "1.0";
key = themeKey;
theme.colors = {
frame = rgb "base00";
frame_inactive = rgb "base00";
frame_incognito = rgb "base00";
frame_incognito_inactive = rgb "base00";
toolbar = rgb "base00";
toolbar_button_icon = rgb "base05";
control_background = rgb "base00";
tab_text = rgb "base0D";
background_tab = rgb "base00";
tab_background_text = rgb "base04";
tab_background_text_inactive = rgb "base04";
ntp_background = rgb "base00";
ntp_text = rgb "base05";
};
};
heliumFlags = [
"--ozone-platform=wayland"
"--enable-features=UseOzonePlatform,VaapiVideoDecoder,VaapiVideoEncoder,CanvasOopRasterization"
"--disable-features=UseChromeOSDirectVideoDecoder,WaylandWpColorManagerV1"
"--enable-accelerated-video-decode"
"--enable-gpu-rasterization"
"--use-gl=egl"
"--no-default-browser-check"
"--show-avatar-button=never"
];
originalPkg = (inputs.helium-browser.packages.${pkgs.stdenv.hostPlatform.system}.helium).override {
flags = heliumFlags;
};
patchScript = pkgs.writeShellScript "helium-patch-prefs" ''
PROFILE="$HOME/.config/net.imput.helium/Default"
THEME_DIR="$PROFILE/Extensions/${themeId}/1.0_0"
PREFS="$PROFILE/Preferences"
mkdir -p "$THEME_DIR"
rm -f "$THEME_DIR/Cached Theme.pak"
printf '%s' '${themeManifest}' > "$THEME_DIR/manifest.json"
if [ -f "$PREFS" ]; then
tmp=$(mktemp)
${lib.getExe pkgs.jq} \
--arg id "${themeId}" \
--slurpfile manifest "$THEME_DIR/manifest.json" \
'
.helium.browser.layout = 3 |
.helium.browser.minimal_location_bar = true |
.helium.browser.show_dynamic_new_tab_button = false |
.helium.browser.rounded_frame = false |
.bookmark_bar.show_tab_groups = false |
.extensions.settings[$id] = {
"active_permissions": {"api": [], "explicit_host": [], "manifest_permissions": [], "scriptable_host": []},
"creation_flags": 0,
"from_webstore": false,
"install_time": "13300000000000000",
"location": 1,
"manifest": $manifest[0],
"path": ($id + "/1.0_0"),
"state": 1,
"was_installed_by_default": false,
"was_installed_by_oem": false
} |
.extensions.theme = {"id": $id, "use_system": false}
' "$PREFS" > "$tmp" && mv "$tmp" "$PREFS"
fi
'';
baseWrapped = pkgs.symlinkJoin {
name = "helium-wrapped";
paths = [originalPkg];
nativeBuildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/helium \
--run ${lib.escapeShellArg (toString patchScript)}
'';
};
wrappedPkg = baseWrapped // {override = _: baseWrapped;};
in {
imports = [
inputs.helium-browser.homeModules.default
./bookmarks
];
programs.helium = {
enable = true;
package = lib.mkForce wrappedPkg;
};
home.sessionVariables.BROWSER = "${config.programs.helium.package}/bin/helium";
xdg.desktopEntries.helium = {
name = "Helium";
genericName = "Navigateur Web";
exec = "${config.programs.helium.package}/bin/helium %U";
icon = "${config.programs.helium.package}/share/icons/hicolor/256x256/apps/helium.png";
terminal = false;
categories = ["Network" "WebBrowser"];
mimeType = [
"text/html"
"text/xml"
"application/xhtml+xml"
"x-scheme-handler/http"
"x-scheme-handler/https"
"x-scheme-handler/ftp"
];
};
xdg.desktopEntries.helium-private = {
name = "Helium (Private window)";
genericName = "Navigateur Web";
exec = "${config.programs.helium.package}/bin/helium --incognito %U";
icon = "${config.programs.helium.package}/share/icons/hicolor/256x256/apps/helium.png";
terminal = false;
categories = ["Network" "WebBrowser"];
mimeType = ["text/html" "text/xml" "application/xhtml+xml"];
};
}
+70
View File
@@ -0,0 +1,70 @@
{...}: let
bookmarkList =
(import ./bookmarks/general.nix)
++ (import ./bookmarks/tools.nix)
++ (import ./bookmarks/entertainment.nix)
++ (import ./bookmarks/infosec.nix)
++ (import ./bookmarks/other.nix)
++ (import ./bookmarks/jack.nix);
toChromium = items:
map (item:
if item ? url
then {inherit (item) name url;}
else {
name = item.name;
children = toChromium item.bookmarks;
})
items;
in {
stylix.targets.chromium.enable = false;
programs.helium = {
enable = true;
policies = {
BrowserSignin = 0;
SyncDisabled = true;
SigninAllowed = false;
PasswordManagerEnabled = false;
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
SafeBrowsingEnabled = false;
MetricsReportingEnabled = false;
SpellCheckServiceEnabled = false;
DefaultCookiesSetting = 1;
DefaultGeolocationSetting = 2;
DefaultNotificationsSetting = 2;
DefaultPopupsSetting = 2;
DefaultBrowserSettingEnabled = false;
DeveloperToolsAvailability = 1;
DnsOverHttpsMode = "secure";
DnsOverHttpsTemplates = "https://dns.quad9.net/dns-query";
DefaultSearchProviderEnabled = true;
DefaultSearchProviderName = "Startpage";
DefaultSearchProviderSearchURL = "https://www.startpage.com/do/search?q={searchTerms}";
DefaultSearchProviderSuggestURL = "https://www.startpage.com/do/suggest?q={searchTerms}";
NewTabPageLocation = "http://127.0.0.1:8888";
HomepageIsNewTabPage = false;
HomepageLocation = "http://127.0.0.1:8888";
ShowHomeButton = false;
RestoreOnStartup = 4;
BookmarkBarEnabled = false;
ManagedBookmarks = toChromium bookmarkList;
ExtensionInstallForcelist = [
"dbepggeogbaibhgnhhndojpepiihcmeb" # Vimiu
"gcknhkkoolaabfmlnjonogaaifnjlfnp" # FoxyProxy
"ghmbeldphafepmbegfdlkpapadhbakde" # Proton Pass
"mdjildafknihdffpkfmmpnpoiajfjnjd" # Consent-O-Matic
"pkehgijcmpdhfbdbbnkijodmdjhbjlgp" # Privacy Badger
];
};
};
}
+19
View File
@@ -0,0 +1,19 @@
{pkgs, ...}: let
nightshift-toggle =
pkgs.writeShellScriptBin "nightshift-toggle"
# bash
''
if pidof "hyprsunset"; then
pkill hyprsunset
${pkgs.libnotify}/bin/notify-send "Night Shift Disabled" "Returning to full spectrum light. Filter disabled."
else
${pkgs.hyprsunset}/bin/hyprsunset -t 4500 &
${pkgs.libnotify}/bin/notify-send "Night Shift Activated" "Welcome to the warm side. Blue light filtering is now active."
fi
'';
in {
home.packages = with pkgs; [
hyprsunset
nightshift-toggle
];
}
+5
View File
@@ -0,0 +1,5 @@
{inputs, ...}: {
imports = [inputs.nix-index-database.homeModules.default];
programs.nix-index.enable = true;
programs.nix-index-database.comma.enable = true;
}
+31
View File
@@ -0,0 +1,31 @@
# - ## 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.
{
config,
lib,
pkgs,
...
}: {
options.programs.nixy = {
enable = lib.mkEnableOption "nixy";
configDirectory = lib.mkOption {
type = lib.types.str;
default = "$HOME/.config/nixos";
description = "Path to the NixOS configuration directory";
};
};
config = lib.mkIf config.programs.nixy.enable {
home.packages = [
(import ./package.nix {
inherit pkgs;
inherit (config.programs.nixy) configDirectory;
})
];
};
}
+14
View File
@@ -0,0 +1,14 @@
{
pkgs,
system,
...
}: {
packages.${system}.nixy = import ./package.nix {
inherit pkgs;
configDirectory = "$HOME/.config/nixos";
};
homeManagerModules.nixy = {
imports = [./default.nix];
};
}
+69
View File
@@ -0,0 +1,69 @@
{
pkgs,
configDirectory,
}:
pkgs.writeShellScriptBin "nixy"
# bash
''
EXTRA_ARGS="''${@:2}"
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"
)
# 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 . $EXTRA_ARGS
elif [[ $1 == "test" ]];then
cd ${configDirectory} && git add . && sudo nixos-rebuild test --flake . $EXTRA_ARGS
elif [[ $1 == "update" ]];then
cd ${configDirectory} && nix flake update $EXTRA_ARGS
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
''
+33
View File
@@ -0,0 +1,33 @@
{
inputs,
pkgs,
config,
...
}: let
c = config.lib.stylix.colors;
in {
imports = [inputs.nvf.homeManagerModules.default];
programs.nvf = {
enable = true;
settings = {
vim.luaConfigRC.hl-overrides = ''
local function apply_hl()
vim.api.nvim_set_hl(0, "MiniStarterHeader", { fg = "#${c.base0D}", bold = true })
vim.api.nvim_set_hl(0, "SnacksPickerBorder", { fg = "#${c.base0D}" })
vim.api.nvim_set_hl(0, "SnacksPickerTitle", { fg = "#${c.base0D}", bold = true })
end
apply_hl()
vim.api.nvim_create_autocmd("ColorScheme", { pattern = "*", callback = apply_hl })
'';
imports = [
./options.nix
./languages.nix
./picker.nix
./snacks.nix
./keymaps.nix
./utils.nix
./mini.nix
];
};
};
}
+37
View File
@@ -0,0 +1,37 @@
{
inputs,
pkgs,
system,
...
}: let
nvimConfig = inputs.nvf.lib.neovimConfiguration {
inherit pkgs;
modules = [
./options.nix
./languages.nix
./picker.nix
./snacks.nix
./keymaps.nix
./utils.nix
./mini.nix
];
};
in {
packages.${system}.nvim = nvimConfig.neovim;
apps.${system}.nvim = {
type = "app";
program = "${nvimConfig.neovim}/bin/nvim";
};
defaultApp.${system} = {
type = "app";
program = "${nvimConfig.neovim}/bin/nvim";
};
homeManagerModules.nvim = {
imports = [
inputs.nvf.homeManagerModules.default
./default.nix
];
};
}
+327
View File
@@ -0,0 +1,327 @@
{
vim = {
globals.mapleader = " ";
keymaps = [
{
key = "s";
mode = "n";
silent = true;
action = "<cmd>lua MiniJump2d.start(MiniJump2d.builtin_opts.single_character)<cr>";
desc = "Jump2d";
}
{
key = "K";
mode = "n";
silent = true;
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
desc = "LSP Hover";
}
{
key = "<C-tab>";
mode = "n";
silent = true;
action = "<cmd>bnext<cr>";
desc = "Next Buffer";
}
# Format
{
key = "<leader>lf";
mode = "n";
silent = true;
action = "<cmd>lua require('conform').format({ async = true, lsp_format = 'fallback' })<cr>";
desc = "Format file";
}
# Terminal
{
key = "<leader>tt";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.terminal.toggle()<cr>";
desc = "Toggle terminal";
}
{
key = "<leader>tf";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.terminal.toggle(nil, { style = 'float' })<cr>";
desc = "Toggle terminal (float)";
}
{
key = "<leader>tg";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.lazygit()<cr>";
desc = "Lazygit";
}
{
key = "<leader>ts";
mode = "v";
silent = true;
action = ":<C-u>SttrTransform<CR>";
desc = "String Transform";
}
{
key = "<leader>tj";
mode = "n";
silent = true;
action = ":JwtTui<CR>";
desc = "JWT TUI";
}
{
key = "<leader>tj";
mode = "v";
silent = true;
action = ":<C-u>JwtTuiOpen<CR>";
desc = "JWT TUI";
}
# UI
{
key = "<leader>uw";
mode = "n";
silent = true;
action = "<cmd>set wrap!<cr>";
desc = "Toggle word wrapping";
}
{
key = "<leader>ul";
mode = "n";
silent = true;
action = "<cmd>set linebreak!<cr>";
desc = "Toggle linebreak";
}
{
key = "<leader>us";
mode = "n";
silent = true;
action = "<cmd>set spell!<cr>";
desc = "Toggle spellLazyGitcheck";
}
{
key = "<leader>uc";
mode = "n";
silent = true;
action = "<cmd>set cursorline!<cr>";
desc = "Toggle cursorline";
}
{
key = "<leader>un";
mode = "n";
silent = true;
action = "<cmd>set number!<cr>";
desc = "Toggle line numbers";
}
{
key = "<leader>ur";
mode = "n";
silent = true;
action = "<cmd>set relativenumber!<cr>";
desc = "Toggle relative line numbers";
}
{
key = "<leader>ut";
mode = "n";
silent = true;
action = "<cmd>set showtabline=2<cr>";
desc = "Show tabline";
}
{
key = "<leader>uT";
mode = "n";
silent = true;
action = "<cmd>set showtabline=0<cr>";
desc = "Hide tabline";
}
# Todos
{
key = "<leader>xt";
mode = "n";
silent = true;
action = "<cmd>TodoTrouble<cr>";
desc = "Todo (Trouble)";
}
# Shell
{
key = "<leader>!";
mode = "n";
silent = true;
lua = true;
desc = "Insert command output";
action = ''
function()
local cmd = vim.fn.input("Command: ")
if cmd == "" then return end
local lines = vim.fn.systemlist(cmd)
while #lines > 0 and lines[#lines] == "" do
table.remove(lines)
end
if #lines == 0 then return end
vim.api.nvim_put(lines, "l", true, true)
end
'';
}
{
key = "<leader>!";
mode = "v";
silent = true;
lua = true;
desc = "Run command with selection";
action = ''
function()
local start_line = vim.fn.line("'<")
local end_line = vim.fn.line("'>")
local lines = vim.api.nvim_buf_get_lines(0, start_line - 1, end_line, false)
local input_text = table.concat(lines, "\n")
local cmd = vim.fn.input("$ ")
if cmd == "" then return end
local result = vim.fn.system({"bash", "-c", cmd}, input_text)
local output = vim.split(result, "\n", { plain = true })
if output[#output] == "" then table.remove(output) end
if #output == 0 then return end
vim.api.nvim_buf_set_lines(0, start_line - 1, end_line, false, output)
end
'';
}
# QOL
{
key = ">";
mode = "v";
silent = true;
action = ">gv";
desc = "Indent and keep selection";
}
{
key = "<";
mode = "v";
silent = true;
action = "<gv";
desc = "Dedent and keep selection";
}
# Move
{
key = "<C-h>";
mode = "n";
silent = true;
action = "<C-w>h";
desc = "Move to left window";
}
{
key = "<C-j>";
mode = "n";
silent = true;
action = "<C-w>j";
desc = "Move to bottom window";
}
{
key = "<C-k>";
mode = "n";
silent = true;
action = "<C-w>k";
desc = "Move to top window";
}
{
key = "<C-l>";
mode = "n";
silent = true;
action = "<C-w>l";
desc = "Move to right window";
}
# Save
{
key = "<C-s>";
mode = [
"n"
"i"
"v"
];
silent = true;
action = "<cmd>w<cr>";
desc = "Save file";
}
# Deactivate "esc"
{
key = "<Esc>";
mode = [
"n"
"i"
"v"
];
silent = true;
action = "<Nop>";
desc = "Disable Escape";
}
# Disable Arrow Keys in Normal Mode and Middle click
{
key = "<Up>";
mode = "n";
silent = true;
action = "<Nop>";
desc = "Disable Up Arrow";
}
{
key = "<Down>";
mode = "n";
silent = true;
action = "<Nop>";
desc = "Disable Down Arrow";
}
{
key = "<Left>";
mode = "n";
silent = true;
action = "<Nop>";
desc = "Disable Left Arrow";
}
{
key = "<Right>";
mode = "n";
silent = true;
action = "<Nop>";
desc = "Disable Right Arrow";
}
{
key = "<MiddleMouse>";
mode = [
"n"
"i"
"v"
];
action = "<nop>";
silent = true;
}
{
key = "<2-MiddleMouse>";
mode = [
"n"
"i"
"v"
];
action = "<nop>";
silent = true;
}
{
key = "<3-MiddleMouse>";
mode = [
"n"
"i"
"v"
];
action = "<nop>";
silent = true;
}
];
};
}
+116
View File
@@ -0,0 +1,116 @@
{...}: {
vim = {
diagnostics = {
enable = true;
config = {
signs = {
text = {
"vim.diagnostic.severity.Error" = " ";
"vim.diagnostic.severity.Warn" = " ";
"vim.diagnostic.severity.Hint" = " ";
"vim.diagnostic.severity.Info" = " ";
};
};
underline = true;
update_in_insert = true;
virtual_text = true;
};
nvim-lint = {
enable = true;
};
};
treesitter = {
enable = true;
autotagHtml = true;
context.enable = true;
highlight.enable = true;
textobjects.enable = true;
};
lsp = {
enable = true;
presets = {
tailwindcss-language-server = {
enable = true;
};
};
trouble.enable = true;
lspSignature.enable = true;
lspconfig.enable = true;
formatOnSave = false;
mappings.format = null;
inlayHints.enable = true;
servers.nil.settings.nix.autoArchive = true;
otter-nvim = {
enable = true;
setupOpts = {
buffers.set_filetype = true;
lsp = {
diagnostic_update_event = [
"BufWritePost"
"InsertLeave"
];
};
};
};
lspkind.enable = true;
lspsaga = {
enable = true;
setupOpts = {
ui = {
code_action = "";
};
lightbulb = {
sign = false;
virtual_text = true;
};
symbol_in_winbar.enable = false;
};
};
};
languages = {
enableExtraDiagnostics = true;
enableFormat = true;
enableTreesitter = true;
python = {
enable = true;
lsp = {
enable = true;
servers = ["pyright"];
};
};
astro.enable = true;
go.enable = true;
markdown = {
enable = true;
format.type = ["prettierd"];
extensions = {
markview-nvim = {
enable = true;
setupOpts = {
preview = {
hybrid_modes = ["n"];
};
};
};
};
extraDiagnostics.enable = true;
};
typescript.enable = true;
css.enable = true;
svelte.enable = true;
html.enable = true;
bash.enable = true;
nix.enable = true;
lua.enable = true;
};
formatter = {
conform-nvim = {
enable = true;
setupOpts.format_on_save = {
lsp_format = "fallback";
};
};
};
};
}
+100
View File
@@ -0,0 +1,100 @@
{lib, ...}: {
vim.luaConfigRC.mini-clue = ''
local miniclue = require('mini.clue')
miniclue.setup({
triggers = {
{ mode = 'n', keys = '<Leader>' },
{ mode = 'x', keys = '<Leader>' },
{ mode = 'n', keys = 'g' },
{ mode = 'x', keys = 'g' },
{ mode = 'n', keys = "'" },
{ mode = 'n', keys = '`' },
{ mode = 'n', keys = '"' },
{ mode = 'i', keys = '<C-r>' },
{ mode = 'c', keys = '<C-r>' },
{ mode = 'n', keys = '<C-w>' },
{ mode = 'n', keys = 'z' },
},
clues = {
miniclue.gen_clues.g(),
miniclue.gen_clues.marks(),
miniclue.gen_clues.registers(),
miniclue.gen_clues.windows({ submode_resize = true }),
miniclue.gen_clues.z(),
{ mode = 'n', keys = '<Leader>f', desc = '+find' },
{ mode = 'n', keys = '<Leader>s', desc = '+search' },
{ mode = 'n', keys = '<Leader>t', desc = '+terminal' },
{ mode = 'n', keys = '<Leader>u', desc = '+ui' },
{ mode = 'n', keys = '<Leader>l', desc = '+lsp' },
{ mode = 'n', keys = '<Leader>x', desc = '+trouble' },
{ mode = 'n', keys = '<Leader>!', desc = 'shell' },
{ mode = 'v', keys = '<Leader>!', desc = 'shell' },
{ mode = 'n', keys = '<Leader>e', desc = 'yazi' },
},
window = { delay = 300 },
})
'';
vim.mini = {
ai.enable = true;
starter = {
enable = true;
setupOpts = {
header = ''
'';
footer = "";
items = [
{
name = "files";
action = lib.mkLuaInline "function() Snacks.picker.files() end";
section = "";
}
{
name = "directories";
action = lib.mkLuaInline "function() Snacks.explorer() end";
section = "";
}
{
name = "tmp";
action = lib.mkLuaInline ''
function()
local uuid = vim.fn.system("uuidgen"):match("(%S+)")
vim.cmd("edit /tmp/" .. uuid .. ".md")
end
'';
section = "";
}
{
name = "recent";
action = lib.mkLuaInline "function() Snacks.picker.recent() end";
section = "";
}
];
};
};
comment.enable = true;
icons.enable = true;
indentscope.enable = true;
pairs.enable = true;
diff.enable = true;
git.enable = true;
jump2d.enable = true;
statusline.enable = true;
clue.enable = true;
surround.enable = true;
};
}
+45
View File
@@ -0,0 +1,45 @@
{lib, ...}: {
vim = {
viAlias = false;
vimAlias = true;
withNodeJs = true;
options = {
autoindent = true;
smartindent = true;
shiftwidth = 2;
foldlevel = 99;
foldcolumn = "auto:1";
mousescroll = "ver:1,hor:1";
mousemoveevent = true;
fillchars = "eob:,fold: ,foldopen:,foldsep:,foldclose:";
signcolumn = "yes";
tabstop = 2;
softtabstop = 2;
wrap = false;
};
globals.navic_silence = true;
clipboard = {
enable = true;
registers = "unnamedplus";
};
luaConfigRC.osc52-clipboard = ''
vim.g.clipboard = {
name = 'OSC 52',
copy = {
['+'] = require('vim.ui.clipboard.osc52').copy '+',
['*'] = require('vim.ui.clipboard.osc52').copy '*',
},
paste = {
['+'] = require('vim.ui.clipboard.osc52').paste '+',
['*'] = require('vim.ui.clipboard.osc52').paste '*',
},
}
'';
theme = {
enable = true;
name = lib.mkForce "catppuccin";
style = lib.mkForce "mocha";
transparent = lib.mkForce true;
};
};
}
+162
View File
@@ -0,0 +1,162 @@
{
vim = {
utility = {
snacks-nvim = {
setupOpts = {
picker.enabled = true;
explorer.enabled = true;
};
};
};
keymaps = [
# Top Pickers & Explorer
{
key = "<leader> ";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.smart()<cr>";
desc = "Smart Find Files";
}
{
key = "<leader>E";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.explorer()<cr>";
desc = "File Explorer";
}
{
key = "<leader>/";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lines()<cr>";
desc = "Buffer Lines";
}
# Find
{
key = "<leader>fb";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.buffers()<cr>";
desc = "Buffers";
}
{
key = "<leader>ff";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.files()<cr>";
desc = "Find Files";
}
{
key = "<leader>fp";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.projects()<cr>";
desc = "Projects";
}
{
key = "<leader>fr";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.recent()<cr>";
desc = "Recent";
}
{
key = "<leader>f:";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.command_history()<cr>";
desc = "Command History";
}
{
key = "<leader>fn";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.notifications()<cr>";
desc = "Notification History";
}
# Grep
{
key = "<leader>sg";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.grep()<cr>";
desc = "Grep";
}
{
key = "<leader>st";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.todo_comments()<cr>";
desc = "Todos";
}
{
key = "<leader>sw";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.grep_word()<cr>";
desc = "Visual selection or word";
}
{
key = "<leader>sr";
mode = "n";
silent = true;
action = "<cmd>nohlsearch<cr>";
desc = "Reset search";
}
# LSP
{
key = "gd";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_definitions()<cr>";
desc = "Goto Definition";
}
{
key = "gD";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_declarations()<cr>";
desc = "Goto Declaration";
}
{
key = "gr";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_references()<cr>";
desc = "References";
nowait = true;
}
{
key = "gI";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_implementations()<cr>";
desc = "Goto Implementation";
}
{
key = "gy";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_type_definitions()<cr>";
desc = "Goto Type Definition";
}
{
key = "<leader>ss";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_symbols()<cr>";
desc = "LSP Symbols";
}
{
key = "<leader>sS";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_workspace_symbols()<cr>";
desc = "LSP Workspace Symbols";
}
];
};
}
+18
View File
@@ -0,0 +1,18 @@
{
vim.utility.snacks-nvim = {
enable = true;
setupOpts = {
quickfile.enabled = true;
statuscolumn.enabled = true;
zen.enabled = true;
bufdelete.enabled = true;
gitsigns.enabled = true;
animate.enabled = true;
lazygit = {
enabled = true;
configure = false;
};
terminal.enabled = true;
};
};
}
+72
View File
@@ -0,0 +1,72 @@
{pkgs, ...}: {
vim = {
luaConfigRC.remove-todo-keymaps = ''
vim.keymap.del("n", "<leader>tdq")
vim.keymap.del("n", "<leader>tdt")
'';
undoFile.enable = true;
utility.yazi-nvim = {
enable = true;
mappings.openYazi = "<leader>e";
};
notes.todo-comments.enable = true;
assistant.copilot = {
enable = true;
cmp.enable = true;
};
autocomplete = {
nvim-cmp = {
enable = true;
sources = {
buffer = "[Buffer]";
path = "[Path]";
};
sourcePlugins = [
pkgs.vimPlugins.cmp-cmdline
];
};
};
snippets.luasnip.enable = true;
ui = {
noice.enable = true;
colorizer.enable = true;
};
visuals = {
rainbow-delimiters.enable = true;
};
extraPlugins = {
sttr-nvim = {
package = pkgs.vimUtils.buildVimPlugin {
name = "sttr-nvim";
src = pkgs.fetchFromGitHub {
owner = "anotherhadi";
repo = "sttr.nvim";
rev = "b41f2f51372222e23efbe5df9d72391cd933d4d1";
hash = "sha256-JPv0NNNUUNPNJM5LHYjcmTvilbOKB3OxI2Q6wxVbTks=";
};
};
setup = ''
require("sttr").setup()
'';
};
jwt-tui-nvim = {
package = pkgs.vimUtils.buildVimPlugin {
name = "jwt-tui-nvim";
src = pkgs.fetchFromGitHub {
owner = "anotherhadi";
repo = "jwt-tui.nvim";
rev = "c5100cb2cdfaf333014076a1a5c4c6a778bf3983";
hash = "sha256-qnQYZuQwyWkezhuyOorM67KBtatUboubofuT9A6McJI=";
};
};
setup = ''
require("jwt-tui").setup()
'';
};
};
};
}
+5
View File
@@ -0,0 +1,5 @@
{
wayland.windowManager.hyprland.settings.exec-once = [
"protonvpn-app --start-minimized &"
];
}
+39
View File
@@ -0,0 +1,39 @@
{
pkgs,
config,
...
}: {
home.packages = with pkgs; [
proton-vpn
proton-pass
proton-authenticator
];
# Fix Proton Authenticator desktop entry
xdg.desktopEntries = {
"Proton Authenticator" = {
name = "Proton Authenticator";
exec = "env WEBKIT_DISABLE_COMPOSITING_MODE=1 ${pkgs.proton-authenticator}/bin/proton-authenticator";
icon = "proton-authenticator";
type = "Application";
categories = ["Utility"];
terminal = false;
};
"Proton Calendar" = {
name = "Proton Calendar";
exec = ''${config.programs.helium.package}/bin/helium "https://calendar.proton.me"'';
icon = "proton-calendar";
type = "Application";
categories = ["Utility"];
terminal = false;
};
"Proton Mail" = {
name = "Proton Mail";
exec = ''${config.programs.helium.package}/bin/helium "https://mail.proton.me/"'';
icon = "proton-mail";
type = "Application";
categories = ["Utility"];
terminal = false;
};
};
}
+11
View File
@@ -0,0 +1,11 @@
# Import all shell configurations
{
imports = [
./fzf.nix
./zsh.nix
./starship.nix
./zoxide.nix
./eza.nix
./direnv.nix
];
}
+6
View File
@@ -0,0 +1,6 @@
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}
+13
View 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
View 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"
];
};
}
+60
View File
@@ -0,0 +1,60 @@
# 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;
settings = {
add_newline = true;
format = lib.concatStrings [
"$nix_shell"
"$hostname"
"$directory"
"$git_branch"
"$git_state"
"$git_status"
"$character"
];
directory = {
style = accent;
};
character = {
success_symbol = "[](${accent})";
error_symbol = "[](red)";
vimcmd_symbol = "[](cyan)";
};
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";
};
};
};
}
+7
View File
@@ -0,0 +1,7 @@
# Zoxide is a cd replacement
{
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
}
+196
View File
@@ -0,0 +1,196 @@
# My shell configuration
{
pkgs,
lib,
config,
...
}: {
home.packages = with pkgs; [
bat
ripgrep
];
# Add go binaries to the PATH
home.sessionPath = ["$HOME/go/bin"];
home.sessionVariables = {
COLORTERM = "truecolor";
};
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 = {
# Change default
vim = "nvim";
vi = "nvim";
cd = "z";
ls = "eza --icons=always --no-quotes";
tree = "eza --icons=always --tree --no-quotes";
cat = "bat --theme=base16 --color=always --paging=never --tabs=2 --wrap=never --plain";
mkdir = "mkdir -p";
# Shortcuts
spt = "spotatui";
v = "nvim";
c = "clear";
e = "exit";
open = "${pkgs.xdg-utils}/bin/xdg-open";
notes = "nvim ~/notes/index.md --cmd 'cd ~/notes' -c ':lua Snacks.picker.smart()'";
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";
# Typo
clera = "clear";
celar = "clear";
claer = "clear";
sl = "ls";
};
initContent =
# bash
''
bindkey -e
# Open command in VIM
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey '^X' edit-command-line
# Suffix Aliases
alias -s {nix,md,txt,json,yml,yaml,go}=nvim
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)
alias -g G="| grep"
alias -g L="| less"
alias -g V="| nvim"
alias -g H="| head"
alias -g T="| tail"
alias -g JQ="| jq"
alias -g C="| wl-copy"
alias -g NE="2>/dev/null"
alias -g ND=">/dev/null"
alias -g NUL=">/dev/null 2>1"
# 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
autoload zmv
hash -d dl=~/Downloads
hash -d ni=~/.config/nixos
hash -d de=~/dev
hash -d cy=~/Cyber
${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\\"
}
'';
};
}
+104
View File
@@ -0,0 +1,104 @@
# Spotatui is a terminal user interface for Spotify, written in Rust. It allows you to control your Spotify playback and manage your playlists directly from the terminal.
{
config,
pkgs,
...
}: let
c = config.lib.stylix.colors;
rgb = base: "${c."${base}-rgb-r"}, ${c."${base}-rgb-g"}, ${c."${base}-rgb-b"}";
in {
home.packages = with pkgs; [
spotatui
];
home.file.".config/spotatui/config.yml".text = ''
keybindings:
back: q
next_page: ctrl-d
previous_page: ctrl-u
jump_to_start: ctrl-a
jump_to_end: ctrl-e
jump_to_album: a
jump_to_artist_album: A
jump_to_context: o
manage_devices: d
decrease_volume: '-'
increase_volume: +
toggle_playback: space
seek_backwards: <
seek_forwards: '>'
next_track: n
previous_track: p
force_previous_track: P
help: '?'
shuffle: ctrl-s
repeat: ctrl-r
search: /
submit: enter
copy_song_url: c
copy_album_url: C
audio_analysis: v
lyrics_view: B
cover_art_view: G
add_item_to_queue: z
show_queue: Q
open_settings: alt-,
save_settings: alt-s
listening_party: ctrl-p
like_track: F
behavior:
seek_milliseconds: 5000
volume_increment: 10
volume_percent: 100
tick_rate_milliseconds: 16
enable_text_emphasis: true
show_loading_indicator: true
enforce_wide_search_bar: true
enable_global_song_count: false
disable_mouse_inputs: false
enable_discord_rpc: false
discord_rpc_client_id: null
enable_announcements: false
announcement_feed_url: null
seen_announcement_ids:
- 2026-05-19-sonos-help-wanted
- 2026-02-27-major-refactor-complete
shuffle_enabled: false
liked_icon:
shuffle_icon: 🔀
repeat_track_icon: 🔂
repeat_context_icon: 🔁
playing_icon:
paused_icon:
set_window_title: true
visualizer_style: Equalizer
dismissed_announcements: []
relay_server_url: wss://spotatui-party.spotatui.workers.dev/ws
stop_after_current_track: false
sidebar_width_percent: 20
playbar_height_rows: 6
library_height_percent: 30
startup_behavior: continue
disable_auto_update: true
auto_update_delay: '0'
keepawake_enabled: true
theme:
preset: Custom
active: ${rgb "base0D"}
banner: ${rgb "base0C"}
error_border: ${rgb "base08"}
error_text: ${rgb "base08"}
hint: ${rgb "base0A"}
hovered: ${rgb "base0E"}
inactive: ${rgb "base03"}
playbar_background: Reset
playbar_progress: ${rgb "base0D"}
playbar_progress_text: ${rgb "base05"}
playbar_text: Reset
selected: ${rgb "base0D"}
text: Reset
background: Reset
header: Reset
highlighted_lyrics: ${rgb "base0B"}
'';
}
+176
View File
@@ -0,0 +1,176 @@
# Thunar is a file explorer
{
pkgs,
pkgs-stable,
config,
lib,
...
}: let
user = config.var.username;
in {
# ctrl + m to toggle the menubar
home.packages =
(with pkgs-stable; [
xfce.thunar
xfce.xfconf
xfce.tumbler
xfce.thunar-archive-plugin
xfce.thunar-volman
xfce.thunar-media-tags-plugin
p7zip
xarchiver
])
++ (with pkgs; [
# Icon themes: keep on global pkgs to avoid conflicts with other modules
papirus-icon-theme
material-icons
material-design-icons
material-symbols
]);
gtk = {
enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
# bookmarks for the side pane
gtk3.bookmarks = [
"file:///home/${user}/Downloads Downloads"
"file:///home/${user}/Pictures Pictures"
"file:///home/${user}/.config/nixos NixOS"
"file:///home/${user}/dev Development"
];
};
qt.enable = true;
home.sessionVariables = {
XDG_ICON_DIR = "${pkgs.papirus-icon-theme}/share/icons/Papirus";
QS_ICON_THEME = "Papirus";
QT_STYLE_OVERRIDE = lib.mkForce "Fusion";
};
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=./
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.1" 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="230"/>
<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="false"/>
<property name="misc-thumbnail-draw-frames" type="bool" value="true"/>
<property name="misc-text-beside-icons" type="bool" value="false"/>
<property name="misc-change-window-icon" type="bool" value="false"/>
<property name="hidden-bookmarks" type="array">
<value type="string" value="computer:///"/>
<value type="string" value="recent:///"/>
<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,118,111,50,50,50,50,993,50,50,84,50,151"/>
<property name="last-toolbar-items" type="string" value="menu:1,undo:1,back:1,forward:1,open-parent:0,open-home:0,redo:0,zoom-in:0,zoom-out:0,zoom-reset:0,location-bar:1,view-switcher:1,search:1,view-as-icons:0,view-as-detailed-list:0,view-as-compact-list:0,toggle-split-view:0,reload:0,new-tab:0,new-window:0,uca-action-1700000000000001:0"/>
<property name="last-side-pane" type="string" value="THUNAR_SIDEPANE_TYPE_SHORTCUTS"/>
<property name="last-image-preview-visible" type="bool" value="false"/>
<property name="misc-use-csd" type="bool" value="true"/>
<property name="default-view" type="string" value="ThunarIconView"/>
<property name="misc-thumbnail-max-file-size" type="uint64" value="1073741824"/>
<property name="misc-symbolic-icons-in-toolbar" type="bool" value="true"/>
<property name="misc-date-style" type="string" value="THUNAR_DATE_STYLE_SIMPLE"/>
<property name="shortcuts-icon-size" type="string" value="THUNAR_ICON_SIZE_16"/>
<property name="tree-icon-size" type="string" value="THUNAR_ICON_SIZE_16"/>
<property name="misc-symbolic-icons-in-sidepane" type="bool" value="true"/>
<property name="misc-open-new-window-as-tab" type="bool" value="false"/>
<property name="misc-full-path-in-tab-title" type="bool" value="true"/>
<property name="misc-show-delete-action" type="bool" value="false"/>
</channel>
'';
force = true;
};
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>ghostty -d %f</command>
<description>Opens 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>
<action>
<icon>package-x-generic</icon>
<name>Compress here (tar.gz)</name>
<submenu></submenu>
<unique-id>1700000000000003</unique-id>
<command>tar -czvf %n.tar.gz %N</command>
<description>Creates a compressed archive (.tar.gz) of selected files/folders.</description>
<range>*</range>
<patterns>*</patterns>
<directories/>
<other-files/>
</action>
</actions>
'';
}
+129
View File
@@ -0,0 +1,129 @@
{pkgs, ...}: {
programs.yazi = {
enable = true;
shellWrapperName = "y";
plugins = {
git = {
package = pkgs.yaziPlugins.git;
setup = true;
};
ouch = pkgs.yaziPlugins.ouch;
piper = pkgs.yaziPlugins.piper;
convert = pkgs.yaziPlugins.convert;
"jump-to-char" = pkgs.yaziPlugins."jump-to-char";
"wl-clipboard" = pkgs.yaziPlugins."wl-clipboard";
"batch-rename-gui" = pkgs.yaziPlugins.mkYaziPlugin {
pname = "batch-rename-gui.yazi";
version = "0-unstable-2025-07-08";
src = pkgs.fetchFromGitHub {
owner = "pakhromov";
repo = "batch-rename-gui.yazi";
rev = "5c2d5aa349948b6ab405a171541faab44751f6a5";
hash = "sha256-3RviPY3WOyYi5GWXWRYMWp6VLxCe5cuJX7Kb7AyWxLE=";
};
};
};
settings.mgr.ratio = [0 4 3];
settings.plugin = {
prepend_fetchers = [
{
url = "*";
run = "git";
group = "git";
}
{
url = "*/";
run = "git";
group = "git";
}
];
prepend_previewers = [
{
url = "*.md";
run = ''piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"'';
}
];
prepend_openers = [
{
url = "*.{zip,tar,gz,bz2,xz,7z,rar}";
run = "ouch";
}
];
};
keymap.mgr.prepend_keymap = [
{
on = ["C"];
run = "plugin ouch";
desc = "Compress";
}
{
on = ["X"];
run = "plugin ouch --args=extract";
desc = "Extract";
}
{
on = ["c" "p"];
run = "plugin convert -- --extension='png'";
desc = "Convert to PNG";
}
{
on = ["c" "j"];
run = "plugin convert -- --extension='jpg'";
desc = "Convert to JPG";
}
{
on = ["c" "w"];
run = "plugin convert -- --extension='webp'";
desc = "Convert to WebP";
}
{
on = ["M"];
run = ''shell 'exiftool "$@" | less' --block'';
desc = "Show metadata";
}
{
on = ["T"];
run = "plugin toggle-parent";
desc = "Toggle parent pane";
}
{
on = ["F"];
run = "plugin jump-to-char";
desc = "Jump to char";
}
{
on = ["Y"];
run = "plugin wl-clipboard";
desc = "Copy to clipboard (Wayland)";
}
{
on = ["B"];
run = "plugin batch-rename-gui";
desc = "Batch rename";
}
];
};
home.packages = with pkgs; [glow ouch hexyl exiftool fzf wl-clipboard];
xdg.configFile."yazi/plugins/toggle-parent.yazi/main.lua".text = ''
--- @sync entry
local RESTORE_WIDTH = 1
return {
entry = function(st, job)
local r = rt.mgr.ratio
if r.parent == 0 then
rt.mgr.ratio = { st.width or RESTORE_WIDTH, r.current, r.preview }
else
st.width = r.parent
rt.mgr.ratio = { 0, r.current, r.preview }
end
ya.emit("app:resize", {})
end
}
'';
}