Compare commits
23 Commits
main
...
d522dcd5ab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d522dcd5ab | ||
|
|
c3bf8c8e49 | ||
|
|
5876cf4564 | ||
|
|
af49129b2a | ||
|
|
2021268b73 | ||
|
|
b432d26028 | ||
|
|
5e4e0050dd | ||
|
|
206ca73ee5 | ||
|
|
1824ed760d | ||
|
|
c52452dbf4 | ||
|
|
4321d6bba5 | ||
|
|
db7bba461a | ||
|
|
966a3cea5c | ||
|
|
4d7caf0abe | ||
|
|
2517fd0269 | ||
|
|
1e9873bae4 | ||
|
|
ff4743a0db | ||
|
|
3e3941a9f3 | ||
|
|
dd7709d9e4 | ||
|
|
c494611b05 | ||
|
|
4e69d65a8a | ||
|
|
35af981c83 | ||
|
|
85450dd973 |
130
README.md
130
README.md
@@ -1,130 +0,0 @@
|
|||||||
# Unified Nix Configuration
|
|
||||||
|
|
||||||
This repository contains a modular, flake-based Nix configuration for multiple platforms and hosts. It provides a declarative and reproducible environment using NixOS, nix-darwin, and Home Manager.
|
|
||||||
|
|
||||||
## Quick Start Guide
|
|
||||||
|
|
||||||
### Daily Usage
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Apply changes (NixOS WSL)
|
|
||||||
nixos-rebuild switch --sudo --flake .#work --impure
|
|
||||||
|
|
||||||
# Apply changes (macOS)
|
|
||||||
darwin-rebuild switch --flake .#Martins-MacBook-Pro
|
|
||||||
|
|
||||||
# Update packages (weekly/monthly)
|
|
||||||
nix flake update
|
|
||||||
# ... then run the switch command for your host
|
|
||||||
```
|
|
||||||
|
|
||||||
## Structure
|
|
||||||
|
|
||||||
The configuration is organized into `hosts` and `modules`:
|
|
||||||
|
|
||||||
```
|
|
||||||
.
|
|
||||||
├── flake.nix # Entry point with all system configurations
|
|
||||||
├── flake.lock # Locked dependency versions
|
|
||||||
├── hosts/ # Machine-specific configurations
|
|
||||||
│ ├── home/
|
|
||||||
│ │ ├── darwin/ # Martins-MacBook-Pro
|
|
||||||
│ │ ├── nix/ # Standalone Home Manager for Home
|
|
||||||
│ │ └── nixos/ # Home NixOS Server
|
|
||||||
│ └── work/
|
|
||||||
│ ├── nix/ # Standalone Home Manager for Work
|
|
||||||
│ └── nixos/ # Work NixOS (WSL)
|
|
||||||
└── modules/ # Shared reusable modules
|
|
||||||
├── home/ # Home Manager modules (sh, nvim, tmux, etc.)
|
|
||||||
└── nixos/ # NixOS-specific modules
|
|
||||||
```
|
|
||||||
|
|
||||||
## Available Configurations
|
|
||||||
|
|
||||||
### NixOS
|
|
||||||
- **work**: WSL-based NixOS environment for work (User: `pan`).
|
|
||||||
- **home**: Server-based NixOS environment for home (User: `martin`).
|
|
||||||
|
|
||||||
### Darwin (macOS)
|
|
||||||
- **Martins-MacBook-Pro**: nix-darwin configuration for macOS.
|
|
||||||
|
|
||||||
### Standalone Home Manager
|
|
||||||
- **pan@work**: Home Manager for non-NixOS Linux at work.
|
|
||||||
- **martin@mac**: Home Manager for macOS (without nix-darwin).
|
|
||||||
|
|
||||||
## Installation & Usage
|
|
||||||
|
|
||||||
### 1. Apply Configuration
|
|
||||||
|
|
||||||
Navigate to the repository and run the appropriate command for your system:
|
|
||||||
|
|
||||||
**NixOS (Work/WSL):**
|
|
||||||
```bash
|
|
||||||
sudo nixos-rebuild switch --flake .#work --impure
|
|
||||||
```
|
|
||||||
|
|
||||||
**Darwin (macOS):**
|
|
||||||
```bash
|
|
||||||
darwin-rebuild switch --flake .#Martins-MacBook-Pro
|
|
||||||
```
|
|
||||||
|
|
||||||
**Standalone Home Manager:**
|
|
||||||
```bash
|
|
||||||
home-manager switch --flake .#pan@work
|
|
||||||
```
|
|
||||||
|
|
||||||
*Note: The `--impure` flag may be required for certain configurations (like NIX_LD).*
|
|
||||||
|
|
||||||
### 2. Updating System Packages
|
|
||||||
|
|
||||||
To update all packages to the latest versions from nixpkgs-unstable:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Update flake inputs
|
|
||||||
nix flake update
|
|
||||||
|
|
||||||
# Apply the updates
|
|
||||||
sudo nixos-rebuild switch --flake .#work --impure
|
|
||||||
```
|
|
||||||
|
|
||||||
## Maintenance
|
|
||||||
|
|
||||||
### Rollback
|
|
||||||
If something breaks after an update, you can rollback to the previous generation:
|
|
||||||
- **NixOS**: `sudo nixos-rebuild switch --rollback`
|
|
||||||
- **Darwin**: `darwin-rebuild --rollback`
|
|
||||||
|
|
||||||
### Cleanup
|
|
||||||
Remove old generations to free up disk space:
|
|
||||||
```bash
|
|
||||||
# Delete generations older than 30 days
|
|
||||||
sudo nix-collect-garbage --delete-older-than 30d
|
|
||||||
|
|
||||||
# Or delete all old generations
|
|
||||||
sudo nix-collect-garbage -d
|
|
||||||
```
|
|
||||||
|
|
||||||
## Modules Detail
|
|
||||||
|
|
||||||
### Home Manager Modules (`modules/home/`)
|
|
||||||
- **sh.nix**: Zsh configuration with completions and aliases.
|
|
||||||
- **nvim.nix**: Personalized Neovim setup.
|
|
||||||
- **tmux.nix**: Terminal multiplexer configuration.
|
|
||||||
- **git.nix**: Git, Lazygit, and Jujutsu settings.
|
|
||||||
- **dev.nix**: Development tools, language runtimes, and LLM tool configurations.
|
|
||||||
- **task.nix**: Taskwarrior and productivity tools.
|
|
||||||
|
|
||||||
### NixOS Modules (`modules/nixos/`)
|
|
||||||
- **common.nix**: Shared system settings for all NixOS hosts.
|
|
||||||
|
|
||||||
## Create Convenience Alias
|
|
||||||
|
|
||||||
Add these to your shell configuration for faster updates:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Quick rebuild (adjust to your host)
|
|
||||||
alias nr='sudo nixos-rebuild switch --flake .#work --impure'
|
|
||||||
|
|
||||||
# Update and rebuild
|
|
||||||
alias nu='nix flake update && sudo nixos-rebuild switch --flake .#work --impure'
|
|
||||||
```
|
|
||||||
98
TODO.md
98
TODO.md
@@ -1,98 +0,0 @@
|
|||||||
# TODO - NixOS Configuration
|
|
||||||
|
|
||||||
This file tracks remaining tasks and known issues for the NixOS configuration.
|
|
||||||
|
|
||||||
## High Priority
|
|
||||||
|
|
||||||
### Hardware Configuration
|
|
||||||
- [ ] Replace `hardware-configuration.nix` with actual generated configuration
|
|
||||||
- Run `sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix`
|
|
||||||
- Verify file systems are correctly configured
|
|
||||||
- Verify boot partition is correct
|
|
||||||
- Adjust CPU microcode (Intel vs AMD)
|
|
||||||
|
|
||||||
### System Settings
|
|
||||||
- [ ] Choose boot loader (systemd-boot vs GRUB)
|
|
||||||
|
|
||||||
## Medium Priority
|
|
||||||
|
|
||||||
### Tmux Configuration
|
|
||||||
|
|
||||||
- [ ] Update note popup keybindings (C-n, C-p) with correct NixOS paths
|
|
||||||
- Current: Commented out (had WSL hard-coded paths)
|
|
||||||
- Action: Decide on note location and update paths
|
|
||||||
- Example: `~/Documents/notes/Work/quick_notes.md`
|
|
||||||
|
|
||||||
- [ ] Verify `~/bin/tmuxp_selector.sh` script exists
|
|
||||||
- Used by `C-s` keybinding
|
|
||||||
- May need to be created or path adjusted
|
|
||||||
|
|
||||||
## Low Priority
|
|
||||||
|
|
||||||
### Shell Configuration
|
|
||||||
|
|
||||||
- [ ] Consider adding additional shell aliases
|
|
||||||
- [ ] Review if any macOS-specific tools need Linux alternatives
|
|
||||||
|
|
||||||
### Documentation
|
|
||||||
|
|
||||||
- [ ] Document custom Neovim configuration (lua files)
|
|
||||||
- [ ] Create troubleshooting guide for common issues
|
|
||||||
|
|
||||||
### Optimizations
|
|
||||||
|
|
||||||
- [ ] Consider using `programs.zsh.shellInit` vs `initContent`
|
|
||||||
- [ ] Review if `nix-ld` is actually needed (check use cases)
|
|
||||||
- [ ] Consider splitting large modules into smaller files
|
|
||||||
|
|
||||||
## Features Not Yet Ported
|
|
||||||
|
|
||||||
These were not in the original Home Manager config but might be useful on NixOS:
|
|
||||||
|
|
||||||
- [ ] Docker / Podman
|
|
||||||
|
|
||||||
## Known Issues
|
|
||||||
|
|
||||||
## Testing Checklist
|
|
||||||
|
|
||||||
Before considering this configuration complete:
|
|
||||||
|
|
||||||
- [ ] LSP servers work in Neovim
|
|
||||||
|
|
||||||
## Future Enhancements
|
|
||||||
|
|
||||||
- [ ] Add backup/restore scripts
|
|
||||||
- [ ] Create CI/CD for testing configuration
|
|
||||||
- [ ] Consider using flake-parts for better organization
|
|
||||||
- [ ] Add system monitoring tools
|
|
||||||
- [ ] Configure automatic updates
|
|
||||||
- [ ] Add custom shell functions
|
|
||||||
- [ ] Integrate with cloud sync for dotfiles
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
### Unified Structure Benefits
|
|
||||||
|
|
||||||
1. **Multi-platform support**: Added support for Darwin (macOS) and NixOS (WSL and native).
|
|
||||||
2. **Modular Home Manager**: Reusable modules shared across all platforms.
|
|
||||||
3. **Machine-specific configurations**: Separated into `hosts/` for better organization.
|
|
||||||
4. **Flexible deployment**: Support for both NixOS modules and standalone Home Manager.
|
|
||||||
|
|
||||||
### Migration Path
|
|
||||||
|
|
||||||
This configuration is designed to be the central point for all machines:
|
|
||||||
|
|
||||||
1. Clone to `~/dev/dot/newnix` (or preferred path).
|
|
||||||
2. Identify your host type (NixOS WSL, Darwin, etc.).
|
|
||||||
3. Apply the corresponding flake output as described in `README.md`.
|
|
||||||
4. Test and verify workflows.
|
|
||||||
|
|
||||||
## Questions to Resolve
|
|
||||||
|
|
||||||
- [ ] What are the custom packages used for?
|
|
||||||
- [ ] Are there any private/work-specific configurations to add?
|
|
||||||
- [ ] Should we add any of the "Features Not Yet Ported"?
|
|
||||||
- [ ] Is GPU acceleration needed (NVIDIA, AMD)?
|
|
||||||
- [ ] Are there any cron jobs or systemd timers to configure?
|
|
||||||
- [ ] Should we enable fish or keep only zsh?
|
|
||||||
- [ ] Do we need any container tools (Docker, Podman)?
|
|
||||||
311
flake.lock
generated
311
flake.lock
generated
@@ -1,311 +0,0 @@
|
|||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"flake-compat": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767039857,
|
|
||||||
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1769996383,
|
|
||||||
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681202837,
|
|
||||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs-stable"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1772985280,
|
|
||||||
"narHash": "sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "8f736f007139d7f70752657dff6a401a585d6cbc",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "release-25.11",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager-wsl": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs-wsl-stable"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1772985280,
|
|
||||||
"narHash": "sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "8f736f007139d7f70752657dff6a401a585d6cbc",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "release-25.11",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-darwin": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1773000227,
|
|
||||||
"narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=",
|
|
||||||
"owner": "LnL7",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"rev": "da529ac9e46f25ed5616fd634079a5f3c579135f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "LnL7",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixos-vscode-server": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1770124655,
|
|
||||||
"narHash": "sha256-yHmd2B13EtBUPLJ+x0EaBwNkQr9LTne1arLVxT6hSnY=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixos-vscode-server",
|
|
||||||
"rev": "92ce71c3ba5a94f854e02d57b14af4997ab54ef0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixos-vscode-server",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixos-wsl": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs-wsl-stable"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1772455238,
|
|
||||||
"narHash": "sha256-QE29mlgasni5gszxs9/qNLnp6wvXgicP2iSh0gybPfw=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixos-wsl",
|
|
||||||
"rev": "eabb9a917f546c0bb64654850dd5f57f7694d1a3",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "release-25.11",
|
|
||||||
"repo": "nixos-wsl",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1772963539,
|
|
||||||
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-lib": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1769909678,
|
|
||||||
"narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"rev": "72716169fe93074c333e8d0173151350670b824c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1773068389,
|
|
||||||
"narHash": "sha256-vMrm7Pk2hjBRPnCSjhq1pH0bg350Z+pXhqZ9ICiqqCs=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "44bae273f9f82d480273bab26f5c50de3724f52f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-25.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-wsl-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1773068389,
|
|
||||||
"narHash": "sha256-vMrm7Pk2hjBRPnCSjhq1pH0bg350Z+pXhqZ9ICiqqCs=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "44bae273f9f82d480273bab26f5c50de3724f52f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-25.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1771369470,
|
|
||||||
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"home-manager-wsl": "home-manager-wsl",
|
|
||||||
"nix-darwin": "nix-darwin",
|
|
||||||
"nixos-vscode-server": "nixos-vscode-server",
|
|
||||||
"nixos-wsl": "nixos-wsl",
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
|
||||||
"nixpkgs-wsl-stable": "nixpkgs-wsl-stable",
|
|
||||||
"sops-nix": "sops-nix",
|
|
||||||
"tasksquire": "tasksquire"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sops-nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1773096132,
|
|
||||||
"narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=",
|
|
||||||
"owner": "Mic92",
|
|
||||||
"repo": "sops-nix",
|
|
||||||
"rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "Mic92",
|
|
||||||
"repo": "sops-nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tasksquire": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"nixpkgs": "nixpkgs_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1771878653,
|
|
||||||
"narHash": "sha256-+OkJmYH+h5dgAbUtbGq8fZ90g5/rwiew5WPmbexD9kI=",
|
|
||||||
"ref": "dev",
|
|
||||||
"rev": "6b1418fc71be513ba5ebb718da29e3190c3fda58",
|
|
||||||
"revCount": 52,
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@git.pander.me/martin/tasksquire.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"ref": "dev",
|
|
||||||
"type": "git",
|
|
||||||
"url": "ssh://git@git.pander.me/martin/tasksquire.git"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
||||||
149
flake.nix
149
flake.nix
@@ -1,149 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Unified Nix Configuration";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
# Unstable for standalone configurations and overlays
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
|
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
||||||
|
|
||||||
nixpkgs-wsl-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
||||||
|
|
||||||
nixos-wsl = {
|
|
||||||
url = "github:nix-community/nixos-wsl/release-25.11";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs-wsl-stable";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager-wsl = {
|
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs-wsl-stable";
|
|
||||||
};
|
|
||||||
|
|
||||||
nix-darwin = {
|
|
||||||
url = "github:LnL7/nix-darwin";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# individual packages
|
|
||||||
sops-nix = {
|
|
||||||
url = "github:Mic92/sops-nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
nixos-vscode-server = {
|
|
||||||
url = "github:nix-community/nixos-vscode-server";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
tasksquire = {
|
|
||||||
url = "git+ssh://git@git.pander.me/martin/tasksquire.git?ref=dev";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-wsl-stable, nixos-wsl, home-manager, home-manager-wsl, nix-darwin, ... }@inputs:
|
|
||||||
let
|
|
||||||
linuxSystem = "x86_64-linux";
|
|
||||||
linuxAarchSystem = "aarch64-linux";
|
|
||||||
darwinSystem = "aarch64-darwin";
|
|
||||||
|
|
||||||
pkgsLinux = nixpkgs.legacyPackages.${linuxSystem};
|
|
||||||
pkgsLinuxAarch = nixpkgs.legacyPackages.${linuxAarchSystem};
|
|
||||||
pkgsDarwin = nixpkgs.legacyPackages.${darwinSystem};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
|
|
||||||
# --- NixOS Systems ---
|
|
||||||
nixosConfigurations = {
|
|
||||||
|
|
||||||
# Work WSL
|
|
||||||
"nixos@work" = nixpkgs-wsl-stable.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit self inputs; };
|
|
||||||
modules = [
|
|
||||||
nixos-wsl.nixosModules.wsl
|
|
||||||
./hosts/work/nixos/configuration.nix
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
nixpkgs.hostPlatform = linuxSystem;
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nixpkgs.overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit self inputs;
|
|
||||||
};
|
|
||||||
home-manager.users.pan = import ./hosts/work/nixos/home.nix;
|
|
||||||
}
|
|
||||||
inputs.nixos-vscode-server.nixosModules.default
|
|
||||||
({ pkgs, ... }: {
|
|
||||||
services.vscode-server.enable = true;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Home
|
|
||||||
"nixos@home" = nixpkgs-stable.lib.nixosSystem {
|
|
||||||
specialArgs = {
|
|
||||||
inherit self inputs;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
./hosts/home/nixos/configuration.nix
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
nixpkgs.hostPlatform = linuxAarchSystem;
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nixpkgs.overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit self inputs;
|
|
||||||
};
|
|
||||||
home-manager.users.martin = import ./hosts/home/nixos/home.nix;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# --- Darwin Systems (Mac) ---
|
|
||||||
darwinConfigurations."Martins-MacBook-Pro" = nix-darwin.lib.darwinSystem {
|
|
||||||
specialArgs = { inherit self inputs; };
|
|
||||||
modules = [
|
|
||||||
./hosts/home/darwin/configuration.nix
|
|
||||||
{
|
|
||||||
nixpkgs.hostPlatform = darwinSystem;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# --- Standalone Home Manager ---
|
|
||||||
homeConfigurations = {
|
|
||||||
"nix@work" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = nixpkgs-stable.legacyPackages.${linuxSystem};
|
|
||||||
extraSpecialArgs = { inherit self inputs; };
|
|
||||||
modules = [
|
|
||||||
./hosts/work/nix/home.nix
|
|
||||||
{
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nixpkgs.overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"nix@home" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = nixpkgs-stable.legacyPackages.${darwinSystem};
|
|
||||||
extraSpecialArgs = { inherit self inputs; };
|
|
||||||
modules = [
|
|
||||||
./hosts/home/nix/home.nix
|
|
||||||
{
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nixpkgs.overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../../modules/home/common.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.git.settings.user = {
|
|
||||||
name = "Martin Pander";
|
|
||||||
email = "git@pander-on.de";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.jujutsu.settings.user = {
|
|
||||||
name = "Martin Pander";
|
|
||||||
email = "git@pander-on.de";
|
|
||||||
};
|
|
||||||
|
|
||||||
dot.llm = {
|
|
||||||
enable = true;
|
|
||||||
gemini-cli.enable = true;
|
|
||||||
opencode.enable = true;
|
|
||||||
opencode.enableConfig = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{ config, pkgs, self, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
# Minimal system configuration
|
|
||||||
environment.systemPackages = [ pkgs.vim ];
|
|
||||||
|
|
||||||
services.nix-daemon.enable = true;
|
|
||||||
|
|
||||||
nix.settings.experimental-features = "nix-command flakes";
|
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
# Set Git commit hash for darwin-version.
|
|
||||||
system.configurationRevision = self.rev or self.dirtyRev or null;
|
|
||||||
|
|
||||||
system.stateVersion = 4;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../common.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home.username = "martin";
|
|
||||||
home.homeDirectory = "/Users/martin";
|
|
||||||
|
|
||||||
home.stateVersion = "24.05";
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../../../modules/nixos/common.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-label/nixos";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "macnix";
|
|
||||||
|
|
||||||
users.users.martin = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
uid = 1000;
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.ghostty.terminfo
|
|
||||||
];
|
|
||||||
|
|
||||||
system.stateVersion = "25.11";
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../common.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# User details
|
|
||||||
home.username = "martin";
|
|
||||||
home.homeDirectory = "/home/martin";
|
|
||||||
|
|
||||||
home.stateVersion = "25.11";
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../../modules/home/common.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.git.settings.user = {
|
|
||||||
name = "Martin Pander";
|
|
||||||
email = "martin.pander@knowtion.de";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.jujutsu.settings.user = {
|
|
||||||
name = "Martin Pander";
|
|
||||||
email = "martin.pander@knowtion.de";
|
|
||||||
};
|
|
||||||
|
|
||||||
dot.llm = {
|
|
||||||
enable = true;
|
|
||||||
claude-code.enable = true;
|
|
||||||
opencode.enable = true;
|
|
||||||
opencode.enableConfig = true;
|
|
||||||
opencode.workMode = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
dot.tmux.workMode = true;
|
|
||||||
dot.nvim.workMode = true;
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../common.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home.username = "pan";
|
|
||||||
home.homeDirectory = "/home/pan";
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
nix-ld
|
|
||||||
];
|
|
||||||
|
|
||||||
home.stateVersion = "23.11";
|
|
||||||
|
|
||||||
dot.sh.sourceProfile = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../../../modules/nixos/common.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
wsl.enable = true;
|
|
||||||
wsl.defaultUser = "pan";
|
|
||||||
wsl.interop.register = true;
|
|
||||||
|
|
||||||
networking.hostName = "nix";
|
|
||||||
|
|
||||||
users.users.pan = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
uid = 1000;
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home/pan/pro" = {
|
|
||||||
device = "/dev/disk/by-uuid/9a37862c-85db-4434-b06a-ec8c2713ecc9";
|
|
||||||
fsType = "ext4"; # or xfs, etc.
|
|
||||||
options = [ "defaults" "nofail" "x-systemd.automount" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "25.05";
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../common.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# User details
|
|
||||||
home.username = "pan";
|
|
||||||
home.homeDirectory = "/home/pan";
|
|
||||||
|
|
||||||
# Home Manager release version
|
|
||||||
home.stateVersion = "25.05";
|
|
||||||
|
|
||||||
# Disable version mismatch warning (intentionally using HM 25.11 with nixpkgs 25.05)
|
|
||||||
home.enableNixpkgsReleaseCheck = false;
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
options.dot = {
|
|
||||||
dotfilesPath = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "${config.home.homeDirectory}/dev/dot";
|
|
||||||
description = "Absolute path to the dotfiles repository on the local machine.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./secrets.nix
|
|
||||||
./sh.nix
|
|
||||||
./tmux.nix
|
|
||||||
./git.nix
|
|
||||||
./dev.nix
|
|
||||||
./nvim.nix
|
|
||||||
./task.nix
|
|
||||||
./opencode.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
nerd-fonts.fira-code
|
|
||||||
nil # Nix LSP
|
|
||||||
|
|
||||||
# Language servers
|
|
||||||
yaml-language-server
|
|
||||||
marksman
|
|
||||||
pkgs.unstable.dockerfile-language-server # Use unstable for latest LSP features
|
|
||||||
|
|
||||||
# Secrets management
|
|
||||||
sops
|
|
||||||
age
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.ssh = {
|
|
||||||
enable = true;
|
|
||||||
enableDefaultConfig = false;
|
|
||||||
includes = [ "config.local" ];
|
|
||||||
matchBlocks = {
|
|
||||||
"*" = {
|
|
||||||
addKeysToAgent = "yes";
|
|
||||||
};
|
|
||||||
|
|
||||||
"git.pander.me" = {
|
|
||||||
hostname = "git.pander.me";
|
|
||||||
user = "git";
|
|
||||||
identityFile = "~/.ssh/private_git";
|
|
||||||
port = 2222;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
news.display = "silent";
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.dot.llm;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.dot.llm = {
|
|
||||||
enable = lib.mkEnableOption "LLM tools";
|
|
||||||
claude-code.enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable claude-code";
|
|
||||||
};
|
|
||||||
opencode.enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable opencode";
|
|
||||||
};
|
|
||||||
gemini-cli.enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable gemini-cli";
|
|
||||||
};
|
|
||||||
bubblewrap.enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = pkgs.stdenv.isLinux;
|
|
||||||
description = "Enable bubblewrap (Linux only)";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkMerge [
|
|
||||||
{
|
|
||||||
programs.direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
visidata
|
|
||||||
codespelunker
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
(lib.mkIf cfg.enable {
|
|
||||||
home.packages =
|
|
||||||
(lib.optional cfg.claude-code.enable pkgs.unstable.claude-code) ++
|
|
||||||
(lib.optional cfg.opencode.enable pkgs.unstable.opencode) ++
|
|
||||||
(lib.optional cfg.gemini-cli.enable pkgs.unstable.gemini-cli) ++
|
|
||||||
(lib.optional (cfg.bubblewrap.enable && pkgs.stdenv.isLinux) pkgs.unstable.bubblewrap);
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,103 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.dot.nvim;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.dot.nvim = {
|
|
||||||
workMode = lib.mkEnableOption "work-specific neovim configuration";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
programs.neovim = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
defaultEditor = true;
|
|
||||||
vimAlias = true;
|
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
|
||||||
vim-repeat
|
|
||||||
vim-surround
|
|
||||||
ts-comments-nvim
|
|
||||||
vim-fugitive
|
|
||||||
gitsigns-nvim
|
|
||||||
nvim-tree-lua
|
|
||||||
targets-vim
|
|
||||||
mini-pairs
|
|
||||||
mini-align
|
|
||||||
mini-bracketed
|
|
||||||
mini-splitjoin
|
|
||||||
mini-move
|
|
||||||
mini-ai
|
|
||||||
mini-icons
|
|
||||||
flash-nvim
|
|
||||||
trouble-nvim
|
|
||||||
conform-nvim
|
|
||||||
nvim-lint
|
|
||||||
promise-async
|
|
||||||
nvim-ufo
|
|
||||||
vim-windowswap
|
|
||||||
plenary-nvim
|
|
||||||
telescope-nvim
|
|
||||||
telescope-fzf-native-nvim
|
|
||||||
telescope-ui-select-nvim
|
|
||||||
yanky-nvim
|
|
||||||
lualine-nvim
|
|
||||||
undotree
|
|
||||||
luasnip
|
|
||||||
nvim-cmp
|
|
||||||
cmp_luasnip
|
|
||||||
cmp-buffer
|
|
||||||
cmp-path
|
|
||||||
cmp-cmdline
|
|
||||||
cmp-nvim-lsp
|
|
||||||
cmp-nvim-lsp-signature-help
|
|
||||||
cmp_yanky
|
|
||||||
cmp-git
|
|
||||||
nvim-lspconfig
|
|
||||||
lspkind-nvim
|
|
||||||
copilot-lua
|
|
||||||
copilot-cmp
|
|
||||||
CopilotChat-nvim
|
|
||||||
# opencode-nvim
|
|
||||||
bullets-vim
|
|
||||||
nvim-dap
|
|
||||||
nvim-nio
|
|
||||||
# nvim-dap-ui
|
|
||||||
nvim-dap-view
|
|
||||||
nvim-dap-virtual-text
|
|
||||||
nvim-dap-go
|
|
||||||
nvim-dap-python
|
|
||||||
nvim-dap-lldb
|
|
||||||
todo-comments-nvim
|
|
||||||
vim-markdown
|
|
||||||
zen-mode-nvim
|
|
||||||
plantuml-syntax
|
|
||||||
obsidian-nvim
|
|
||||||
render-markdown-nvim
|
|
||||||
image-nvim
|
|
||||||
img-clip-nvim
|
|
||||||
vim-nix
|
|
||||||
(nvim-treesitter.withPlugins (p: [ p.awk p.bash p.c p.c_sharp p.cpp p.css p.diff p.dockerfile p.doxygen p.git_config p.gitcommit p.go p.gomod p.gosum p.gotmpl p.helm p.haskell p.html p.http p.java p.javascript p.json p.latex p.lua p.markdown p.markdown_inline p.matlab p.nix p.printf p.python p.regex p.rust p.sql p.strace p.supercollider p.svelte p.swift p.terraform p.tmux p.toml p.typescript p.vim p.xml p.yaml p.zig ]))
|
|
||||||
];
|
|
||||||
|
|
||||||
extraLuaConfig = ''
|
|
||||||
_G.is_work = ${if cfg.workMode then "true" else "false"}
|
|
||||||
_G.is_mac = ${if pkgs.stdenv.isDarwin then "true" else "false"}
|
|
||||||
_G.is_private_nixos = ${if !cfg.workMode && pkgs.stdenv.isLinux then "true" else "false"}
|
|
||||||
|
|
||||||
require('base')
|
|
||||||
require('keymaps')
|
|
||||||
require('plugins')
|
|
||||||
require('filetype')
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow for editing the lua modules without a nix rebuild
|
|
||||||
xdg.configFile."nvim/lua".source = config.lib.file.mkOutOfStoreSymlink "${config.dot.dotfilesPath}/modules/nvim/lua";
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
nodejs-slim
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.dot.llm.opencode;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.dot.llm.opencode = {
|
|
||||||
enableConfig = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable managed OpenCode configuration";
|
|
||||||
};
|
|
||||||
|
|
||||||
workMode = lib.mkEnableOption "work-specific opencode configuration";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enableConfig {
|
|
||||||
# Declare the sops secret
|
|
||||||
sops.secrets.langdock_api_key = {
|
|
||||||
# Uses defaultSopsFile from secrets.nix
|
|
||||||
};
|
|
||||||
|
|
||||||
# Create the OpenCode config.json template with secret substitution
|
|
||||||
sops.templates."opencode/opencode.json" = {
|
|
||||||
content = builtins.toJSON (let
|
|
||||||
baseConfig = {
|
|
||||||
"$schema" = "https://opencode.ai/config.json";
|
|
||||||
default_agent = "plan";
|
|
||||||
};
|
|
||||||
|
|
||||||
workConfig = {
|
|
||||||
enabled_providers = [ "anthropic" "langdock-openai" "ollama" ];
|
|
||||||
model = "anthropic/claude-opus-4-6-default";
|
|
||||||
small_model = "anthropic/claude-haiku-4-5-20251001";
|
|
||||||
provider = {
|
|
||||||
langdock-openai = {
|
|
||||||
npm = "@ai-sdk/openai-compatible";
|
|
||||||
name = "Langdock OpenAI";
|
|
||||||
options = {
|
|
||||||
baseURL = "https://api.langdock.com/openai/eu/v1";
|
|
||||||
apiKey = config.sops.placeholder.langdock_api_key;
|
|
||||||
};
|
|
||||||
models = {
|
|
||||||
"gpt-5.2" = { name = "GPT-5.2"; };
|
|
||||||
"gpt-5-mini" = { name = "GPT-5 mini"; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
anthropic = {
|
|
||||||
options = {
|
|
||||||
baseURL = "https://api.langdock.com/anthropic/eu/v1";
|
|
||||||
apiKey = config.sops.placeholder.langdock_api_key;
|
|
||||||
};
|
|
||||||
models = {
|
|
||||||
"claude-opus-4-6-default" = { name = "Opus 4.6"; };
|
|
||||||
"claude-sonnet-4-6-default" = { name = "Sonnet 4.6"; };
|
|
||||||
"claude-haiku-4-5-20251001" = { name = "Haiku 4.5"; };
|
|
||||||
};
|
|
||||||
whitelist = [ "claude-opus-4-6-default" "claude-sonnet-4-6-default" "claude-haiku-4-5-20251001"];
|
|
||||||
};
|
|
||||||
ollama = {
|
|
||||||
npm = "@ai-sdk/openai-compatible";
|
|
||||||
name = "Ollama (Local)";
|
|
||||||
options = {
|
|
||||||
baseURL = "http://192.168.11.23:11434/v1";
|
|
||||||
};
|
|
||||||
models = {
|
|
||||||
"qwen3-coder:30b" = { name = "Qwen 3 Coder 30B"; };
|
|
||||||
"codellama:34b-instruct" = { name = "CodeLlama 34B Instruct"; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
personalConfig = {
|
|
||||||
plugin = [ "opencode-gemini-auth@latest" ];
|
|
||||||
model = "google/gemini-3-pro-preview";
|
|
||||||
small_model = "google/gemini-3-flash-preview";
|
|
||||||
enabled_providers = [ "google" ];
|
|
||||||
};
|
|
||||||
in
|
|
||||||
# Merge base config with the selected mode config
|
|
||||||
baseConfig // (if cfg.workMode then workConfig else personalConfig)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
# Link the generated config to the expected location
|
|
||||||
xdg.configFile."opencode/opencode.json".source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."opencode/opencode.json".path;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{ inputs, config, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
];
|
|
||||||
|
|
||||||
sops = {
|
|
||||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
|
||||||
defaultSopsFormat = "yaml";
|
|
||||||
|
|
||||||
age = {
|
|
||||||
keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
SOPS_AGE_KEY_FILE = config.sops.age.keyFile;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.dot.sh;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.dot.sh = {
|
|
||||||
sourceProfile = lib.mkEnableOption "sourcing of $HOME/.profile in zsh profileExtra";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
autosuggestion.enable = true;
|
|
||||||
syntaxHighlighting.enable = true;
|
|
||||||
|
|
||||||
history.size = 500000;
|
|
||||||
|
|
||||||
prezto = {
|
|
||||||
enable = true;
|
|
||||||
caseSensitive = true;
|
|
||||||
color = true;
|
|
||||||
editor = {
|
|
||||||
dotExpansion = true;
|
|
||||||
keymap = "vi";
|
|
||||||
};
|
|
||||||
pmodules = [
|
|
||||||
"environment"
|
|
||||||
"terminal"
|
|
||||||
"editor"
|
|
||||||
"history"
|
|
||||||
"directory"
|
|
||||||
"spectrum"
|
|
||||||
"utility"
|
|
||||||
"completion"
|
|
||||||
"ssh"
|
|
||||||
"syntax-highlighting"
|
|
||||||
"history-substring-search"
|
|
||||||
"prompt"
|
|
||||||
"git"
|
|
||||||
];
|
|
||||||
prompt.theme = "minimal";
|
|
||||||
syntaxHighlighting.highlighters = [
|
|
||||||
"main"
|
|
||||||
"brackets"
|
|
||||||
"pattern"
|
|
||||||
"line"
|
|
||||||
"cursor"
|
|
||||||
"root"
|
|
||||||
];
|
|
||||||
tmux = {
|
|
||||||
autoStartLocal = true;
|
|
||||||
itermIntegration = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
initContent = ''
|
|
||||||
HISTCONTROL='erasedups:ignoreboth'
|
|
||||||
HISTIGNORE='&:[ ]*:exit:ls:bg:fg:history:clear'
|
|
||||||
unsetopt beep
|
|
||||||
'';
|
|
||||||
|
|
||||||
profileExtra = lib.mkIf cfg.sourceProfile ''
|
|
||||||
source $HOME/.profile
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fzf = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.lsd = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zoxide = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
options = [
|
|
||||||
"--cmd cd"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bat.enable = true;
|
|
||||||
programs.ripgrep.enable = true;
|
|
||||||
programs.btop.enable = true;
|
|
||||||
programs.ranger.enable = true;
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
fd
|
|
||||||
dust
|
|
||||||
glow
|
|
||||||
ripgrep-all
|
|
||||||
viddy
|
|
||||||
duf
|
|
||||||
lsof
|
|
||||||
];
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
BAT_THEME = "Coldark-Cold";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.shellAliases = {
|
|
||||||
lst = "lsd --tree";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.dot.tmux;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.dot.tmux = {
|
|
||||||
workMode = lib.mkEnableOption "work-specific tmux configuration";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
programs.tmux = {
|
|
||||||
enable = true;
|
|
||||||
shortcut = "a";
|
|
||||||
mouse = true;
|
|
||||||
keyMode = "vi";
|
|
||||||
escapeTime = 10;
|
|
||||||
terminal = "screen-256color";
|
|
||||||
tmuxp.enable = true;
|
|
||||||
extraConfig = ''
|
|
||||||
set -g display-time 1500
|
|
||||||
|
|
||||||
unbind S
|
|
||||||
bind S command-prompt "switch -t %1"
|
|
||||||
bind-key , command-prompt -p "rename-window:" "rename-window '%%'"
|
|
||||||
|
|
||||||
# Check if we are in vim
|
|
||||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
|
||||||
|
|
||||||
bind-key -n C-M-h if-shell "$is_vim" { send-keys C-M-h } { if -F "#{pane_at_left}" "previous-window" "select-pane -L" }
|
|
||||||
bind-key -n C-M-j if-shell "$is_vim" { send-keys C-M-j } { if -F "#{pane_at_bottom}" "switch-client -n" "select-pane -D" }
|
|
||||||
bind-key -n C-M-k if-shell "$is_vim" { send-keys C-M-k } { if -F "#{pane_at_top}" "switch-client -p" "select-pane -U" }
|
|
||||||
bind-key -n C-M-l if-shell "$is_vim" { send-keys C-M-l } { if -F "#{pane_at_right}" "next-window" "select-pane -R" }
|
|
||||||
|
|
||||||
bind '"' split-window -c "#{pane_current_path}"
|
|
||||||
bind % split-window -h -c "#{pane_current_path}"
|
|
||||||
bind c new-window -a -c "#{pane_current_path}"
|
|
||||||
|
|
||||||
bind C-g display-popup -E -d "#{pane_current_path}" -xC -yC -w 95% -h 95% "lazygit"
|
|
||||||
bind C-t display-popup -E -xC -yC -w 95% -h 95% "tasksquire"
|
|
||||||
|
|
||||||
${lib.optionalString cfg.workMode ''
|
|
||||||
bind C-s display-popup -E "zsh ~/bin/tmuxp_selector.sh"
|
|
||||||
bind C-n display-popup -E -xC -yC -w 95% -h 95% -d "~/Documents/notes/Work/" "vim quick_notes.md"
|
|
||||||
bind C-p display-popup -E -xC -yC -w 95% -h 95% -d "~/Documents/notes/Work/development/" "vim mbpr.md"
|
|
||||||
''}
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# status line
|
|
||||||
#######################################
|
|
||||||
set -g status-justify centre
|
|
||||||
|
|
||||||
set -g status-left "#[bg=#808080,fg=#ffffff,bold] #S #[default]#[bg=#BCBCBC] #{-30:pane_title} "
|
|
||||||
set -g status-left-length 40
|
|
||||||
|
|
||||||
set -g status-right "#[bg=#BCBCBC] %H:%M #[bg=#808080,fg=#ffffff] %d.%m.%y "
|
|
||||||
|
|
||||||
# setw -g window-status-format " #W#F "
|
|
||||||
# setw -g window-status-current-format " #W#F "
|
|
||||||
setw -g window-status-format " #W "
|
|
||||||
setw -g window-status-current-format " #W "
|
|
||||||
setw -g window-status-separator ""
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# colors, taken from vim-lucius
|
|
||||||
#######################################
|
|
||||||
set -g status-style "bg=#DADADA,fg=#000000"
|
|
||||||
|
|
||||||
setw -g window-status-style "bg=#BCBCBC,fg=#000000"
|
|
||||||
setw -g window-status-current-style "bg=#808080,fg=#ffffff"
|
|
||||||
|
|
||||||
setw -g window-status-activity-style "bg=#AFD7AF,fg=#000000"
|
|
||||||
setw -g window-status-bell-style "bg=#AFD7AF,fg=#000000"
|
|
||||||
#setw -g window-status-content-style "bg=#AFD7AF,fg=#000000"
|
|
||||||
|
|
||||||
set -g pane-active-border-style "bg=#eeeeee,fg=#006699"
|
|
||||||
set -g pane-border-style "bg=#eeeeee,fg=#999999"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home.shellAliases = {
|
|
||||||
"o" = "tmuxp";
|
|
||||||
"ol" = "tmuxp load";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./secrets.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Berlin";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "de_DE.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
|
||||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
|
||||||
LC_MONETARY = "de_DE.UTF-8";
|
|
||||||
LC_NAME = "de_DE.UTF-8";
|
|
||||||
LC_NUMERIC = "de_DE.UTF-8";
|
|
||||||
LC_PAPER = "de_DE.UTF-8";
|
|
||||||
LC_TELEPHONE = "de_DE.UTF-8";
|
|
||||||
LC_TIME = "de_DE.UTF-8";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
programs.ssh.startAgent = true;
|
|
||||||
programs.nix-ld.enable = true;
|
|
||||||
|
|
||||||
nix.settings = {
|
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 7d";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
git
|
|
||||||
wget
|
|
||||||
curl
|
|
||||||
vim
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
{ inputs, config, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
];
|
|
||||||
|
|
||||||
sops = {
|
|
||||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
|
||||||
defaultSopsFormat = "yaml";
|
|
||||||
|
|
||||||
age = {
|
|
||||||
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
||||||
# keyFile = "/var/lib/sops-nix/key.txt";
|
|
||||||
# generateKey = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# Overlay to provide unstable packages under pkgs.unstable.* namespace
|
|
||||||
# This allows using stable packages by default while selectively using
|
|
||||||
# unstable versions for specific packages (e.g., LLM development tools)
|
|
||||||
#
|
|
||||||
# Usage: Pass nixpkgs input when applying overlay:
|
|
||||||
# overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
|
|
||||||
|
|
||||||
nixpkgs: final: prev: {
|
|
||||||
unstable = import nixpkgs {
|
|
||||||
inherit (prev) system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
61
nix/common.nix
Normal file
61
nix/common.nix
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./user/sh.nix
|
||||||
|
./user/tmux.nix
|
||||||
|
./user/git.nix
|
||||||
|
./user/dev.nix
|
||||||
|
./user/nvim.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
nil
|
||||||
|
# neovim
|
||||||
|
|
||||||
|
# (pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||||
|
pkgs.nerd-fonts.fira-code
|
||||||
|
|
||||||
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||||
|
# echo "Hello, ${config.home.username}!"
|
||||||
|
# '')
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
# ".screenrc".source = dotfiles/screenrc;
|
||||||
|
|
||||||
|
# ".gradle/gradle.properties".text = ''
|
||||||
|
# org.gradle.console=verbose
|
||||||
|
# org.gradle.daemon.idletimeout=3600000
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
|
||||||
|
# Home Manager can also manage your environment variables through
|
||||||
|
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
||||||
|
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
||||||
|
# either
|
||||||
|
#
|
||||||
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# /etc/profiles/per-user/moustachioed/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
#home.sessionVariables = {
|
||||||
|
# EDITOR = "nvim";
|
||||||
|
#};
|
||||||
|
|
||||||
|
#home.shellAliases = {
|
||||||
|
# "ll" = "ls -la";
|
||||||
|
# "t" = "tmuxp";
|
||||||
|
# "tl" = "tmuxp load";
|
||||||
|
# };
|
||||||
|
|
||||||
|
news.display = "silent";
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
69
nix/flake.lock
generated
Normal file
69
nix/flake.lock
generated
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1750275572,
|
||||||
|
"narHash": "sha256-upC/GIlsIgtdtWRGd1obzdXWYQptNkfzZeyAFWgsgf0=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "0f355844e54e4c70906b1ef5cc35a0047d666c04",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1749873626,
|
||||||
|
"narHash": "sha256-1Mc/D/1RwwmDKY59f4IpDBgcQttxffm+4o0m67lQ8hc=",
|
||||||
|
"owner": "LnL7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "2f140d6ac8840c6089163fb43ba95220c230f22b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "LnL7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1750134718,
|
||||||
|
"narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nix-darwin": "nix-darwin",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
83
nix/flake.nix
Normal file
83
nix/flake.nix
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
{
|
||||||
|
description = "Home Manager configuration of moustachioed";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
nix-darwin.url = "github:LnL7/nix-darwin";
|
||||||
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nix-darwin, nixpkgs, home-manager, ... }:
|
||||||
|
let
|
||||||
|
system = "x86_64-darwin";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
|
configuration = { pkgs, ... }: {
|
||||||
|
environment.systemPackages =
|
||||||
|
[
|
||||||
|
pkgs.vim
|
||||||
|
];
|
||||||
|
|
||||||
|
# Auto upgrade nix package and the daemon service.
|
||||||
|
services.nix-daemon.enable = true;
|
||||||
|
# nix.package = pkgs.nix;
|
||||||
|
|
||||||
|
nix.settings.experimental-features = "nix-command flakes";
|
||||||
|
|
||||||
|
programs.zsh.enable = true; # default shell on catalina
|
||||||
|
|
||||||
|
# Set Git commit hash for darwin-version.
|
||||||
|
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||||
|
|
||||||
|
# Used for backwards compatibility, please read the changelog before changing.
|
||||||
|
# $ darwin-rebuild changelog
|
||||||
|
system.stateVersion = 4;
|
||||||
|
|
||||||
|
# The platform the configuration will be used on.
|
||||||
|
nixpkgs.hostPlatform = system;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
# Build darwin flake using:
|
||||||
|
# $ darwin-rebuild build --flake .#Martins-MacBook-Pro
|
||||||
|
darwinConfigurations."Martins-MacBook-Pro" = nix-darwin.lib.darwinSystem {
|
||||||
|
modules = [ configuration ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Expose the package set, including overlays, for convenience.
|
||||||
|
darwinPackages = self.darwinConfigurations."Martins-MacBook-Pro".pkgs;
|
||||||
|
|
||||||
|
homeConfigurations = {
|
||||||
|
"moustachioed" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./user/profiles/moustachioedBook.nix
|
||||||
|
./common.nix
|
||||||
|
./user/task_home.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"martin" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./user/profiles/martin.nix
|
||||||
|
./common.nix
|
||||||
|
./user/task_home.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"pan" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./user/profiles/work.nix
|
||||||
|
./common.nix
|
||||||
|
./user/task.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
nix/user/dev.nix
Normal file
13
nix/user/dev.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
visidata
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
|
||||||
alias = {
|
aliases = {
|
||||||
st = "status";
|
st = "status";
|
||||||
ci = "commit";
|
ci = "commit";
|
||||||
co = "checkout";
|
co = "checkout";
|
||||||
@@ -17,6 +17,9 @@
|
|||||||
cleanup = "!git fetch --prune && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -D";
|
cleanup = "!git fetch --prune && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -D";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
difftastic.enable = true;
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
column.ui = "auto";
|
column.ui = "auto";
|
||||||
branch.sort = "-committerdate";
|
branch.sort = "-committerdate";
|
||||||
tag.sort = "version:refname";
|
tag.sort = "version:refname";
|
||||||
@@ -59,12 +62,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Difftastic - modern diff tool
|
|
||||||
programs.difftastic = {
|
|
||||||
enable = true;
|
|
||||||
git.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.lazygit = {
|
programs.lazygit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -78,14 +75,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.jujutsu = {
|
programs.jujutsu.enable = true;
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
aliases = {
|
|
||||||
tug = ["bookmark" "move" "--from" "heads(::@- & bookmarks())" "--to" "@-"];
|
|
||||||
lg = ["log"];
|
|
||||||
des = ["describe"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
91
nix/user/nvim.nix
Normal file
91
nix/user/nvim.nix
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
defaultEditor = true;
|
||||||
|
vimAlias = true;
|
||||||
|
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
vim-repeat
|
||||||
|
vim-surround
|
||||||
|
ts-comments-nvim
|
||||||
|
vim-fugitive
|
||||||
|
gitsigns-nvim
|
||||||
|
nvim-tree-lua
|
||||||
|
targets-vim
|
||||||
|
mini-pairs
|
||||||
|
mini-align
|
||||||
|
mini-bracketed
|
||||||
|
mini-splitjoin
|
||||||
|
mini-move
|
||||||
|
mini-ai
|
||||||
|
mini-icons
|
||||||
|
flash-nvim
|
||||||
|
trouble-nvim
|
||||||
|
conform-nvim
|
||||||
|
nvim-lint
|
||||||
|
promise-async
|
||||||
|
nvim-ufo
|
||||||
|
vim-windowswap
|
||||||
|
plenary-nvim
|
||||||
|
telescope-nvim
|
||||||
|
telescope-fzf-native-nvim
|
||||||
|
telescope-ui-select-nvim
|
||||||
|
yanky-nvim
|
||||||
|
lualine-nvim
|
||||||
|
undotree
|
||||||
|
luasnip
|
||||||
|
nvim-cmp
|
||||||
|
cmp_luasnip
|
||||||
|
cmp-buffer
|
||||||
|
cmp-path
|
||||||
|
cmp-cmdline
|
||||||
|
cmp-nvim-lsp
|
||||||
|
cmp-nvim-lsp-signature-help
|
||||||
|
cmp_yanky
|
||||||
|
cmp-git
|
||||||
|
nvim-lspconfig
|
||||||
|
lspkind-nvim
|
||||||
|
copilot-lua
|
||||||
|
copilot-cmp
|
||||||
|
CopilotChat-nvim
|
||||||
|
bullets-vim
|
||||||
|
nvim-dap
|
||||||
|
nvim-nio
|
||||||
|
nvim-dap-ui
|
||||||
|
nvim-dap-virtual-text
|
||||||
|
nvim-dap-go
|
||||||
|
nvim-dap-python
|
||||||
|
nvim-dap-lldb
|
||||||
|
todo-comments-nvim
|
||||||
|
vim-markdown
|
||||||
|
zen-mode-nvim
|
||||||
|
plantuml-syntax
|
||||||
|
obsidian-nvim
|
||||||
|
render-markdown-nvim
|
||||||
|
image-nvim
|
||||||
|
img-clip-nvim
|
||||||
|
vim-nix
|
||||||
|
(nvim-treesitter.withPlugins (p: [ p.awk p.bash p.c p.c_sharp p.cpp p.css p.diff p.dockerfile p.doxygen p.git_config p.gitcommit p.go p.gomod p.gosum p.gotmpl p.helm p.haskell p.html p.http p.java p.javascript p.json p.latex p.lua p.markdown p.markdown_inline p.matlab p.nix p.printf p.python p.regex p.rust p.sql p.strace p.supercollider p.svelte p.swift p.terraform p.tmux p.toml p.typescript p.vim p.xml p.yaml p.zig ]))
|
||||||
|
];
|
||||||
|
|
||||||
|
# extraConfig = ''
|
||||||
|
# set t_vb=
|
||||||
|
# '';
|
||||||
|
|
||||||
|
extraLuaConfig = builtins.concatStringsSep "\n" [
|
||||||
|
(lib.strings.fileContents ../../nvim/base.lua)
|
||||||
|
(lib.strings.fileContents ../../nvim/keymaps.lua)
|
||||||
|
(lib.strings.fileContents ../../nvim/plugins.lua)
|
||||||
|
(lib.strings.fileContents ../../nvim/filetype.lua)
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
nodejs-slim
|
||||||
|
marksman
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
13
nix/user/profiles/martin.nix
Normal file
13
nix/user/profiles/martin.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "martin";
|
||||||
|
home.homeDirectory = "/Users/martin";
|
||||||
|
|
||||||
|
home.stateVersion = "24.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
userName = "Martin";
|
||||||
|
userEmail = "git@pander-on.de";
|
||||||
|
};
|
||||||
|
}
|
||||||
13
nix/user/profiles/moustachioedBook.nix
Normal file
13
nix/user/profiles/moustachioedBook.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "moustachioed";
|
||||||
|
home.homeDirectory = "/Users/moustachioed";
|
||||||
|
|
||||||
|
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
userName = "Martin";
|
||||||
|
userEmail = "git@pander-on.de";
|
||||||
|
};
|
||||||
|
}
|
||||||
24
nix/user/profiles/work.nix
Normal file
24
nix/user/profiles/work.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "pan";
|
||||||
|
home.homeDirectory = "/home/pan";
|
||||||
|
|
||||||
|
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
userName = "Martin Pander";
|
||||||
|
userEmail = "martin.pander@knowtion.de";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
yaml-language-server
|
||||||
|
marksman
|
||||||
|
dockerfile-language-server-nodejs
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.zsh.profileExtra = ''
|
||||||
|
source $HOME/.profile
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
||||||
117
nix/user/sh.nix
Normal file
117
nix/user/sh.nix
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
|
history.size = 500000;
|
||||||
|
#history.path = "${config.xdg.dataHome}/zsh/history";
|
||||||
|
prezto = {
|
||||||
|
enable = true;
|
||||||
|
caseSensitive = true;
|
||||||
|
color = true;
|
||||||
|
editor = {
|
||||||
|
dotExpansion = true;
|
||||||
|
keymap = "vi";
|
||||||
|
};
|
||||||
|
pmodules = [
|
||||||
|
"environment"
|
||||||
|
"terminal"
|
||||||
|
"editor"
|
||||||
|
"history"
|
||||||
|
"directory"
|
||||||
|
"spectrum"
|
||||||
|
"utility"
|
||||||
|
"completion"
|
||||||
|
"syntax-highlighting"
|
||||||
|
"history-substring-search"
|
||||||
|
"prompt"
|
||||||
|
"git"
|
||||||
|
];
|
||||||
|
prompt.theme = "minimal";
|
||||||
|
syntaxHighlighting.highlighters = [
|
||||||
|
"main"
|
||||||
|
"brackets"
|
||||||
|
"pattern"
|
||||||
|
"line"
|
||||||
|
"cursor"
|
||||||
|
"root"
|
||||||
|
];
|
||||||
|
tmux = {
|
||||||
|
autoStartLocal = true;
|
||||||
|
itermIntegration = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
initContent = ''
|
||||||
|
HISTCONTROL='erasedups:ignoreboth'
|
||||||
|
HISTIGNORE='&:[ ]*:exit:ls:bg:fg:history:clear'
|
||||||
|
unsetopt beep
|
||||||
|
|
||||||
|
if [[ "$(uname -s)" == "Darwin" ]]; then
|
||||||
|
export RUSTUP_HOME="$HOME/.rustup"
|
||||||
|
export CARGO_HOME="$HOME/.cargo"
|
||||||
|
[ -f "$CARGO_HOME/env" ] && . "$CARGO_HOME/env"
|
||||||
|
fi;
|
||||||
|
if [[ "$(uname -r)" == *Microsoft* ]]; then
|
||||||
|
if command -v tmuxp &> /dev/null && [ -z "$TMUX" ]; then
|
||||||
|
tmuxp load --yes misc
|
||||||
|
fi
|
||||||
|
fi;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.lsd = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
options = [
|
||||||
|
"--cmd cd"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.bat.enable = true;
|
||||||
|
programs.ripgrep.enable = true;
|
||||||
|
programs.btop.enable = true;
|
||||||
|
programs.ranger.enable = true;
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
fd
|
||||||
|
du-dust
|
||||||
|
glow
|
||||||
|
ripgrep-all
|
||||||
|
viddy
|
||||||
|
duf
|
||||||
|
(python3.withPackages(ps: [ ps.llm ps.llm-gemini ]))
|
||||||
|
#nerdfonts
|
||||||
|
];
|
||||||
|
|
||||||
|
home.sessionVariables = lib.mkMerge [ {
|
||||||
|
BAT_THEME = "Coldark-Cold";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
home.shellAliases = lib.mkMerge [
|
||||||
|
{
|
||||||
|
lst = "lsd --tree";
|
||||||
|
}
|
||||||
|
|
||||||
|
# This is the correct way to use lib.mkIf within lib.mkMerge
|
||||||
|
# (lib.mkIf pkgs.stdenv.targetPlatform.isWindows {
|
||||||
|
(lib.mkIf (lib.strings.hasSuffix "windows" pkgs.system) {
|
||||||
|
open = "explorer.exe .";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{config, pkgs, lib, inputs, ...}:
|
{config, pkgs, lib, ...}:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.taskwarrior = {
|
programs.taskwarrior = {
|
||||||
@@ -8,10 +8,8 @@
|
|||||||
config = {
|
config = {
|
||||||
weekstart = "monday";
|
weekstart = "monday";
|
||||||
|
|
||||||
uda.tasksquire.tags.default="code,comm,cust,del,doc,mngmnt,ops,rsrch,rvw,track";
|
context.today.read = "(prio:H or +next)";
|
||||||
|
context.today.write = "prio:H +next";
|
||||||
uda.parenttask.type="string";
|
|
||||||
uda.parenttask.label="Parent";
|
|
||||||
|
|
||||||
uda.energy.type="string";
|
uda.energy.type="string";
|
||||||
uda.energy.label="Energy";
|
uda.energy.label="Energy";
|
||||||
@@ -22,15 +20,10 @@
|
|||||||
urgency.uda.priority.L.coefficient = -0.5;
|
urgency.uda.priority.L.coefficient = -0.5;
|
||||||
urgency.user.tag.deferred.coefficient = -15.0;
|
urgency.user.tag.deferred.coefficient = -15.0;
|
||||||
urgency.user.tag.cust.coefficient = 5.0;
|
urgency.user.tag.cust.coefficient = 5.0;
|
||||||
urgency.user.tag.fixed.coefficient = -100.0;
|
|
||||||
|
|
||||||
report.next.columns="id,start.age,entry.age,depends,priority,energy,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency";
|
report.next.columns="id,start.age,entry.age,depends,priority,energy,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency";
|
||||||
report.next.labels="ID,Active,Age,Deps,P,E,Project,Tag,Recur,S,Due,Until,Description,Urg";
|
report.next.labels="ID,Active,Age,Deps,P,E,Project,Tag,Recur,S,Due,Until,Description,Urg";
|
||||||
report.next.filter="status:pending -WAITING -deferred -track";
|
report.next.filter="status:pending -WAITING -deferred";
|
||||||
|
|
||||||
report.time.columns="id,start.age,entry.age,depends,priority,energy,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency";
|
|
||||||
report.time.labels="ID,Active,Age,Deps,P,E,Project,Tag,Recur,S,Due,Until,Description,Urg";
|
|
||||||
report.time.filter="status:pending -WAITING -deferred +fixed";
|
|
||||||
|
|
||||||
report.deferred.columns="id,start.age,entry.age,depends,priority,energy,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency";
|
report.deferred.columns="id,start.age,entry.age,depends,priority,energy,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description,urgency";
|
||||||
report.deferred.context="1";
|
report.deferred.context="1";
|
||||||
@@ -46,8 +39,6 @@
|
|||||||
report.low.labels="ID,Active,Age,Deps,P,E,Project,Tag,Recur,S,Due,Until,Description,Urg";
|
report.low.labels="ID,Active,Age,Deps,P,E,Project,Tag,Recur,S,Due,Until,Description,Urg";
|
||||||
report.low.sort="energy+,urgency-";
|
report.low.sort="energy+,urgency-";
|
||||||
|
|
||||||
context.today.read = "(prio:H or +next)";
|
|
||||||
context.today.write = "prio:H +next";
|
|
||||||
context.deferred.read = "+deferred";
|
context.deferred.read = "+deferred";
|
||||||
context.deferred.write = "+deferred";
|
context.deferred.write = "+deferred";
|
||||||
context.customer.read = "+cust";
|
context.customer.read = "+cust";
|
||||||
@@ -62,8 +53,7 @@
|
|||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
taskwarrior-tui
|
taskwarrior-tui
|
||||||
unstable.timewarrior
|
timewarrior
|
||||||
inputs.tasksquire.packages.${pkgs.system}.default
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home.shellAliases = lib.mkMerge [ {
|
home.shellAliases = lib.mkMerge [ {
|
||||||
37
nix/user/task_home.nix
Normal file
37
nix/user/task_home.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{config, pkgs, lib, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.taskwarrior = {
|
||||||
|
enable = true;
|
||||||
|
colorTheme = "light-256";
|
||||||
|
package = pkgs.taskwarrior3;
|
||||||
|
config = {
|
||||||
|
weekstart = "monday";
|
||||||
|
|
||||||
|
uda.priority.values = "H,M,,L";
|
||||||
|
urgency.uda.priority.L.coefficient = -0.5;
|
||||||
|
urgency.user.tag.deferred.coefficient = -15.0;
|
||||||
|
urgency.user.tag.cust.coefficient = 5.0;
|
||||||
|
|
||||||
|
context.today.read = "-deferred and (prio:H or +next)";
|
||||||
|
context.today.write = "prio:H or +next";
|
||||||
|
context.deferred.read = "+deferred";
|
||||||
|
context.deferred.write = "+deferred";
|
||||||
|
context.low_energy.read = "+low";
|
||||||
|
context.low_energy.write = "+low";
|
||||||
|
|
||||||
|
uda.taskwarrior-tui.task-report.show-info = false;
|
||||||
|
uda.taskwarrior-tui.selection.reverse = "yes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
taskwarrior-tui
|
||||||
|
];
|
||||||
|
|
||||||
|
home.shellAliases = lib.mkMerge [ {
|
||||||
|
t = "task";
|
||||||
|
tt = "taskwarrior-tui";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
72
nix/user/tmux.nix
Normal file
72
nix/user/tmux.nix
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
shortcut = "a";
|
||||||
|
mouse = true;
|
||||||
|
keyMode = "vi";
|
||||||
|
escapeTime = 0;
|
||||||
|
terminal = "screen-256color";
|
||||||
|
tmuxp.enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g display-time 1500
|
||||||
|
|
||||||
|
unbind S
|
||||||
|
bind S command-prompt "switch -t %1"
|
||||||
|
|
||||||
|
bind-key -n M-K switch-client -p
|
||||||
|
bind-key -n M-J switch-client -n
|
||||||
|
|
||||||
|
bind-key -n M-L next-window
|
||||||
|
bind-key -n M-H previous-window
|
||||||
|
|
||||||
|
bind '"' split-window -c "#{pane_current_path}"
|
||||||
|
bind % split-window -h -c "#{pane_current_path}"
|
||||||
|
bind c new-window -a -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
bind C-s display-popup -E "zsh ~/bin/tmuxp_selector.sh"
|
||||||
|
bind C-g display-popup -E -d "#{pane_current_path}" -xC -yC -w 95% -h 95% "lazygit"
|
||||||
|
bind C-t display-popup -E -xC -yC -w 95% -h 95% "tasksquire"
|
||||||
|
bind C-n display-popup -E -xC -yC -w 95% -h 95% "vim /mnt/c/Users/marti/Documents/notes/Work/quick_notes.md"
|
||||||
|
bind C-m display-popup -E -xC -yC -w 95% -h 95% "vim /mnt/c/Users/marti/Documents/notes/Work/mbpr.md"
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# status line
|
||||||
|
#######################################
|
||||||
|
set -g status-justify centre
|
||||||
|
|
||||||
|
set -g status-left "#[bg=#808080,fg=#ffffff,bold] #S #[default]#[bg=#BCBCBC] #{-30:pane_title} "
|
||||||
|
set -g status-left-length 40
|
||||||
|
|
||||||
|
set -g status-right "#[bg=#BCBCBC] %H:%M #[bg=#808080,fg=#ffffff] %d.%m.%y "
|
||||||
|
|
||||||
|
# setw -g window-status-format " #W#F "
|
||||||
|
# setw -g window-status-current-format " #W#F "
|
||||||
|
setw -g window-status-format " #W "
|
||||||
|
setw -g window-status-current-format " #W "
|
||||||
|
setw -g window-status-separator ""
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# colors, taken from vim-lucius
|
||||||
|
#######################################
|
||||||
|
set -g status-style "bg=#DADADA,fg=#000000"
|
||||||
|
|
||||||
|
setw -g window-status-style "bg=#BCBCBC,fg=#000000"
|
||||||
|
setw -g window-status-current-style "bg=#808080,fg=#ffffff"
|
||||||
|
|
||||||
|
setw -g window-status-activity-style "bg=#AFD7AF,fg=#000000"
|
||||||
|
setw -g window-status-bell-style "bg=#AFD7AF,fg=#000000"
|
||||||
|
#setw -g window-status-content-style "bg=#AFD7AF,fg=#000000"
|
||||||
|
|
||||||
|
set -g pane-active-border-style "bg=#eeeeee,fg=#006699"
|
||||||
|
set -g pane-border-style "bg=#eeeeee,fg=#999999"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
home.shellAliases = lib.mkMerge [ {
|
||||||
|
"o" = "tmuxp";
|
||||||
|
"ol" = "tmuxp load";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -36,6 +36,7 @@ vim.opt.foldopen = vim.opt.foldopen - 'block'
|
|||||||
vim.opt.foldlevel = 99
|
vim.opt.foldlevel = 99
|
||||||
vim.opt.lazyredraw = true
|
vim.opt.lazyredraw = true
|
||||||
vim.opt.listchars = 'eol:¬,tab:▸ ,trail:·'
|
vim.opt.listchars = 'eol:¬,tab:▸ ,trail:·'
|
||||||
|
vim.opt.fillchars = 'vert:|,fold: '
|
||||||
vim.opt.list = true
|
vim.opt.list = true
|
||||||
vim.opt.laststatus = 3
|
vim.opt.laststatus = 3
|
||||||
vim.opt.scrolloff = 8
|
vim.opt.scrolloff = 8
|
||||||
@@ -132,7 +133,7 @@ vim.api.nvim_create_user_command('TrimWhiteSpace', function()
|
|||||||
vim.cmd('%s/\\s\\+$//e')
|
vim.cmd('%s/\\s\\+$//e')
|
||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
function ToggleDiagnostics()
|
local function ToggleDiagnostics()
|
||||||
vim.diagnostic.enable(not vim.diagnostic.is_enabled())
|
vim.diagnostic.enable(not vim.diagnostic.is_enabled())
|
||||||
if vim.diagnostic.is_enabled() then
|
if vim.diagnostic.is_enabled() then
|
||||||
print("Diagnostics enabled")
|
print("Diagnostics enabled")
|
||||||
@@ -1,130 +1,52 @@
|
|||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true })
|
vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true })
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
group = 'FileTypeConfigs',
|
||||||
pattern = 'python',
|
pattern = 'python',
|
||||||
once = true,
|
|
||||||
callback = function()
|
callback = function()
|
||||||
require('dap-python').setup()
|
require('dap-python').setup()
|
||||||
|
-- lspconfig.pyright.setup({ capabilities = capabilities })
|
||||||
|
-- require("conform").setup({
|
||||||
|
-- python = {"black"},
|
||||||
|
-- })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
-- vim.api.nvim_create_autocmd('FileType', {
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
-- group = 'FileTypeConfigs',
|
||||||
pattern = 'go',
|
-- pattern = 'go',
|
||||||
once = true,
|
-- callback = function()
|
||||||
callback = function()
|
-- require('dap-python').setup()
|
||||||
vim.lsp.enable('ty')
|
-- require('dap-go').setup()
|
||||||
vim.lsp.enable('gopls')
|
|
||||||
require('dap-go').setup()
|
lspconfig.ruff.setup({ capabilities = capabilities })
|
||||||
end,
|
lspconfig.gopls.setup({ capabilities = capabilities })
|
||||||
|
lspconfig.marksman.setup({ capabilities = capabilities })
|
||||||
|
lspconfig.rust_analyzer.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
["rust-analyzer"] = {
|
||||||
|
checkOnSave = {
|
||||||
|
command = "clippy",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
lspconfig.dockerls.setup({ capabilities = capabilities })
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
lspconfig.docker_compose_language_service.setup({ capabilities = capabilities })
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
lspconfig.clangd.setup({ capabilities = capabilities })
|
||||||
pattern = 'proto',
|
lspconfig.sqls.setup({ capabilities = capabilities })
|
||||||
once = true,
|
lspconfig.zls.setup({ capabilities = capabilities })
|
||||||
callback = function()
|
lspconfig.omnisharp.setup({ capabilities = capabilities })
|
||||||
vim.lsp.config('buf_ls', {
|
lspconfig.yamlls.setup({ capabilities = capabilities })
|
||||||
cmd = { 'buf', 'lsp', 'serve' },
|
|
||||||
filetypes = { 'proto' },
|
|
||||||
root_markers = { 'buf.yaml', '.git' },
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.lsp.enable('buf_ls')
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
|
||||||
pattern = 'markdown',
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.enable('marksman')
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
|
||||||
pattern = 'sql',
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.enable('sqls')
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
|
||||||
pattern = { 'dockerfile', 'yaml.docker-compose' },
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.enable('dockerls')
|
|
||||||
vim.lsp.enable('docker_compose_language_service')
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
|
||||||
pattern = 'rust',
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.enable('rust_analyzer')
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
|
||||||
pattern = { 'c', 'cpp' },
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.enable('clangd')
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
|
||||||
pattern = { 'zig' },
|
|
||||||
pattern = 'sql',
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.enable('zls')
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
|
||||||
pattern = { 'yaml' },
|
|
||||||
pattern = 'sql',
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.enable('yamlls')
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
group = vim.api.nvim_create_augroup('FileTypeConfigs', { clear = true }),
|
|
||||||
pattern = { 'cs' },
|
|
||||||
pattern = 'sql',
|
|
||||||
once = true,
|
|
||||||
callback = function()
|
|
||||||
vim.lsp.enable('omnisharp')
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require("conform").setup({
|
require("conform").setup({
|
||||||
go = {"gofmt"},
|
go = {"gofmt"},
|
||||||
python = {"black"},
|
python = {"black"},
|
||||||
rust = {"rustfmt"},
|
rust = {"rustfmt"},
|
||||||
|
|
||||||
format_on_save = {
|
|
||||||
timeout_ms = 500,
|
|
||||||
lsp_fallback = true,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
-- end,
|
-- end,
|
||||||
-- })
|
-- })
|
||||||
@@ -4,14 +4,14 @@ vim.g.mapleader = " "
|
|||||||
vim.keymap.set({'n', 'v'}, 'j', 'gj', {})
|
vim.keymap.set({'n', 'v'}, 'j', 'gj', {})
|
||||||
vim.keymap.set({'n', 'v'}, 'k', 'gk', {})
|
vim.keymap.set({'n', 'v'}, 'k', 'gk', {})
|
||||||
|
|
||||||
-- vim.keymap.set('n', '<C-M-h>', '<C-w>h', {})
|
vim.keymap.set('n', '<C-M-h>', '<C-w>h', {})
|
||||||
-- vim.keymap.set('n', '<C-M-j>', '<C-w>j', {})
|
vim.keymap.set('n', '<C-M-j>', '<C-w>j', {})
|
||||||
-- vim.keymap.set('n', '<C-M-k>', '<C-w>k', {})
|
vim.keymap.set('n', '<C-M-k>', '<C-w>k', {})
|
||||||
-- vim.keymap.set('n', '<C-M-l>', '<C-w>l', {})
|
vim.keymap.set('n', '<C-M-l>', '<C-w>l', {})
|
||||||
-- vim.keymap.set('t', '<C-M-h>', '<C-\\><C-n><C-w>h', {})
|
vim.keymap.set('t', '<C-M-h>', '<C-\\><C-n><C-w>h', {})
|
||||||
-- vim.keymap.set('t', '<C-M-j>', '<C-\\><C-n><C-w>j', {})
|
vim.keymap.set('t', '<C-M-j>', '<C-\\><C-n><C-w>j', {})
|
||||||
-- vim.keymap.set('t', '<C-M-k>', '<C-\\><C-n><C-w>k', {})
|
vim.keymap.set('t', '<C-M-k>', '<C-\\><C-n><C-w>k', {})
|
||||||
-- vim.keymap.set('t', '<C-M-l>', '<C-\\><C-n><C-w>l', {})
|
vim.keymap.set('t', '<C-M-l>', '<C-\\><C-n><C-w>l', {})
|
||||||
vim.keymap.set('n', '<leader>zm', '<C-W>_<C-W>|', { noremap = true, silent = true })
|
vim.keymap.set('n', '<leader>zm', '<C-W>_<C-W>|', { noremap = true, silent = true })
|
||||||
vim.keymap.set('n', '<C-M-Y>', '<C-w>5<', {})
|
vim.keymap.set('n', '<C-M-Y>', '<C-w>5<', {})
|
||||||
vim.keymap.set('n', '<C-M-U>', '<C-w>5+', {})
|
vim.keymap.set('n', '<C-M-U>', '<C-w>5+', {})
|
||||||
@@ -123,48 +123,9 @@ vim.keymap.set('n', "<leader>dr", function() require("dap").repl.toggle() end)
|
|||||||
vim.keymap.set('n', "<leader>ds", function() require("dap").session() end)
|
vim.keymap.set('n', "<leader>ds", function() require("dap").session() end)
|
||||||
vim.keymap.set('n', "<leader>dt", function() require("dap").terminate() end)
|
vim.keymap.set('n', "<leader>dt", function() require("dap").terminate() end)
|
||||||
vim.keymap.set('n', "<leader>dw", function() require("dap.ui.widgets").hover() end)
|
vim.keymap.set('n', "<leader>dw", function() require("dap.ui.widgets").hover() end)
|
||||||
vim.keymap.set('n', "<leader>dv", function() require("dap-view").toggle() end)
|
|
||||||
|
|
||||||
vim.keymap.set('n', "<F5>", function() require("dap").continue() end)
|
vim.keymap.set('n', "<F5>", function() require("dap").continue() end)
|
||||||
vim.keymap.set('n', "<F2>", function() require("dap").step_into() end)
|
vim.keymap.set('n', "<F11>", function() require("dap").step_into() end)
|
||||||
vim.keymap.set('n', "<F1>", function() require("dap").step_over() end)
|
vim.keymap.set('n', "<F10>", function() require("dap").step_over() end)
|
||||||
vim.keymap.set('n', "<F3>", function() require("dap").step_out() end)
|
vim.keymap.set('n', "<F12>", function() require("dap").step_out() end)
|
||||||
|
|
||||||
|
|
||||||
-- Tmux Navigator
|
|
||||||
vim.g.tmux_navigator_no_mappings = 1
|
|
||||||
|
|
||||||
local function tmux_navigate(direction)
|
|
||||||
local old_win = vim.api.nvim_get_current_win()
|
|
||||||
vim.cmd('wincmd ' .. direction)
|
|
||||||
local new_win = vim.api.nvim_get_current_win()
|
|
||||||
|
|
||||||
if old_win == new_win then
|
|
||||||
-- We are at the edge, let tmux handle it
|
|
||||||
-- This requires the tmux config to be set up to handle these keys when not in vim,
|
|
||||||
-- BUT since we are IN vim, we need to explicitly trigger the tmux action.
|
|
||||||
-- However, simply sending the key to tmux might just send it back to vim if we aren't careful,
|
|
||||||
-- or we can just run the tmux command directly.
|
|
||||||
|
|
||||||
local tmux_cmd = ""
|
|
||||||
if direction == 'h' then
|
|
||||||
tmux_cmd = 'if -F "#{pane_at_left}" "previous-window" "select-pane -L"'
|
|
||||||
elseif direction == 'j' then
|
|
||||||
tmux_cmd = 'if -F "#{pane_at_bottom}" "switch-client -n" "select-pane -D"'
|
|
||||||
elseif direction == 'k' then
|
|
||||||
tmux_cmd = 'if -F "#{pane_at_top}" "switch-client -p" "select-pane -U"'
|
|
||||||
elseif direction == 'l' then
|
|
||||||
tmux_cmd = 'if -F "#{pane_at_right}" "next-window" "select-pane -R"'
|
|
||||||
end
|
|
||||||
|
|
||||||
-- We use vim.fn.system to execute the tmux command
|
|
||||||
-- We need to wrap the command in 'tmux' call
|
|
||||||
vim.fn.system('tmux ' .. tmux_cmd)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<C-M-h>', function() tmux_navigate('h') end)
|
|
||||||
vim.keymap.set('n', '<C-M-j>', function() tmux_navigate('j') end)
|
|
||||||
vim.keymap.set('n', '<C-M-k>', function() tmux_navigate('k') end)
|
|
||||||
vim.keymap.set('n', '<C-M-l>', function() tmux_navigate('l') end)
|
|
||||||
|
|
||||||
@@ -10,6 +10,10 @@ require('mini.move').setup()
|
|||||||
require('flash').setup()
|
require('flash').setup()
|
||||||
require('ts-comments').setup()
|
require('ts-comments').setup()
|
||||||
|
|
||||||
|
local function is_wsl_env()
|
||||||
|
return os.getenv("WSL_DISTRO_NAME") ~= nil or os.getenv("WSL_INTEROP") ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
vim.g.tagbar_left=1
|
vim.g.tagbar_left=1
|
||||||
vim.g.tagbar_autoclose=1
|
vim.g.tagbar_autoclose=1
|
||||||
vim.g.tagbar_autofocus=1
|
vim.g.tagbar_autofocus=1
|
||||||
@@ -134,6 +138,10 @@ cmp.setup.cmdline(':', {
|
|||||||
})
|
})
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
-- lspconfig.svelte.setup({ capabilities = capabilities })
|
||||||
|
-- lspconfig.flow.setup({ capabilities = capabilities })
|
||||||
|
-- lspconfig.nil_ls.setup({ capabilities = capabilities })
|
||||||
|
|
||||||
capabilities.textDocument.foldingRange = {
|
capabilities.textDocument.foldingRange = {
|
||||||
dynamicRegistration = false,
|
dynamicRegistration = false,
|
||||||
@@ -142,13 +150,11 @@ capabilities.textDocument.foldingRange = {
|
|||||||
|
|
||||||
local language_servers = vim.lsp.get_clients() -- or list servers manually like {'gopls', 'clangd'}
|
local language_servers = vim.lsp.get_clients() -- or list servers manually like {'gopls', 'clangd'}
|
||||||
for _, ls in ipairs(language_servers) do
|
for _, ls in ipairs(language_servers) do
|
||||||
if ls ~= nil then
|
require('lspconfig')[ls].setup({
|
||||||
vim.lsp.config(ls).setup({
|
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
-- you can add other fields for setting up lsp server in this table
|
-- you can add other fields for setting up lsp server in this table
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
|
||||||
require('ufo').setup()
|
require('ufo').setup()
|
||||||
|
|
||||||
require("yanky").setup({
|
require("yanky").setup({
|
||||||
@@ -177,27 +183,27 @@ require("telescope").setup {
|
|||||||
require("telescope").load_extension("ui-select")
|
require("telescope").load_extension("ui-select")
|
||||||
require("telescope").load_extension("yank_history")
|
require("telescope").load_extension("yank_history")
|
||||||
|
|
||||||
-- require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
-- -- ensure_installed = { "lua", "vim", "help" },
|
-- ensure_installed = { "lua", "vim", "help" },
|
||||||
-- ensure_installed = {},
|
ensure_installed = {},
|
||||||
-- sync_install = false,
|
sync_install = false,
|
||||||
-- auto_install = false,
|
auto_install = false,
|
||||||
--
|
|
||||||
--
|
|
||||||
-- highlight = {
|
highlight = {
|
||||||
-- enable = true,
|
enable = true,
|
||||||
--
|
|
||||||
-- disable = function(lang, buf)
|
disable = function(lang, buf)
|
||||||
-- local max_filesize = 100 * 1024 -- 100 KB
|
local max_filesize = 100 * 1024 -- 100 KB
|
||||||
-- local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||||
-- if ok and stats and stats.size > max_filesize then
|
if ok and stats and stats.size > max_filesize then
|
||||||
-- return true
|
return true
|
||||||
-- end
|
end
|
||||||
-- end,
|
end,
|
||||||
--
|
|
||||||
-- additional_vim_regex_highlighting = false,
|
additional_vim_regex_highlighting = false,
|
||||||
-- },
|
},
|
||||||
-- }
|
}
|
||||||
|
|
||||||
require('lualine').setup({
|
require('lualine').setup({
|
||||||
options = {
|
options = {
|
||||||
@@ -337,10 +343,10 @@ require('lint').linters_by_ft = {
|
|||||||
require("trouble").setup()
|
require("trouble").setup()
|
||||||
require("todo-comments").setup()
|
require("todo-comments").setup()
|
||||||
|
|
||||||
require("dap-view").setup()
|
require("dapui").setup()
|
||||||
require("nvim-dap-virtual-text").setup()
|
require("nvim-dap-virtual-text").setup()
|
||||||
|
|
||||||
local dap, dapui = require("dap"), require("dap-view")
|
local dap, dapui = require("dap"), require("dapui")
|
||||||
dap.listeners.before.attach.dapui_config = function()
|
dap.listeners.before.attach.dapui_config = function()
|
||||||
dapui.open()
|
dapui.open()
|
||||||
end
|
end
|
||||||
@@ -363,21 +369,21 @@ dap.adapters.codelldb = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- dap.configurations.zig = {
|
dap.configurations.zig = {
|
||||||
-- {
|
{
|
||||||
-- name = "Launch Zig Program",
|
name = "Launch Zig Program",
|
||||||
-- type = "codelldb",
|
type = "codelldb",
|
||||||
-- request = "launch",
|
request = "launch",
|
||||||
-- program = function()
|
program = function()
|
||||||
-- -- Prompts for the executable path when you start debugging
|
-- Prompts for the executable path when you start debugging
|
||||||
-- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/zig-out/bin/', 'file')
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/zig-out/bin/', 'file')
|
||||||
-- end,
|
end,
|
||||||
-- cwd = "${workspaceFolder}",
|
cwd = "${workspaceFolder}",
|
||||||
-- stopOnEntry = false,
|
stopOnEntry = false,
|
||||||
-- },
|
},
|
||||||
-- }
|
}
|
||||||
|
|
||||||
if _G.is_mac then
|
if vim.fn.has("mac") then
|
||||||
workspaces = {
|
workspaces = {
|
||||||
{
|
{
|
||||||
name = "privat",
|
name = "privat",
|
||||||
@@ -396,7 +402,7 @@ if _G.is_mac then
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
if _G.is_work then
|
if is_wsl_env() then
|
||||||
workspaces = {
|
workspaces = {
|
||||||
{
|
{
|
||||||
name = "work",
|
name = "work",
|
||||||
@@ -410,16 +416,6 @@ if _G.is_work then
|
|||||||
daily_notes = {}
|
daily_notes = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
if _G.is_private_nixos then
|
|
||||||
workspaces = {
|
|
||||||
{
|
|
||||||
name = "tech",
|
|
||||||
path = "~/notes",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
daily_notes = {}
|
|
||||||
end
|
|
||||||
|
|
||||||
require("obsidian").setup({
|
require("obsidian").setup({
|
||||||
workspaces = workspaces,
|
workspaces = workspaces,
|
||||||
templates = {
|
templates = {
|
||||||
@@ -427,12 +423,18 @@ require("obsidian").setup({
|
|||||||
date_format = "%Y-%m-%d %a",
|
date_format = "%Y-%m-%d %a",
|
||||||
time_format = "%H:%M",
|
time_format = "%H:%M",
|
||||||
},
|
},
|
||||||
checkbox = {
|
ui = {
|
||||||
order = { " ", ">", "x", "!", "~" },
|
checkboxes = {
|
||||||
|
[" "] = { char = "", hl_group = "ObsidianTodo" },
|
||||||
|
[">"] = { char = "", hl_group = "ObsidianRightArrow" },
|
||||||
|
["x"] = { char = "", hl_group = "ObsidianDone" },
|
||||||
|
["~"] = { char = "", hl_group = "ObsidianTilde" },
|
||||||
|
["!"] = { char = "", hl_group = "ObsidianImportant" },
|
||||||
|
["?"] = { char = "?", hl_group = "ObsidianImportant" }
|
||||||
},
|
},
|
||||||
frontmatter = {
|
},
|
||||||
enabled = true,
|
disable_frontmatter = false,
|
||||||
func = function(note)
|
note_frontmatter_func = function(note)
|
||||||
-- Add the title of the note as an alias.
|
-- Add the title of the note as an alias.
|
||||||
if note.title then
|
if note.title then
|
||||||
note:add_alias(note.title)
|
note:add_alias(note.title)
|
||||||
@@ -448,13 +450,11 @@ require("obsidian").setup({
|
|||||||
|
|
||||||
return out
|
return out
|
||||||
end,
|
end,
|
||||||
},
|
|
||||||
note_path_func = function(spec)
|
note_path_func = function(spec)
|
||||||
local path = spec.dir / spec.title
|
local path = spec.dir / spec.title
|
||||||
return path:with_suffix(".md")
|
return path:with_suffix(".md")
|
||||||
end,
|
end,
|
||||||
daily_notes = daily_notes,
|
daily_notes = daily_notes,
|
||||||
legacy_commands = false,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
require('render-markdown').setup({
|
require('render-markdown').setup({
|
||||||
@@ -462,25 +462,4 @@ require('render-markdown').setup({
|
|||||||
file_types = { 'markdown'},
|
file_types = { 'markdown'},
|
||||||
completions = { lsp = { enabled = true } },
|
completions = { lsp = { enabled = true } },
|
||||||
render_modes = { 'n', 'c', 't' },
|
render_modes = { 'n', 'c', 't' },
|
||||||
checkbox = {
|
|
||||||
enabled = true,
|
|
||||||
render_modes = false,
|
|
||||||
bullet = false,
|
|
||||||
right_pad = 1,
|
|
||||||
unchecked = {
|
|
||||||
icon = ' ',
|
|
||||||
highlight = 'RenderMarkdownUnchecked',
|
|
||||||
scope_highlight = nil,
|
|
||||||
},
|
|
||||||
checked = {
|
|
||||||
icon = ' ',
|
|
||||||
highlight = 'RenderMarkdownChecked',
|
|
||||||
scope_highlight = nil,
|
|
||||||
},
|
|
||||||
custom = {
|
|
||||||
next = { raw = '[!]', rendered = ' ', highlight = 'RenderMarkdownNext', scope_highlight = nil },
|
|
||||||
ongoing = { raw = '[>]', rendered = '▶ ', highlight = 'RenderMarkdownOngoing', scope_highlight = nil },
|
|
||||||
waiting = { raw = '[~]', rendered = ' ', highlight = 'RenderMarkdownWaiting', scope_highlight = nil },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
keys:
|
|
||||||
- &macbook age1hmgy68ukugduef75ev72jnpu77ff3lajadpf7u0zv3ex4nt7f5qs5nxx2l
|
|
||||||
- &macnix age1yez9q5q94kt99d9q8eqgqrkz7djmk3kwsqdjp7ww7e0fquzjevpsjkk5x4
|
|
||||||
- &worknix age1wufdcd234uw69lcw6gtv9r5zfz7h5tvu0fzcg5d8tn67yx6pv47sary4q2
|
|
||||||
|
|
||||||
creation_rules:
|
|
||||||
- path_regex: secrets\.yaml$
|
|
||||||
key_groups:
|
|
||||||
- age:
|
|
||||||
- *macbook
|
|
||||||
- *macnix
|
|
||||||
- *worknix
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
langdock_api_key: ENC[AES256_GCM,data:9CTt73dQowcjIdjQoPMjsmGeIgV0nyHZxePOwak/m09ePfu4Gb3gDC17wq9Hde5J9IqpEID73Kdo/DsGm9m765rPGQFxGwTo3MO5eZgXAQjFXQNNhYm+sug=,iv:TVuiMG/7HYjncK3oC8r5xYrnNGXFcrBrpq9OO+7plNY=,tag:EZqUOGYwTHcukDop8p/JBw==,type:str]
|
|
||||||
sops:
|
|
||||||
age:
|
|
||||||
- recipient: age1hmgy68ukugduef75ev72jnpu77ff3lajadpf7u0zv3ex4nt7f5qs5nxx2l
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJcTBpZ3BwNnVxVkFQQWgy
|
|
||||||
VWFsMFF0WGIzbTBFZ0htQ251dGlVdW5PckdNCmtldkZZL0Z3SER2OHZuUGdvNVpI
|
|
||||||
Vk1KS1ZYVzZXZGtUbTNtZnhPeStSTlUKLS0tICtXYTgxMHc0alBYUDAzcXVXcm9J
|
|
||||||
YjQrUGZaWmpaV2tGOXJmbGR5K3l1VFEK+bsmeV/PjYcSlsJz0ZQZ8U9EYSu8bTJM
|
|
||||||
BJ0T910cPudb/dkMrU9QSWUlBbOKk78ivKvDbwqPBfguSqU5GevLGg==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
- recipient: age1yez9q5q94kt99d9q8eqgqrkz7djmk3kwsqdjp7ww7e0fquzjevpsjkk5x4
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA3WXdEM2RORG56N3hVRGx5
|
|
||||||
NVZnWHY4TG5sRmdyQnJqVm4waUpoNGc4eFQ0CkNoanF3ZFRNQzQ5dHBST1BkSko0
|
|
||||||
cDAwYlBKVUZ3amJrcDJHcTloaXIwcWsKLS0tIDlMa0dqNmJvMjZZSVBPWjJncGlK
|
|
||||||
Q3F3cHFoWC9Ga0Q4S3VqQ1psRjZZUmsK7+d9wMgC27xaOu1CLX8YbG8BbJdYhLLg
|
|
||||||
dc8RHujixqkvheiv9syzCNF0z6Oc2qT5Vw2v7gCZ1SPgomOf3oHNHQ==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
- recipient: age1wufdcd234uw69lcw6gtv9r5zfz7h5tvu0fzcg5d8tn67yx6pv47sary4q2
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpWjdzMWpCemJJR2FvUjJ2
|
|
||||||
b0hraEVBWDdJeG9JRFpLYm5XV1FDUDFMeFdnCktwRElvTmoyZmpPQ3VjbldXVHo4
|
|
||||||
SmpjQlRPK2o3YnNLMklyMnVwWERtb28KLS0tIDNjcGJhMkR1bCtBWUV1WU5TZjVR
|
|
||||||
YjBrekY4Y2JSczBEQ3BObjhKZkhYc3MKMrGlO/w7Hvp23rpL71/XDsJDcbc3t73C
|
|
||||||
iXdD2Oc9V5g5Jz3H7mkaAlNRg8u+LwGXYdwZiG7NWSyQnARPgeMBwQ==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
lastmodified: "2026-02-10T21:55:05Z"
|
|
||||||
mac: ENC[AES256_GCM,data:Qmwba0kQ8uzz72UbkVx+41i+iFtjI07nRLkYI9+G3TNCDVcWSFdPXCjWxdozU1jTOYyt9EZpP5x+5DLRCbNIlsKpClMvVGwAbu8XKvqQoF5Ao4PXOFNg6hyWTPjoVDLHkEaykpgpg1fr29CHUDkyyFGniQ+Slv5LAndAx+ncTAA=,iv:ehZZi7DUlYlGcBMgV25h+cew/amgbH2tKFMr7jaNw/U=,tag:ag2vcgc29Dlx+QI8qju/LQ==,type:str]
|
|
||||||
unencrypted_suffix: _unencrypted
|
|
||||||
version: 3.11.0
|
|
||||||
Reference in New Issue
Block a user