stt, mem0, rofi-project-opener

This commit is contained in:
m3tm3re
2026-01-02 15:12:26 +01:00
parent 6ac20b65f4
commit 841d7abbe7
21 changed files with 562 additions and 531 deletions

View File

@@ -1,51 +0,0 @@
# home/ - Home Manager Configurations
User-level configurations managed by home-manager.
## Structure
```
home/
├── common/ # Shared home-manager config
│ └── default.nix # Overlays, nix-colors, allowUnfree
├── features/ # Modular, toggle-able features
│ ├── cli/ # Shell tools (see features/AGENTS.md)
│ ├── coding/ # Dev tools
│ └── desktop/ # GUI, Hyprland, theming
└── m3tam3re/ # Per-host user configs
├── home.nix # Shared user config (git, ssh, packages)
└── m3-<host>.nix # Host-specific (imports features, monitor layouts)
```
## Per-Host Config Pattern
Each `m3-<host>.nix`:
1. Imports `../common`, `./home.nix`, and needed `../features/*`
2. Enables specific features via `features.<category>.<name>.enable`
3. Overrides host-specific settings (monitors, default apps)
Example:
```nix
{
imports = [../common ./home.nix ../features/cli ../features/desktop];
features.cli.nushell.enable = true;
features.desktop.hyprland.enable = true;
wayland.windowManager.hyprland.settings.monitor = ["DP-1,2560x1440,0x0,1"];
}
```
## Theming
Uses nix-colors (Dracula scheme). Access colors:
```nix
"#${config.colorScheme.palette.base00}" # Background
"#${config.colorScheme.palette.base05}" # Foreground
```
## Adding New User Config
1. Create `m3tam3re/m3-<newhost>.nix`
2. Import needed features
3. Add to `flake.nix` homeConfigurations (standalone) or host's home-manager.users

View File

@@ -1,64 +0,0 @@
# features/ - Modular Home Manager Features
Toggle-able feature modules using `mkEnableOption` pattern.
## Structure
```
features/
├── cli/ # Shell & terminal tools
│ ├── default.nix # Always-on CLI tools (bat, eza, direnv, carapace)
│ ├── nushell.nix # features.cli.nushell.enable
│ ├── fzf.nix # features.cli.fzf.enable
│ ├── starship.nix # features.cli.starship.enable
│ ├── zellij.nix # Always-on zellij config
│ └── secrets.nix # features.cli.secrets.enable
├── coding/ # Dev tools
│ └── default.nix # features.coding.* (zed, neovim)
└── desktop/ # GUI applications
├── default.nix # Always-on (kitty, xdg, cursor)
├── hyprland.nix # features.desktop.hyprland.enable
├── gaming.nix # features.desktop.gaming.enable
├── media.nix # features.desktop.media.enable
└── ...
```
## Creating a New Feature
1. Create `<category>/<feature>.nix`:
```nix
{config, lib, ...}:
with lib; let
cfg = config.features.<category>.<feature>;
in {
options.features.<category>.<feature>.enable =
mkEnableOption "description";
config = mkIf cfg.enable {
# Configuration when enabled
};
}
```
2. Import in `<category>/default.nix`
3. Enable in user configs: `features.<category>.<feature>.enable = true;`
## Feature Categories
| Category | Purpose | Key features |
|----------|---------|--------------|
| cli | Shell tools | nushell, fzf, starship, nitch, secrets |
| coding | Development | (in default.nix, no sub-features yet) |
| desktop | GUI/WM | hyprland, gaming, media, office, crypto, fonts, rofi, wayland |
## Always-On vs Toggle-able
- **default.nix**: Configuration that applies when the category is imported (no enable flag)
- **<feature>.nix**: Must be explicitly enabled via `features.*.enable = true`
## Desktop Feature Details
- `hyprland.nix`: Window manager config, keybinds, window rules (host overrides monitors/workspaces)
- `gaming.nix`: Steam, gamemode, mangohud
- `media.nix`: mpv, obs-studio, spotify
- `wayland.nix`: Clipboard, screenshots, idle management

View File

