mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-08-21 10:45:49 +02:00
@@ -120,7 +120,6 @@ sudo nixos-rebuild switch --flake ~/.config/nixos#yourhostname
|
||||
- [WALLPAPERS](https://github.com/anotherhadi/awesome-wallpapers): An awesome
|
||||
collection of wallpapers
|
||||
- [NEOVIM](docs/NEOVIM.md): How to use the Neovim config in your own flake
|
||||
- [GROUPS](docs/GROUPS.md): Reusable package groups (dev, cybersecurity)
|
||||
|
||||
- [CONTRIBUTING](docs/CONTRIBUTING.md): How to contribute
|
||||
- [LICENSE](LICENSE): MIT License
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
.claude/
|
||||
old/
|
||||
docs/superpowers/
|
||||
.superpowers/
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
# Groups
|
||||
|
||||
Groups are curated sets of packages exposed as flake outputs. Each group has two forms:
|
||||
|
||||
- **`homeManagerModules.<group>`** — full home-manager module (packages + files + systemd units)
|
||||
- **`packages.<group>`** — standalone environment for `nix shell` (packages only)
|
||||
|
||||
## Available groups
|
||||
|
||||
- dev (go, bun, air, ...)
|
||||
- cybersecurity (nmap, john, dirb, ffuf, ...)
|
||||
|
||||
For the Cybersecurity group, the home-manager module also sets up:
|
||||
|
||||
- `~/Cyber/wordlists/` with SecLists, fuzz4bounty, and hashcat rules
|
||||
- `~/Cyber/tmp/` as a temporary workspace
|
||||
|
||||
## Use in another flake
|
||||
|
||||
Add this repo as an input:
|
||||
|
||||
```nix
|
||||
inputs.nixy.url = "github:anotherhadi/nixy";
|
||||
```
|
||||
|
||||
Import the home-manager module in your home configuration:
|
||||
|
||||
```nix
|
||||
{ inputs, ... }: {
|
||||
imports = [
|
||||
inputs.nixy.homeManagerModules.cybersecurity
|
||||
# inputs.nixy.homeManagerModules.dev
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
## Quick shell without installing
|
||||
|
||||
```sh
|
||||
nix shell github:anotherhadi/nixy#cybersecurity
|
||||
nix shell github:anotherhadi/nixy#dev
|
||||
```
|
||||
|
||||
This drops you into a shell with all tools in `PATH`. No home-manager required, no wordlists or systemd units.
|
||||
@@ -1,134 +0,0 @@
|
||||
# NVF config en flake réutilisable
|
||||
|
||||
**Date:** 2026-07-29
|
||||
**Statut:** Approuvé (design)
|
||||
|
||||
## Objectif
|
||||
|
||||
Permettre à n'importe qui de réutiliser la configuration NVF (Neovim via
|
||||
[nvf](https://github.com/notashelf/nvf)) de ce dépôt, de deux façons :
|
||||
|
||||
1. **`nix run`** — lancer le nvim standalone sans home-manager.
|
||||
2. **Module home-manager** — importer un module dans sa propre config, qui
|
||||
s'adapte automatiquement à *son* thème stylix.
|
||||
|
||||
Le tout sans traîner les inputs lourds du monorepo (nixarr, blog,
|
||||
awesome-wallpapers, etc.), et en supportant Linux **et** macOS.
|
||||
|
||||
## État actuel
|
||||
|
||||
- `home/programs/nvf/flake.nix` n'est **pas** un vrai flake : c'est une fonction
|
||||
`{ inputs, pkgs, system, ... }` fusionnée dans les outputs du flake racine via
|
||||
`import ./home/programs/nvf/flake.nix args`.
|
||||
- Elle expose déjà `packages.<system>.nvim`, `apps.<system>.nvim` et
|
||||
`homeManagerModules.nvim`, mais :
|
||||
- uniquement pour `x86_64-linux` (system codé en dur) ;
|
||||
- `homeManagerModules.nvim` importe `default.nix`, qui **exige `inputs`**
|
||||
(via `inputs.nvf...`) — un tiers devrait le fournir lui-même ;
|
||||
- un tiers qui consomme le flake racine tire **tous** les inputs lourds.
|
||||
- Les hosts consomment nvf en important **directement le dossier**
|
||||
(`imports = [ ../../home/programs/nvf ]` → `default.nix`), `inputs` venant des
|
||||
`extraSpecialArgs` du monorepo. `homeManagerModules.nvim` n'est donc **pas**
|
||||
utilisé en interne aujourd'hui.
|
||||
- `default.nix` référence `config.lib.stylix.colors` **sans garde** → un
|
||||
consommateur sans stylix aurait une erreur d'évaluation.
|
||||
|
||||
## Design
|
||||
|
||||
### 1. `home/programs/nvf/flake.nix` → vrai flake
|
||||
|
||||
Remplace la fonction actuelle. Inputs minimaux, outputs multi-systèmes.
|
||||
|
||||
- `inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"` (stable)
|
||||
- `inputs.nvf.url = "github:notashelf/nvf"`
|
||||
- Systèmes : `x86_64-linux`, `aarch64-linux`, `aarch64-darwin`, `x86_64-darwin`
|
||||
via un helper `forAllSystems` (`nixpkgs.lib.genAttrs`).
|
||||
- Liste de modules partagée : `options.nix`, `languages.nix`, `picker.nix`,
|
||||
`snacks.nix`, `keymaps.nix`, `utils.nix`, `mini.nix`.
|
||||
|
||||
Outputs :
|
||||
|
||||
- `packages.<sys>.nvim` (+ `.default`) = `(nvf.lib.neovimConfiguration { inherit pkgs modules; }).neovim`
|
||||
- `apps.<sys>.nvim` (+ `.default`) pointant vers `${nvim}/bin/nvim`
|
||||
- `homeManagerModules.nvim` (+ `.default`) :
|
||||
`{ imports = [ nvf.homeManagerModules.default ./default.nix ]; }`
|
||||
— `nvf` capturé depuis les inputs **du flake**, donc le tiers n'a rien à fournir.
|
||||
- `formatter.<sys>` = `pkgs.alejandra`
|
||||
|
||||
### 2. `home/programs/nvf/default.nix` — découplé + garde stylix
|
||||
|
||||
- Signature : `{ config, lib, ... }` — plus de `inputs`.
|
||||
- Retirer `imports = [ inputs.nvf.homeManagerModules.default ]` (désormais dans
|
||||
le wrapper `homeManagerModules.nvim` du flake).
|
||||
- Rendre l'override stylix conditionnel :
|
||||
|
||||
```nix
|
||||
vim.luaConfigRC = lib.mkIf (config ? stylix && config.stylix.enable) {
|
||||
hl-overrides = let c = config.lib.stylix.colors; in '' ... '';
|
||||
};
|
||||
```
|
||||
|
||||
- Avec stylix → nvim prend la palette du consommateur.
|
||||
- Sans stylix → nvim marche, thème natif nvf.
|
||||
|
||||
### 3. Flake racine (`flake.nix`)
|
||||
|
||||
- Ajouter l'input :
|
||||
|
||||
```nix
|
||||
nvf-config = {
|
||||
url = "path:./home/programs/nvf";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
inputs.nvf.follows = "nvf";
|
||||
};
|
||||
```
|
||||
|
||||
- Retirer la ligne `(import ./home/programs/nvf/flake.nix args)` du `merge`.
|
||||
- Ré-exposer, pour garder `nix run .#nvim` depuis la racine :
|
||||
|
||||
```nix
|
||||
packages.${system}.nvim = inputs.nvf-config.packages.${system}.nvim;
|
||||
apps.${system}.nvim = inputs.nvf-config.apps.${system}.nvim;
|
||||
```
|
||||
|
||||
### 4. Hosts
|
||||
|
||||
`hosts/laptop/home.nix`, `hosts/work/home.nix`, `hosts/server/home.nix` :
|
||||
|
||||
```nix
|
||||
# avant
|
||||
imports = [ ../../home/programs/nvf ];
|
||||
# après
|
||||
imports = [ inputs.nvf-config.homeManagerModules.default ];
|
||||
```
|
||||
|
||||
Toi et les tiers utilisez ainsi exactement le même module.
|
||||
|
||||
## Locks
|
||||
|
||||
Deux `flake.lock` distincts : racine + `home/programs/nvf/flake.lock`.
|
||||
|
||||
| Contexte | Lock qui fait foi |
|
||||
|----------|-------------------|
|
||||
| Toi, via le monorepo (`follows`) | Lock **racine** ; le lock du sous-flake est ignoré. |
|
||||
| Tiers, `github:.../nixos?dir=home/programs/nvf` | Lock du **sous-flake**. |
|
||||
| `nix run ./home/programs/nvf#nvim` | Lock du sous-flake. |
|
||||
|
||||
**Friction connue :** le `path:` input est épinglé dans le lock racine. Après
|
||||
édition de la config nvim, faire `nix flake update nvf-config` (ou
|
||||
`--update-input nvf-config`) pour que le monorepo reprenne les changements.
|
||||
|
||||
## Décisions clés (YAGNI)
|
||||
|
||||
- **Flake dédié dans le monorepo** (pas dépôt séparé) — source unique, pas de
|
||||
synchro à gérer.
|
||||
- **Garde stylix optionnelle** plutôt qu'exigence dure — coût nul, évite un
|
||||
footgun pour les tiers non-stylixés.
|
||||
- **Multi-système** — trivial via `genAttrs`, permet l'usage sur macOS.
|
||||
|
||||
## Vérification
|
||||
|
||||
- `nix flake check ./home/programs/nvf`
|
||||
- `nix run ./home/programs/nvf#nvim` (lance nvim standalone)
|
||||
- `nix flake check` à la racine
|
||||
- Rebuild d'un host (ex. laptop) sans régression nvim, thème stylix conservé.
|
||||
Generated
+2
-2
@@ -882,11 +882,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"path": "./home/programs/nvf",
|
||||
"path": "./home/programs/tui/nvf",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"path": "./home/programs/nvf",
|
||||
"path": "./home/programs/tui/nvf",
|
||||
"type": "path"
|
||||
},
|
||||
"parent": []
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
nvf.url = "github:notashelf/nvf";
|
||||
nvf-config = {
|
||||
url = "path:./home/programs/nvf";
|
||||
url = "path:./home/programs/tui/nvf";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
inputs.nvf.follows = "nvf";
|
||||
};
|
||||
@@ -71,8 +71,7 @@
|
||||
merge = nixpkgs.lib.foldl nixpkgs.lib.recursiveUpdate {};
|
||||
in
|
||||
merge [
|
||||
(import ./home/programs/group/flake.nix args)
|
||||
(import ./home/programs/nixy/flake.nix args)
|
||||
(import ./home/programs/tui/nixy/flake.nix args)
|
||||
{
|
||||
formatter.${system} = pkgs.alejandra;
|
||||
packages.${system}.nvim = inputs.nvf-config.packages.${system}.nvim;
|
||||
|
||||
@@ -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 ─────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
../../nixos/utils.nix
|
||||
../../nixos/hyprland.nix
|
||||
../../nixos/usbguard.nix
|
||||
../../home/programs/helium/system.nix # I hate browser's configuration..
|
||||
../../home/programs/gui/helium/system.nix # I hate browser's configuration..
|
||||
|
||||
../../nixos/omen.nix # CHANGEME: For my laptop only, remove this (OMEN 16)
|
||||
|
||||
|
||||
+22
-16
@@ -5,25 +5,31 @@
|
||||
}: {
|
||||
imports = [
|
||||
# Programs
|
||||
../../home/programs/helium
|
||||
../../home/programs/proton
|
||||
../../home/programs/proton/auto-start-vpn.nix
|
||||
../../home/programs/ghostty
|
||||
inputs.nvf-config.homeManagerModules.default
|
||||
../../home/programs/shell
|
||||
../../home/programs/git
|
||||
../../home/programs/git/lazygit.nix
|
||||
../../home/programs/git/signing.nix # CHANGEME: Change the key or remove this file
|
||||
../../home/programs/thunar
|
||||
../../home/programs/nixy
|
||||
../../home/programs/nix-utils
|
||||
../../home/programs/spotatui
|
||||
../../home/programs/yazi
|
||||
|
||||
../../home/programs/group/basic-apps.nix
|
||||
## GUI
|
||||
../../home/programs/gui/proton
|
||||
../../home/programs/gui/proton/auto-start-vpn.nix
|
||||
../../home/programs/gui/helium
|
||||
../../home/programs/gui/thunar
|
||||
../../home/programs/gui/pkgs.nix
|
||||
|
||||
## TUI
|
||||
inputs.nvf-config.homeManagerModules.default
|
||||
../../home/programs/tui/ghostty
|
||||
../../home/programs/tui/ilovetui
|
||||
../../home/programs/tui/shell
|
||||
../../home/programs/tui/git
|
||||
../../home/programs/tui/git/lazygit.nix
|
||||
../../home/programs/tui/git/signing.nix # CHANGEME: Change the key or remove this file
|
||||
../../home/programs/tui/nixy
|
||||
../../home/programs/tui/nix-utils
|
||||
../../home/programs/tui/spotatui
|
||||
../../home/programs/tui/yazi
|
||||
../../home/programs/tui/pkgs.nix
|
||||
|
||||
## GROUPS
|
||||
../../home/programs/group/cybersecurity.nix
|
||||
../../home/programs/group/dev.nix
|
||||
../../home/programs/group/misc.nix
|
||||
|
||||
# System (Desktop environment like stuff)
|
||||
../../home/system/hyprlock
|
||||
|
||||
@@ -52,7 +52,6 @@ in {
|
||||
- *work
|
||||
'';
|
||||
|
||||
systemd.user.services.mbsync.Unit.After = ["sops-nix.service"];
|
||||
home.packages = with pkgs; [
|
||||
sops
|
||||
age
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
autoUpgrade = false;
|
||||
autoGarbageCollector = true;
|
||||
|
||||
hasBattery = true;
|
||||
};
|
||||
|
||||
# DON'T TOUCH THIS
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
options = [
|
||||
"subvol=/"
|
||||
"compress=zstd"
|
||||
]; # adapte selon si t'as des subvolumes
|
||||
]; # adjust depending on whether you use subvolumes
|
||||
};
|
||||
swapDevices = [];
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
../../nixos/utils.nix
|
||||
../../nixos/hyprland.nix
|
||||
../../nixos/docker.nix
|
||||
../../home/programs/helium/system.nix # I hate browser's configuration..
|
||||
../../home/programs/gui/helium/system.nix # I hate browser's configuration..
|
||||
|
||||
# You should let those lines as is
|
||||
./hardware-configuration.nix
|
||||
@@ -37,5 +37,5 @@
|
||||
networking.firewall.allowedTCPPorts = [9001];
|
||||
|
||||
# Don't touch this
|
||||
system.stateVersion = "24.05";
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
|
||||
+20
-15
@@ -5,23 +5,28 @@
|
||||
}: {
|
||||
imports = [
|
||||
# Programs
|
||||
inputs.nvf-config.homeManagerModules.default
|
||||
../../home/programs/proton
|
||||
../../home/programs/helium
|
||||
../../home/programs/ghostty
|
||||
../../home/programs/shell
|
||||
../../home/programs/git
|
||||
../../home/programs/git/lazygit.nix
|
||||
../../home/programs/thunar
|
||||
../../home/programs/nixy
|
||||
../../home/programs/nix-utils
|
||||
../../home/programs/spotatui
|
||||
../../home/programs/yazi
|
||||
|
||||
../../home/programs/group/basic-apps.nix
|
||||
## GUI
|
||||
../../home/programs/gui/proton
|
||||
../../home/programs/gui/helium
|
||||
../../home/programs/gui/thunar
|
||||
../../home/programs/gui/pkgs.nix
|
||||
|
||||
## TUI
|
||||
inputs.nvf-config.homeManagerModules.default
|
||||
../../home/programs/tui/ghostty
|
||||
../../home/programs/tui/shell
|
||||
../../home/programs/tui/git
|
||||
../../home/programs/tui/git/lazygit.nix
|
||||
../../home/programs/tui/nixy
|
||||
../../home/programs/tui/nix-utils
|
||||
../../home/programs/tui/spotatui
|
||||
../../home/programs/tui/yazi
|
||||
../../home/programs/tui/pkgs.nix
|
||||
|
||||
## GROUPS
|
||||
../../home/programs/group/cybersecurity.nix
|
||||
../../home/programs/group/dev.nix
|
||||
../../home/programs/group/misc.nix
|
||||
|
||||
# System (Desktop environment like stuff)
|
||||
../../home/system/hyprlock
|
||||
@@ -43,7 +48,7 @@
|
||||
homeDirectory = "/home/" + config.var.username;
|
||||
|
||||
# Don't touch this
|
||||
stateVersion = "24.05";
|
||||
stateVersion = "26.05";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.monitor = [
|
||||
|
||||
@@ -49,7 +49,6 @@ in {
|
||||
- *work
|
||||
'';
|
||||
|
||||
systemd.user.services.mbsync.Unit.After = ["sops-nix.service"];
|
||||
home.packages = with pkgs; [
|
||||
sops
|
||||
age
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
autoUpgrade = false;
|
||||
autoGarbageCollector = true;
|
||||
|
||||
hasBattery = false;
|
||||
};
|
||||
|
||||
# DON'T TOUCH THIS
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
{config, pkgs, ...}: {
|
||||
{config, ...}: {
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.package = pkgs.docker_29;
|
||||
users.users."${config.var.username}".extraGroups = ["docker"];
|
||||
}
|
||||
|
||||
@@ -5,5 +5,12 @@
|
||||
withUWSM = true;
|
||||
};
|
||||
|
||||
# Generic Wayland hints (Chromium/Electron and Firefox), applied on every
|
||||
# Hyprland host regardless of the GPU.
|
||||
environment.variables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
};
|
||||
|
||||
security.pam.services.hyprlock = {};
|
||||
}
|
||||
|
||||
@@ -16,11 +16,9 @@ in {
|
||||
environment.variables = {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
__GL_GSYNC_ALLOWED = "1";
|
||||
__GL_VRR_ALLOWED = "1";
|
||||
NVD_BACKEND = "direct";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
};
|
||||
|
||||
nixpkgs.config.nvidia.acceptLicense = true;
|
||||
|
||||
+7
-3
@@ -13,12 +13,16 @@
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hp-omen-linux-module";
|
||||
version = "rebase-6.14";
|
||||
version = "rebase-6.15";
|
||||
# Upstream only rebases per kernel branch and currently tops out at
|
||||
# rebase-6.15, while linuxPackages_latest is already on 7.x. If the
|
||||
# module ever fails to build against a newer kernel, either bump this
|
||||
# to a fresh upstream branch or fall back to a stable kernel.
|
||||
src = fetchFromGitHub {
|
||||
owner = "ranisalt";
|
||||
repo = "hp-omen-linux-module";
|
||||
rev = finalAttrs.version;
|
||||
sha256 = "sha256-2zCm29bdboSjRm/caMjBPGNc0tZXPUnIIYlHxxfhAok=";
|
||||
rev = "d4b9b5adb84581c3874ca3985dc749c40c3ece67"; # rebase-6.15
|
||||
sha256 = "sha256-IOXHzcCB0n1InMjeIu3XYEJ4bhbHS3NIlS8/+4XIwkQ=";
|
||||
};
|
||||
setSourceRoot = ''
|
||||
export sourceRoot=$(pwd)/${finalAttrs.src.name}/src
|
||||
|
||||
Reference in New Issue
Block a user