mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-08-21 10:45:49 +02:00
Compare commits
5 Commits
a393b84c92
...
def37f0b3a
| Author | SHA1 | Date | |
|---|---|---|---|
| def37f0b3a | |||
| 0d901aa10c | |||
| 835114e5c9 | |||
| 9cef5b8f76 | |||
| c37f3fc5e4 |
@@ -120,7 +120,6 @@ sudo nixos-rebuild switch --flake ~/.config/nixos#yourhostname
|
|||||||
- [WALLPAPERS](https://github.com/anotherhadi/awesome-wallpapers): An awesome
|
- [WALLPAPERS](https://github.com/anotherhadi/awesome-wallpapers): An awesome
|
||||||
collection of wallpapers
|
collection of wallpapers
|
||||||
- [NEOVIM](docs/NEOVIM.md): How to use the Neovim config in your own flake
|
- [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
|
- [CONTRIBUTING](docs/CONTRIBUTING.md): How to contribute
|
||||||
- [LICENSE](LICENSE): MIT License
|
- [LICENSE](LICENSE): MIT License
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
.sops.yaml
|
.sops.yaml
|
||||||
.claude/
|
.claude/
|
||||||
old/
|
old/
|
||||||
|
docs/superpowers/
|
||||||
|
.superpowers/
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ sudo nixos-rebuild switch --flake ~/.config/nixos#yourhostname
|
|||||||
- [WALLPAPERS](https://github.com/anotherhadi/awesome-wallpapers): An awesome
|
- [WALLPAPERS](https://github.com/anotherhadi/awesome-wallpapers): An awesome
|
||||||
collection of wallpapers
|
collection of wallpapers
|
||||||
- [NEOVIM](docs/NEOVIM.md): How to use the Neovim config in your own flake
|
- [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
|
- [CONTRIBUTING](docs/CONTRIBUTING.md): How to contribute
|
||||||
- [LICENSE](LICENSE): MIT License
|
- [LICENSE](LICENSE): MIT License
|
||||||
|
|||||||
@@ -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.
|
|
||||||
Generated
+20
@@ -872,6 +872,25 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nvf-config": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs-stable"
|
||||||
|
],
|
||||||
|
"nvf": [
|
||||||
|
"nvf"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"path": "./home/programs/tui/nvf",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"path": "./home/programs/tui/nvf",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
"parent": []
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"awesome-wallpapers": "awesome-wallpapers",
|
"awesome-wallpapers": "awesome-wallpapers",
|
||||||
@@ -888,6 +907,7 @@
|
|||||||
"notashelf-tuigreet": "notashelf-tuigreet",
|
"notashelf-tuigreet": "notashelf-tuigreet",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"nvf": "nvf",
|
"nvf": "nvf",
|
||||||
|
"nvf-config": "nvf-config",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"stylix": "stylix"
|
"stylix": "stylix"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,11 @@
|
|||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
nvf.url = "github:notashelf/nvf";
|
nvf.url = "github:notashelf/nvf";
|
||||||
|
nvf-config = {
|
||||||
|
url = "path:./home/programs/tui/nvf";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||||
|
inputs.nvf.follows = "nvf";
|
||||||
|
};
|
||||||
nur = {
|
nur = {
|
||||||
url = "github:nix-community/nur";
|
url = "github:nix-community/nur";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -66,11 +71,11 @@
|
|||||||
merge = nixpkgs.lib.foldl nixpkgs.lib.recursiveUpdate {};
|
merge = nixpkgs.lib.foldl nixpkgs.lib.recursiveUpdate {};
|
||||||
in
|
in
|
||||||
merge [
|
merge [
|
||||||
(import ./home/programs/nvf/flake.nix args)
|
(import ./home/programs/tui/nixy/flake.nix args)
|
||||||
(import ./home/programs/group/flake.nix args)
|
|
||||||
(import ./home/programs/nixy/flake.nix args)
|
|
||||||
{
|
{
|
||||||
formatter.${system} = pkgs.alejandra;
|
formatter.${system} = pkgs.alejandra;
|
||||||
|
packages.${system}.nvim = inputs.nvf-config.packages.${system}.nvim;
|
||||||
|
apps.${system}.nvim = inputs.nvf-config.apps.${system}.nvim;
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
h-laptop = import ./hosts/laptop/flake.nix args;
|
h-laptop = import ./hosts/laptop/flake.nix args;
|
||||||
h-work = import ./hosts/work/flake.nix args;
|
h-work = import ./hosts/work/flake.nix args;
|
||||||
|
|||||||
@@ -1,66 +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;
|
|
||||||
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
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -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,
|
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 = {
|
xdg.desktopEntries.helium = {
|
||||||
name = "Helium";
|
name = "Helium";
|
||||||
genericName = "Navigateur Web";
|
genericName = "Web Browser";
|
||||||
exec = "${config.programs.helium.package}/bin/helium %U";
|
exec = "${config.programs.helium.package}/bin/helium %U";
|
||||||
icon = "${config.programs.helium.package}/share/icons/hicolor/256x256/apps/helium.png";
|
icon = "${config.programs.helium.package}/share/icons/hicolor/256x256/apps/helium.png";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
@@ -128,7 +128,7 @@ in {
|
|||||||
|
|
||||||
xdg.desktopEntries.helium-private = {
|
xdg.desktopEntries.helium-private = {
|
||||||
name = "Helium (Private window)";
|
name = "Helium (Private window)";
|
||||||
genericName = "Navigateur Web";
|
genericName = "Web Browser";
|
||||||
exec = "${config.programs.helium.package}/bin/helium --incognito %U";
|
exec = "${config.programs.helium.package}/bin/helium --incognito %U";
|
||||||
icon = "${config.programs.helium.package}/share/icons/hicolor/256x256/apps/helium.png";
|
icon = "${config.programs.helium.package}/share/icons/hicolor/256x256/apps/helium.png";
|
||||||
terminal = false;
|
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
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
c = config.lib.stylix.colors;
|
|
||||||
in {
|
|
||||||
imports = [inputs.nvf.homeManagerModules.default];
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -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"
|
"node_modules"
|
||||||
"result"
|
"result"
|
||||||
"result-*"
|
"result-*"
|
||||||
|
".superpowers/"
|
||||||
|
"docs/superpowers/"
|
||||||
];
|
];
|
||||||
settings = {
|
settings = {
|
||||||
user.name = username;
|
user.name = username;
|
||||||
@@ -40,13 +42,10 @@ in {
|
|||||||
d = "diff";
|
d = "diff";
|
||||||
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)";
|
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)";
|
||||||
pl = "!git pull 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";
|
st = "status";
|
||||||
br = "branch";
|
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'';
|
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'';
|
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
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.nvf = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
vim.luaConfigRC = lib.mkIf (config ? stylix && config.stylix.enable) {
|
||||||
|
hl-overrides = let
|
||||||
|
c = config.lib.stylix.colors;
|
||||||
|
in ''
|
||||||
|
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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Generated
+133
@@ -0,0 +1,133 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1777699697,
|
||||||
|
"narHash": "sha256-Eg9b/rq/ECYwNwEXs5i9wHyhxNI0JrYx2srdI2uZMaQ=",
|
||||||
|
"ref": "refs/heads/main",
|
||||||
|
"rev": "382052b74656a369c5408822af3f2501e9b1af81",
|
||||||
|
"revCount": 94,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.lix.systems/lix-project/flake-compat.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.lix.systems/lix-project/flake-compat.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nvf",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1778716662,
|
||||||
|
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mnw": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1780772958,
|
||||||
|
"narHash": "sha256-VKKe8r4pwCGWZ3Yr9CPN129R4S3CKLSrlYqdYz3vKpM=",
|
||||||
|
"owner": "Gerg-L",
|
||||||
|
"repo": "mnw",
|
||||||
|
"rev": "0871dbf63a53610c95db04439ed8ea4d6ec9c160",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Gerg-L",
|
||||||
|
"repo": "mnw",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1785133411,
|
||||||
|
"narHash": "sha256-Yjv0WEg39KRYS0rBdTbu6Fc/or/ihAKk13W9sQ6VWd0=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "2f5a153c270b70cb0f8c11f46d96d6d3bc39f4e3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-26.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1781216227,
|
||||||
|
"narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "a0374025a863d007d98e3297f6aa46cc3141c2f0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-26.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nvf": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"mnw": "mnw",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1781997110,
|
||||||
|
"narHash": "sha256-6D6xtYN5t1kZGNd69eMZsRBkgX5Df1roErn/kFR1C+A=",
|
||||||
|
"owner": "notashelf",
|
||||||
|
"repo": "nvf",
|
||||||
|
"rev": "320f60b97075a58d38b90fc5e39f478421dbd38a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "notashelf",
|
||||||
|
"repo": "nvf",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nvf": "nvf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
description = "Hadi's NVF Neovim configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||||
|
nvf.url = "github:notashelf/nvf";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nvf,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
||||||
|
forAllSystems = f: nixpkgs.lib.genAttrs systems f;
|
||||||
|
modules = [
|
||||||
|
./options.nix
|
||||||
|
./languages.nix
|
||||||
|
./picker.nix
|
||||||
|
./snacks.nix
|
||||||
|
./keymaps.nix
|
||||||
|
./utils.nix
|
||||||
|
./mini.nix
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
packages = forAllSystems (system: let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
nvim = (nvf.lib.neovimConfiguration {inherit pkgs modules;}).neovim;
|
||||||
|
in {
|
||||||
|
inherit nvim;
|
||||||
|
default = nvim;
|
||||||
|
});
|
||||||
|
|
||||||
|
apps = forAllSystems (system: let
|
||||||
|
nvim = {
|
||||||
|
type = "app";
|
||||||
|
program = "${self.packages.${system}.nvim}/bin/nvim";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
inherit nvim;
|
||||||
|
default = nvim;
|
||||||
|
});
|
||||||
|
|
||||||
|
homeManagerModules = rec {
|
||||||
|
nvim = {
|
||||||
|
imports = [
|
||||||
|
nvf.homeManagerModules.default
|
||||||
|
./default.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
default = nvim;
|
||||||
|
};
|
||||||
|
|
||||||
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{...}: {
|
{pkgs, ...}: {
|
||||||
vim = {
|
vim = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
context.enable = true;
|
context.enable = true;
|
||||||
highlight.enable = true;
|
highlight.enable = true;
|
||||||
textobjects.enable = true;
|
textobjects.enable = true;
|
||||||
|
grammars = [pkgs.vimPlugins.nvim-treesitter.grammarPlugins.http];
|
||||||
};
|
};
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -4,19 +4,6 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs-stable; [
|
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
|
# I love TUIs
|
||||||
caligula # User-friendly, lightweight TUI for disk imaging (ISO, USB BOOT)
|
caligula # User-friendly, lightweight TUI for disk imaging (ISO, USB BOOT)
|
||||||
dysk # A terminal-based disk usage analyzer
|
dysk # A terminal-based disk usage analyzer
|
||||||
@@ -40,5 +27,14 @@
|
|||||||
pastel # Command-line tool to generate, analyze, convert and manipulate colors
|
pastel # Command-line tool to generate, analyze, convert and manipulate colors
|
||||||
imagemagick # Image manipulation tool
|
imagemagick # Image manipulation tool
|
||||||
chafa # Image to ANSI/Unicode converter and more.
|
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 {csv,tsv,parquet,pqt,arrow,db,sqlite,xls,xlsx,xlsm,xlsb,fwf}=tw
|
||||||
alias -s {png,jpg,jpeg,gif,pdf}=xdg-open
|
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 G="| grep"
|
||||||
alias -g L="| less"
|
alias -g L="| less"
|
||||||
alias -g V="| nvim"
|
alias -g V="| nvim"
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
alias -g C="| wl-copy"
|
alias -g C="| wl-copy"
|
||||||
alias -g NE="2>/dev/null"
|
alias -g NE="2>/dev/null"
|
||||||
alias -g ND=">/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
|
# search history based on what's typed in the prompt
|
||||||
autoload -U history-search-end
|
autoload -U history-search-end
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Clipboard history: cliphist watches the Wayland clipboard and stores every
|
||||||
|
# entry (text + images) so it can be recalled later via the `clipboard-menu`
|
||||||
|
# script (tofi). Uses the home-manager module so the watcher services are
|
||||||
|
# managed the same way as swaync/hypridle.
|
||||||
|
{...}: {
|
||||||
|
services.cliphist = {
|
||||||
|
enable = true;
|
||||||
|
allowImages = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# hypridle handles idle management: lock the screen, turn the display off, and
|
||||||
|
# suspend after periods of inactivity. The `caffeine-toggle` script pauses it.
|
||||||
|
{...}: {
|
||||||
|
services.hypridle = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
# Avoid starting multiple hyprlock instances.
|
||||||
|
lock_cmd = "pidof hyprlock || hyprlock";
|
||||||
|
before_sleep_cmd = "loginctl lock-session";
|
||||||
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
|
};
|
||||||
|
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 300; # 5 min → lock
|
||||||
|
on-timeout = "loginctl lock-session";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 360; # 6 min → screen off
|
||||||
|
on-timeout = "hyprctl dispatch dpms off";
|
||||||
|
on-resume = "hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 1800; # 30 min → suspend
|
||||||
|
on-timeout = "systemctl suspend";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -124,7 +124,7 @@ in {
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Quick launch
|
# Quick launch
|
||||||
"$mod,RETURN, exec, uwsm app -- ${pkgs.ghostty}/bin/ghostty" # Ghostty (terminal)
|
"$mod,RETURN, exec, ${pkgs.ghostty}/bin/ghostty +new-window" # Ghostty (terminal, via daemon D-Bus)
|
||||||
"$mod,E, exec, uwsm app -- ${pkgs-stable.thunar}/bin/thunar" # Thunar
|
"$mod,E, exec, uwsm app -- ${pkgs-stable.thunar}/bin/thunar" # Thunar
|
||||||
"$mod, SPACE, exec, tofi-drun" # Launcher
|
"$mod, SPACE, exec, tofi-drun" # Launcher
|
||||||
"$mod, N, exec, swaync-client -t" # Notification center
|
"$mod, N, exec, swaync-client -t" # Notification center
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ in {
|
|||||||
hyprshot
|
hyprshot
|
||||||
hyprpicker
|
hyprpicker
|
||||||
swappy
|
swappy
|
||||||
|
satty
|
||||||
imv
|
imv
|
||||||
wf-recorder
|
wf-recorder
|
||||||
wlr-randr
|
wlr-randr
|
||||||
@@ -61,6 +62,10 @@ in {
|
|||||||
",prefered,auto,1" # default
|
",prefered,auto,1" # default
|
||||||
];
|
];
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
"systemctl --user start app-com.mitchellh.ghostty.service"
|
||||||
|
];
|
||||||
|
|
||||||
env = [
|
env = [
|
||||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||||
"XDG_SESSION_TYPE,wayland"
|
"XDG_SESSION_TYPE,wayland"
|
||||||
@@ -118,6 +123,7 @@ in {
|
|||||||
|
|
||||||
layerrule = [
|
layerrule = [
|
||||||
"match:namespace launcher, animation popin 70%"
|
"match:namespace launcher, animation popin 70%"
|
||||||
|
"match:namespace swaync-control-center, animation slide right"
|
||||||
];
|
];
|
||||||
|
|
||||||
windowrule = [
|
windowrule = [
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ in {
|
|||||||
{
|
{
|
||||||
label = "";
|
label = "";
|
||||||
type = "toggle";
|
type = "toggle";
|
||||||
command = "swayosd-client --input-volume mute-toggle";
|
command = "mic-mute";
|
||||||
"update-command" = "wpctl get-volume @DEFAULT_SOURCE@ | grep -q MUTED && echo true || echo false";
|
"update-command" = "mic-status";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
label = "";
|
label = "";
|
||||||
@@ -111,7 +111,6 @@ in {
|
|||||||
--border-radius: ${toString rounding}px;
|
--border-radius: ${toString rounding}px;
|
||||||
--border-radius-s: ${toString gaps-in}px;
|
--border-radius-s: ${toString gaps-in}px;
|
||||||
--border-radius-xl: ${toString (rounding - 2)}px;
|
--border-radius-xl: ${toString (rounding - 2)}px;
|
||||||
--shadow: 2px 4px 10px rgba(0,0,0,0.15);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification { padding: 5px; }
|
.notification { padding: 5px; }
|
||||||
@@ -210,7 +209,6 @@ in {
|
|||||||
|
|
||||||
.control-center .notification-background {
|
.control-center .notification-background {
|
||||||
background: @center-notification-bg;
|
background: @center-notification-bg;
|
||||||
box-shadow: var(--shadow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-center .notification-background .close-button,
|
.control-center .notification-background .close-button,
|
||||||
@@ -272,7 +270,6 @@ in {
|
|||||||
|
|
||||||
.widget-mpris {
|
.widget-mpris {
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
box-shadow: var(--shadow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mpris-overlay {
|
.mpris-overlay {
|
||||||
@@ -302,7 +299,6 @@ in {
|
|||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
background: @background-alt;
|
background: @background-alt;
|
||||||
box-shadow: var(--shadow);
|
|
||||||
color: @text;
|
color: @text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,7 +339,6 @@ in {
|
|||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
background: @background-alt;
|
background: @background-alt;
|
||||||
box-shadow: var(--shadow);
|
|
||||||
color: @text;
|
color: @text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,7 +370,6 @@ in {
|
|||||||
padding: 5px 15px;
|
padding: 5px 15px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
background: @background-alt;
|
background: @background-alt;
|
||||||
box-shadow: var(--shadow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.widget-buttons-grid button {
|
.widget-buttons-grid button {
|
||||||
@@ -409,4 +403,14 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
stylix.targets.swaync.enable = false;
|
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"];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,6 +90,116 @@
|
|||||||
terminal = false;
|
terminal = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
color-pick = {
|
||||||
|
name = "Pick Color";
|
||||||
|
exec = "color-pick";
|
||||||
|
icon = "color-select-symbolic";
|
||||||
|
comment = "Pick a screen color to the clipboard";
|
||||||
|
categories = ["Utility"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "color;picker;hex;eyedropper;";
|
||||||
|
};
|
||||||
|
|
||||||
|
screenshot-region = {
|
||||||
|
name = "Screenshot Region";
|
||||||
|
exec = "hyprshot -m region";
|
||||||
|
icon = "screenshot-recorded-symbolic";
|
||||||
|
comment = "Capture a selected region";
|
||||||
|
categories = ["Utility"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "screenshot;capture;region;";
|
||||||
|
};
|
||||||
|
|
||||||
|
screenshot-window = {
|
||||||
|
name = "Screenshot Window";
|
||||||
|
exec = "hyprshot -m window";
|
||||||
|
icon = "screenshot-recorded-symbolic";
|
||||||
|
comment = "Capture the active window";
|
||||||
|
categories = ["Utility"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "screenshot;capture;window;";
|
||||||
|
};
|
||||||
|
|
||||||
|
screenshot-screen = {
|
||||||
|
name = "Screenshot Screen";
|
||||||
|
exec = "hyprshot -m output";
|
||||||
|
icon = "screenshot-recorded-symbolic";
|
||||||
|
comment = "Capture the whole screen";
|
||||||
|
categories = ["Utility"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "screenshot;capture;screen;monitor;";
|
||||||
|
};
|
||||||
|
|
||||||
|
screenshot-edit = {
|
||||||
|
name = "Screenshot & Annotate";
|
||||||
|
exec = "screenshot-edit";
|
||||||
|
icon = "edit-symbolic";
|
||||||
|
comment = "Capture a region and open it in Satty";
|
||||||
|
categories = ["Utility"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "screenshot;annotate;satty;edit;";
|
||||||
|
};
|
||||||
|
|
||||||
|
record-toggle = {
|
||||||
|
name = "Screen Recording";
|
||||||
|
exec = "record-toggle";
|
||||||
|
icon = "media-record-symbolic";
|
||||||
|
comment = "Start or stop screen recording";
|
||||||
|
categories = ["Utility" "AudioVideo"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "record;recording;screencast;video;";
|
||||||
|
};
|
||||||
|
|
||||||
|
power-cycle = {
|
||||||
|
name = "Power Profile";
|
||||||
|
exec = "power-cycle";
|
||||||
|
icon = "power-profile-balanced-symbolic";
|
||||||
|
comment = "Cycle power-saver / balanced / performance";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "power;profile;performance;battery;";
|
||||||
|
};
|
||||||
|
|
||||||
|
airplane-toggle = {
|
||||||
|
name = "Airplane Mode";
|
||||||
|
exec = "airplane-toggle";
|
||||||
|
icon = "airplane-mode-symbolic";
|
||||||
|
comment = "Toggle Wi-Fi and Bluetooth together";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "airplane;flight;wifi;bluetooth;offline;";
|
||||||
|
};
|
||||||
|
|
||||||
|
clipboard-menu = {
|
||||||
|
name = "Clipboard History";
|
||||||
|
exec = "clipboard-menu";
|
||||||
|
icon = "edit-paste-symbolic";
|
||||||
|
comment = "Pick a past clipboard entry";
|
||||||
|
categories = ["Utility"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "clipboard;history;paste;cliphist;";
|
||||||
|
};
|
||||||
|
|
||||||
|
emoji-picker = {
|
||||||
|
name = "Emoji Picker";
|
||||||
|
exec = "emoji-picker";
|
||||||
|
icon = "face-smile-symbolic";
|
||||||
|
comment = "Pick an emoji and type it";
|
||||||
|
categories = ["Utility"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "emoji;emoticon;smiley;symbol;";
|
||||||
|
};
|
||||||
|
|
||||||
|
caffeine-toggle = {
|
||||||
|
name = "Keep Awake";
|
||||||
|
exec = "caffeine-toggle";
|
||||||
|
icon = "my-caffeine-on-symbolic";
|
||||||
|
comment = "Pause or resume idle locking and suspend";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "caffeine;idle;awake;inhibit;suspend;";
|
||||||
|
};
|
||||||
|
|
||||||
logout = {
|
logout = {
|
||||||
name = "Logout";
|
name = "Logout";
|
||||||
exec = "hyprctl dispatch exit";
|
exec = "hyprctl dispatch exit";
|
||||||
@@ -99,6 +209,81 @@
|
|||||||
terminal = false;
|
terminal = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dnd-toggle = {
|
||||||
|
name = "Do Not Disturb";
|
||||||
|
exec = "dnd-toggle";
|
||||||
|
icon = "notifications-disabled-symbolic";
|
||||||
|
comment = "Toggle Do Not Disturb";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "dnd;notifications;disturb;swaync;silence;";
|
||||||
|
};
|
||||||
|
|
||||||
|
vol-mute = {
|
||||||
|
name = "Mute Volume";
|
||||||
|
exec = "vol-mute";
|
||||||
|
icon = "audio-volume-muted-symbolic";
|
||||||
|
comment = "Toggle output mute";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
vol-up = {
|
||||||
|
name = "Volume Up";
|
||||||
|
exec = "vol-up";
|
||||||
|
icon = "audio-volume-high-symbolic";
|
||||||
|
comment = "Raise the volume by 5%";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
vol-down = {
|
||||||
|
name = "Volume Down";
|
||||||
|
exec = "vol-down";
|
||||||
|
icon = "audio-volume-low-symbolic";
|
||||||
|
comment = "Lower the volume by 5%";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
bright-up = {
|
||||||
|
name = "Brightness Up";
|
||||||
|
exec = "bright-up";
|
||||||
|
icon = "display-brightness-high-symbolic";
|
||||||
|
comment = "Raise the brightness by 5%";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
bright-down = {
|
||||||
|
name = "Brightness Down";
|
||||||
|
exec = "bright-down";
|
||||||
|
icon = "display-brightness-low-symbolic";
|
||||||
|
comment = "Lower the brightness by 5%";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
output-cycle = {
|
||||||
|
name = "Cycle Audio Output";
|
||||||
|
exec = "output-cycle";
|
||||||
|
icon = "audio-speakers-symbolic";
|
||||||
|
comment = "Switch to the next audio output";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "audio;output;sink;speaker;headphones;";
|
||||||
|
};
|
||||||
|
|
||||||
|
input-cycle = {
|
||||||
|
name = "Cycle Audio Input";
|
||||||
|
exec = "input-cycle";
|
||||||
|
icon = "audio-input-microphone-symbolic";
|
||||||
|
comment = "Switch to the next audio input";
|
||||||
|
categories = ["System"];
|
||||||
|
terminal = false;
|
||||||
|
settings.Keywords = "audio;input;source;microphone;mic;";
|
||||||
|
};
|
||||||
|
|
||||||
spotatui = {
|
spotatui = {
|
||||||
name = "Spotify";
|
name = "Spotify";
|
||||||
exec = "ghostty -e spotatui";
|
exec = "ghostty -e spotatui";
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ in {
|
|||||||
iw
|
iw
|
||||||
hyprsunset
|
hyprsunset
|
||||||
]
|
]
|
||||||
++ (with scripts; [vol-up vol-down vol-mute mic-mute bright-up bright-down nightshift-toggle focus-toggle waybar-toggle wifi-toggle bluetooth-toggle]);
|
++ (with scripts; [vol-up vol-down vol-mute mic-mute bright-up bright-down nightshift-toggle focus-toggle waybar-toggle wifi-toggle bluetooth-toggle dnd-toggle output-cycle input-cycle color-pick screenshot-edit record-toggle power-cycle airplane-toggle clipboard-menu emoji-picker caffeine-toggle mic-status]);
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once = [
|
wayland.windowManager.hyprland.settings.exec-once = [
|
||||||
"waybar"
|
"waybar"
|
||||||
|
|||||||
+263
-24
@@ -31,35 +31,111 @@
|
|||||||
OSD_TEXT=" $BRIGHT%"
|
OSD_TEXT=" $BRIGHT%"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# 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
|
||||||
|
src=$(${pkgs.pipewire}/bin/pw-dump | ${pkgs.jq}/bin/jq -r \
|
||||||
|
'[.[] | select(.info.props."media.class"=="Audio/Source") | .id] | .[0] // empty')
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
# 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 {
|
in {
|
||||||
bluetoothScript = pkgs.writeShellScript "waybar-bluetooth" ''
|
bluetoothScript = pkgs.writeShellScript "waybar-bluetooth" ''
|
||||||
if bluetoothctl show 2>/dev/null | grep -q "Powered: yes"; then
|
jq=${pkgs.jq}/bin/jq
|
||||||
device=$(bluetoothctl devices Connected 2>/dev/null | head -1 | cut -d' ' -f3-)
|
nl=$'\n'
|
||||||
if [ -n "$device" ]; then
|
# bluetoothctl bloque sans contrôleur par défaut → toujours borné par timeout.
|
||||||
printf '{"text": "%s", "class": "connected", "tooltip": "Bluetooth\\n %s"}\n' "$device" "$device"
|
bt() { timeout 3 ${pkgs.bluez}/bin/bluetoothctl "$@" 2>/dev/null; }
|
||||||
else
|
|
||||||
printf '{"text": "", "class": "on", "tooltip": "Bluetooth on"}\n'
|
powered=$(bt show | awk '/Powered:/ { print $2; exit }')
|
||||||
fi
|
if [ "$powered" != "yes" ]; then
|
||||||
|
"$jq" -cn '{ text: "", class: "off", tooltip: "Bluetooth off" }'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
tip=""
|
||||||
|
add_tip() { tip="''${tip:+$tip$nl}$1"; }
|
||||||
|
|
||||||
|
count=0
|
||||||
|
for mac in $(bt devices Connected | awk '{ print $2 }'); do
|
||||||
|
count=$((count + 1))
|
||||||
|
info=$(bt info "$mac")
|
||||||
|
name=$(printf '%s' "$info" | sed -n 's/^[[:space:]]*Name: //p' | head -1)
|
||||||
|
[ -z "$name" ] && name="$mac"
|
||||||
|
batt=$(printf '%s' "$info" | sed -n 's/.*Battery Percentage:.*(\([0-9][0-9]*\)).*/\1/p' | head -1)
|
||||||
|
add_tip " $name''${batt:+ · $batt%}"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$count" -gt 0 ]; then
|
||||||
|
"$jq" -cn --arg tooltip "$tip" '{ text: "", class: "connected", tooltip: $tooltip }'
|
||||||
else
|
else
|
||||||
printf '{"text": "", "class": "off", "tooltip": "Bluetooth off"}\n'
|
"$jq" -cn '{ text: "", class: "on", tooltip: "Bluetooth on" }'
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
networkScript = pkgs.writeShellScript "waybar-network" ''
|
networkScript = pkgs.writeShellScript "waybar-network" ''
|
||||||
for iface in $(${pkgs.iproute2}/bin/ip -br link show | awk '$2 == "UP" {print $1}' | grep -vE '^(lo|tun|proton|wg[0-9]|ppp|vpn|docker|br-|veth|virbr)'); do
|
nmcli=${pkgs.networkmanager}/bin/nmcli
|
||||||
ip=$(${pkgs.iproute2}/bin/ip addr show "$iface" 2>/dev/null | grep 'inet ' | awk '{print $2}' | cut -d/ -f1 | head -1)
|
ip=${pkgs.iproute2}/bin/ip
|
||||||
if [ -n "$ip" ]; then
|
jq=${pkgs.jq}/bin/jq
|
||||||
if [[ "$iface" == wl* ]]; then
|
nl=$'\n'
|
||||||
ssid=$(${pkgs.iw}/bin/iw dev "$iface" link 2>/dev/null | grep SSID | sed 's/.*SSID: //')
|
|
||||||
signal=$(${pkgs.iw}/bin/iw dev "$iface" link 2>/dev/null | grep signal | awk '{print $2}')
|
text=""
|
||||||
printf '{"text": "", "class": "wifi", "tooltip": " %s\\n %s dBm"}\n' "$ssid" "$signal"
|
tip=""
|
||||||
else
|
class="disconnected"
|
||||||
printf '{"text": "", "class": "ethernet", "tooltip": " %s\\n %s"}\n' "$iface" "$ip"
|
add_seg() { text="''${text:+$text }$1"; }
|
||||||
fi
|
add_tip() { tip="''${tip:+$tip$nl}$1"; }
|
||||||
exit 0
|
|
||||||
|
# ── Ethernet ────────────────────────────────────────────────
|
||||||
|
eth=$("$nmcli" -t -f DEVICE,TYPE,STATE device status 2>/dev/null \
|
||||||
|
| awk -F: '$2 == "ethernet" && $3 == "connected" { print $1; exit }')
|
||||||
|
if [ -n "$eth" ]; then
|
||||||
|
eth_ip=$("$ip" -4 -br addr show "$eth" 2>/dev/null | awk '{ print $3 }' | cut -d/ -f1)
|
||||||
|
add_seg ""
|
||||||
|
class="ethernet"
|
||||||
|
add_tip " Ethernet''${eth_ip:+ · $eth_ip}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ── Wi-Fi ───────────────────────────────────────────────────
|
||||||
|
wifi=$("$nmcli" -t -f ACTIVE,SSID,SIGNAL device wifi 2>/dev/null | grep -m1 '^yes:')
|
||||||
|
if [ -n "$wifi" ]; then
|
||||||
|
ssid=$(printf '%s' "$wifi" | cut -d: -f2)
|
||||||
|
signal=$(printf '%s' "$wifi" | cut -d: -f3)
|
||||||
|
if [ "''${signal:-0}" -ge 80 ]; then icon=""
|
||||||
|
elif [ "''${signal:-0}" -ge 60 ]; then icon=""
|
||||||
|
elif [ "''${signal:-0}" -ge 40 ]; then icon=""
|
||||||
|
elif [ "''${signal:-0}" -ge 20 ]; then icon=""
|
||||||
|
else icon=""
|
||||||
fi
|
fi
|
||||||
done
|
add_seg "$icon"
|
||||||
printf '{"text": "", "class": "disconnected", "tooltip": "Disconnected"}\n'
|
[ "$class" = "disconnected" ] && class="wifi"
|
||||||
|
add_tip "$icon ''${ssid:-Wi-Fi}''${signal:+ · $signal%}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ── VPN (nmcli, fallback interfaces) ────────────────────────
|
||||||
|
vpn=$("$nmcli" -t -f TYPE,NAME connection show --active 2>/dev/null \
|
||||||
|
| awk -F: '$1 == "vpn" || $1 == "wireguard" { print $2; exit }')
|
||||||
|
if [ -z "$vpn" ]; then
|
||||||
|
vpn=$("$ip" -br link show 2>/dev/null \
|
||||||
|
| awk '($2 == "UP" || $2 == "UNKNOWN") && $1 ~ /^(tun|wg|proton|ppp)/ { sub(/@.*/, "", $1); print $1; exit }')
|
||||||
|
fi
|
||||||
|
if [ -n "$vpn" ]; then
|
||||||
|
add_seg ""
|
||||||
|
add_tip " VPN · $vpn"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ── Rien ────────────────────────────────────────────────────
|
||||||
|
if [ -z "$text" ]; then
|
||||||
|
text=""
|
||||||
|
tip="Disconnected"
|
||||||
|
fi
|
||||||
|
|
||||||
|
"$jq" -cn --arg text "$text" --arg class "$class" --arg tooltip "$tip" \
|
||||||
|
'{ text: $text, class: $class, tooltip: $tooltip }'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
vol-up = pkgs.writeShellScriptBin "vol-up" ''
|
vol-up = pkgs.writeShellScriptBin "vol-up" ''
|
||||||
@@ -81,8 +157,12 @@ in {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
mic-mute = pkgs.writeShellScriptBin "mic-mute" ''
|
mic-mute = pkgs.writeShellScriptBin "mic-mute" ''
|
||||||
${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_SOURCE@ toggle
|
wpctl=${pkgs.wireplumber}/bin/wpctl
|
||||||
if ${pkgs.wireplumber}/bin/wpctl get-volume @DEFAULT_SOURCE@ | grep -q MUTED; then
|
${micSource}
|
||||||
|
[ -z "$src" ] && exit 0
|
||||||
|
|
||||||
|
"$wpctl" set-mute "$src" toggle
|
||||||
|
if "$wpctl" get-volume "$src" | grep -q MUTED; then
|
||||||
OSD_TEXT=" Muted"
|
OSD_TEXT=" Muted"
|
||||||
else
|
else
|
||||||
OSD_TEXT=" Live"
|
OSD_TEXT=" Live"
|
||||||
@@ -90,6 +170,15 @@ in {
|
|||||||
${updateOsd}
|
${updateOsd}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
mic-status = pkgs.writeShellScriptBin "mic-status" ''
|
||||||
|
${micSource}
|
||||||
|
if [ -n "$src" ] && ${pkgs.wireplumber}/bin/wpctl get-volume "$src" | grep -q MUTED; then
|
||||||
|
echo true
|
||||||
|
else
|
||||||
|
echo false
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
bright-up = pkgs.writeShellScriptBin "bright-up" ''
|
bright-up = pkgs.writeShellScriptBin "bright-up" ''
|
||||||
${pkgs.brightnessctl}/bin/brightnessctl set 5%+
|
${pkgs.brightnessctl}/bin/brightnessctl set 5%+
|
||||||
${brightGetText}
|
${brightGetText}
|
||||||
@@ -160,5 +249,155 @@ in {
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# TODO: Run in background
|
dnd-toggle = pkgs.writeShellScriptBin "dnd-toggle" ''
|
||||||
|
state=$(${pkgs.swaynotificationcenter}/bin/swaync-client -d)
|
||||||
|
if [ "$state" = "true" ]; then
|
||||||
|
OSD_TEXT=" Do Not Disturb On"
|
||||||
|
else
|
||||||
|
OSD_TEXT=" Do Not Disturb Off"
|
||||||
|
fi
|
||||||
|
${updateOsd}
|
||||||
|
'';
|
||||||
|
|
||||||
|
output-cycle = pkgs.writeShellScriptBin "output-cycle" ''
|
||||||
|
wpctl=${pkgs.wireplumber}/bin/wpctl
|
||||||
|
jq=${pkgs.jq}/bin/jq
|
||||||
|
pwdump=${pkgs.pipewire}/bin/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
|
||||||
|
|
||||||
|
cur=$("$wpctl" inspect @DEFAULT_AUDIO_SINK@ 2>/dev/null | sed -n 's/^id \([0-9]*\),.*/\1/p')
|
||||||
|
|
||||||
|
next_index=0
|
||||||
|
for i in "''${!ids[@]}"; do
|
||||||
|
if [ "''${ids[$i]}" = "$cur" ]; then
|
||||||
|
next_index=$(( (i + 1) % n ))
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
next=''${ids[$next_index]}
|
||||||
|
|
||||||
|
"$wpctl" set-default "$next"
|
||||||
|
desc=$("$pwdump" | "$jq" -r --argjson id "$next" '.[] | select(.id==$id) | .info.props."node.description"')
|
||||||
|
OSD_TEXT=" ''${desc:-Output}"
|
||||||
|
${updateOsd}
|
||||||
|
'';
|
||||||
|
|
||||||
|
input-cycle = pkgs.writeShellScriptBin "input-cycle" ''
|
||||||
|
wpctl=${pkgs.wireplumber}/bin/wpctl
|
||||||
|
jq=${pkgs.jq}/bin/jq
|
||||||
|
pwdump=${pkgs.pipewire}/bin/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
|
||||||
|
|
||||||
|
cur=$("$wpctl" inspect @DEFAULT_AUDIO_SOURCE@ 2>/dev/null | sed -n 's/^id \([0-9]*\),.*/\1/p')
|
||||||
|
|
||||||
|
next_index=0
|
||||||
|
for i in "''${!ids[@]}"; do
|
||||||
|
if [ "''${ids[$i]}" = "$cur" ]; then
|
||||||
|
next_index=$(( (i + 1) % n ))
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
next=''${ids[$next_index]}
|
||||||
|
|
||||||
|
"$wpctl" set-default "$next"
|
||||||
|
desc=$("$pwdump" | "$jq" -r --argjson id "$next" '.[] | select(.id==$id) | .info.props."node.description"')
|
||||||
|
OSD_TEXT=" ''${desc:-Input}"
|
||||||
|
${updateOsd}
|
||||||
|
'';
|
||||||
|
|
||||||
|
color-pick = pkgs.writeShellScriptBin "color-pick" ''
|
||||||
|
# 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"
|
||||||
|
else
|
||||||
|
OSD_TEXT=" Cancelled"
|
||||||
|
fi
|
||||||
|
${updateOsd}
|
||||||
|
'';
|
||||||
|
|
||||||
|
screenshot-edit = pkgs.writeShellScriptBin "screenshot-edit" ''
|
||||||
|
${pkgs.hyprshot}/bin/hyprshot -m region --raw 2>/dev/null \
|
||||||
|
| ${pkgs.satty}/bin/satty --filename -
|
||||||
|
'';
|
||||||
|
|
||||||
|
record-toggle = pkgs.writeShellScriptBin "record-toggle" ''
|
||||||
|
if pgrep -x wf-recorder >/dev/null; then
|
||||||
|
# -INT laisse wf-recorder finaliser le fichier proprement.
|
||||||
|
pkill -INT -x wf-recorder
|
||||||
|
OSD_TEXT=" Recording saved"
|
||||||
|
else
|
||||||
|
dir="$HOME/Videos"
|
||||||
|
mkdir -p "$dir"
|
||||||
|
file="$dir/rec-$(date +%Y%m%d-%H%M%S).mp4"
|
||||||
|
${pkgs.wf-recorder}/bin/wf-recorder -f "$file" >/dev/null 2>&1 &
|
||||||
|
OSD_TEXT=" Recording…"
|
||||||
|
fi
|
||||||
|
${updateOsd}
|
||||||
|
'';
|
||||||
|
|
||||||
|
power-cycle = pkgs.writeShellScriptBin "power-cycle" ''
|
||||||
|
ppd=${pkgs.power-profiles-daemon}/bin/powerprofilesctl
|
||||||
|
cur=$("$ppd" get)
|
||||||
|
case "$cur" in
|
||||||
|
power-saver) next=balanced; icon="" ;;
|
||||||
|
balanced) next=performance; icon="" ;;
|
||||||
|
performance) next=power-saver; icon="" ;;
|
||||||
|
*) next=balanced; icon="" ;;
|
||||||
|
esac
|
||||||
|
"$ppd" set "$next"
|
||||||
|
OSD_TEXT="$icon ''${next^}"
|
||||||
|
${updateOsd}
|
||||||
|
'';
|
||||||
|
|
||||||
|
airplane-toggle = pkgs.writeShellScriptBin "airplane-toggle" ''
|
||||||
|
# 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
|
||||||
|
if $on; then
|
||||||
|
nmcli radio wifi off 2>/dev/null
|
||||||
|
bluetoothctl power off >/dev/null 2>&1 || true
|
||||||
|
OSD_TEXT=" Airplane On"
|
||||||
|
else
|
||||||
|
nmcli radio wifi on 2>/dev/null
|
||||||
|
bluetoothctl power on >/dev/null 2>&1 || true
|
||||||
|
OSD_TEXT=" Airplane Off"
|
||||||
|
fi
|
||||||
|
${updateOsd}
|
||||||
|
'';
|
||||||
|
|
||||||
|
clipboard-menu = pkgs.writeShellScriptBin "clipboard-menu" ''
|
||||||
|
${pkgs.cliphist}/bin/cliphist list \
|
||||||
|
| ${tofiMenu} --prompt-text "Clipboard: " \
|
||||||
|
| ${pkgs.cliphist}/bin/cliphist decode \
|
||||||
|
| ${pkgs.wl-clipboard}/bin/wl-copy
|
||||||
|
'';
|
||||||
|
|
||||||
|
emoji-picker = pkgs.writeShellScriptBin "emoji-picker" ''
|
||||||
|
export PATH="${pkgs.wtype}/bin:${pkgs.wl-clipboard}/bin:$PATH"
|
||||||
|
export BEMOJI_PICKER_CMD="${tofiMenu} --prompt-text 'emoji: '"
|
||||||
|
# -t tape l'emoji (wtype), -c le copie aussi.
|
||||||
|
exec ${pkgs.bemoji}/bin/bemoji -t -c
|
||||||
|
'';
|
||||||
|
|
||||||
|
caffeine-toggle = pkgs.writeShellScriptBin "caffeine-toggle" ''
|
||||||
|
# Pause hypridle (stay awake) or resume it.
|
||||||
|
if systemctl --user is-active --quiet hypridle; then
|
||||||
|
systemctl --user stop hypridle
|
||||||
|
OSD_TEXT=" Keep Awake On"
|
||||||
|
else
|
||||||
|
systemctl --user start hypridle
|
||||||
|
OSD_TEXT=" Keep Awake Off"
|
||||||
|
fi
|
||||||
|
${updateOsd}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
networkScript,
|
networkScript,
|
||||||
bluetoothScript,
|
bluetoothScript,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
gaps-out = config.theme.gaps-out;
|
gaps-out = config.theme.gaps-out;
|
||||||
c = config.lib.stylix.colors;
|
c = config.lib.stylix.colors;
|
||||||
|
hasBattery = config.var.hasBattery or false;
|
||||||
in {
|
in {
|
||||||
programs.waybar.settings = [
|
programs.waybar.settings = [
|
||||||
{
|
{
|
||||||
@@ -13,7 +16,9 @@ in {
|
|||||||
position = "top";
|
position = "top";
|
||||||
height = config.theme.bar-height;
|
height = config.theme.bar-height;
|
||||||
margin = "${toString gaps-out} ${toString gaps-out} 0";
|
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 ─────────────────────────────────────────────────────────
|
# ── Modules ─────────────────────────────────────────────────────────
|
||||||
|
|
||||||
@@ -48,7 +53,7 @@ in {
|
|||||||
|
|
||||||
"custom/bluetooth" = {
|
"custom/bluetooth" = {
|
||||||
exec = "${bluetoothScript}";
|
exec = "${bluetoothScript}";
|
||||||
exec-if = "bluetoothctl show 2>/dev/null | grep -q Controller";
|
exec-if = "${pkgs.bluez}/bin/bluetoothctl list 2>/dev/null | grep -q Controller";
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
interval = 5;
|
interval = 5;
|
||||||
on-click-right = "blueman-manager &";
|
on-click-right = "blueman-manager &";
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
../../nixos/utils.nix
|
../../nixos/utils.nix
|
||||||
../../nixos/hyprland.nix
|
../../nixos/hyprland.nix
|
||||||
../../nixos/usbguard.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)
|
../../nixos/omen.nix # CHANGEME: For my laptop only, remove this (OMEN 16)
|
||||||
|
|
||||||
|
|||||||
+29
-19
@@ -1,36 +1,46 @@
|
|||||||
{config, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
# Programs
|
# Programs
|
||||||
../../home/programs/helium
|
|
||||||
../../home/programs/proton
|
|
||||||
../../home/programs/proton/auto-start-vpn.nix
|
|
||||||
../../home/programs/ghostty
|
|
||||||
../../home/programs/nvf
|
|
||||||
../../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/desktop-actions # TODO:
|
|
||||||
|
|
||||||
../../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/cybersecurity.nix
|
||||||
../../home/programs/group/dev.nix
|
../../home/programs/group/dev.nix
|
||||||
../../home/programs/group/misc.nix
|
|
||||||
|
|
||||||
# System (Desktop environment like stuff)
|
# System (Desktop environment like stuff)
|
||||||
../../home/system/hyprlock
|
../../home/system/hyprlock
|
||||||
../../home/system/hyprland
|
../../home/system/hyprland
|
||||||
../../home/system/waybar
|
../../home/system/waybar
|
||||||
../../home/system/swaync
|
../../home/system/swaync
|
||||||
../../home/system/swayosd
|
|
||||||
../../home/system/tofi
|
../../home/system/tofi
|
||||||
../../home/system/mime
|
../../home/system/mime
|
||||||
../../home/system/udiskie
|
../../home/system/udiskie
|
||||||
|
../../home/system/clipboard
|
||||||
|
../../home/system/hypridle
|
||||||
|
|
||||||
./variables.nix # Mostly user-specific configuration
|
./variables.nix # Mostly user-specific configuration
|
||||||
./secrets # CHANGEME: You should probably remove this line, this is where I store my secrets
|
./secrets # CHANGEME: You should probably remove this line, this is where I store my secrets
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ in {
|
|||||||
- *work
|
- *work
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.user.services.mbsync.Unit.After = ["sops-nix.service"];
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
sops
|
sops
|
||||||
age
|
age
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
autoUpgrade = false;
|
autoUpgrade = false;
|
||||||
autoGarbageCollector = true;
|
autoGarbageCollector = true;
|
||||||
|
|
||||||
|
hasBattery = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# DON'T TOUCH THIS
|
# DON'T TOUCH THIS
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
options = [
|
options = [
|
||||||
"subvol=/"
|
"subvol=/"
|
||||||
"compress=zstd"
|
"compress=zstd"
|
||||||
]; # adapte selon si t'as des subvolumes
|
]; # adjust depending on whether you use subvolumes
|
||||||
};
|
};
|
||||||
swapDevices = [];
|
swapDevices = [];
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
{config, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
# Mostly user-specific configuration
|
# Mostly user-specific configuration
|
||||||
./variables.nix
|
./variables.nix
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
../../home/programs/nvf
|
inputs.nvf-config.homeManagerModules.default
|
||||||
../../home/programs/shell
|
../../home/programs/shell
|
||||||
../../home/programs/git
|
../../home/programs/git
|
||||||
../../home/programs/git/lazygit.nix
|
../../home/programs/git/lazygit.nix
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
../../nixos/users.nix
|
../../nixos/users.nix
|
||||||
../../nixos/utils.nix
|
../../nixos/utils.nix
|
||||||
../../nixos/hyprland.nix
|
../../nixos/hyprland.nix
|
||||||
../../home/programs/helium/system.nix # I hate browser's configuration..
|
../../nixos/docker.nix
|
||||||
|
../../home/programs/gui/helium/system.nix # I hate browser's configuration..
|
||||||
|
|
||||||
# You should let those lines as is
|
# You should let those lines as is
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
@@ -28,13 +29,13 @@
|
|||||||
services.usbguard.rules = ''
|
services.usbguard.rules = ''
|
||||||
allow id 1d6b:0002 serial "0000:00:14.0" name "xHCI Host Controller" hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" parent-hash "rV9bfLq7c2eA4tYjVjwO4bxhm+y6GgZpl9J60L0fBkY=" with-interface 09:00:00 with-connect-type ""
|
allow id 1d6b:0002 serial "0000:00:14.0" name "xHCI Host Controller" hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" parent-hash "rV9bfLq7c2eA4tYjVjwO4bxhm+y6GgZpl9J60L0fBkY=" with-interface 09:00:00 with-connect-type ""
|
||||||
allow id 1d6b:0003 serial "0000:00:14.0" name "xHCI Host Controller" hash "prM+Jby/bFHCn2lNjQdAMbgc6tse3xVx+hZwjOPHSdQ=" parent-hash "rV9bfLq7c2eA4tYjVjwO4bxhm+y6GgZpl9J60L0fBkY=" with-interface 09:00:00 with-connect-type ""
|
allow id 1d6b:0003 serial "0000:00:14.0" name "xHCI Host Controller" hash "prM+Jby/bFHCn2lNjQdAMbgc6tse3xVx+hZwjOPHSdQ=" parent-hash "rV9bfLq7c2eA4tYjVjwO4bxhm+y6GgZpl9J60L0fBkY=" with-interface 09:00:00 with-connect-type ""
|
||||||
allow id 17ef:608d serial "" name "Lenovo USB Optical Mouse" hash "klpDZuv1jhWGNqZLOl+KXF+75Ir3PfBm6D6ncjoLRBU=" parent-hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" via-port "1-7" with-interface 03:01:02 with-connect-type "hotplug"
|
|
||||||
allow id 17ef:6190 serial "" name "Lenovo Calliope USB Keyboard G2" hash "CfZ9R/aoXGm7BN/ojVEzKQwVoxCUtRWMuACrE7BL/5Y=" parent-hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" via-port "1-10" with-interface { 03:01:01 03:00:00 } with-connect-type "hotplug"
|
allow id 17ef:6190 serial "" name "Lenovo Calliope USB Keyboard G2" hash "CfZ9R/aoXGm7BN/ojVEzKQwVoxCUtRWMuACrE7BL/5Y=" parent-hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" via-port "1-10" with-interface { 03:01:01 03:00:00 } with-connect-type "hotplug"
|
||||||
allow id 0781:5581 name " SanDisk 3.2Gen1"
|
allow id 0781:5581 name " SanDisk 3.2Gen1"
|
||||||
|
allow id 17ef:608d name "Lenovo USB Optical Mouse"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [9001];
|
networking.firewall.allowedTCPPorts = [9001];
|
||||||
|
|
||||||
# Don't touch this
|
# Don't touch this
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "26.05";
|
||||||
}
|
}
|
||||||
|
|||||||
+27
-16
@@ -1,23 +1,32 @@
|
|||||||
{config, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
# Programs
|
# Programs
|
||||||
../../home/programs/proton
|
|
||||||
../../home/programs/helium
|
|
||||||
../../home/programs/ghostty
|
|
||||||
../../home/programs/nvf
|
|
||||||
../../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/cybersecurity.nix
|
||||||
../../home/programs/group/dev.nix
|
../../home/programs/group/dev.nix
|
||||||
../../home/programs/group/misc.nix
|
|
||||||
|
|
||||||
# System (Desktop environment like stuff)
|
# System (Desktop environment like stuff)
|
||||||
../../home/system/hyprlock
|
../../home/system/hyprlock
|
||||||
@@ -27,6 +36,8 @@
|
|||||||
../../home/system/tofi
|
../../home/system/tofi
|
||||||
../../home/system/mime
|
../../home/system/mime
|
||||||
../../home/system/udiskie
|
../../home/system/udiskie
|
||||||
|
../../home/system/clipboard
|
||||||
|
../../home/system/hypridle
|
||||||
|
|
||||||
./variables.nix # Mostly user-specific configuration
|
./variables.nix # Mostly user-specific configuration
|
||||||
./secrets # CHANGEME: You should probably remove this line, this is where I store my secrets
|
./secrets # CHANGEME: You should probably remove this line, this is where I store my secrets
|
||||||
@@ -37,7 +48,7 @@
|
|||||||
homeDirectory = "/home/" + config.var.username;
|
homeDirectory = "/home/" + config.var.username;
|
||||||
|
|
||||||
# Don't touch this
|
# Don't touch this
|
||||||
stateVersion = "24.05";
|
stateVersion = "26.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.monitor = [
|
wayland.windowManager.hyprland.settings.monitor = [
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ in {
|
|||||||
- *work
|
- *work
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.user.services.mbsync.Unit.After = ["sops-nix.service"];
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
sops
|
sops
|
||||||
age
|
age
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
autoUpgrade = false;
|
autoUpgrade = false;
|
||||||
autoGarbageCollector = true;
|
autoGarbageCollector = true;
|
||||||
|
|
||||||
|
hasBattery = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# DON'T TOUCH THIS
|
# DON'T TOUCH THIS
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
{config, pkgs, ...}: {
|
{config, ...}: {
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
virtualisation.docker.package = pkgs.docker_29;
|
|
||||||
users.users."${config.var.username}".extraGroups = ["docker"];
|
users.users."${config.var.username}".extraGroups = ["docker"];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,5 +5,12 @@
|
|||||||
withUWSM = true;
|
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 = {};
|
security.pam.services.hyprlock = {};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,11 +16,9 @@ in {
|
|||||||
environment.variables = {
|
environment.variables = {
|
||||||
LIBVA_DRIVER_NAME = "nvidia";
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
NIXOS_OZONE_WL = "1";
|
|
||||||
__GL_GSYNC_ALLOWED = "1";
|
__GL_GSYNC_ALLOWED = "1";
|
||||||
__GL_VRR_ALLOWED = "1";
|
__GL_VRR_ALLOWED = "1";
|
||||||
NVD_BACKEND = "direct";
|
NVD_BACKEND = "direct";
|
||||||
MOZ_ENABLE_WAYLAND = "1";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.nvidia.acceptLicense = true;
|
nixpkgs.config.nvidia.acceptLicense = true;
|
||||||
|
|||||||
+7
-3
@@ -13,12 +13,16 @@
|
|||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "hp-omen-linux-module";
|
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 {
|
src = fetchFromGitHub {
|
||||||
owner = "ranisalt";
|
owner = "ranisalt";
|
||||||
repo = "hp-omen-linux-module";
|
repo = "hp-omen-linux-module";
|
||||||
rev = finalAttrs.version;
|
rev = "d4b9b5adb84581c3874ca3985dc749c40c3ece67"; # rebase-6.15
|
||||||
sha256 = "sha256-2zCm29bdboSjRm/caMjBPGNc0tZXPUnIIYlHxxfhAok=";
|
sha256 = "sha256-IOXHzcCB0n1InMjeIu3XYEJ4bhbHS3NIlS8/+4XIwkQ=";
|
||||||
};
|
};
|
||||||
setSourceRoot = ''
|
setSourceRoot = ''
|
||||||
export sourceRoot=$(pwd)/${finalAttrs.src.name}/src
|
export sourceRoot=$(pwd)/${finalAttrs.src.name}/src
|
||||||
|
|||||||
@@ -47,6 +47,10 @@ in {
|
|||||||
# literally no documentation about this anywhere.
|
# literally no documentation about this anywhere.
|
||||||
# might be good to write about this...
|
# might be good to write about this...
|
||||||
# https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/
|
# https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/
|
||||||
|
# Unlock the gnome-keyring with the login password so apps (browser
|
||||||
|
# secrets via libsecret, ProtonVPN credentials, …) don't reprompt.
|
||||||
|
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||||
|
|
||||||
systemd.services.greetd.serviceConfig = {
|
systemd.services.greetd.serviceConfig = {
|
||||||
Type = "idle";
|
Type = "idle";
|
||||||
StandardInput = "tty";
|
StandardInput = "tty";
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
- [ ] Configuration waybar
|
- Clean files
|
||||||
- [ ] Configuration sway-nc
|
- Check claude: Sécu, mots en français, faute, ...
|
||||||
- [ ] Configuration sway-osd
|
- LOW BATTERY OSD
|
||||||
- [ ] Configuration hyprlock
|
- a jour ./docs/NEOVIM.md
|
||||||
- [x] Gaming/Focus mode
|
|
||||||
- [ ] Configuration Rofi/Drun
|
|
||||||
- [ ] Helium plus rapide ? service/deamon ?
|
|
||||||
- [ ] Ghostty service/deamon ?
|
|
||||||
- [ ] Tofi service/deamon ?
|
|
||||||
- [ ] Clean files
|
|
||||||
- [ ] NVF dans Nur
|
|
||||||
- [ ] Check claude: Sécu, mots en français, faute, ...
|
|
||||||
|
|||||||
Reference in New Issue
Block a user