@@ -0,0 +1,65 @@
# CLI FEATURES (home-manager)
**Shell and terminal tooling with Fish + Nushell dual configuration**
## OVERVIEW
8 CLI modules with integrated tooling across Fish and Nushell shells.
## STRUCTURE
```
cli/
├── default.nix # Imports + shared tools (bat, eza, direnv)
├── fish.nix # Fish shell + aliases
├── fzf.nix # Fuzzy finder
├── nitch.nix # System info tool
├── nushell.nix # Nushell + aliases
├── secrets.nix # Password-store integration
├── starship.nix # Shell prompt
└── zellij.nix # Terminal multiplexer
```
## WHERE TO LOOK
| Task | Location | Notes |
|------|----------|-------|
| Add CLI tool | default.nix home.packages | Check if shell integration needed |
| Shell aliases | fish.nix or nushell.nix | Kept in sync between shells |
| Prompt config | starship.nix | Uses nerd-fonts symbols |
| Secret access | secrets.nix | Agenix integration |
## CONVENTIONS
### Shell Integration Pattern
Tools with shell hooks enabled in both Fish and Nushell:
- **carapace**: Completions
- **zoxide**: Smart cd
- **eza**: ls replacement
- **direnv**: Directory environments
- **fzf**: Fuzzy finding
### NixOS Rebuild Aliases (both shells)
```
nr/nrs - nixos-rebuild [switch]
snr/snrs - sudo nixos-rebuild [switch]
hms - home-manager switch
```
### Bat Theme
Custom `universal` theme generated from nix-colors palette in default.nix (lines 34-157).
### Secrets Integration
Fish/Nushell source `$HOME/.secrets` if `secrets.enable = true` (CLI secrets feature).
## ANTI-PATTERNS
- **DON'T** add aliases to only one shell - keep Fish/Nushell in sync
- **DON'T** use `programs.bash` - Nushell is default shell
- **DON'T** bypass carapace for completions - integrated by default
## NOTES
- zellij-ps custom package for project session management
- Default shell set to Nushell in hosts/common/default.nix
- Bat theme dynamically generated (no external theme files)
- lf file manager uses bat for previews
- Agenix CLI (agenix-cli) included for secret management

View File

@@ -12,7 +12,12 @@
./starship.nix
./zellij.nix
];
cli.stt-ptt = {
enable = true;
whisperPackage = pkgs.whisper-cpp-vulkan;
model = "ggml-large-v3-turbo";
notifyTimeout = 2000;
};
programs.carapace = {
enable = true;
enableFishIntegration = true;
@@ -192,6 +197,7 @@
agenix-cli
alejandra
bc
bun
claude-code
comma
coreutils
@@ -209,6 +215,7 @@
llm
lf
nix-index
libnotify
nushellPlugins.skim
progress
ripgrep

View File

@@ -25,7 +25,7 @@ in {
$env.FZF_DEFAULT_COMMAND = "fd --type f --exclude .git --follow --hidden"
$env.SSH_AUTH_SOCK = "/run/user/1000/gnupg/S.gpg-agent.ssh"
$env.FLAKE = $"($env.HOME)/p/nixos/nixos-config"
$env.PATH = ($env.PATH | split row (char esep) | prepend $"($env.HOME)/.cache/.bun/bin" | uniq)
$env.PATH = ($env.PATH | split row (char esep) | append "/home/m3tam3re/.cache/.bun/bin" | uniq)
source /run/agenix/${config.home.username}-secrets
'';
configFile.text = ''

View File

@@ -1,9 +1,8 @@
{pkgs, ...}: {
home.packages = with pkgs; [
bun
code2prompt
devpod
#devpod-desktop
code2prompt
nur.repos.charmbracelet.crush
(python3.withPackages (ps:
with ps; [

View File

@@ -0,0 +1,79 @@
# DESKTOP FEATURES (home-manager)
**Wayland/Hyprland environment with color-coordinated tooling**
## OVERVIEW
12 modular desktop features with nix-colors (Dracula) integration across all components.
## STRUCTURE
```
desktop/
├── default.nix # Imports + XDG + Kitty config
├── coding.nix # Development tools (VSCode, etc.)
├── crypto.nix # Crypto wallets/tools
├── fonts.nix # Font packages
├── gaming.nix # Gaming tools/Steam
├── hyprland.nix # Hyprland WM configuration
├── media.nix # Media players/editors
├── office.nix # LibreOffice, document tools
├── rofi.nix # Application launcher
├── theme.nix # GTK/Qt theming
├── wayland.nix # Wayland utilities
└── webapps.nix # Browser-based apps
```
## WHERE TO LOOK
| Task | Location | Notes |
|------|----------|-------|
| Add desktop app | Relevant feature .nix | Update home.packages |
| Configure Hyprland | hyprland.nix | Window manager settings |
| Fix colors | Check colorScheme references | Uses config.colorScheme.palette.base* |
| Add font | fonts.nix | Increases system closure size |
## CONVENTIONS
### Color Scheme Integration
All color-aware tools reference `config.colorScheme.palette.base00` through `base0F`:
- **base00-07**: Grayscale (dark to light)
- **base08**: Red/errors
- **base09**: Orange
- **base0A**: Yellow/strings
- **base0B**: Green/functions
- **base0C**: Cyan
- **base0D**: Blue/types
- **base0E**: Purple/constants
- **base0F**: Brown
Template:
```nix
foreground = "#${config.colorScheme.palette.base05}";
background = "#${config.colorScheme.palette.base00}";
```
### Session Variables
Set in default.nix for Wayland/Hyprland:
```nix
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
XDG_CURRENT_DESKTOP = "Hyprland";
```
### XDG Defaults
- **PDF**: okular
- **Text**: nvim
- **Browser**: Zen (io.github.zen_browser.zen)
- **Archive**: file-roller
## ANTI-PATTERNS
- **DON'T** hardcode hex colors - use colorScheme palette
- **DON'T** install fonts globally - keep in user packages
- **DON'T** bypass XDG defaults - set in mimeApps
## NOTES
- Kitty terminal configured in default.nix (not separate file)
- Bibata-Modern-Ice cursor theme hardcoded
- Session path includes cargo, npm-global, bun
- Desktop features are always-enabled (no feature flags in this dir)

View File

@@ -14,6 +14,7 @@
./rofi.nix
./theme.nix
./wayland.nix
./webapps.nix
];
xdg = {
@@ -51,7 +52,7 @@
XDG_SESSION_TYPE = "wayland";
XDG_SESSION_DESKTOP = "Hyprland";
};
home.sessionPath = ["\${XDG_BIN_HOME}" "\${HOME}/.cargo/bin" "$HOME/.npm-global/bin"];
home.sessionPath = ["\${XDG_BIN_HOME}" "\${HOME}/.cargo/bin" "$HOME/.npm-global/bin" "$HOME/.cache/.bun/bin"];
fonts.fontconfig.enable = true;
@@ -125,7 +126,7 @@
home.packages = with pkgs; [
appimage-run
anytype
stable.anytype
# blueberry
bemoji
brave
@@ -165,7 +166,6 @@
telegram-desktop
vivaldi
vivaldi-ffmpeg-codecs
warp-terminal
# wl-clipboard
# wlogout
# wtype

View File

@@ -169,13 +169,13 @@ in {
"$mainMod SHIFT, S, exec, uwsm app -- rofi -show emoji"
"$mainMod, P, exec, uwsm app -- rofi-pass"
"$mainMod SHIFT, P, pseudo"
"$mainMod, R, exec, stt-ptt start"
"$mainMod, J, togglesplit"
"$mainMod, h, movefocus, l"
"$mainMod, l, movefocus, r"
"$mainMod, k, movefocus, u"
"$mainMod, j, movefocus, d"
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
@@ -198,7 +198,9 @@ in {
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
];
bindr = [
"$mainMod, R, exec, stt-ptt stop"
];
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"

View File

@@ -179,5 +179,13 @@ in {
}
'');
};
cli.rofi-project-opener = {
enable = true;
projectDirs = [
"$HOME/p/NIX"
];
terminal = pkgs.kitty;
terminalCommand = "opencode";
};
};
}

View File

@@ -0,0 +1,55 @@
{
pkgs,
lib,
...
}: let
icons = {
teams = pkgs.fetchurl {
url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-teams.svg";
sha256 = "sha256-Pr9QS8nnXJq97r4/G3c6JXi34zxHl0ps9gcyI8cN/s8=";
};
outlook = pkgs.fetchurl {
url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-outlook.svg";
sha256 = "sha256-3u8t5QNHFZvrAegxBiGicO4PjtMWhEaQSCv7MSSfLLc=";
};
opencode = pkgs.fetchurl {
url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/opencode-dark.svg";
sha256 = "1lms4f8habamvdh2qqqz9psx4py9wx23mmlkkds44pvrbq3bkj3n";
};
};
in {
xdg.desktopEntries = {
teams = {
name = "Microsoft Teams";
exec = "launch-webapp https://teams.microsoft.com";
comment = "Open Microsoft Teams as a Desktop App";
categories = ["Application" "Network" "Chat"];
terminal = false;
icon = icons.teams;
};
outlook = {
name = "Microsoft Outlook";
exec = "launch-webapp https://outlook.office.com/mail/";
comment = "Open Microsoft Outlook as a Desktop App";
categories = ["Application" "Network"];
terminal = false;
icon = icons.outlook;
};
basecamp = {
name = "Basecamp";
exec = "launch-webapp https://3.basecamp.com/5996442/";
comment = "Open Basecamp as a Desktop App";
categories = ["Application" "Network"];
terminal = false;
icon = "/home/sascha.koenig/.local/share/icons/basecamp-logo.png";
};
opencode = {
name = "Opencode";
exec = "rofi-project-opener";
comment = "Open Opencode Terminal App";
categories = ["Application" "Development"];
terminal = false;
icon = icons.opencode;
};
};
}