1

Compare commits

..

157 Commits

Author SHA1 Message Date
d0e6fe072a Home/Darwinix: Disable keychain 2026-03-21 14:34:13 +01:00
86ea11c8e8 Modules/Fish: Add darwin rebuild abbr 2026-03-21 14:34:06 +01:00
1adacf5e1e Home/Darwinix: Add programs 2026-03-21 14:18:23 +01:00
e53787deae Modules/Fish: Update for nix-darwin 2026-03-21 14:18:10 +01:00
efce5c6293 Home/Darwinix: Add packages 2026-03-21 14:06:55 +01:00
6069a12e64 Modules/Neovim: Update for nix-darwin 2026-03-21 14:01:01 +01:00
91bd79a051 Modules/Kitty: Update for nix-darwin 2026-03-21 13:56:24 +01:00
9bec5f42b1 Modules/Fish: Update for nix-darwin 2026-03-21 13:44:12 +01:00
602aa4cd56 Initialize nix-darwin config for darwinix 2026-03-21 13:28:25 +01:00
3573a705af Home: Disable rofi 2026-03-21 11:49:04 +01:00
615d886a98 Update screenshots 2026-03-21 11:22:51 +01:00
4416f39f0c Modules/Niri: Enable dunst 2026-03-21 11:21:02 +01:00
0bb481c037 Modules/Niri: Use waypaper with swww backend instead of swaybg 2026-03-21 10:59:19 +01:00
98a3788f4f Modules/Niri: Add wallpaper switcher keybindings 2026-03-21 01:45:07 +01:00
ac4b005f9b Add wallpapers 2026-03-21 01:41:42 +01:00
901f58a527 Modules/Niri: Set wallpaper 2026-03-20 22:58:05 +01:00
9a5bc3e981 Modules/Niri: Add session command menu 2026-03-20 22:47:08 +01:00
fe69d39769 Lib/Rofi: Allow supplying a dmenu command for mkSimpleMenu 2026-03-20 22:46:58 +01:00
2f675e96f0 Modules/Niri: Theme walker 2026-03-20 22:24:00 +01:00
56512194ef Modules/Waybar: Update module configurations 2026-03-20 21:41:02 +01:00
d1a6aafed5 Modules/Waybar: Make option accept list of outputs instead of single 2026-03-20 20:00:12 +01:00
6305d9ca2e Modules/Niri: Replace kde polkit agent with gnome's + fix waybar rounded corner clipping 2026-03-20 19:52:35 +01:00
887f7db0c7 Modules/Waybar: Align waybar with current colorscheme 2026-03-20 19:51:18 +01:00
d8dbdbc5de Modules/Neovim: Add tombi toml formatter 2026-03-20 19:50:44 +01:00
4014ed0318 Modules/Niri: Disable DMS (slow af) 2026-03-20 19:25:28 +01:00
87fa954937 Modules/Firefox: Fix search engine typo 2026-03-20 17:10:53 +01:00
934644c5e2 Modules/Niri: Update gtk theme + fix flatpak themes 2026-03-20 17:10:43 +01:00
0bda035ccd Modules/Hyprland: Deprecate hyprland module 2026-03-20 14:08:51 +01:00
6e999ffa02 Modules/Fish: Update abbrs 2026-03-20 10:32:12 +01:00
807388d032 Home: Add exiftool 2026-03-20 09:35:06 +01:00
9b1a7c73e6 Modules/Niri: Update gtk theme 2026-03-19 23:57:52 +01:00
da729f8c22 Services/ComfyUI: Update root directory 2026-03-19 23:57:43 +01:00
d08d795adf System/Nixinator: Add two additional disks to system (disko, luks) 2026-03-19 23:57:32 +01:00
ffc2516353 Home/Nixinator: Add hytale + steam 2026-03-19 23:57:05 +01:00
135e1e5701 Services/ComfyUI: Init at v2026-03-16 2026-03-19 17:43:22 +01:00
5b2fc78889 Services/FileFlows: Don't autostart nixinator node 2026-03-19 17:37:19 +01:00
4cbe9885b2 Home: Remove old ollama config 2026-03-19 17:32:15 +01:00
9b43074248 Home: Add mars database port forward 2026-03-19 10:29:55 +01:00
be3f6baa17 Home/Nixinator: Use ghidra option instead of package 2026-03-19 10:29:43 +01:00
837233b552 Modules/Firefox: Update search engines 2026-03-17 18:16:41 +01:00
ca0c718f3b Modules/Firefox: Update HM Search bookmark url 2026-03-17 18:16:34 +01:00
3c68574aea Home: Add resultbrowser ssh port forward to mars host 2026-03-17 18:16:21 +01:00
aa668d04d3 Modules/Impermanence: Persist ghidra config 2026-03-13 01:10:04 +01:00
d16b645078 System/Nixinator: Disable restic backup service (broken) 2026-03-13 00:55:35 +01:00
b71264b864 Home/Nixinator: Add ghidra 2026-03-13 00:47:33 +01:00
6ed1882429 System/Nixinator: Open FAIL* port 1111 2026-03-12 20:25:54 +01:00
952802d4f7 Modules/Neovim: Don't use cursive script front in neovide 2026-03-12 20:25:44 +01:00
53fc6eedc8 Flake: Update lock 2026-03-12 20:25:25 +01:00
2e0f378c9e Modules/Neovim: Fix just-lsp configuration 2026-03-12 09:31:01 +01:00
abab1cf2b4 Modules/Neovim: Fix persisted mappings 2026-03-12 09:28:26 +01:00
ad3210f150 Home: Add wl-clipboard 2026-03-11 21:05:29 +01:00
afe74b8fa1 Config/Flake: Update flake template 2026-03-11 21:05:21 +01:00
8f5a9d753f Services/Fileflows: Update to v26.01 2026-03-11 12:30:56 +01:00
d45a9946bb Modules/Impermanence: Persist man cache 2026-03-09 22:48:36 +01:00
c0f8356205 Home: Add binsider/jujutsu/lurk/radare2 2026-03-09 21:42:09 +01:00
72a8dcb8d5 System: Rename man cache option 2026-03-09 12:16:37 +01:00
da548f10bb Home/Nixtop: Replace light with brightnessctl 2026-03-09 12:16:27 +01:00
9bfbbc0dc9 Home: Replace helvum with crosspipe 2026-03-09 12:16:04 +01:00
26ac3a8e02 Home/Nixtop: Replace light with brightnessctl 2026-03-09 12:15:56 +01:00
632fcc3dab Derivations/Tiddl: Add typer typing-extensions build input 2026-03-09 12:15:45 +01:00
a204951964 Flake: Update lock 2026-03-09 12:15:23 +01:00
9aea533693 Home: Update CLion EAP version + masssprings version 2026-03-06 22:15:09 +01:00
a07499813d Home: Add masssprings 2026-03-05 10:28:56 +01:00
6e2a64a50c Home: Pregenerate keepassxc session config 2026-03-05 10:28:26 +01:00
80d932838f Overlays: Upgrade clion to 2026.1-EAP 2026-03-01 22:37:01 +01:00
4bed2e7021 Modules/Fish: Add nix run abbr 2026-03-01 22:36:50 +01:00
75ffcc5c6e Modules/Neovim: Update clangd launch arguments 2026-02-28 18:33:37 +01:00
cb14d79586 Modules/Neovim: Move trouble to bottom 2026-02-28 18:33:27 +01:00
9b41d5552e Modules/Impermanence: Persist jetbrains state 2026-02-28 11:26:20 +01:00
3d50b8fea7 Home: Add czkawka 2026-02-27 20:10:14 +01:00
5aec2aa971 Home/Nixinator: Add clion 2026-02-27 18:34:01 +01:00
b799d86823 Config/Flake: Add cross-compilation template 2026-02-27 12:19:31 +01:00
d505394753 Modules/Bootloader: Reduce configuration limit to 3 to fit in 512MB /boot partition 2026-02-27 12:19:21 +01:00
06cf86fa20 System/Nixinator: Move to linux stable with nvidia-open 2026-02-26 16:15:19 +01:00
a4272ea92c Modules/Niri: Disable DMS startup dialog 2026-02-26 16:14:53 +01:00
89739e3af0 Modules/Niri: Disable autostart of some apps 2026-02-26 00:17:26 +01:00
52a99db8e0 System/Nixinator: Enable 5 LUKS password retries 2026-02-26 00:17:14 +01:00
7848fb7274 System/Nixinator: Switch to vanilla linux kernel (doesn't work with nvidia-open currently) 2026-02-26 00:17:03 +01:00
397d1b014c Config/Flake: Update after xorg package set deprecation 2026-02-26 00:16:29 +01:00
7f1ce57994 Derivations/UnityHub: Update after xorg package set deprecation 2026-02-26 00:16:18 +01:00
a1f495f138 Modules/Niri: Disable dsearch 2026-02-23 13:48:30 +01:00
4e9003e0c5 Config/Flake: Provide devShells.default instead of devShell 2026-02-22 13:47:44 +01:00
380e11edb2 Modules/Niri: Add reset-window-height hotkey 2026-02-19 22:47:28 +01:00
a2153c4418 Modules/Niri: Update DMS config 2026-02-17 11:45:36 +01:00
abdcbe2ce9 Modules/Niri: Place blurred wallpaper in overview backdrop 2026-02-17 11:45:24 +01:00
fa286dce16 System/Nixinator: Mark /home as neededForBoot 2026-02-17 11:08:02 +01:00
c4454daab6 Modules/Firefox: Disable vdhcoapp 2026-02-17 11:07:54 +01:00
a03c9d8227 Flake: Update lock 2026-02-17 10:53:26 +01:00
9db5d91da6 Modules/Niri: Enable danksearch 2026-02-17 10:53:26 +01:00
72716230ea Modules/Neovim: Make clangd-extensions non-lazy 2026-02-17 10:53:26 +01:00
2919e797ed System: Harden SSHD and authorize key 2026-02-17 10:53:26 +01:00
86d669c2ab Modules/Niri: Add colorpicker widget to bar 2026-02-17 10:53:26 +01:00
77ac5b70b8 Services/Formula12: Init 2026-02-17 10:53:26 +01:00
54839be395 Config/Flake: Update pkgs.hiPrio to lib.hiPrio 2026-02-17 10:53:26 +01:00
714e3e0683 Config/Neovim: Add bundler script to generate portable neovim config 2026-02-10 18:11:01 +01:00
a8d7d1e666 Modules/Impermanence: Persist tiddl config 2026-02-10 14:54:51 +01:00
40bcc14304 Modules/Neovim: Add justfile support 2026-02-09 18:55:41 +01:00
fa5bd0eefd Modules/Neovim: Display whitespace in visual mode 2026-02-09 15:50:46 +01:00
6182ada581 Modules/Neovim: Add makefile formatter 2026-02-09 15:50:24 +01:00
4acddcec09 Modules/Firefox: Add godbolt bookmark 2026-02-09 14:00:05 +01:00
5c14817464 Config/Navi: Add tiddl cheat 2026-02-04 20:23:40 +01:00
38920bd3d7 Derivations/Tiddle: Add tiddl derivation 2026-02-04 20:16:54 +01:00
b89934d13f Services/Kiwix: Init kiwix at v3.8.1 2026-02-03 11:28:16 +01:00
734dfcadfc Services/Immich: Update to v2.5.2 2026-02-03 11:28:00 +01:00
2c959fdc0c Services/Nginx: Expose hytale port 2026-01-29 16:33:45 +01:00
e00c4f49f5 Modules/Impermanence: Persist jellyfin-tui settings 2026-01-26 13:44:42 +01:00
61131ca598 Home: Add jellyfin-tui 2026-01-26 13:44:34 +01:00
9c1a39d699 Modules/Firefox: Disable darkmode plugin 2026-01-26 13:19:43 +01:00
32de6e24b7 Modules/Neovim: Enable autotools-language-server 2026-01-25 23:01:07 +01:00
78e554cc30 Modules/Impermanence: Persist feishin config 2026-01-25 19:23:15 +01:00
f65617deed Home: Add feishing 2026-01-25 19:14:11 +01:00
aa3a881d58 Derivations/TidalDL: Fix derivation after original repo got nuked 2026-01-24 19:46:42 +01:00
7f99b73635 System/Nixinator: Enable IPv6 networking 2026-01-24 19:22:11 +01:00
c1360e5c2c System/ServeNix: Enable IPv6 networking 2026-01-24 02:05:37 +01:00
ca9e66bc35 System/ThinkNix: Enable IPv6 networking 2026-01-24 01:32:31 +01:00
eac705bdfb Modules/Docker: Enable IP forwarding + add IPv6 fallback dns 2026-01-24 01:32:14 +01:00
69beab4812 Lib/Networking: Accept router advertisements 2026-01-24 01:31:54 +01:00
515110ff7d Modules/Neovim: Enable nixd + alejandra also for headless 2026-01-24 01:31:42 +01:00
9a9bffd637 Home: Add gnumake 2026-01-19 12:07:38 +01:00
f1b269e3ee Modules/Impermanence: Persist /var/lib/docker 2026-01-18 21:51:44 +01:00
f09dee5ad8 Home/Nixinator: Add zed + vscode 2026-01-18 21:45:47 +01:00
f246eacdb3 Modules/Impermanence: Persist docker build cache, zed config, jellyfin-desktop config 2026-01-18 21:45:36 +01:00
b7e2bba8f0 Update systemmodules/homemodules paths to allow nixd to differentiate between the two 2026-01-18 15:47:51 +01:00
25ae0f4b85 System: Rename system/modules to system/systemmodules 2026-01-18 15:34:46 +01:00
d12b247368 Home: Rename home/modules to home/homemodules 2026-01-18 15:34:36 +01:00
25e9128875 System/Nixinator: Reenable restic backup with NFS "hard" 2026-01-18 14:01:30 +01:00
eee28f57fc System: Replace NFS mounts "soft" option with "hard" 2026-01-18 14:00:16 +01:00
ea03e2266f System/Nixinator: Disable restic until I figure out why the repo breaks all the time 2026-01-18 01:19:19 +01:00
5e422d05c9 System/Nixinator: Disable rootless docker 2026-01-18 01:19:04 +01:00
eaa36cfce2 Modules/Neovim: Update clangd options 2026-01-18 00:01:14 +01:00
572d0bfe9e Modules/Neovim: Update nvim-treesitter config after update 2026-01-17 23:46:34 +01:00
385ca27f8c Modules/Niri: Disable workspace scroll on focus change 2026-01-17 23:46:19 +01:00
4c18fd8c8e Modules/Niri: Update DMS configuration after update 2026-01-17 23:00:44 +01:00
bf0c55669c Derivations/TidalDL: Disable broken derivation for now 2026-01-17 21:59:22 +01:00
86a5e79079 System/Nixinator: Enable 16G swap 2026-01-17 21:58:24 +01:00
7d429a4720 Derivations/TidalDL: Update src after the original repository was removed (thank you anna) 2026-01-17 20:29:17 +01:00
2e9a4b13d1 System: Fix after update 2026-01-17 20:28:40 +01:00
73eeff9a0e Home: Fix after update 2026-01-17 20:28:34 +01:00
d216a8018d Flake: Update lock 2026-01-17 20:20:57 +01:00
b09d854e50 Home/Nixinator: Disable ollama 2026-01-17 20:20:31 +01:00
ff39dd1df2 Modules/Neovim: Rewrite clangd root_dir expression for neovim v0.11 2026-01-17 19:50:05 +01:00
98c520e0bd Services/FileFlows: Don't mount MusicVideos into nixinator node 2026-01-17 19:32:45 +01:00
7e3d3ca4a5 Modules/Impermanence: Persist user docker images/containers 2026-01-17 19:23:35 +01:00
c8a76751f3 System/Nixinator: Remove GAMES disk mount 2026-01-17 19:23:05 +01:00
12a10bee82 Home: Rename dankMaterialShell to dank-material-shell after flake update 2026-01-17 19:22:45 +01:00
767309885a Flake: Update lock 2026-01-17 19:22:45 +01:00
6d360ed782 System/Servenix: Mount nfs share for music videos/recorded shows 2026-01-05 18:02:51 +01:00
ddccd51b5a Services/Box: Update to v0.30.1 2026-01-05 18:02:51 +01:00
1fef42e5d4 Home: Disable hyprland bc it's too woke 2025-12-26 13:45:40 +01:00
0d20883f4f Home: Enable hyprland + niri depending on their system module state 2025-12-26 13:07:07 +01:00
cec5ec5493 Modules/Niri: Update DMS default config 2025-12-14 17:16:16 +01:00
5833dff19e Home: Disable hyprland 2025-12-14 16:14:14 +01:00
7b4c2df7af Modules/Hyprland: Update to current config format 2025-12-14 16:14:07 +01:00
1643f30906 System/Nixinator: Switch to Nvidia beta driver since stable is currently broken on kernel 6.18 2025-12-12 19:52:06 +01:00
79c617cc91 Flake: Update lock 2025-12-12 19:52:06 +01:00
474a8badf4 Modules/Niri: Init DankMaterialShell config 2025-12-12 19:52:06 +01:00
17368396cf Services/Box: Init at v0.29.3 2025-12-09 03:26:30 +01:00
111 changed files with 2325 additions and 3538 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 747 KiB

171
README.md
View File

@ -1,159 +1,42 @@
# NixFlake
# NixOS Configuration
NixOS flake with [Niri](https://github.com/niri-wm/niri), [Waybar](https://github.com/Alexays/Waybar) for a lightweight desktop and [home-manager](https://github.com/nix-community/home-manager) for declarative `~/` configuration.
Modular NixOS configuration, using [Niri](https://github.com/niri-wm/niri) and [Waybar](https://github.com/Alexays/Waybar) for a light desktop.
## Screenshots
![](FastFetch.png)
![Fastfetch](FastFetch.png)
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
Alternatively, use `nh os switch` or `nh os boot`.
![Neovim](NeoVim.png)
## NixFlake/system
![Darwin](Darwin.png)
Contains all the system configurations.
## Hosts
- There is a common configuration used for all systems: `NixFlake/system/default.nix`
- Every system has its own special configuration: `NixFlake/system/<hostname>/default.nix`
- System modules are located in `NixFlake/system/systemmodules`
- Hosted services are located in `NixFlake/system/services`
| Host | Type | GPU | Features |
|-|-|-|-|
| `nixinator` | Desktop (x86_64) | NVIDIA | [disko](https://github.com/nix-community/disko) partitioning, [lanzaboote](https://github.com/nix-community/lanzaboote) Secure Boot, [impermanence](https://github.com/nix-community/impermanence) opt-in state, [sops-nix](https://github.com/Mic92/sops-nix) secrets |
| `nixtop` | Laptop (x86_64) | Intel | Obsolete trash computer |
| `servenix` | Headless (x86_64) | NVIDIA | Jellyfin, Nextcloud, Gitea, ... |
| `thinknix` | Headless (x86_64) | - | AdGuard DNS, Nginx, ... |
| `darwinix` | macOS (aarch64) | - | nix-darwin with home-manager |
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
## Usage
## NixFlake/home
```bash
# Enter dev shell (provides helper utilities)
nix develop
Contains all the home-manager configurations.
# Rebuild system + user config together
nh os switch
nh os boot
- There is a common configuration for each user: `NixFlake/home/<username>/default.nix`
- There is a configuration for a single system of this user: `NixFlake/home/<username>/<hostname>/default.nix`
- Home-Manager modules are located in `NixFlake/home/homemodules`
# Or with nixos-rebuild
sudo nixos-rebuild switch --flake .#nixinator
```
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
## Info
## NixFlake/derivations
Home-manager runs as a NixOS module (not standalone). A single `nixos-rebuild switch` rebuilds both system and user configuration together.
Contains all the stuff I packaged.
Each derivation is loaded into `NixFlake/derivations/default.nix`.
### Components
## NixFlake/overlays
Per-host config consists of three layers:
1. **Common Config**: `system/default.nix` (NixOS) / `home/christoph/default.nix` (home-manager)
2. **Host Config**: `system/<hostname>/default.nix` (NixOS) / `home/christoph/<hostname>/default.nix` (home-manager)
3. **Hardware**: `system/<hostname>/hardware-configuration.nix`
### Modules
There are two module hierarchies (NixOS and home-manager modules):
```
system/systemmodules/<name>/ home/homemodules/<name>/
- options.nix # declares options - options.nix # declares options
- default.nix # implementation - default.nix # implementation
```
## Files
```
NixFlake/
├── flake.nix # flake entrypoint: inputs, outputs, host definitions
├── flake.lock # flake lockfile
├── shell.nix # dev shell (nix develop)
├── system/ # NixOS system configurations
│ ├── default.nix # global system defaults (all hosts)
│ ├── <hostname>/ # per-host overrides + hardware-config
│ ├── systemmodules/ # reusable system modules
│ └── services/ # OCI container services
├── home/ # home-manager user configuration
│ └── christoph/
│ ├── default.nix # global user defaults
│ ├── <hostname>/ # per-host user overrides
│ └── homemodules/ # reusable home-manager modules
├── lib/ # shared helpers
├── derivations/ # custom packages
├── overlays/ # package overrides
├── config/ # linked dotfiles
└── wallpapers/ # backgrounds
```
## System Modules
| Module | Description |
|--------|-------------|
| `bootloader` | systemd-boot, lanzaboote Secure Boot signing |
| `desktopportal` | xdg-desktop-portal backends (Niri, GTK) |
| `docker` | Docker / podman daemon config |
| `fonts` | System fonts and fontconfig |
| `impermanence` | Opt-in state persistence (wipes `/` on boot) |
| `mime` | MIME type associations |
| `network` | systemd-networkd wired/wireless config |
| `polkit` | Polkit rules for desktop users |
| `sops-nix` | Secrets decryption at boot |
## Home-Manager Modules
### Shell & Terminal
`fish` `terminal` `kitty` `tmux` `paths`
### Editors
`neovim` `vscode` `zed`
### Desktop / WM
`niri` `waybar` `rofi` `color` `fcitx`
### Media
`mpd` `rmpc` `cava` `beets` `jellyfin-tui`
### Browsers
`firefox` `qutebrowser`
### Tools
`git` `ssh` `bat` `btop` `fastfetch` `lazygit` `yazi` `zathura`
## Services
All server services run as OCI containers (podman). Each service is defined in `system/services/<name>.nix`.
| Service | Purpose |
|---------|---------|
| `adguard` | DNS ad blocking |
| `authelia` | SSO |
| `fileflows` | Media processing |
| `gitea` | Git server |
| `immich` | Photo cloud |
| `jellyfin` | Streaming server |
| `kiwix` | Offline mirrors |
| `kopia` | Docker volume backup |
| `nextcloud` | File sync |
| `nginx-proxy-manager` | Reverse proxy with Let's Encrypt |
| `ntfy` | Push notification server |
| `paperless` | Document management |
| `portainer` | Container status monitor |
| `teamspeak` | Voice chat server |
| `tinymediamanager` | Media metadata management |
## Overlays
Package modifications live in `overlays/default.nix`.
## Secrets
Secrets are managed with sops-nix. Public age keys are stored in `flake.nix` under `publicKeys`. Encrypted `.yaml`/`.json` files are referenced via `sops.secrets.<name>`. Decryption happens at activation time.
## Shared Helpers (`lib/`)
| File | Purpose |
|------|---------|
| `nixos.nix` | Host config builders (NixOS + darwin) |
| `modules.nix` | Option helpers |
| `networking.nix` | systemd-networkd config generators |
| `generators.nix` | Lua code generation |
| `containers.nix` | OCI container helpers for services |
| `color.nix` | Color utilities |
| `rofi.nix` | Rofi menu helpers |
Available to all modules as `mylib` (injected via special args).
Contains all overlays, e.g. package version overrides.
The `NixFlake/overlays/default.nix` imports all overlays and all derivations.
It is then imported by the top-level `NixFlake/flake.nix`, to make everything available to the system/home configurations.

View File

@ -98,65 +98,38 @@ rec {
buildDebug = mkBuildScript "Debug";
buildRelease = mkBuildScript "Release";
# Add project-local fish abbrs here
abbrs = {
# Use this to specify commands that should be ran after entering fish shell
initProjectShell = pkgs.writers.writeFish "init-shell.fish" ''
echo "Entering \"${description}\" environment..."
# Determine the project root, used e.g. in cmake scripts
set -g -x FLAKE_PROJECT_ROOT (git rev-parse --show-toplevel)
# Rust Bevy:
# build-release-windows = "CARGO_FEATURE_PURE=1 cargo xwin build --release --target x86_64-pc-windows-msvc";
# abbr -a build-release-windows "CARGO_FEATURE_PURE=1 cargo xwin build --release --target x86_64-pc-windows-msvc"
# C/C++:
# cmake-debug = "${cmakeDebug}";
# cmake-release = "${cmakeRelease}";
# build-debug = "${buildDebug}";
# build-release = "${buildRelease}";
# abbr -a cmake-debug "${cmakeDebug}"
# abbr -a cmake-release "${cmakeRelease}"
# abbr -a build-debug "${buildDebug}"
# abbr -a build-release "${buildRelease}"
# Clojure:
# clojure-deps = "deps-lock --lein";
# abbr -a clojure-deps "deps-lock --lein"
# Python:
# run = "python ./app/main.py";
# profile = "py-spy record -o profile.svg -- python ./app/main.py && firefox profile.svg";
# ptop = "py-spy top -- python ./app/main.py";
};
eraseAbbr = name: value: ''abbr --erase ${name} 2>/dev/null'';
createAbbr = name: value: ''abbr -a ${name} "${value}"'';
# This will be sourced by the global fish config if INIT_PROJECT_SHELL gets unset
unloadProjectShell = pkgs.writers.writeFish "unload-shell.fish" ''
echo "Unloading \"${description}\" environment..."
${builtins.concatStringsSep "\n" (lib.mapAttrsToList eraseAbbr abbrs)}
'';
# This will be sourced by the global fish config if INIT_PROJECT_SHELL gets set
initProjectShell = pkgs.writers.writeFish "init-shell.fish" ''
# Unload just in case, to not have redefinition errors
source ${unloadProjectShell}
echo "Sourcing \"${description}\" environment..."
${builtins.concatStringsSep "\n" (lib.mapAttrsToList createAbbr abbrs)}
# abbr -a run "python ./app/main.py"
# abbr -a profile "py-spy record -o profile.svg -- python ./app/main.py && firefox profile.svg"
# abbr -a ptop "py-spy top -- python ./app/main.py"
'';
in
builtins.concatStringsSep "\n" [
# Launch into pure fish shell
''
# Determine the project root, used e.g. in cmake scripts
export FLAKE_PROJECT_ROOT="$(git rev-parse --show-toplevel)"
# Can't do the "exec" with nix-direnv
# - The "exec fish" would call direnv again => Infinite loop
# - The shellHook is Bash/POSIX, so fish syntax doesn't work
# Use this for "nix develop" without direnv
# exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
# Use this for direnv without "nix develop"
export INIT_PROJECT_SHELL="${initProjectShell}"
export UNLOAD_PROJECT_SHELL="${unloadProjectShell}"
exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
''
# Qt: Launch into wrapped fish shell (direnv incompatible)
# Qt: Launch into wrapped fish shell
# https://nixos.org/manual/nixpkgs/stable/#sec-language-qt
# ''
# fishdir=$(mktemp -d)

View File

@ -238,11 +238,11 @@ $ mode: echo -e "--export \tExport public key\n--export-secret-keys\t
% sops
# Edit secrets.yaml
sops ~/NixFlake/system/systemmodules/sops-nix/secrets.yaml
sops ~/NixFlake/system/modules/sops-nix/secrets.yaml
% sops
# Rekey secrets.yaml
sops updatekeys ~/NixFlake/system/systemmodules/sops-nix/secrets.yaml
sops updatekeys ~/NixFlake/system/modules/sops-nix/secrets.yaml
% ssh
# Generate a new SSH key
@ -308,33 +308,27 @@ mkdir -p "<name>" && cd "<name>" && spotdl --client-id (cat /home/christoph/.sec
% ffmpeg
# Create a slow motion version of a video with interpolated/blended frames
ffmpeg -i <input> -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=<doublefps>',setpts=2*PTS" output.mp4
ffmpeg -i "<input>" -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=<doublefps>',setpts=2*PTS" output.mp4
$ input: eza -f -1
% ffmpeg
# Detect black bar dimensions automatically by looking at the first 10 frames
ffmpeg -i <input> -vframes 10 -vf cropdetect -f null -
ffmpeg -i "<input>" -vframes 10 -vf cropdetect -f null -
$ input: eza -f -1
% ffmpeg
# Preview video with applied crop settings
ffplay -vf crop=<width>:<height>:<x>:<y> <input>
ffplay -vf crop=<width>:<height>:<x>:<y> "<input>"
$ input: eza -f -1
% ffmpeg
# Re-encode the video with applied crop settings
ffmpeg -i <input> -vf crop=<width>:<height>:<x>:<y> -c:a copy output.mp4
ffmpeg -i "<input>" -vf crop=<width>:<height>:<x>:<y> -c:a copy output.mp4
$ input: eza -f -1
% ffmpeg
# Reencode and compress the video using the h265 codec
ffmpeg -i <input> -vcodec libx265 -crf <quality> out_<input>
$ input: eza -f -1
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"
% ffmpeg
# Reencode, compress and scale the video using the h265 codec
ffmpeg -i <input> -vcodec libx265 -crf <quality> -vf scale=<width>:-2,setsar=1:1 out_<input>
ffmpeg -i "<input>" -vcodec libx265 -crf <quality> "out_<input>"
$ input: eza -f -1
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"

View File

@ -1,10 +0,0 @@
.bordered-images img {
border-radius: var(--callout-radius);
/* border-style: solid; */
/* border-width: var(--callout-border-width); */
/* border-color: var(--color-purple-rgb); */
/* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); */
/* Background color so PNGs with transparent backgrounds don't look weird */
/* background-color: var(--background-secondary); */
}

View File

@ -1,5 +1,5 @@
.center-images img {
display: block !important;
margin-left: auto !important;
margin-right: auto !important;
img[alt*="center"] {
display: block;
margin-left: auto;
margin-right: auto;
}

View File

@ -1,4 +0,0 @@
.fullwidth-images img {
width: 100% !important;
height: auto !important;
}

View File

@ -1,5 +0,0 @@
.justify-text.cm-s-obsidian,
.justify-text.markdown-preview-view {
text-align: justify;
hyphens: auto;
}

View File

@ -34,12 +34,12 @@
in
pythonPkgs.buildPythonApplication rec {
pname = "tiddl";
version = "3.4.3";
version = "3.2.0";
format = "pyproject";
src = pythonPkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-45KHNS1IP59DsH8i2uQ7sua6T21vW/Yw1PQg55jzLGs=";
sha256 = "sha256-uLkGyIScYPqFgQdPAOYJDJG0jp+nDAwIl2kFkaJZFco=";
};
dontCheckRuntimeDeps = true;

275
flake.lock generated
View File

@ -60,11 +60,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1781164160,
"narHash": "sha256-dxo3aPnfaQJt9K/3NhgKfu2Q9B42z4d4Or9Izoug+68=",
"lastModified": 1773079031,
"narHash": "sha256-RvCzINnVISBT3d0F1DoIcQFbQsbRJISW9qZeKTzmNaA=",
"owner": "abenz1267",
"repo": "elephant",
"rev": "3296842820d04d5ec774afc7528492fcbb3c01f2",
"rev": "53afe39cef252010f7c55bd33c5bae6dd50dcf0c",
"type": "github"
},
"original": {
@ -96,6 +96,29 @@
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"nixpkgs": [
"textfox",
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1754512310,
"narHash": "sha256-gXE5lTYMOhpDJo+siLXW/3BzySPmLMD12GVB1QFVbyw=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "2008f9aa7a5ccde48bfc1de5a919be5898da09c2",
"type": "gitlab"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -170,11 +193,11 @@
]
},
"locked": {
"lastModified": 1778716662,
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=",
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github"
},
"original": {
@ -263,15 +286,12 @@
}
},
"hardware": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1781168557,
"narHash": "sha256-LOnLQ2tpYF9gqIDDr3+j3DbpJJr/QCH6zPRT2GzEUOE=",
"lastModified": 1772972630,
"narHash": "sha256-mUJxsNOrBMNOUJzN0pfdVJ1r2pxeqm9gI/yIKXzVVbk=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "6358ff76821101c178e3ab4919a62799bfe3652e",
"rev": "3966ce987e1a9a164205ac8259a5fe8a64528f72",
"type": "github"
},
"original": {
@ -287,11 +307,11 @@
]
},
"locked": {
"lastModified": 1781305496,
"narHash": "sha256-g8Vv4Qfc7n+lgov97REu3X6BeJtvYY0hlSUZR1GrGQQ=",
"lastModified": 1773332277,
"narHash": "sha256-1V+wRrZD9Sw12AQBUWk9CR+XhDZQ8q6yBE0S3Wjbd1M=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c87a39aa979acc4848016d2220c6238390d84779",
"rev": "4aeef1941f862fe3a70d1b8264b4e289358c2325",
"type": "github"
},
"original": {
@ -323,14 +343,14 @@
},
"hytale-launcher": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1781228795,
"narHash": "sha256-OSofuO5j7FLg2R7c9YQdK5epMqkQLucExcDNF7dqCMo=",
"lastModified": 1773947929,
"narHash": "sha256-flpkAPM3zpMpWoqvVkMTo3ptuBF0QKNi6Raa8rnIq7o=",
"owner": "JPyke3",
"repo": "hytale-launcher-nix",
"rev": "efe21e31eb63d6db1a104c14bbb437ae5d03f73b",
"rev": "a8d0a974b187f0997c03c23000dea552194edf39",
"type": "github"
},
"original": {
@ -342,7 +362,7 @@
"impermanence": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1769548169,
@ -392,11 +412,11 @@
]
},
"locked": {
"lastModified": 1776677689,
"narHash": "sha256-wzdMqyyNkEPEfuCqSTzaz3ikH3+Rm7oWILNcURNax34=",
"lastModified": 1773343116,
"narHash": "sha256-5wnd9z3atP264FMin5MNq4ZaOR/2SYYspFXw8cecrKA=",
"ref": "refs/heads/main",
"rev": "768d26aa3fe80949bd64f62d6c5b35455c8cb768",
"revCount": 140,
"rev": "6248c10a251c5f2628389b982919ba4a8125d71e",
"revCount": 139,
"type": "git",
"url": "https://gitea.local.chriphost.de/christoph/cpp-masssprings"
},
@ -408,7 +428,7 @@
"naersk": {
"inputs": {
"fenix": "fenix",
"nixpkgs": "nixpkgs_9"
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1763384566,
@ -436,11 +456,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1781234038,
"narHash": "sha256-jo4a47qDgsx1F1i0MtHZl12FfzqKJOES25vbm0ZUxeI=",
"lastModified": 1773329386,
"narHash": "sha256-Xoy4j0NKRrZEAkiFxtTKTsmtUumpvjh3ievyat00eA8=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "eb5789cba8d37802d330df5a13c691622c83121f",
"rev": "815e692569fbb01701770a49ad2fe942cec7f431",
"type": "github"
},
"original": {
@ -469,11 +489,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1780938415,
"narHash": "sha256-QHyIMGSbCQW8d5qbOrMsm6gem10bO3Au2YLa3alJfHo=",
"lastModified": 1773130184,
"narHash": "sha256-3bwx4WqCB06yfQIGB+OgIckOkEDyKxiTD5pOo4Xz2rI=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "6f1a2c5f0e8274223d4204b1f8d6f7f91538967e",
"rev": "b07bde3ee82dd73115e6b949e4f3f63695da35ea",
"type": "github"
},
"original": {
@ -486,14 +506,14 @@
"inputs": {
"flake-compat": "flake-compat_2",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_6"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1778849865,
"narHash": "sha256-HiVhuhD7Fvfje3iw4slmtcCckz/LbjLITa4g/iTEbw0=",
"lastModified": 1771150922,
"narHash": "sha256-+oQJun4CFDlOQRocbZpqQDj7agoy56/4ZjT1oUR7NOs=",
"owner": "thiagokokada",
"repo": "nix-alien",
"rev": "1bb49f5aea63e95a3cf9c4b91f9f1331fef7a52b",
"rev": "96045e886ba0dd45b27590e7c0c6e77bbb54033d",
"type": "github"
},
"original": {
@ -509,11 +529,11 @@
]
},
"locked": {
"lastModified": 1781242433,
"narHash": "sha256-bchLZZ3sRn740zyvD2icZSnNoTaanN0nw7l6fjVXO+E=",
"lastModified": 1773000227,
"narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "aabb2037edfc0f210723b72cd5f528aab5dd3f0b",
"rev": "da529ac9e46f25ed5616fd634079a5f3c579135f",
"type": "github"
},
"original": {
@ -547,11 +567,11 @@
]
},
"locked": {
"lastModified": 1778393439,
"narHash": "sha256-mOtQxUjtKaPHLeoLOY/YEDctmud1X9KwJr4kE1MJ3Wc=",
"lastModified": 1771130777,
"narHash": "sha256-UIKOwG0D9XVIJfNWg6+gENAvQP+7LO46eO0Jpe+ItJ0=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "01466c414c7357ae2ce32be4a272a7c69e94ab5f",
"rev": "efec7aaad8d43f8e5194df46a007456093c40f88",
"type": "github"
},
"original": {
@ -578,11 +598,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1780952837,
"narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=",
"lastModified": 1773222311,
"narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e820eb4a444b46a19b2e03e8dfd2359439ff30fe",
"rev": "0590cd39f728e129122770c029970378a79d076a",
"type": "github"
},
"original": {
@ -594,11 +614,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1780952837,
"narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=",
"lastModified": 1773814637,
"narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e820eb4a444b46a19b2e03e8dfd2359439ff30fe",
"rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96",
"type": "github"
},
"original": {
@ -608,22 +628,6 @@
"type": "github"
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1775710090,
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1764242076,
@ -642,24 +646,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1767892417,
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1781074563,
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
"lastModified": 1773821835,
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
"type": "github"
},
"original": {
@ -669,7 +660,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_4": {
"locked": {
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
@ -685,13 +676,13 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_5": {
"locked": {
"lastModified": 1778443072,
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
"lastModified": 1771008912,
"narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32",
"rev": "a82ccc39b39b621151d6732718e3e250109076fa",
"type": "github"
},
"original": {
@ -701,39 +692,23 @@
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1773122722,
"narHash": "sha256-FIqHByVqxCprNjor1NqF80F2QQoiiyqanNNefdlvOg4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "62dc67aa6a52b4364dd75994ec00b51fbf474e50",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1781074563,
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1780336545,
"narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4df1b885d76a54e1aa1a318f8d16fd6005b6401f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1752077645,
"narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=",
@ -749,18 +724,36 @@
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_8",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3"
},
"locked": {
"lastModified": 1781287460,
"narHash": "sha256-9hXtN4my7eBqHRVQ/t6FQZ4YqZ1KG6SsKSG4Hdtr+i0=",
"lastModified": 1772402258,
"narHash": "sha256-3DmCFOdmbkFML1/G9gj8Wb+rCCZFPOQtNoMCpqOF8SA=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "f2029d9a26266eb67f46b0c79bd0a3713839a57a",
"rev": "21ae25e13b01d3b4cdc750b5f9e7bad68b150c10",
"type": "github"
},
"original": {
@ -800,11 +793,11 @@
]
},
"locked": {
"lastModified": 1781349989,
"narHash": "sha256-PTgbtYdDqSzfANBCI8g0iA5DdMGr5imJuWUH1w0RmWY=",
"lastModified": 1773339783,
"narHash": "sha256-07iRHomuUvJ7Mmp+F7qo68xIb+y3gy0o/B7kuR1K2Qc=",
"owner": "nix-community",
"repo": "NUR",
"rev": "6b2f93e70e526d09559f73dfc3760d489a5504bf",
"rev": "1a4ca0d650fbfd4c58e1b1c2b153151fec77d6b2",
"type": "github"
},
"original": {
@ -854,7 +847,7 @@
"nix-alien": "nix-alien",
"nix-darwin": "nix-darwin",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_7",
"nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable_2",
"nixvim": "nixvim",
"nps": "nps",
@ -909,11 +902,11 @@
]
},
"locked": {
"lastModified": 1780547341,
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=",
"lastModified": 1773096132,
"narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a",
"rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784",
"type": "github"
},
"original": {
@ -954,16 +947,15 @@
},
"systems_3": {
"locked": {
"lastModified": 1774449309,
"narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=",
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "c29398b59d2048c4ab79345812849c9bd15e9150",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"ref": "future-26.11",
"repo": "default",
"type": "github"
}
@ -1000,16 +992,17 @@
},
"textfox": {
"inputs": {
"firefox-addons": "firefox-addons",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1780405768,
"narHash": "sha256-WhPHaupeq5yWP53anFH6vr/ZMQQtAYGtpgUhzqWx9Ws=",
"lastModified": 1773044834,
"narHash": "sha256-R2u3z09DuUbSoWClASPUqKXQG/QZYlBsiy8vYXrJ2VU=",
"owner": "adriankarlen",
"repo": "textfox",
"rev": "d6895da75f10fa17f1b637759aec3d84818b20e2",
"rev": "0b8873d30db55a94e9e0dd934405dcac5e4d8a73",
"type": "github"
},
"original": {
@ -1023,15 +1016,15 @@
"elephant": [
"elephant"
],
"nixpkgs": "nixpkgs_10",
"nixpkgs": "nixpkgs_8",
"systems": "systems_5"
},
"locked": {
"lastModified": 1781164128,
"narHash": "sha256-xPcYrHdDXWykIi5/XXkLvliBArRnfzvs+atB9El1qhI=",
"lastModified": 1773675699,
"narHash": "sha256-GrormZ2KxchtCLuO90+5fioEQmlUCKBIil0Mzr9w0Iw=",
"owner": "abenz1267",
"repo": "walker",
"rev": "aa1e4b7d59237e8c43dde58636bae476f23d9bfb",
"rev": "d2702235710da3d7daf55c912ca7534261cf20f5",
"type": "github"
},
"original": {
@ -1060,11 +1053,11 @@
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1781226823,
"narHash": "sha256-28696iIw8uE0ZUyFTtzhEM8xMh85clCYypMxkvUi+sc=",
"lastModified": 1772429643,
"narHash": "sha256-M+bAeCCcjBnVk6w/4dIVvXvpJwOKnXjwi/lDbaN6Yws=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "8575d0ef55d70f9b4c46b6bffb3accf912217e1e",
"rev": "10f985b84cdbcc3bbf35b3e7e43d1b2a84fa9ce2",
"type": "github"
},
"original": {

View File

@ -64,7 +64,7 @@
# NeoVim <3
nixvim.url = "github:nix-community/nixvim";
# nixvim.inputs.nixpkgs.follows = "nixpkgs";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
# Emacs nightly
# emacs-overlay.url = "github:nix-community/emacs-overlay";
@ -78,10 +78,6 @@
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
# nix-flatpak.inputs.nixpkgs.follows = "nixpkgs"; # nix-flatpak doesn't have this
# Instant Direnv (load environment in background)
# direnv-instant.url = "github:Mic92/direnv-instant";
# direnv-instant.inputs.nixpkgs.follows = "nixpkgs";
# Realtime audio
# musnix.url = "github:musnix/musnix";
# musnix.inputs.nixpkgs.follows = "nixpkgs";
@ -142,6 +138,7 @@
inputs.nur.overlays.default
inputs.niri.overlays.niri
# inputs.emacs-overlay.overlay
# inputs.comfyui-nix.overlays.default
# All my own overlays (derivations + modifications)
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
@ -155,17 +152,7 @@
config.allowUnfree = true;
config.allowUnfreePredicate = pkg: true;
overlays = let
pkgs-stable = import inputs.nixpkgs-stable {
system = darwinSystem;
config.allowUnfree = true;
config.allowUnfreePredicate = pkg: true;
};
in [
# All my own overlays (derivations + modifications)
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
];
overlays = [];
};
# My own library functions are imported here.
@ -224,9 +211,7 @@
hostname = "darwinix";
username = "christoph";
headless = false;
extraModules = [
inputs.sops-nix.darwinModules.sops
];
extraModules = [];
};
};
@ -252,6 +237,8 @@
extraModules =
[
inputs.disko.nixosModules.disko
# inputs.nixified-ai.nixosModules.comfyui
# inputs.comfyui-nix.nixosModules.default
]
++ commonModules;
};

View File

@ -8,7 +8,9 @@
inputs,
...
}: {
config = {
config = let
inherit (config.homemodules) color;
in {
paths = rec {
nixflake = "${config.home.homeDirectory}/NixFlake";
dotfiles = "${nixflake}/config";
@ -25,8 +27,26 @@
font = "MonoLisa Alt Script";
};
packages.enable = true;
terminal.enable = true;
fish.enable = true;
git = {
enable = true;
userName = "Christoph Urlacher";
userEmail = "christoph.urlacher@protonmail.com";
signCommits = true;
};
kitty.enable = true;
lazygit.enable = true;
neovim = {
enable = true;
alias = true;
neovide = true;
};
yazi.enable = true;
};
home = {
@ -35,20 +55,376 @@
homeDirectory = "/Users/${config.home.username}";
enableNixpkgsReleaseCheck = true;
sessionVariables = {
LANG = "en_US.UTF-8";
EDITOR = "nvim";
MANPAGER = "nvim +Man!";
TERMINAL = "kitty";
};
packages = with pkgs; [
(ripgrep.override {withPCRE2 = true;})
gdu
duf
sd
fclones
tealdeer
killall
atool
exiftool
ouch
ffmpegthumbnailer
mediainfo
file
unrar
p7zip
unzip
progress
tokei
nix-search-tv
nix-tree
just
# packages = with pkgs; []; # Configured in homemodules/packages
ffmpeg-full
imagemagick
poppler-utils
pdf2svg
pandoc
dig
tcpdump
traceroute
gping
curlie
wget
doggo
rsync
rclone
httpie
inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default
cachix
# GUI
ripdrag
jellyfin-tui
];
stateVersion = "25.11";
};
programs = {};
# TODO: Deduplicate with other configs
programs = {
home-manager.enable = true;
services = {};
bat = {
enable = true;
themes = {
catppuccin-latte = {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
};
file = "Catppuccin-latte.tmTheme";
};
};
config = {
theme = "catppuccin-latte";
};
};
cava = {
enable = true;
settings = {
general = {
framerate = 60; # default 60
autosens = 1; # default 1
sensitivity = 100; # default 100
lower_cutoff_freq = 50; # not passed to cava if not provided
higher_cutoff_freq = 10000; # not passed to cava if not provided
};
smoothing = {
noise_reduction = 77; # default 77
monstercat = false; # default false
waves = false; # default false
};
color = {
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
gradient = 1;
gradient_color_1 = "'${color.hexS.teal}'";
gradient_color_2 = "'${color.hexS.sky}'";
gradient_color_3 = "'${color.hexS.sapphire}'";
gradient_color_4 = "'${color.hexS.blue}'";
gradient_color_5 = "'${color.hexS.mauve}'";
gradient_color_6 = "'${color.hexS.pink}'";
gradient_color_7 = "'${color.hexS.maroon}'";
gradient_color_8 = "'${color.hexS.red}'";
};
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
eza = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
fastfetch = {
enable = true;
settings = {
logo = {
padding = {
top = 4;
left = 1;
right = 2;
};
};
display = {
separator = "";
key.width = 17;
};
# Box Drawing: ╭ ─ ╮ ╰ ╯ │
modules = [
# Title
{
type = "title";
format = "{#1} {#}{user-name-colored}";
}
# System Information
{
type = "custom";
format = "{#1} {#}System Information";
}
{
type = "os";
key = "{#separator} {#keys}󰍹 OS";
}
{
type = "kernel";
key = "{#separator} {#keys}󰒋 Kernel";
}
{
type = "bootmgr";
key = "{#separator} {#keys}󰒋 BootMGR";
}
{
type = "uptime";
key = "{#separator} {#keys}󰅐 Uptime";
}
{
type = "packages";
key = "{#separator} {#keys}󰏖 Packages";
# format = "{all}";
}
{
type = "custom";
format = "{#1}";
}
# Desktop Environment
{
type = "custom";
format = "{#1} {#}Desktop Environment";
}
{
type = "de";
key = "{#separator} {#keys}󰧨 DE";
}
{
type = "wm";
key = "{#separator} {#keys}󱂬 WM";
}
{
type = "wmtheme";
key = "{#separator} {#keys}󰉼 Theme";
}
{
type = "display";
key = "{#separator} {#keys}󰹑 Resolution";
}
{
type = "shell";
key = "{#separator} {#keys}󰞷 Shell";
}
{
type = "terminalfont";
key = "{#separator} {#keys}󰛖 Font";
}
{
type = "icons";
key = "{#separator} {#keys} Icons";
}
{
type = "cursor";
key = "{#separator} {#keys}󰆽 Cursor";
}
{
type = "custom";
format = "{#1}";
}
# Hardware Information
{
type = "custom";
format = "{#1} {#}Hardware Information";
}
{
type = "board";
key = "{#separator} {#keys} Board";
}
{
type = "cpu";
key = "{#separator} {#keys}󰻠 CPU";
}
{
type = "gpu";
key = "{#separator} {#keys}󰢮 GPU";
}
{
type = "memory";
key = "{#separator} {#keys}󰍛 Memory";
}
# {
# type = "disk";
# key = "{#separator}│ {#keys}󰋊 Disk (/)";
# folders = "/";
# }
# {
# type = "disk";
# key = "{#separator}│ {#keys}󰋊 Disk (~/Games)";
# folders = "/home/christoph/Games";
# }
{
type = "btrfs";
key = "{#separator} {#keys}󰋊 BTRFS";
}
{
type = "custom";
format = "{#1}";
}
# Colors Footer
{
type = "colors";
key = "{#separator} {#1}";
keyWidth = 6;
symbol = "circle";
}
];
};
};
fd.enable = true;
fzf = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
navi = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
forwardAgent = false;
addKeysToAgent = "yes";
compression = true;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"nixinator" = {
user = "christoph";
hostname = "192.168.86.50";
};
"servenix" = {
user = "christoph";
hostname = "local.chriphost.de";
};
"thinknix" = {
user = "christoph";
hostname = "think.chriphost.de";
};
"vps" = {
user = "root";
hostname = "vps.chriphost.de";
};
"mars" = {
user = "smchurla";
hostname = "mars.cs.tu-dortmund.de";
serverAliveInterval = 60;
localForwards = [
{
# Resultbrowser
bind.port = 22941;
host.address = "127.0.0.1";
host.port = 22941;
}
{
# Mysql
bind.port = 3306;
host.address = "127.0.0.1";
host.port = 3306;
}
];
};
};
};
tmux = {
enable = true;
clock24 = true;
escapeTime = 0; # Delay after pressing escape
# keyMode = "vi";
terminal = "xterm-256color";
plugins = with pkgs; [
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha
'';
}
];
extraConfig = ''
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
'';
};
yt-dlp.enable = true;
zoxide = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
};
services = {
};
};
}

View File

@ -34,7 +34,8 @@ in
homemodules = {
beets.enable = !headless;
cava.enable = !headless;
btop.enable = true;
chromium = {
enable = !headless;
@ -77,15 +78,37 @@ in
disableTabBar = true;
};
fish.enable = true;
git = {
enable = true;
userName = "Christoph Urlacher";
userEmail = "christoph.urlacher@protonmail.com";
signCommits = true;
};
kitty.enable = !headless;
lazygit.enable = true;
mpd.enable = !headless;
neovim = {
enable = true;
alias = true;
neovide = !headless;
};
niri.enable = nixosConfig.programs.niri.enable;
nnn.enable = false; # Use yazi
packages.enable = true;
qutebrowser.enable = !headless;
rmpc.enable = !headless;
rofi.enable = false;
terminal.enable = true;
rofi = {
enable = false;
};
waybar.enable = !headless;
yazi.enable = true;
zathura.enable = !headless;
};
@ -247,13 +270,374 @@ in
};
# Add stuff for your user as you see fit:
# packages = with pkgs; []; # Configured in homemodules/packages
# TODO: Make the headless installations smaller. Don't install stuff here if !headless but in nixinator config.
packages = with pkgs;
lib.mkMerge [
[
# Shell utils
(ripgrep.override {withPCRE2 = true;}) # fast as fuck
gdu # Alternative to du-dust (I like it better)
duf # Disk usage analyzer (for all disk overview)
sd # Sed alternative
fclones # Duplicate file finder
tealdeer # Very fast tldr (so readable man)
killall
atool # Archive preview
exiftool
ouch # Unified compression/decompression
ffmpegthumbnailer # Video thumbnails
mediainfo # Media meta information
file # File meta information
unrar # Cooler WinRar
p7zip # Zip stuff
unzip # Unzip stuff
progress # Find coreutils processes and show their progress
tokei # Text file statistics in a project
playerctl # Media player control
pastel # Color tools
nvd # Nix rebuild diff
nix-search-tv # Search nixpkgs, nur, nixos options and homemanager options
nix-tree # Browse the nix store sorted by size (gdu for closures)
nurl # Generate nix fetcher sections based on URLs
python313 # Nicer scripting than bash
lazyjournal # Journalctl viewer
systemctl-tui
restic # Backups
gnumake
just # make alternative
binsider # .elf analyzer
jujutsu # git-like vcs
lurk # strace analysis
radare2
# Hardware/Software info
pciutils # lspci
mesa-demos # OpenGL info
wayland-utils # wayland-info
clinfo # OpenCL info
vulkan-tools # vulkaninfo
libva-utils # vainfo
vdpauinfo # Video-Decode and Presentation API for Unix info
hwloc # Generate CPU topology diagram
lm_sensors # Readout hardware sensors
acpica-tools # Dump ACPI tables etc.
smartmontools # Disk health
nvme-cli # NVME disk health
# Video/Image/Audio utils
ffmpeg-full # I love ffmpeg (including ffplay)
ffmpeg-normalize # Normalize audio
imagemagick # Convert image (magic)
mp3val # Validate mp3 files
flac # Validate flac files
# spotdl
# Document utils
poppler-utils # pdfunite
graphviz # generate graphs from code
d2 # generate diagrams from code
plantuml # generate diagrams
gnuplot # generate function plots
pdf2svg # extract vector graphics from pdf
pandoc # document converting madness
# Networking
dig # Make DNS requests
tcpdump # Listen in on TCP traffic
traceroute # "Follow" a packet
gping # ping with graph
curlie # curl a'la httpie
wget # download that shit
doggo # dns client
rsync # cp on steroids
rclone # Rsync for cloud
httpie # Cool http client
cifs-utils # Mount samba shares
nfs-utils # Mount NFS shares
sshfs # Mount remote directories via SSH
# Run unpatched binaries on NixOS
# Sets NIX_LD_LIBRARY_PATH and NIX_LD variables for nix-ld.
# Usage: "nix-alien-ld -- <Executable>".
inputs.nix-alien.packages.${pkgs.stdenv.hostPlatform.system}.nix-alien
# Search nixpkgs
inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default
# Use NixCommunity binary cache
cachix
]
(lib.mkIf (!headless) [
ripdrag # drag & drop from terminal
veracrypt
wl-clipboard
# Proton
protonvpn-gui
protonmail-bridge-gui
# GUI stuff
nautilus # Just in case
signal-desktop
anki
font-manager # Previews fonts, but doesn't set them
nextcloud-client
keepassxc
thunderbird # TODO: Email module
obsidian
zotero
zeal # docs browser
# helvum # unmaintained
crosspipe
vlc
audacity
ferdium
gparted
# feishin # electron :(
jellyfin-tui
czkawka-full # file deduplicator
# Office
kdePackages.wacomtablet # For xournalpp/krita
xournalpp # Write with a pen, like old people
hunspell # I cna't type
hunspellDicts.en_US
hunspellDicts.de_DE
inputs.masssprings.packages.${stdenv.hostPlatform.system}.default
])
];
};
# home.file.".options-doc".source = "${pkgs.modules-options-doc}";
# Packages with extra options managed by HomeManager natively
programs = {
# The home-manager management tool.
# Will only be enabled if HM is installed standalone.
home-manager.enable = true;
bat = {
enable = true;
themes = {
catppuccin-latte = {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
};
file = "Catppuccin-latte.tmTheme";
};
};
config = {
theme = "catppuccin-latte";
};
};
cava = {
enable = !headless;
settings = {
general = {
framerate = 60; # default 60
autosens = 1; # default 1
sensitivity = 100; # default 100
lower_cutoff_freq = 50; # not passed to cava if not provided
higher_cutoff_freq = 10000; # not passed to cava if not provided
};
smoothing = {
noise_reduction = 77; # default 77
monstercat = false; # default false
waves = false; # default false
};
color = {
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
gradient = 1;
gradient_color_1 = "'${color.hexS.teal}'";
gradient_color_2 = "'${color.hexS.sky}'";
gradient_color_3 = "'${color.hexS.sapphire}'";
gradient_color_4 = "'${color.hexS.blue}'";
gradient_color_5 = "'${color.hexS.mauve}'";
gradient_color_6 = "'${color.hexS.pink}'";
gradient_color_7 = "'${color.hexS.maroon}'";
gradient_color_8 = "'${color.hexS.red}'";
};
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
eza = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
# TODO: Module
fastfetch = {
enable = true;
settings = {
logo = {
padding = {
top = 4;
left = 1;
right = 2;
};
};
display = {
separator = "";
key.width = 17;
};
# Box Drawing: ╭ ─ ╮ ╰ ╯ │
modules = [
# Title
{
type = "title";
format = "{#1} {#}{user-name-colored}";
}
# System Information
{
type = "custom";
format = "{#1} {#}System Information";
}
{
type = "os";
key = "{#separator} {#keys}󰍹 OS";
}
{
type = "kernel";
key = "{#separator} {#keys}󰒋 Kernel";
}
{
type = "bootmgr";
key = "{#separator} {#keys}󰒋 BootMGR";
}
{
type = "uptime";
key = "{#separator} {#keys}󰅐 Uptime";
}
{
type = "packages";
key = "{#separator} {#keys}󰏖 Packages";
# format = "{all}";
}
{
type = "custom";
format = "{#1}";
}
# Desktop Environment
{
type = "custom";
format = "{#1} {#}Desktop Environment";
}
{
type = "de";
key = "{#separator} {#keys}󰧨 DE";
}
{
type = "wm";
key = "{#separator} {#keys}󱂬 WM";
}
{
type = "wmtheme";
key = "{#separator} {#keys}󰉼 Theme";
}
{
type = "display";
key = "{#separator} {#keys}󰹑 Resolution";
}
{
type = "shell";
key = "{#separator} {#keys}󰞷 Shell";
}
{
type = "terminalfont";
key = "{#separator} {#keys}󰛖 Font";
}
{
type = "icons";
key = "{#separator} {#keys} Icons";
}
{
type = "cursor";
key = "{#separator} {#keys}󰆽 Cursor";
}
{
type = "custom";
format = "{#1}";
}
# Hardware Information
{
type = "custom";
format = "{#1} {#}Hardware Information";
}
{
type = "board";
key = "{#separator} {#keys} Board";
}
{
type = "cpu";
key = "{#separator} {#keys}󰻠 CPU";
}
{
type = "gpu";
key = "{#separator} {#keys}󰢮 GPU";
}
{
type = "memory";
key = "{#separator} {#keys}󰍛 Memory";
}
# {
# type = "disk";
# key = "{#separator}│ {#keys}󰋊 Disk (/)";
# folders = "/";
# }
# {
# type = "disk";
# key = "{#separator}│ {#keys}󰋊 Disk (~/Games)";
# folders = "/home/christoph/Games";
# }
{
type = "btrfs";
key = "{#separator} {#keys}󰋊 BTRFS";
}
{
type = "custom";
format = "{#1}";
}
# Colors Footer
{
type = "colors";
key = "{#separator} {#1}";
keyWidth = 6;
symbol = "circle";
}
];
};
};
fd.enable = true;
fzf = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
imv = {
enable = !headless;
settings = {
@ -281,6 +665,11 @@ in
};
};
navi = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
nix-index = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
@ -310,6 +699,92 @@ in
# pointer
# ];
# };
ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
forwardAgent = false;
addKeysToAgent = "no";
compression = true;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"nixinator" = {
user = "christoph";
hostname = "192.168.86.50";
};
"servenix" = {
user = "christoph";
hostname = "local.chriphost.de";
};
"thinknix" = {
user = "christoph";
hostname = "think.chriphost.de";
};
"vps" = {
user = "root";
hostname = "vps.chriphost.de";
};
"mars" = {
user = "smchurla";
hostname = "mars.cs.tu-dortmund.de";
serverAliveInterval = 60;
localForwards = [
{
# Resultbrowser
bind.port = 22941;
host.address = "127.0.0.1";
host.port = 22941;
}
{
# Mysql
bind.port = 3306;
host.address = "127.0.0.1";
host.port = 3306;
}
];
};
};
};
tmux = {
enable = true;
clock24 = true;
escapeTime = 0; # Delay after pressing escape
# keyMode = "vi";
terminal = "xterm-256color";
plugins = with pkgs; [
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha
'';
}
];
extraConfig = ''
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
'';
};
yt-dlp.enable = true;
zoxide = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
};
services = {

View File

@ -3,7 +3,6 @@
pkgs,
nixosConfig,
config,
hostname,
lib,
mylib,
username,
@ -19,212 +18,6 @@
fcitx.enable = true;
waybar.monitors = ["DP-1" "DP-2"];
vscode.enable = true;
zed.enable = true;
};
programs = {
claude-code = {
enable = true;
enableMcpIntegration = true;
};
mcp = {
enable = true;
servers = {
nixos = {
command = "uvx";
args = ["mcp-nixos"];
};
svelte = {
# claude mcp add -t stdio -s [scope] svelte -- npx -y @sveltejs/mcp
command = "npx";
args = ["-y" "@sveltejs/mcp"];
type = "stdio";
};
shadcn = {
# npx shadcn@latest mcp init --client claude
command = "npx";
args = ["-y" "shadcn@latest" "mcp"];
};
};
};
opencode = {
enable = true;
enableMcpIntegration = true;
extraPackages = with pkgs; [
# opencode-claude-auth # Installed using npm
];
# Writes opencode.json
settings = {
attachment = {
image = {
auto_resize = true;
max_width = 2000;
max_height = 2000;
max_base64_bytes = 5242880;
};
};
autoupdate = false;
compaction = {
auto = true;
prune = true;
reserved = 10000;
};
default_agent = "plan";
enabled_providers = [
"opencode"
"opencode-go"
"anthropic"
];
formatter = {
nixfmt = {
disabled = true;
};
alejandra = {
command = ["alejandra" "$FILE"];
extensions = [".nix"];
};
perltidy = {
command = ["perltidy" "$FILE"];
extensions = [".pl"];
};
};
lsp = {
nixd = {
command = ["nixd"];
extensions = [".nix"];
initialization = {
preferences = {
nixd = {
nixpkgs = {expr = "import <nixpkgs> {}";};
options = {
nixos = {expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.${hostname}.options";};
home-manager = {expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.\"${hostname}\".options.home-manager.users.type.getSubOptions []";};
};
diagnostic = {
suppress = ["sema-escaping-with" "var-bind-to-this" "escaping-this-with"];
};
};
};
};
};
perlnavigator = {
command = ["perlnavigator"];
extensions = [".pl"];
initialization = {
preferences = {};
};
};
# perlpls = {
# command = ["pls"];
# extensions = [".pl"];
# initialization = {
# preferences = {
# perl = {
# perlcritic = {enabled = false;};
# syntax = {enabled = true;};
# };
# };
# };
# };
r-language-server = {
command = ["R" "--no-echo" "-e" "languageserver::run()"];
extensions = [".r" ".rmd" ".quarto"];
};
};
permission = {
"*" = "ask";
"bash" = {
"*" = "ask";
"ls *" = "allow";
"find *" = "ask"; # Don't want find -exec
"file *" = "allow";
"wc *" = "allow";
"grep *" = "allow";
"rg *" = "allow";
"test *" = "allow";
"echo *" = "allow";
"which *" = "allow";
"pwd *" = "allow";
"dirname *" = "allow";
"basename *" = "allow";
"readlink *" = "allow";
"cat *.env" = "deny";
"cat *.env.*" = "deny";
"cat *.env.example" = "allow";
"printenv *" = "deny";
"env *" = "deny";
"nix eval *" = "allow";
"nix flake metadata *" = "allow";
"nix flake show *" = "allow";
"nix path-info *" = "allow";
"nix why-depends *" = "allow";
"nix derivation show *" = "allow";
"nix store ping *" = "allow";
"nix stire diff-closures *" = "allow";
"git status *" = "allow";
"git log *" = "allow";
"git diff *" = "allow";
};
"external_directory" = {
"/nix/store/**" = "allow";
"/tmp" = "allow";
"/tmp/*" = "allow";
};
"read" = {
"*" = "allow";
"*.env" = "deny";
"*.env.*" = "deny";
"*.env.example" = "allow";
};
"grep" = "allow";
"glob" = "allow";
"lsp" = "allow";
"skill" = "allow";
"task" = "ask";
"todowrite" = "allow";
"webfetch" = "allow";
"websearch" = "allow";
"question" = "allow";
};
plugin = [
"opencode-claude-auth@latest" # https://github.com/griffinmartin/opencode-claude-auth
"@tarquinen/opencode-dcp@latest" # better compacting
# "@slkiser/opencode-quota"
];
share = "disabled";
shell = "fish";
snapshot = false;
watcher = {
ignore = ["node_modules/**" "dist/**" ".git/**"];
};
};
# Writes tui.json
tui = {
theme = "system";
diff_style = "auto";
mouse = true;
attention = {
enabled = true;
notifications = true;
sound = true;
volume = "0.3";
};
};
agents = {};
commands = {};
context = '''';
skills = {};
tools = {};
};
};
home = let
@ -282,9 +75,9 @@
# jetbrains.idea-ultimate
# jetbrains.webstorm
# jetbrains.rider
zed-editor
vscode
# ghidra # launch with _JAVA_AWT_WM_NONREPARENTING=1 (use programs.ghidra)
# zed-editor # Using module
# vscode # Using module
# Unity Stuff
# unityhub
@ -308,16 +101,11 @@
jellyfin-mpv-shim
# tidal-hifi
# tidal-dl-ng # TODO: Borked
# spotdl
tiddl
picard
handbrake
teamspeak6-client
# virt-manager # use system program option
virt-viewer
gnome-boxes # doesn't list VMs imported using virsh
steam-devices-udev-rules
];
@ -365,8 +153,6 @@
"com.usebottles.bottles"
"io.github.lawstorant.boxflat"
"org.onlyoffice.desktopeditors"
# "com.unity.UnityHub"
];

View File

@ -2,32 +2,30 @@
{pkgs, ...}: {
config = {
homemodules = {
# TODO: Niri config (needs to modularize niri module)
hyprland = {
keyboard = {
layout = "us";
variant = "altgr-intl";
option = "nodeadkeys";
};
# hyprland = {
# keyboard = {
# layout = "us";
# variant = "altgr-intl";
# option = "nodeadkeys";
# };
#
# monitors = {
# "eDP-1" = {
# width = 1920;
# height = 1080;
# rate = 60;
# x = 0;
# y = 0;
# scale = 1;
# };
# };
#
# workspaces = {
# "eDP-1" = [1 2 3 4 5 6 7 8 9];
# };
# };
monitors = {
"eDP-1" = {
width = 1920;
height = 1080;
rate = 60;
x = 0;
y = 0;
scale = 1;
};
};
waybar.monitors = ["eDP-1"];
workspaces = {
"eDP-1" = [1 2 3 4 5 6 7 8 9];
};
};
waybar.monitor = "eDP-1";
};
home = {

View File

@ -0,0 +1,156 @@
# TODO: Expose some settings
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}:
with lib;
with mylib.modules; let
cfg = config.homemodules.vscode;
in {
options.homemodules.vscode = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable {
programs.vscode = {
enable = true;
enableExtensionUpdateCheck = false;
enableUpdateCheck = false;
extensions = with pkgs.vscode-extensions; [
# alefragnani.bookmarks # TODO: Use inline bookmarks instead
# alefragnani.project-manager # NOTE: Not much sense with flake dev environments
catppuccin.catppuccin-vsc
catppuccin.catppuccin-vsc-icons
christian-kohler.path-intellisense
# codezombiech.gitignore # NOTE: Superfluous
# coolbear.systemd-unit-file # NOTE: Unnecessary on NixOS
eamodio.gitlens
# formulahendry.auto-rename-tag
# formulahendry.auto-close-tag
# gitlab.gitlab-workflow
# irongeek.vscode-env
# jnoortheen.nix-ide
# kamadorueda.alejandra
# kamikillerto.vscode-colorize
# llvm-vs-code-extensions.vscode-clangd
# matklad.rust-analyzer
mechatroner.rainbow-csv
# mikestead.dotenv
# mkhl.direnv
# ms-azuretools.vscode-docker
# ms-kubernetes-tools.vscode-kubernetes-tools
ms-python.python
ms-toolsai.jupyter
ms-vscode.cmake-tools
ms-vscode.cpptools
# ms-vscode.hexeditor
# ms-vscode.makefile-tools
ms-python.black-formatter
ms-python.vscode-pylance
ms-vscode-remote.remote-ssh
# naumovs.color-highlight
njpwerner.autodocstring
# james-yu.latex-workshop
# redhat.java
# redhat.vscode-xml
# redhat.vscode-yaml
ritwickdey.liveserver
# rubymaniac.vscode-paste-and-indent
ryu1kn.partial-diff
# serayuzgur.crates
shd101wyy.markdown-preview-enhanced
# skyapps.fish-vscode
# tamasfe.even-better-toml
# timonwong.shellcheck
# tomoki1207.pdf # Incompatible with latex workshop
# valentjn.vscode-ltex
vscodevim.vim
vscode-icons-team.vscode-icons
# yzhang.markdown-all-in-one
];
# haskell = {};
# keybindings = {};
userSettings = {
# VSCode Internals
"editor.fontFamily" = "JetBrainsMono Nerd Font Mono";
"editor.fontSize" = 16;
"editor.renderWhitespace" = "selection";
"editor.cursorStyle" = "line"; # Use line for vim plugin
"editor.lineNumbers" = "relative";
"editor.linkedEditing" = true;
"editor.smoothScrolling" = true;
"editor.stickyScroll.enabled" = true;
"editor.tabCompletion" = "on";
"editor.cursorSmoothCaretAnimation" = "on";
"editor.cursorSurroundingLines" = 10;
"editor.minimap.renderCharacters" = false;
"editor.bracketPairColorization.enabled" = true;
"editor.guides.bracketPairs" = "active";
"editor.guides.bracketPairsHorizontal" = "active";
"editor.guides.highlightActiveIndentation" = false;
"files.autoSave" = "onFocusChange";
"files.trimFinalNewlines" = true;
"files.trimTrailingWhitespace" = true; # NOTE: If this is enabled with frequent autosave, the current lines whitespace will always be removed, which is obnoxious
"window.restoreWindows" = "none";
"window.titleBarStyle" = "custom"; # NOTE: Should help with crashing on wayland
# "window.titleBarStyle" = "native";
# "window.menuBarVisibility" = "toggle";
"workbench.enableExperiments" = false;
"workbench.list.smoothScrolling" = true;
# "workbench.colorTheme" = "Default Light Modern";
# "workbench.iconTheme" = "vscode-icons";
"workbench.colorTheme" = "Catppuccin Latte";
"workbench.iconTheme" = "catppuccin-latte";
"remote.SSH.configFile" = "~/.ssh/custom-config";
"security.workspace.trust.enabled" = false;
# Language Tool
"ltex.checkFrequency" = "manual";
# LaTeX
"latex-workshop.latex.tools" = [
{
"name" = "latexmk";
"command" = "latexmk";
"args" = [
"-synctex=1"
"-shell-escape"
"-interaction=nonstopmode"
"-file-line-error"
"-pdf"
"-outdir=%OUTDIR%"
"%DOC%"
];
"env" = {};
}
];
"latex-workshop.latexindent.args" = [
"-c"
"%DIR%/"
"%TMPFILE%"
"-m"
"-y=defaultIndent: '%INDENT%'"
];
# Nix
"[nix]"."editor.tabSize" = 2;
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nil";
"nix.formatterPath" = "alejandra";
# C++
# "C_Cpp.intelliSenseEngine" = "disabled"; # IntelliSense conflics with Clangd
};
# TODO: Snippets
};
};
}

View File

@ -1,34 +0,0 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}: let
inherit (config.homemodules) bat color;
in {
options.homemodules.bat = import ./options.nix {inherit lib mylib;};
config = lib.mkIf bat.enable {
programs.bat = {
enable = true;
themes = {
catppuccin-latte = {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
};
file = "Catppuccin-latte.tmTheme";
};
};
config = {
theme = "catppuccin-latte";
};
};
};
}

View File

@ -1,7 +0,0 @@
{
lib,
mylib,
...
}: {
enable = lib.mkEnableOption "Enable bat";
}

View File

@ -57,7 +57,7 @@ in {
fetchart = {
auto = "yes";
sources = "*"; # sources are queried in this order
sources = "filesystem coverart itunes amazon albumart"; # sources are queried in this order
};
# lyrics = {

View File

@ -1,48 +0,0 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}: let
inherit (config.homemodules) cava color;
in {
options.homemodules.cava = import ./options.nix {inherit lib mylib;};
config = lib.mkIf cava.enable {
programs.cava = {
enable = true;
settings = {
general = {
framerate = 60; # default 60
autosens = 1; # default 1
sensitivity = 100; # default 100
lower_cutoff_freq = 50; # not passed to cava if not provided
higher_cutoff_freq = 10000; # not passed to cava if not provided
};
smoothing = {
noise_reduction = 77; # default 77
monstercat = false; # default false
waves = false; # default false
};
color = {
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
gradient = 1;
gradient_color_1 = "'${color.hexS.teal}'";
gradient_color_2 = "'${color.hexS.sky}'";
gradient_color_3 = "'${color.hexS.sapphire}'";
gradient_color_4 = "'${color.hexS.blue}'";
gradient_color_5 = "'${color.hexS.mauve}'";
gradient_color_6 = "'${color.hexS.pink}'";
gradient_color_7 = "'${color.hexS.maroon}'";
gradient_color_8 = "'${color.hexS.red}'";
};
};
};
};
}

View File

@ -1,7 +0,0 @@
{
lib,
mylib,
...
}: {
enable = lib.mkEnableOption "Enable cava";
}

View File

@ -1,21 +1,13 @@
{inputs, ...}: {
imports = [
# My own HM modules
./bat
./btop
./color
./fastfetch
./fish
./git
./jellyfin-tui
./kitty
./lazygit
./neovim
./packages
./paths
./ssh
./terminal
./tmux
./yazi
# HM modules imported from the flake inputs

View File

@ -3,45 +3,34 @@
# Obsolete modules are kept in "1_deprecated" for reference.
# My own HM modules
./bat
./beets
./btop
./cava
./chromium
./color
./docs
./fastfetch
./fcitx
./firefox
./fish
./git
./jellyfin-tui
./kitty
./lazygit
./mpd
./neovim
./niri
./nnn
./packages
./paths
./qutebrowser
./rmpc
./rofi
./waybar
./ssh
./terminal
./tmux
./vscode
./yazi
./zathura
./zed
# HM modules imported from the flake inputs
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.nixvim.homeModules.nixvim
inputs.textfox.homeManagerModules.default
inputs.walker.homeManagerModules.default
# inputs.direnv-instant.homeModules.direnv-instant
# inputs.niri.homeModules.niri # Imported by system module
# inputs.noctalia.homeModules.default
# inputs.caelestia.homeManagerModules.default

View File

@ -32,9 +32,6 @@ in {
"Notes/Obsidian/Chriphost/latex_snippets.json".source = ../../../config/obsidian/latex_snippets.json; # TODO: Symlink
"Notes/Obsidian/Chriphost/.obsidian/snippets/latex_preview.css".source = ../../../config/obsidian/css_snippets/latex_preview.css;
"Notes/Obsidian/Chriphost/.obsidian/snippets/center_image.css".source = ../../../config/obsidian/css_snippets/center_image.css;
"Notes/Obsidian/Chriphost/.obsidian/snippets/fullwidth_image.css".source = ../../../config/obsidian/css_snippets/fullwidth_image.css;
"Notes/Obsidian/Chriphost/.obsidian/snippets/justify_text.css".source = ../../../config/obsidian/css_snippets/justify_text.css;
"Notes/Obsidian/Chriphost/.obsidian/snippets/bordered_image.css".source = ../../../config/obsidian/css_snippets/bordered_image.css;
};
};
};

View File

@ -1,163 +0,0 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}: let
inherit (config.homemodules) fastfetch color;
in {
options.homemodules.fastfetch = import ./options.nix {inherit lib mylib;};
config = lib.mkIf fastfetch.enable {
programs.fastfetch = {
enable = true;
settings = {
logo = {
padding = {
top = 4;
left = 1;
right = 2;
};
};
display = {
separator = "";
key.width = 17;
};
# Box Drawing: ╭ ─ ╮ ╰ ╯ │
modules = [
# Title
{
type = "title";
format = "{#1} {#}{user-name-colored}";
}
# System Information
{
type = "custom";
format = "{#1} {#}System Information";
}
{
type = "os";
key = "{#separator} {#keys}󰍹 OS";
}
{
type = "kernel";
key = "{#separator} {#keys}󰒋 Kernel";
}
{
type = "bootmgr";
key = "{#separator} {#keys}󰒋 BootMGR";
}
{
type = "uptime";
key = "{#separator} {#keys}󰅐 Uptime";
}
{
type = "packages";
key = "{#separator} {#keys}󰏖 Packages";
# format = "{all}";
}
{
type = "custom";
format = "{#1}";
}
# Desktop Environment
{
type = "custom";
format = "{#1} {#}Desktop Environment";
}
{
type = "de";
key = "{#separator} {#keys}󰧨 DE";
}
{
type = "wm";
key = "{#separator} {#keys}󱂬 WM";
}
{
type = "wmtheme";
key = "{#separator} {#keys}󰉼 Theme";
}
{
type = "display";
key = "{#separator} {#keys}󰹑 Resolution";
}
{
type = "shell";
key = "{#separator} {#keys}󰞷 Shell";
}
{
type = "terminalfont";
key = "{#separator} {#keys}󰛖 Font";
}
{
type = "icons";
key = "{#separator} {#keys} Icons";
}
{
type = "cursor";
key = "{#separator} {#keys}󰆽 Cursor";
}
{
type = "custom";
format = "{#1}";
}
# Hardware Information
{
type = "custom";
format = "{#1} {#}Hardware Information";
}
{
type = "board";
key = "{#separator} {#keys} Board";
}
{
type = "cpu";
key = "{#separator} {#keys}󰻠 CPU";
}
{
type = "gpu";
key = "{#separator} {#keys}󰢮 GPU";
}
{
type = "memory";
key = "{#separator} {#keys}󰍛 Memory";
}
# {
# type = "disk";
# key = "{#separator}│ {#keys}󰋊 Disk (/)";
# folders = "/";
# }
# {
# type = "disk";
# key = "{#separator}│ {#keys}󰋊 Disk (~/Games)";
# folders = "/home/christoph/Games";
# }
{
type = "btrfs";
key = "{#separator} {#keys}󰋊 BTRFS";
}
{
type = "custom";
format = "{#1}";
}
# Colors Footer
{
type = "colors";
key = "{#separator} {#1}";
keyWidth = 6;
symbol = "circle";
}
];
};
};
};
}

View File

@ -1,7 +0,0 @@
{
lib,
mylib,
...
}: {
enable = lib.mkEnableOption "Enable fastfetch";
}

View File

@ -103,9 +103,9 @@ in [
(mkBm "Heise" "https://www.heise.de/")
(mkBm "HN" "https://news.ycombinator.com/news")
(mkBm "Reddit" "https://www.reddit.com/user/FightingMushroom/saved/")
# (mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
(mkBm "F12" "https://f12.local.chriphost.gay/racepicks")
(mkBm "F12PB" "https://f12pb.local.chriphost.de/_/")
(mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
(mkBm "F11" "https://f11.local.chriphost.de/racepicks")
(mkBm "F11PB" "https://f11pb.local.chriphost.de/_/#/collections?collection=pbc_1736455494&filter=&sort=-%40rowid")
(mkBm "ISBNDB" "https://isbndb.com/")
(mkBm "Music" "https://bandcamp.com/chriphost")
(mkBm "Albums" "https://www.albumoftheyear.org/user/chriphost/list/307966/2025/")

View File

@ -86,9 +86,6 @@ in {
programs.firefox = {
enable = true;
# configPath = "${config.xdg.configHome}/mozilla/firefox";
configPath = "${config.home.homeDirectory}/.mozilla/firefox";
# firefox-unwrapped is the pure firefox browser, wrapFirefox adds configuration ontop
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
# About policies: https://github.com/mozilla/policy-templates#enterprisepoliciesenabled

View File

@ -42,141 +42,99 @@ in {
fish_pager_color_description ${color.hex.overlay0}
'';
programs.fish = let
# Only add " | bat" if bat is installed
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
programs.fish = lib.mkMerge [
# Darwin exclusive config
(lib.mkIf pkgs.stdenv.isDarwin {
shellAbbrs = let
# These can be used for my config.homemodules and for HM config.programs,
# as both of these add the package to home.packages
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
# Same as above but with args for bat
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
# These can be used for my config.homemodules and for HM config.programs,
# as both of these add the package to home.packages
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
# Only add fish abbr if package is installed
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
in
lib.mkMerge [
# Darwin exclusive config
(lib.mkIf pkgs.stdenv.isDarwin {
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
set --global --export HOMEBREW_REPOSITORY "/opt/homebrew"
fish_add_path --global --move --path "/opt/homebrew/bin" "/opt/homebrew/sbin"
if test -n "$MANPATH[1]"; set --global --export MANPATH ''' $MANPATH; end;
if not contains "/opt/homebrew/share/info" $INFOPATH; set --global --export INFOPATH "/opt/homebrew/share/info" $INFOPATH; end;
'';
shellAbbrs = lib.mkMerge [
# Only add fish abbr if package is installed
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
in
lib.mkMerge [
{
rebuild = "sudo darwin-rebuild switch --flake .#darwinix";
}
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'darwin,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
];
})
})
# Linux exclusive config
(lib.mkIf pkgs.stdenv.isLinux {
generateCompletions = nixosConfig.programs.fish.generateCompletions;
# Linux exclusive config
(lib.mkIf pkgs.stdenv.isLinux {
generateCompletions = nixosConfig.programs.fish.generateCompletions;
# TODO: There's a bug with the direnv mechanism:
# - When leaving an env, it unloads (good)
# - When entering another env, it loads (good)
# - When leaving this one, it doesn't unload (bad)
# - When entering leaving it again, it works...
# This only happens sometimes, is there a race condition?
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
fish_vi_key_bindings
# Because we can't source that in a project flake's shellHook (is POSIX), source it here
function __project_shell_reload --on-variable INIT_PROJECT_SHELL
# Leaving the environment
if not set -q INIT_PROJECT_SHELL; or test -z "$INIT_PROJECT_SHELL"
if test -n "$__last_unload_project_shell"; and test -f "$__last_unload_project_shell"
source "$__last_unload_project_shell"
end
set -e __last_init_project_shell
set -e __last_unload_project_shell
functions = lib.mergeAttrsList [
(lib.optionalAttrs config.homemodules.nnn.enable {
nnncd = {
wraps = "nnn";
description = "support nnn quit and change directory";
body = ''
# Block nesting of nnn in subshells
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
echo "nnn is already running"
return
end
# Entering or switching environments
if test "$INIT_PROJECT_SHELL" != "$__last_init_project_shell"
# Cleanup the previous environment
if test -n "$__last_unload_project_shell"; and test -f "$__last_unload_project_shell"
source "$__last_unload_project_shell"
end
# Store into variables to persist until next environment switch in the same shell
set -g __last_init_project_shell "$INIT_PROJECT_SHELL"
if set -q UNLOAD_PROJECT_SHELL; and test -f "$UNLOAD_PROJECT_SHELL"
set -g __last_unload_project_shell "$UNLOAD_PROJECT_SHELL"
else
set -e __last_unload_project_shell
end
# Source the new environment
if test -f "$INIT_PROJECT_SHELL"
source "$INIT_PROJECT_SHELL"
end
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
# see. To cd on quit only on ^G, remove the "-x" from both lines below,
# without changing the paths.
if test -n "$XDG_CONFIG_HOME"
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
else
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
end
end
'';
functions = lib.mergeAttrsList [
(lib.optionalAttrs config.homemodules.nnn.enable {
nnncd = {
wraps = "nnn";
description = "support nnn quit and change directory";
body = ''
# Block nesting of nnn in subshells
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
echo "nnn is already running"
return
end
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
# see. To cd on quit only on ^G, remove the "-x" from both lines below,
# without changing the paths.
if test -n "$XDG_CONFIG_HOME"
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
else
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
end
# The command function allows one to alias this function to `nnn` without
# making an infinitely recursive alias
command nnn $argv
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm $NNN_TMPFILE
end
'';
};
})
];
# The command function allows one to alias this function to `nnn` without
# making an infinitely recursive alias
command nnn $argv
shellAbbrs = let
# Only add " | bat" if bat is installed
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm $NNN_TMPFILE
end
'';
};
})
];
# Same as above but with args for bat
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
shellAbbrs = lib.mkMerge [
# These can be used for my config.homemodules and for HM config.programs,
# as both of these add the package to home.packages
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
# Only add fish abbr if package is installed
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
in
lib.mkMerge [
# Abbrs that are always available are defined here.
{
# Fish
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
abbrs = batifyWithArgs "abbr" "-l fish";
# Tools
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
nd = "nix develop";
nb = "nix build -L";
ns = "nix shell nixpkgs#";
nr = "nix run";
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra"; # env var for wayland
}
@ -193,33 +151,31 @@ in {
# (abbrify pkgs.sd {sed = "sd";})
];
})
})
# Common config
{
enable = true;
# Common config
{
enable = true;
shellAbbrs = lib.mkMerge [
shellAbbrs = let
# These can be used for my config.homemodules and for HM config.programs,
# as both of these add the package to home.packages
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
# Only add fish abbr if package is installed
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
in
lib.mkMerge [
{
# Shell
# Shell basics
c = "clear";
q = "exit";
mkdir = "mkdir -p"; # also create parents (-p)
watch = "watch -d -c -n 0.5";
sy = "sudo yazi";
sy = "sudo -u ${username} yazi";
cd = "z"; # zoxide for quickjump to previously visited locations
cdd = "zi";
b = "z -"; # jump to previous dir
# Fish
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
abbrs = batifyWithArgs "abbr" "-l fish";
# Nix
nd = "nix develop";
nb = "nix build -L";
ns = "nix shell nixpkgs#";
nr = "nix run";
nps = "nps -e";
}
@ -271,9 +227,14 @@ in {
(abbrify pkgs.lazygit {lg = "lazygit";})
];
plugins = [];
}
];
plugins = [];
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
'';
}
];
programs.starship = {
enable = true;

View File

@ -1,91 +0,0 @@
{
config,
nixosConfig,
darwinConfig,
lib,
mylib,
pkgs,
...
}: let
inherit (config.homemodules) jellyfin-tui color;
systemConfig =
if pkgs.stdenv.isLinux
then nixosConfig
else darwinConfig;
in {
options.homemodules.jellyfin-tui = import ./options.nix {inherit lib mylib;};
config = lib.mkIf jellyfin-tui.enable {
home = {
packages = [
pkgs.jellyfin-tui
];
file = let
jellyfinUrl =
if pkgs.stdenv.isLinux
then "https://jellyfin.local.chriphost.de"
else "https://jellyfin.vps.chriphost.de";
configFile = ''
servers:
- name: Mafia Dortmund
url: ${jellyfinUrl}
username: root
password_file: ${systemConfig.sops.secrets.jellyfin-password.path}
default: true
# All following settings are OPTIONAL. What you see here are the defaults.
# Show album cover image
art: true
# Save and restore the state of the player (queue, volume, etc.)
persist: true
# Grab the primary color from the cover image (false => uses the current theme's `accent` instead)
auto_color: false
# Time in milliseconds to fade between colors when the track changes
auto_color_fade_ms: 400
# Always show the lyrics pane, even if no lyrics are available
lyrics: 'always' # options: 'always', 'never', 'auto'
rounded_corners: true
transcoding:
bitrate: 320
# container: mp3
# Discord Rich Presence. Shows your listening status on your Discord profile if Discord is running.
# NOTE: I think we're allowed to leak this to the public (hopefully)?
discord: 1466134677537685546 # https://discord.com/developers/applications
# Displays album art on your Discord profile if enabled
# !!CAUTION!! - Enabling this will expose the URL of your Jellyfin instance to all Discord users!
discord_art: false
# Customize the title of the terminal window
window_title: true # default -> {title} {artist} ({year})
# window_title: false # disable
# Custom title: choose from current track's {title} {artist} {album} {year}
# window_title: "\"{title}\" by {artist} ({year}) jellyfin-tui"
# Options specified here will be passed to mpv - https://mpv.io/manual/master/#options
mpv:
log-file: /tmp/mpv.log
no-config: true
# af: lavfi=[loudnorm=I=-23:TP=-1]
gapless-audio: weak
prefetch-playlist: yes
replaygain: no
'';
in
lib.mkMerge [
(lib.optionalAttrs pkgs.stdenv.isLinux {
".config/jellyfin-tui/config.yaml".text = configFile;
})
(lib.optionalAttrs pkgs.stdenv.isDarwin {
"Library/Application Support/jellyfin-tui/config.yaml".text = configFile;
})
];
};
};
}

View File

@ -1,7 +0,0 @@
{
lib,
mylib,
...
}: {
enable = lib.mkEnableOption "Enable jellyfin-tui";
}

View File

@ -31,8 +31,8 @@ in {
settings = lib.mkMerge [
# Linux config
(lib.mkIf pkgs.stdenv.isLinux {
allow_remote_control = true; # For nnn file preview or nvim scrollback
listen_on = lib.mkDefault "unix:@mykitty"; # This conflicts with direnv-instant
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
listen_on = "unix:@mykitty";
})
# Common config
@ -42,7 +42,6 @@ in {
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
# hide_window_decorations = "yes";
enabled_layouts = "grid,vertical,horizontal";
cursor_trail = 3;
tab_bar_min_tabs = 2; # Don't show a single tab
tab_bar_edge = "bottom";

View File

@ -30,62 +30,54 @@ in {
(lib.optionals (!headless) [
# Language servers
autotools-language-server
basedpyright
clang-tools
clojure-lsp
cmake-language-server
haskell-language-server
jdt-language-server
just-lsp
ltex-ls # TODO: Only enable on-demand
lua-language-server
nil
# perl5Packages.PLS
perlnavigator
# nil
basedpyright
pyrefly
# rPackages.languageserver
ty
rust-analyzer
svelte-language-server
tailwindcss-language-server
tex-fmt
texlab
tinymist
ty
typescript
vscode-langservers-extracted # includes nodejs
autotools-language-server
just-lsp
# Linters
checkstyle # java
clippy # rust
clj-kondo # clojure
eslint_d # javascript
# python313Packages.ruff
# python313Packages.flake8
# python313Packages.pylint
python313Packages.ruff
python313Packages.flake8
python313Packages.pylint
lua54Packages.luacheck
vale # text
# statix # nix (doesn't recognize pipe operator)
# Formatters
air-formatter
cljfmt
python313Packages.black
google-java-format
html-tidy
jq # json
just-formatter
mbake
# nodePackages_latest.prettier # Use local install as plugins change per project
# perl5Packages.PerlTidy
# prettierd # Use prettier instead because of plugins
# python313Packages.black
# nodePackages_latest.prettier # Use local install as plugins change per project
rustfmt
stylua
tombi
typstyle
nodejs_latest
uv
mbake
just-formatter
tombi
])
[
@ -95,52 +87,6 @@ in {
lua54Packages.jsregexp # For tree-sitter
# nodejs_latest
# TODO: Create a perl module where I can add packages to, so I don't end up with multiple perl installations
# TODO: The same is required for python and R (below)
(perl.withPackages (p:
with p; [
PLS
PerlCritic
PerlTidy
NetOpenSSH
DateTime
DBI
DBDMariaDB
CursesUI
TextCSV_XS
]))
(python314.withPackages (p:
with p; [
# Linters
ruff
flake8
pylint
# Formatters
black
numpy
matplotlib
requests
]))
(rWrapper.override {
packages = with rPackages; [
languageserver
ggplot2
ggalluvial
plotly
shiny
readr
tibble
svglite
dplyr
tidyr
scales
];
})
nixd
alejandra # nix
]
@ -148,8 +94,6 @@ in {
};
programs.nixvim = {
# nixpkgs.pkgs = pkgs;
defaultEditor = true;
enable = true;
enableMan = false; # Nixvim man pages
@ -172,7 +116,7 @@ in {
performance.byteCompileLua = {
enable = true;
configs = true;
initLua = true; # When debugging init.lua turn this off
initLua = false; # When debugging init.lua turn this off
nvimRuntime = true;
plugins = true;
};
@ -182,7 +126,7 @@ in {
maplocalleader = ",";
};
opts = import ./vim_opts.nix {inherit config lib mylib;};
opts = import ./vim_opts.nix {inherit lib mylib;};
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
extraConfigLua = builtins.readFile ./extraConfigLua.lua;
@ -308,15 +252,6 @@ in {
require("${name}").setup(opts)
end
'';
# Like mkDefaultConfig but takes the Lua module name explicitly.
# Use when the Lua module name (e.g. "noice") differs from what
# lazy.nvim expects as the plugin name (e.g. "noice.nvim").
mkDefaultConfigFor = moduleName: ''
function(_, opts)
require("${moduleName}").setup(opts)
end
'';
in {
enable = true;
@ -588,10 +523,8 @@ in {
make = ["bake"];
markdown = ["prettierd" "prettier"];
nix = ["alejandra"];
perl = ["perltidy"];
python = ["black"];
qml = ["qmlformat"];
r = ["air"];
rust = ["rustfmt"];
svelte = ["prettierd" "prettier"];
toml = ["tombi"];
@ -619,21 +552,6 @@ in {
};
};
devdocs = rec {
name = "devdocs";
pkg = pkgs.vimPlugins.devdocs-nvim;
lazy = true;
cmd = ["DevDocs"];
dependencies = [snacks];
config = mkDefaultConfig name;
# opts = {
# ensure_installed = [
# "c"
# "cpp"
# ];
# };
};
direnv = {
name = "direnv";
pkg = pkgs.vimPlugins.direnv-vim;
@ -927,8 +845,9 @@ in {
dependencies = [_lazydev];
config = let
servers = mylib.generators.toLuaObject [
{name = "autotools-language-server";}
{name = "basedpyright";}
# {name = "pyrefly";} # TODO: Config
# {name = "ty";} # TODO: Config
{
name = "clangd";
extraOptions = {
@ -980,6 +899,7 @@ in {
};
};
}
{name = "autotools-language-server";}
# {name = "nil_ls";}
{
name = "nixd";
@ -1021,8 +941,6 @@ in {
};
};
}
{name = "perlpls";}
{name = "perlnavigator";}
{
name = "qmlls";
extraOptions.cmd = [
@ -1030,8 +948,6 @@ in {
"-E" # Use QML_IMPORT_PATH env variable
];
}
# {name = "pyrefly";} # TODO: Config
{name = "r_language_server";}
{name = "svelte";}
{name = "tailwindcss";}
{name = "texlab";}
@ -1043,7 +959,6 @@ in {
semanticTokens = "disable";
};
}
# {name = "ty";} # TODO: Config
# {name = "jdtls";} # Don't set up when using nvim-jdtls
# {name = "rust_analyzer";} # Don't set up when using rustaceanvim
@ -1121,7 +1036,6 @@ in {
pkg = pkgs.vimPlugins.lualine-nvim;
lazy = true;
event = ["BufReadPost" "BufNewFile"];
# dependencies = [opencode];
config = ''
function(_, opts)
local lualine = require("lualine")
@ -1221,7 +1135,6 @@ in {
lualine_c.__raw = ''{}''; # Use __raw: Nixvim does nothing with "[]", so the default config would be used
lualine_x.__raw = ''{}'';
# lualine_x.__raw = ''{ { require("opencode").statusline, }, }'';
lualine_y = ["filetype" "encoding" "fileformat"];
lualine_z.__raw = ''{ { "location", separator = {}, } }'';
};
@ -1387,19 +1300,19 @@ in {
};
_nui = {
name = "nui.nvim";
name = "nui"; # For noice
pkg = pkgs.vimPlugins.nui-nvim;
lazy = true;
};
noice = rec {
name = "noice.nvim";
name = "noice";
pkg = pkgs.vimPlugins.noice-nvim;
lazy = false;
dependencies = [
_nui
];
config = mkDefaultConfigFor "noice";
config = mkDefaultConfig name;
opts = {
presets = {
bottom_search = false;
@ -1461,32 +1374,6 @@ in {
};
};
opencode = {
name = "opencode";
pkg = pkgs.vimPlugins.opencode-nvim;
lazy = false;
config = ''
function()
vim.g.opencode_opts = {
server = {
url = "http://localhost:12345",
start = false,
},
events = {
permissions = {
edits = {
-- Disable neovim diff popup tab
enabled = false,
},
},
},
}
vim.o.autoread = true -- Required for `vim.g.opencode_opts.events.reload`
end
'';
};
# obsidian = rec {
# name = "obsidian";
# pkg = pkgs.vimPlugins.obsidian-nvim;
@ -1711,7 +1598,7 @@ in {
gitbrowse.enabled = false;
image.enabled = false;
indent.enabled = false;
input.enabled = true;
input.enabled = false;
keymap.enabled = false;
layout.enabled = false;
lazygit.enabled = true;
@ -1747,20 +1634,6 @@ in {
truncate = 80;
};
};
actions = {
opencode_send.__raw = ''
function(picker)
local items = vim.tbl_map(function(item)
return item.file
and require("opencode").format({ path = item.file, from = item.pos, to = item.end_pos })
or item.text
end, picker:selected({ fallback = true }))
require("opencode").prompt(table.concat(items, ", ") .. " ")
end
'';
};
};
profiler.enabled = false;
@ -1831,7 +1704,7 @@ in {
};
_plenary = {
name = "plenary.nvim";
name = "plenary";
pkg = pkgs.vimPlugins.plenary-nvim;
lazy = true;
};
@ -2250,12 +2123,12 @@ in {
};
yazi = rec {
name = "yazi.nvim";
name = "yazi";
pkg = pkgs.vimPlugins.yazi-nvim;
lazy = true;
event = ["VeryLazy"];
dependencies = [_plenary];
config = mkDefaultConfigFor "yazi";
config = mkDefaultConfig name;
opts = {
open_for_directories = true;
highlight_hovered_buffers_in_same_directory = false;
@ -2287,7 +2160,6 @@ in {
# dap # Debug adapter protocol # TODO:
# dap-ui # Debugger UI # TODO:
devdocs
diffview # Git diff # TODO: Check the keybindings
direnv # Automatically load local environments
@ -2317,7 +2189,6 @@ in {
noice # Modern UI overhaul, e.g. floating cmdline
# obsidian # Integration with Obsidian.md
opencode # TODO: Doesn't work, can't find "opencode --port" process
# overseer # Run tasks from within neovim (e.g. cargo) # TODO:
persisted # Session management

View File

@ -66,16 +66,3 @@ local rmpc =
vim.g.toggle_rmpc = function()
rmpc:toggle()
end
-- Toggle FailNix UI
local failnix = Terminal:new({
cmd = "cd /home/christoph/Notes/TU/MastersThesis/FailNix && nix develop --command bash -c 'perl ./scripts/menu.pl'",
hidden = true,
close_on_exit = true,
auto_scroll = false,
direction = "float",
})
vim.g.toggle_failnix = function()
failnix:toggle()
end

View File

@ -340,13 +340,6 @@ _: let
action = "<cmd>lua vim.g.toggle_rmpc()<cr>"; # Defined in extraConfigLua.lua
options.desc = "Show Rmpc";
}
# TODO: Something with the environment activation doesn't work
# {
# mode = "n";
# key = "<leader>.";
# action = "<cmd>lua vim.g.toggle_failnix()<cr>"; # Defined in extraConfigLua.lua
# options.desc = "Show FailNix";
# }
{
mode = "n";
key = "<leader>i";
@ -415,58 +408,6 @@ _: let
}
];
leader-opencode = [
{
mode = ["n" "v"];
key = "<leader>o";
action = "+opencode";
}
{
mode = ["n" "v"];
key = "<leader>oo";
action.__raw = ''function() require("opencode").ask("@this: ") end'';
options.desc = "Ask about @this";
}
{
mode = ["n" "v"];
key = "<leader>od";
action.__raw = ''function() require("opencode").prompt("Explain @diagnostics") end'';
options.desc = "Explain @diagnostics";
}
{
mode = ["n" "v"];
key = "<leader>oe";
action.__raw = ''function() require("opencode").prompt("Explain @this and its context") end'';
options.desc = "Explain @this";
}
{
mode = ["n" "v"];
key = "<leader>or";
action.__raw = ''function() require("opencode").prompt("Review @this for correctness and readability") end'';
options.desc = "Review @this";
}
{
mode = ["n" "v"];
key = "<leader>os";
action.__raw = ''function() require("opencode").select() end'';
options.desc = "Select Action";
}
{
mode = "n";
key = "<leader>oa";
action.__raw = ''function() return require("opencode").operator("@this ") .. "_" end'';
options.desc = "Append Line to Prompt";
options.expr = true;
}
{
mode = "v";
key = "<leader>oa";
action.__raw = ''function() return require("opencode").operator("@this ") end'';
options.desc = "Append Range to Prompt";
options.expr = true;
}
];
leader-file = [
{
mode = "n";
@ -564,48 +505,6 @@ _: let
action = "<cmd>lua Snacks.picker.help()<cr>";
options.desc = "Helptags Picker";
}
{
mode = "n";
key = "<leader>hd";
action = "+devdocs";
}
# {
# mode = "n";
# key = "<leader>hdd";
# action.__raw = ''
# function()
# local devdocs = require("devdocs")
# local installedDocs = devdocs.GetInstalledDocs()
# vim.ui.select(installedDocs, {}, function(selected)
# if not selected then
# return
# end
# local docDir = devdocs.GetDocDir(selected)
# -- prettify the filename as you wish
# Snacks.picker.files({ cwd = docDir })
# end)
# end
# '';
# options.desc = "Open Devdocs";
# }
{
mode = "n";
key = "<leader>hdd";
action = "<cmd>DevDocs get<cr>";
options.desc = "Open Devdocs in Split";
}
{
mode = "n";
key = "<leader>hdi";
action = "<cmd>DevDocs install<cr>";
options.desc = "Install Devdocs";
}
{
mode = "n";
key = "<leader>hdD";
action = "<cmd>DevDocs delete<cr>";
options.desc = "Delete Devdocs";
}
];
leader-quit = [
@ -1057,7 +956,6 @@ in
no-leader
leader
leader-opencode
leader-file
leader-help
leader-quit

View File

@ -1,4 +1,4 @@
{config, ...}: {
_: {
showmode = false; # Status line already shows this
backspace = ["indent" "eol" "start"];
termguicolors = true; # Required by multiple plugins
@ -37,7 +37,7 @@
# swapfile = true;
# backup = false;
undofile = true;
undodir = "${config.home.homeDirectory}/.vim/undo";
undodir = "/home/christoph/.vim/undo";
undolevels = 10000;
# autochdir = true;
confirm = true;

View File

@ -19,51 +19,30 @@ in {
}
];
gtk = let
gtkConfig = {
enable = true;
gtk = {
enable = true;
iconTheme.package = color.iconPackage;
iconTheme.name = color.iconTheme;
colorScheme = "dark";
colorScheme = "dark";
gtk3.colorScheme = "dark";
gtk4.colorScheme = "dark";
iconTheme = {
package = color.iconPackage;
name = color.iconTheme;
};
cursorTheme = {
name = color.cursor;
package = color.cursorPackage;
};
theme = {
# name = "adw-gtk3-dark";
# package = pkgs.adw-gtk3;
name = "catppuccin-mocha-mauve-standard";
package = pkgs.catppuccin-gtk.override {
variant = "mocha";
accents = ["mauve"];
size = "standard";
};
theme = {
# name = "adw-gtk3-dark";
# package = pkgs.adw-gtk3;
name = "catppuccin-mocha-mauve-standard";
package = pkgs.catppuccin-gtk.override {
variant = "mocha";
accents = ["mauve"];
size = "standard";
};
};
gtkExtraConfig = {
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
in
gtkConfig
// {
gtk3 =
gtkConfig
// {
extraConfig = gtkExtraConfig;
};
gtk4 =
gtkConfig
// {
extraConfig = gtkExtraConfig;
};
};
};
dconf = {
enable = true;
@ -151,9 +130,8 @@ in {
xwayland-satellite
# ncpamixer # Audio control
wiremix # Audio control
awww
swww
waypaper
wtype # For elephant
# GTK apps (look good and work well with xdg portals)
nautilus # Fallback file chooser used by xdg-desktop-portal-gnome
@ -217,10 +195,6 @@ in {
default = ["desktopapplications"];
};
empty = ["desktopapplications"];
selection_wrap = true;
hide_quick_activation = true;
actions_as_menu = true;
};
themes."cattpuccin-mocha" = let
@ -461,27 +435,10 @@ in {
prefer-no-csd = true; # Disable client-side decorations (e.g. window titlebars)
spawn-at-startup = [
{
argv = [
"ashell"
"-c"
"${config.paths.dotfiles}/ashell/config.toml"
];
}
{
argv = [
"waypaper"
"--restore"
];
}
{argv = ["ashell" "-c" "${config.paths.dotfiles}/ashell/config.toml"];}
{argv = ["waypaper" "--restore"];}
{
argv = [
"kitty"
"--hold"
"fastfetch"
];
}
{argv = ["kitty" "--hold" "fastfetch"];}
{argv = ["fcitx5"];}
# {argv = ["zeal"];}
# {argv = ["protonvpn-app"];}
@ -492,36 +449,16 @@ in {
];
workspaces = {
"1" = {
open-on-output = "DP-1";
};
"2" = {
open-on-output = "DP-1";
};
"3" = {
open-on-output = "DP-1";
};
"4" = {
open-on-output = "DP-1";
};
"5" = {
open-on-output = "DP-1";
};
"6" = {
open-on-output = "DP-1";
};
"7" = {
open-on-output = "DP-1";
};
"8" = {
open-on-output = "DP-1";
};
"9" = {
open-on-output = "DP-1";
};
"10" = {
open-on-output = "DP-2";
};
"1" = {open-on-output = "DP-1";};
"2" = {open-on-output = "DP-1";};
"3" = {open-on-output = "DP-1";};
"4" = {open-on-output = "DP-1";};
"5" = {open-on-output = "DP-1";};
"6" = {open-on-output = "DP-1";};
"7" = {open-on-output = "DP-1";};
"8" = {open-on-output = "DP-1";};
"9" = {open-on-output = "DP-1";};
"10" = {open-on-output = "DP-2";};
};
outputs = {
@ -562,12 +499,8 @@ in {
border = {
enable = true;
width = 2;
active = {
color = color.hex.accent;
};
inactive = {
color = color.hex.base;
};
active = {color = color.hex.accent;};
inactive = {color = color.hex.base;};
};
# This border is drawn OUTSIDE of the focused window
@ -578,9 +511,7 @@ in {
# Hint where a dragged window will be inserted
insert-hint = {
enable = true;
display = {
color = color.hex.accentDim;
};
display = {color = color.hex.accentDim;};
};
always-center-single-column = true;
@ -603,9 +534,7 @@ in {
};
gestures = {
hot-corners = {
enable = false;
};
hot-corners = {enable = false;};
};
window-rules = [
@ -634,50 +563,20 @@ in {
# opacity = 0.8;
}
# Floating + unmaximized windows
{
matches = [
{app-id = "com.github.finefindus.eyedropper";}
{app-id = "re.sonny.Junction";}
];
open-maximized = false;
open-floating = true;
# default-floating-position = {
# x = 0;
# y = 0;
# relative-to = "center";
# };
}
# Specific floating windows
{
matches = [
{app-id = "re.sonny.Junction";}
];
default-column-width.fixed = 500;
default-window-height.fixed = 250;
}
{
matches = [
{app-id = "com.github.finefindus.eyedropper";}
];
default-column-width.fixed = 250;
default-window-height.fixed = 500;
}
# Rules for specific windows
{
matches = [
{app-id = "neovide";}
{app-id = "dev.zed.Zed";}
{app-id = "code";}
{app-id = "jetbrains-clion";}
];
matches = [{app-id = "Zotero";}];
open-on-workspace = "2";
}
{
matches = [{app-id = "neovide";}];
open-on-workspace = "2";
open-maximized = true;
}
{
matches = [{app-id = "jetbrains-clion";}];
open-on-workspace = "2";
open-maximized = true;
open-focused = true;
}
{
matches = [{app-id = "code-url-handler";}];
@ -685,21 +584,8 @@ in {
open-floating = true;
}
{
matches = [
{
app-id = "electron";
title = ".*Chriphost - Obsidian.*";
}
];
matches = [{app-id = "obsidian";}];
open-on-workspace = "3";
# open-maximized = true;
open-focused = true;
}
{
matches = [{app-id = "Zotero";}];
open-on-workspace = "3";
# open-maximized = true;
open-focused = true;
}
{
matches = [{app-id = "firefox";}];
@ -728,12 +614,6 @@ in {
open-floating = true;
open-maximized = true;
}
{
matches = [{app-id = "factorio";}];
open-on-workspace = "6";
# open-floating = true;
open-maximized = true;
}
{
matches = [{app-id = "signal";}];
open-on-workspace = "7";
@ -756,14 +636,6 @@ in {
draw-behind-window = true;
};
}
# TODO: Missing niri-flake update
# {
# matches = [{namespace = "walker";}];
#
# background-effect = {
# blur = true;
# };
# }
];
debug = {
@ -772,211 +644,93 @@ in {
};
# TODO: Move values to config option and set in home/christoph/niri.nix
binds = with config.lib.niri.actions; let
sessionMenu = mylib.rofi.mkMenu {
prompt = "Session";
layers = [
{
binds = with config.lib.niri.actions; {
# Applications
"Mod+T" = {
action = spawn "kitty";
hotkey-overlay = {title = "Spawn Kitty.";};
};
"Mod+E" = {
action = spawn "kitty" "--title=Yazi" "yazi";
hotkey-overlay = {title = "Spawn Yazi.";};
};
"Mod+B" = {
action = spawn "kitty" "--title=Btop" "btop";
hotkey-overlay = {title = "Spawn Btop.";};
};
"Mod+R" = {
action = spawn "kitty" "--title=Rmpc" "rmpc";
hotkey-overlay = {title = "Spawn Rmpc.";};
};
"Mod+N" = {
action = spawn "neovide";
hotkey-overlay = {title = "Spawn Neovide.";};
};
"Mod+Ctrl+N" = {
action = spawn "kitty" "--title=Navi" "navi";
hotkey-overlay = {title = "Call Navi for help.";};
};
"Mod+Shift+N" = {
action = spawn "neovide" "${config.paths.dotfiles}/navi/christoph.cheat";
hotkey-overlay = {title = "Edit the Navi cheats.";};
};
"Mod+Shift+F" = {
action = spawn "neovide" "${config.paths.dotfiles}/flake.nix";
hotkey-overlay = {title = "Edit the NixFlake.";};
};
"Mod+W" = {
action = spawn "waypaper";
hotkey-overlay = {title = "Open wallpaper chooser.";};
};
"Mod+Shift+W" = {
action = spawn "waypaper" "--random";
hotkey-overlay = {title = "Select random wallpaper.";};
};
"Mod+A" = {
action = spawn "walker" "-m" "desktopapplications";
hotkey-overlay = {title = "Toggle the application launcher.";};
};
"Mod+Shift+A" = {
action = spawn "walker" "-m" "providerlist";
hotkey-overlay = {title = "Toggle the launcher.";};
};
"Mod+Escape" = let
powerMenu = mylib.rofi.mkSimpleMenu rec {
prompt = "Session";
attrs = {
"󰤂 Poweroff" = "poweroff";
"󰜉 Reboot" = "reboot";
"󰌾 Lock" = "loginctl lock-session";
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
# " Reload Hyprland" = "hyprctl reload";
# " Exit Hyprland" = "hyprctl dispatch exit";
" Exit Niri" = "niri msg action quit";
}
];
prompts = ["Select Session Action"];
rofiCmd = "walker -d";
};
wallpaperMenu = mylib.rofi.mkMenu {
prompt = "Wallpaper";
layers = [
"eza -1 ${config.paths.nixflake}/wallpapers"
];
prompts = ["Select Wallpaper"];
# Use waypaper instead of swww directly, so the chosen wallpaper will be restored after reboot
command = "waypaper --wallpaper ${config.paths.nixflake}/wallpapers/$OPTION0";
rofiCmd = "walker -d";
};
# No lectures anymore :) - Kept as example
lecturesMenu = mylib.rofi.mkMenu {
prompt = "Lecture";
layers = [
"eza -1 -D ~/Notes/TU"
"eza -1 -D ~/Notes/TU/$OPTION0"
"eza -1 ~/Notes/TU/$OPTION0/$OPTION1 | grep '.pdf'"
];
prompts = [
"Select Lecture"
"Select Subfolder"
"Select Deck"
];
command = "xdg-open ~/Notes/TU/$OPTION0/$OPTION1/$OPTION2";
rofiCmd = "walker -d";
};
# niriMenu = mylib.rofi.mkMenu {
# prompt = "Niri";
# layers = [
# {
# "󰹑 Take Region Screenshot" = "niri msg action screenshot -p false";
# "󰹑 Take Window Screenshot" = "niri msg action screenshot-window -p false -d true";
# "󰹑 Take Full-Screen Screenshot" = "niri msg action screenshot-screen -p false -d true";
# }
# ];
# prompts = ["Execute Niri Action"];
# rofiCmd = "walker -d";
# };
globalMenu = mylib.rofi.mkMenu {
prompt = "Global";
layers = [
{
" Control Session" = "${sessionMenu}/bin/rofi-menu-Session";
"󰸉 Change Wallpaper" = "${wallpaperMenu}/bin/rofi-menu-Wallpaper";
"󰋗 View Keybindings" = "niri msg action show-hotkey-overlay";
" Open Lecture Material" = "${lecturesMenu}/bin/rofi-menu-Lecture";
# " Niri Actions" = "${niriMenu}/bin/rofi-menu-Niri";
# TODO: What else? SSH menu?
}
];
prompts = ["Select Action"];
rofiCmd = "walker -d";
};
in {
# DMenu
"Mod+Shift+A" = {
action = spawn "walker" "-m" "providerlist";
hotkey-overlay = {
title = "Toggle the launcher.";
};
};
"Mod+A" = {
action = spawn "walker" "-m" "desktopapplications";
hotkey-overlay = {
title = "Toggle the application launcher.";
};
command = "walker -d -p ${prompt}";
};
in {
action = spawn "${powerMenu}/bin/rofi-menu-Session";
hotkey-overlay = {title = "Toggle the session menu.";};
};
"Mod+C" = {
action = spawn "walker" "-m" "clipboard";
hotkey-overlay = {
title = "Show clipboard history.";
};
};
"Mod+Escape" = {
action = spawn "${sessionMenu}/bin/rofi-menu-Session";
hotkey-overlay = {
title = "Toggle the session menu.";
};
};
"Mod+W" = {
action = spawn "${wallpaperMenu}/bin/rofi-menu-Wallpaper";
hotkey-overlay = {
title = "Open wallpaper menu.";
};
};
"Mod+D" = {
action = spawn "${globalMenu}/bin/rofi-menu-Global";
hotkey-overlay = {
title = "Open global menu.";
};
};
# Applications
"Mod+Ctrl+W" = {
action = spawn "waypaper";
hotkey-overlay = {
title = "Open waypaper.";
};
};
"Mod+Shift+W" = {
action = spawn "waypaper" "--random";
hotkey-overlay = {
title = "Select random wallpaper.";
};
};
"Mod+T" = {
action = spawn "kitty";
hotkey-overlay = {
title = "Spawn Kitty.";
};
};
"Mod+E" = {
action = spawn "kitty" "--title=Yazi" "yazi";
hotkey-overlay = {
title = "Spawn Yazi.";
};
};
"Mod+B" = {
action = spawn "kitty" "--title=Btop" "btop";
hotkey-overlay = {
title = "Spawn Btop.";
};
};
"Mod+R" = {
action = spawn "kitty" "--title=Rmpc" "rmpc";
hotkey-overlay = {
title = "Spawn Rmpc.";
};
};
"Mod+N" = {
action = spawn "neovide";
hotkey-overlay = {
title = "Spawn Neovide.";
};
};
"Mod+Ctrl+N" = {
action = spawn "kitty" "--title=Navi" "navi";
hotkey-overlay = {
title = "Call Navi for help.";
};
};
"Mod+Shift+N" = {
action = spawn "neovide" "${config.paths.dotfiles}/navi/christoph.cheat";
hotkey-overlay = {
title = "Edit the Navi cheats.";
};
};
"Mod+Shift+F" = {
action = spawn "neovide" "${config.paths.dotfiles}/flake.nix";
hotkey-overlay = {
title = "Edit the NixFlake.";
};
hotkey-overlay = {title = "Show clipboard history.";};
};
# Screenshots
"Mod+S" = {
action.screenshot-window = {
write-to-disk = true;
show-pointer = false;
};
hotkey-overlay = {
title = "Take a screenshot of the current window.";
};
};
"Mod+Ctrl+S" = {
action.screenshot-screen = {
write-to-disk = true;
show-pointer = false;
};
hotkey-overlay = {
title = "Take a screenshot of the current screen.";
};
action.screenshot-window = {write-to-disk = true;};
hotkey-overlay = {title = "Take a screenshot of the current window.";};
};
"Mod+Shift+S" = {
action.screenshot = {
show-pointer = false;
};
hotkey-overlay = {
title = "Take a screenshot of a region.";
};
action.screenshot = {show-pointer = true;};
hotkey-overlay = {title = "Take a screenshot of a region.";};
};
# Niri
"Mod+Shift+Slash" = {
action = show-hotkey-overlay;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
# "Alt+Tab" = {
# action = "next-window";
@ -990,283 +744,191 @@ in {
# Audio
"XF86AudioRaiseVolume" = {
action = spawn "wpctl" "set-volume" "-l" "1.5" "@DEFAULT_AUDIO_SINK@" "5%+";
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"XF86AudioLowerVolume" = {
action = spawn "wpctl" "set-volume" "-l" "1.5" "@DEFAULT_AUDIO_SINK@" "5%-";
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"XF86AudioPlay" = {
action = spawn "playerctl" "play-pause";
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"XF86AudioPrev" = {
action = spawn "playerctl" "previous";
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"XF86AudioNext" = {
action = spawn "playerctl" "next";
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
# Niri windows
"Mod+Q" = {
action = close-window;
hotkey-overlay = {
title = "Close the current window.";
};
hotkey-overlay = {title = "Close the current window.";};
};
"Mod+F" = {
action = fullscreen-window;
hotkey-overlay = {
title = "Toggle between fullscreen and tiled window.";
};
hotkey-overlay = {title = "Toggle between fullscreen and tiled window.";};
};
"Mod+Equal" = {
action = set-column-width "+10%";
hotkey-overlay = {
title = "Increase column width";
};
hotkey-overlay = {title = "Increase column width";};
};
"Mod+Minus" = {
action = set-column-width "-10%";
hotkey-overlay = {
title = "Decrease column width";
};
hotkey-overlay = {title = "Decrease column width";};
};
"Mod+Shift+M" = {
action = set-column-width "50%";
hotkey-overlay = {
title = "Set column width to 50%";
};
hotkey-overlay = {title = "Set column width to 50%";};
};
"Mod+M" = {
action = maximize-column;
hotkey-overlay = {
title = "Maximize column.";
};
hotkey-overlay = {title = "Maximize column.";};
};
"Mod+Comma" = {
action = reset-window-height;
hotkey-overlay = {
title = "Reset window height.";
};
hotkey-overlay = {title = "Reset window height.";};
};
"Mod+V" = {
action = toggle-window-floating;
hotkey-overlay = {
title = "Toggle between floating and tiled window.";
};
hotkey-overlay = {title = "Toggle between floating and tiled window.";};
};
"Mod+O" = {
action = toggle-overview;
hotkey-overlay = {
title = "Toggle overlay.";
};
hotkey-overlay = {title = "Toggle overlay.";};
};
"Mod+H" = {
action = focus-column-or-monitor-left;
hotkey-overlay = {
title = "Focus column on the left. Equivalent bindings for other directions.";
};
hotkey-overlay = {title = "Focus column on the left. Equivalent bindings for other directions.";};
};
"Mod+J" = {
action = focus-window-or-workspace-down;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+K" = {
action = focus-window-or-workspace-up;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+L" = {
action = focus-column-or-monitor-right;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+WheelScrollUp" = {
action = focus-column-left;
hotkey-overlay = {
title = "Focus column on the left. Equivalent binding for other direction.";
};
hotkey-overlay = {title = "Focus column on the left. Equivalent binding for other direction.";};
};
"Mod+WheelScrollDown" = {
action = focus-column-right;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+WheelScrollUp" = {
action = focus-workspace-up;
hotkey-overlay = {
title = "Focus previous workspace. Equivalent binding for other direction.";
};
hotkey-overlay = {title = "Focus previous workspace. Equivalent binding for other direction.";};
};
"Mod+Shift+WheelScrollDown" = {
action = focus-workspace-down;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+H" = {
action = move-column-left-or-to-monitor-left;
hotkey-overlay = {
title = "Move column to the left. Equivalent bindings for other directions.";
};
hotkey-overlay = {title = "Move column to the left. Equivalent bindings for other directions.";};
};
"Mod+Shift+J" = {
action = move-window-down-or-to-workspace-down;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+K" = {
action = move-window-up-or-to-workspace-up;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+L" = {
action = move-column-right-or-to-monitor-right;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
# Niri workspaces
"Mod+1" = {
action = focus-workspace 1;
hotkey-overlay = {
title = "Focus workspace 1. Equivalent bindings for other workspaces.";
};
hotkey-overlay = {title = "Focus workspace 1. Equivalent bindings for other workspaces.";};
};
"Mod+2" = {
action = focus-workspace 2;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+3" = {
action = focus-workspace 3;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+4" = {
action = focus-workspace 4;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+5" = {
action = focus-workspace 5;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+6" = {
action = focus-workspace 6;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+7" = {
action = focus-workspace 7;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+8" = {
action = focus-workspace 8;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+9" = {
action = focus-workspace 9;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+0" = {
action = focus-workspace 10;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+1" = {
action.move-window-to-workspace = 1;
hotkey-overlay = {
title = "Move current window to workspace 1. Equivalent bindings for other workspaces.";
};
hotkey-overlay = {title = "Move current window to workspace 1. Equivalent bindings for other workspaces.";};
};
"Mod+Shift+2" = {
action.move-window-to-workspace = 2;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+3" = {
action.move-window-to-workspace = 3;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+4" = {
action.move-window-to-workspace = 4;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+5" = {
action.move-window-to-workspace = 5;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+6" = {
action.move-window-to-workspace = 6;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+7" = {
action.move-window-to-workspace = 7;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+8" = {
action.move-window-to-workspace = 8;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+9" = {
action.move-window-to-workspace = 9;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
"Mod+Shift+0" = {
action.move-window-to-workspace = 10;
hotkey-overlay = {
hidden = true;
};
hotkey-overlay = {hidden = true;};
};
};
};

View File

@ -1,250 +0,0 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
headless,
inputs,
...
}: let
inherit (config.homemodules) packages color;
in {
options.homemodules.packages = import ./options.nix {inherit lib mylib;};
config = lib.mkIf packages.enable {
# TODO: Add extra packages option and use that from host-specific configs
home.packages = with pkgs;
lib.mkMerge [
# Common packages
[
# Shell utils
(ripgrep.override {withPCRE2 = true;}) # fast as fuck
gdu # Alternative to du-dust (I like it better)
duf # Disk usage analyzer (for all disk overview)
sd # Sed alternative
fclones # Duplicate file finder
tealdeer # Very fast tldr (so readable man)
killall
atool # Archive preview
exiftool
ouch # Unified compression/decompression
ffmpegthumbnailer # Video thumbnails
mediainfo # Media meta information
file # File meta information
unrar # Cooler WinRar
p7zip # Zip stuff
unzip # Unzip stuff
progress # Find coreutils processes and show their progress
tokei # Text file statistics in a project
ttyper
wiki-tui
# Nix
nix-search-tv # Search nixpkgs, nur, nixos options and homemanager options
nix-tree # Browse the nix store sorted by size (gdu for closures)
inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default # Search nixpkgs
# Video/Image/Audio utils
ffmpeg-full # I love ffmpeg (including ffplay)
ffmpeg-normalize # Normalize audio
# Document utils
poppler-utils # pdfunite
pdf2svg # extract vector graphics from pdf
pandoc # document converting madness
# Networking
dig # Make DNS requests
tcpdump # Listen in on TCP traffic
gping # ping with graph
curlie # curl a'la httpie
wget # download that shit
doggo # dns client
rsync # cp on steroids
rclone # Rsync for cloud
httpie # Cool http client
speedtest-cli
bandwhich
snitch
# Use NixCommunity binary cache
cachix
]
# Common !headless packages
(lib.optionals (!headless) [
ripdrag # drag & drop from terminal
# jellyfin-tui # Use module
inputs.masssprings.packages.${stdenv.hostPlatform.system}.default
])
# Linux exclusive packages
(lib.optionals (pkgs.stdenv.isLinux) [
pastel # Color tools
nvd # Nix rebuild diff
nurl # Generate nix fetcher sections based on URLs
# python313 # Nicer scripting than bash
lazyjournal # Journalctl viewer
systemctl-tui
restic # Backups
gnumake
just # make alternative
binsider # .elf analyzer
jujutsu # git-like vcs
lurk # strace analysis
radare2
disktui
lldb
# Hardware/Software info
pciutils # lspci
mesa-demos # OpenGL info
wayland-utils # wayland-info
clinfo # OpenCL info
vulkan-tools # vulkaninfo
libva-utils # vainfo
vdpauinfo # Video-Decode and Presentation API for Unix info
hwloc # Generate CPU topology diagram
lm_sensors # Readout hardware sensors
acpica-tools # Dump ACPI tables etc.
smartmontools # Disk health
nvme-cli # NVME disk health
# Video/Image/Audio utils
imagemagick # Convert image (magic)
mp3val # Validate mp3 files
flac # Validate flac files
# Document utils
graphviz # generate graphs from code
d2 # generate diagrams from code
plantuml # generate diagrams
gnuplot # generate function plots
# Networking
traceroute # "Follow" a packet
cifs-utils # Mount samba shares
nfs-utils # Mount NFS shares
sshfs # Mount remote directories via SSH
# Run unpatched binaries on NixOS
# Sets NIX_LD_LIBRARY_PATH and NIX_LD variables for nix-ld.
# Usage: "nix-alien-ld -- <Executable>".
inputs.nix-alien.packages.${pkgs.stdenv.hostPlatform.system}.nix-alien
])
# Linux exclusive packages (!headless)
(lib.optionals (pkgs.stdenv.isLinux && (!headless)) [
wl-clipboard
# Proton
proton-vpn
protonmail-bridge-gui
# GUI stuff
signal-desktop
anki
nextcloud-client
keepassxc
thunderbird # TODO: Email module
obsidian
zotero
zeal # docs browser
vlc
audacity
# ferdium
# feishin # electron :(
playerctl # Media player control
czkawka-full # file deduplicator
binaryninja-free # reverse engineering
tableplus # database explorer
# opencode-desktop
lmstudio # TODO: Ollama
# Office
kdePackages.wacomtablet # For xournalpp/krita
xournalpp # Write with a pen, like old people
hunspell # I cna't type
hunspellDicts.en_US
hunspellDicts.de_DE
# GTK-Apps
# gnome-calculator
# gnome-calendar
# helvum # unmaintained
crosspipe
nautilus # Just in case
font-manager # Previews fonts, but doesn't set them
gparted
resources
# celluloid
# cine
eyedropper
junction
])
# Darwin exclusive packages
(lib.optionals pkgs.stdenv.isDarwin [
# Use homebrew instead
# alt-tab-macos
# discord
# obsidian
# nextcloud-client
# proton-vpn
# iina
# TODO: Update the docs module to be darwinix compatible
# - The filepaths need to be adapted
texliveFull
typst
])
];
programs = {
# The home-manager management tool.
# Will only be enabled if HM is installed standalone.
home-manager.enable = true;
direnv = {
enable = true;
enableFishIntegration = true;
silent = true;
nix-direnv.enable = true;
};
# This replaces the normal direnv.enableFishIntegration.
# direnv-instant = {
# enable = true;
# enableFishIntegration = true;
# enableKittyIntegration = true;
# settings.use_cache = true;
# };
eza = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
fd.enable = true;
fzf = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
navi = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
yt-dlp.enable = true;
zoxide = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
};
};
}

View File

@ -1,7 +0,0 @@
{
lib,
mylib,
...
}: {
enable = lib.mkEnableOption "Enable common packages";
}

View File

@ -47,8 +47,6 @@ in {
wrap_navigation: false,
enable_mouse: true,
enable_config_hot_reload: true,
enable_lyrics_hot_reload: true,
enable_lyrics_index: true,
status_update_interval_ms: 1000,
rewind_to_start_sec: 30,
lyrics_dir: "${config.home.homeDirectory}/Music",
@ -90,37 +88,24 @@ in {
(
name: "Queue (1)",
pane: Split(
borders: "NONE",
direction: Horizontal,
panes: [
// Left Column (Queue + Cava)
(
size: "70%",
borders: "NONE",
pane: Split(
direction: Vertical,
panes: [
(
size: "75%",
borders: "ALL",
border_symbols: Rounded,
pane: Split(
direction: Vertical,
panes: [
(
size: "2",
pane: Pane(QueueHeader()),
),
(
size: "100%",
pane: Pane(Queue),
),
],
),
pane: Pane(Queue),
),
(
size: "25%",
borders: "ALL",
border_symbols: Rounded,
pane: Pane(Cava),
)
]
@ -130,19 +115,18 @@ in {
// Right Column (AlbumArt + Lyrics)
(
size: "30%",
borders: "NONE",
pane: Split(
direction: Vertical,
panes: [
(
size: "75%",
borders: "ALL",
border_symbols: Rounded,
pane: Pane(AlbumArt),
),
(
size: "25%",
borders: "ALL",
border_symbols: Rounded,
pane: Pane(Lyrics),
),
]
@ -153,59 +137,31 @@ in {
),
(
name: "Albums (2)",
pane: Split(
size: "100%",
direction: Vertical,
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Albums))],
)
pane: Pane(Albums),
),
(
name: "Album Artists (3)",
pane: Split(
size: "100%",
direction: Vertical,
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(AlbumArtists))],
)
pane: Pane(AlbumArtists),
),
(
name: "Artists (4)",
pane: Split(
size: "100%",
direction: Vertical,
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Artists))],
)
pane: Pane(Artists),
),
(
name: "Playlists (5)",
pane: Split(
size: "100%",
direction: Vertical,
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Playlists))],
)
pane: Pane(Playlists),
),
// (
// name: "Directories (6)",
// pane: Split(
// size: "100%",
// direction: Vertical,
// panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Directories))],
// )
// pane: Pane(Directories),
// ),
(
name: "Search (6)",
pane: Split(
size: "100%",
direction: Vertical,
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Search))],
)
pane: Pane(Search),
),
// (
// name: "Visualizer (8)",
// pane: Split(
// size: "100%",
// direction: Vertical,
// panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Cava))],
// )
// pane: Pane(Cava),
// ),
],
@ -331,6 +287,8 @@ in {
#![enable(unwrap_variant_newtypes)]
(
default_album_art_path: None,
show_song_table_header: true,
draw_borders: true,
format_tag_separator: " | ",
browser_column_widths: [20, 38, 42],
modal_backdrop: false,
@ -437,8 +395,6 @@ in {
),
(
pane: Pane(Tabs),
borders: "ALL",
border_symbols: Rounded,
size: "3",
),
(

View File

@ -1,73 +0,0 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}: let
inherit (config.homemodules) ssh color;
in {
options.homemodules.ssh = import ./options.nix {inherit lib mylib;};
config = lib.mkIf ssh.enable {
programs.ssh = {
enable = true;
enableDefaultConfig = false;
settings = {
"*" = {
ForwardAgent = false;
AddKeysToAgent =
if pkgs.stdenv.isLinux
then "no"
else "yes"; # Don't have keychain on darwin
Compression = true;
ServerAliveInterval = 0;
ServerAliveCountMax = 3;
HashKnownHosts = false;
UserKnownHostsFile = "~/.ssh/known_hosts";
ControlMaster = "no";
ControlPath = "~/.ssh/master-%r@%n:%p";
ControlPersist = "no";
};
"nixinator" = {
Port = 5432;
User = "christoph";
HostName = "vps.chriphost.de";
};
"servenix" = {
User = "christoph";
HostName = "local.chriphost.de";
};
"thinknix" = {
User = "christoph";
HostName = "think.chriphost.de";
};
"vps" = {
User = "root";
HostName = "vps.chriphost.de";
};
"mars" = {
User = "smchurla";
HostName = "mars.cs.tu-dortmund.de";
ServerAliveInterval = 60;
LocalForward = [
{
# Resultbrowser
bind.port = 22941;
host.address = "127.0.0.1";
host.port = 22941;
}
{
# Mysql
bind.port = 3306;
host.address = "127.0.0.1";
host.port = 3306;
}
];
};
};
};
};
}

View File

@ -1,7 +0,0 @@
{
lib,
mylib,
...
}: {
enable = lib.mkEnableOption "Enable ssh";
}

View File

@ -1,44 +0,0 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
headless,
...
}: let
inherit (config.homemodules) terminal color;
in {
options.homemodules.terminal = import ./options.nix {inherit lib mylib;};
config = lib.mkIf terminal.enable {
homemodules = {
bat.enable = true;
btop.enable = true;
fastfetch.enable = true;
fish.enable = true;
git = {
enable = true;
userName = "Christoph Urlacher";
userEmail = "christoph.urlacher@protonmail.com";
signCommits = true;
};
jellyfin-tui.enable = true;
kitty.enable = true;
lazygit.enable = true;
neovim = {
enable = true;
alias = true;
neovide = !headless;
};
ssh.enable = true;
tmux.enable = true;
yazi.enable = true;
};
};
}

View File

@ -1,7 +0,0 @@
{
lib,
mylib,
...
}: {
enable = lib.mkEnableOption "Enable terminal tools";
}

View File

@ -1,38 +0,0 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}: let
inherit (config.homemodules) tmux color;
in {
options.homemodules.tmux = import ./options.nix {inherit lib mylib;};
config = lib.mkIf tmux.enable {
programs.tmux = {
enable = true;
clock24 = true;
escapeTime = 0; # Delay after pressing escape
# keyMode = "vi";
terminal = "xterm-256color";
plugins = with pkgs; [
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha
'';
}
];
extraConfig = ''
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
'';
};
};
}

View File

@ -1,7 +0,0 @@
{
lib,
mylib,
...
}: {
enable = lib.mkEnableOption "Enable tmux";
}

View File

@ -1,89 +0,0 @@
# TODO: Expose some settings
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}:
with lib;
with mylib.modules; let
cfg = config.homemodules.vscode;
in {
options.homemodules.vscode = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable {
programs.vscode = {
enable = true;
package = pkgs.vscode;
mutableExtensionsDir = false;
profiles.default = {
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
enableMcpIntegration = true;
extensions = with pkgs.vscode-extensions; [
# Theme
catppuccin.catppuccin-vsc
catppuccin.catppuccin-vsc-icons
vscode-icons-team.vscode-icons
# General
vscodevim.vim
christian-kohler.path-intellisense
ryu1kn.partial-diff
redhat.vscode-yaml
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode.remote-explorer
anthropic.claude-code
# Python
ms-python.python
ms-python.vscode-pylance
ms-python.black-formatter
# C/C++
ms-vscode.cpptools
# llvm-vs-code-extensions.vscode-clangd
ms-vscode.cmake-tools
ms-vscode.makefile-tools
# llvm-org.lldb-vscode
vadimcn.vscode-lldb
# "13xforever".language-x86-64-assembly
# Latex
# james-yu.latex-workshop
# valentjn.vscode-ltex
];
keybindings = [];
globalSnippets = {};
languageSnippets = {};
userMcp = {};
userSettings = {
"editor.fontFamily" = config.homemodules.color.font;
"editor.fontSize" = 14;
"editor.smoothScrolling" = true;
"editor.cursorSmoothCaretAnimation" = "on";
"workbench.enableExperiments" = false;
"workbench.list.smoothScrolling" = true;
"workbench.colorTheme" = "Catppuccin Mocha";
"workbench.iconTheme" = "catppuccin-mocha";
"remote.SSH.configFile" = "~/.ssh/custom-config";
"workbench.welcomePage.walkthroughs.openOnInstall" = false;
"security.workspace.trust.enabled" = false;
"chat.disableAIFeatures" = false;
# C++
# "C_Cpp.intelliSenseEngine" = "disabled"; # IntelliSense conflics with Clangd
};
userTasks = {};
};
};
};
}

View File

@ -24,7 +24,7 @@ in {
output = waybar.monitors;
modules-left = ["custom/launcher" "niri/workspaces" "niri/window"]; # "user"
modules-center = ["mpris"]; # "systemd-failed-units"
modules-center = ["systemd-failed-units" "mpris"];
modules-right = ["privacy" "pulseaudio" "network" "disk" "cpu" "memory" "clock" "tray"];
"custom/launcher" = {
@ -77,11 +77,11 @@ in {
tooltip = true;
tooltip-icon-size = 24;
}
# {
# type = "audio-out";
# tooltip = true;
# tooltip-icon-size = 24;
# }
{
type = "audio-out";
tooltip = true;
tooltip-icon-size = 24;
}
{
type = "audio-in";
tooltip = true;
@ -105,29 +105,30 @@ in {
};
disk = {
interval = 5;
format = "<span>󰋊</span> {percentage_used}%";
on-click = "kitty --hold --title=Duf duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
};
cpu = {
interval = 1;
# states = {
# "critical" = 85;
# };
states = {
"warning" = 65;
"critical" = 85;
};
format = "<span></span> {load}%";
# format-critical = "<span color='#${color.hex.red}'><span></span> {load}%</span>";
format-warning = "<span color='#${color.hex.yellow}'><span></span> {load}%</span>";
format-critical = "<span color='#${color.hex.red}'><span></span> {load}%</span>";
on-click = "kitty --title=Btop btop";
tooltip = false;
};
memory = {
interval = 1;
# states = {
# "critical" = 85;
# };
states = {
"warning" = 65;
"critical" = 85;
};
format = "<span></span> {percentage}%";
# format-critical = "<span color='#${color.hex.red}'><span></span> {percentage}%</span>";
format-warning = "<span color='#${color.hex.yellow}'><span></span> {percentage}%</span>";
format-critical = "<span color='#${color.hex.red}'><span></span> {percentage}%</span>";
on-click = "kitty --title=Btop btop";
tooltip = true;
tooltip-format = "RAM: {used}GiB / {total}GiB\nSwap: {swapUsed}GiB / {swapTotal}GiB";
@ -143,7 +144,7 @@ in {
mode-mon-col = 3;
on-scroll = -1;
format = {
months = "<span color='#${color.hex.peach}'><b>{}</b></span>";
months = "<span color='#${color.hex.yellow}'><b>{}</b></span>";
days = "<span color='#${color.hex.flamingo}'><b>{}</b></span>";
weeks = "<span color='#${color.hex.teal}'><b>W{}</b></span>";
weekdays = "<span color='#${color.hex.lavender}'><b>{}</b></span>";
@ -193,26 +194,24 @@ in {
}
/* Background colors */
#custom-launcher {background-color: #${color.hex.accent};}
#workspaces button {background-color: #${color.hex.blue};}
#workspaces button.empty {background-color: #${color.hex.lavender};}
#workspaces button.active {background-color: #${color.hex.green};}
#workspaces button.urgent {background-color: #${color.hex.red};}
#window {background-color: #${color.hex.maroon};}
#mpris {background-color: #${color.hex.accent};}
#privacy {background-color: #${color.hex.red};}
#pulseaudio {background-color: #${color.hex.maroon};}
#network {background-color: #${color.hex.peach};}
#disk {background-color: #${color.hex.yellow};}
#cpu {background-color: #${color.hex.green};}
#memory {background-color: #${color.hex.teal};}
#clock {background-color: #${color.hex.sky};}
#tray {background-color: #${color.hex.accent};}
#custom-launcher {background-color: #${color.hex.accent};}
#workspaces button {background-color: #${color.hex.lavender};}
#workspaces button.active {background-color: #${color.hex.pink};}
#window {background-color: #${color.hex.maroon};}
#systemd-failed-units {background-color: #${color.hex.red};}
#mpris {background-color: #${color.hex.accent};}
#privacy {background-color: #${color.hex.red};}
#pulseaudio {background-color: #${color.hex.maroon};}
#network {background-color: #${color.hex.peach};}
#disk {background-color: #${color.hex.yellow};}
#cpu {background-color: #${color.hex.green};}
#memory {background-color: #${color.hex.teal};}
#clock {background-color: #${color.hex.sky};}
#tray {background-color: #${color.hex.accent};}
/* Square Widgets */
#custom-launcher,
#systemd-failed-units,
#mpris,
#tray {
color: #${color.hex.mantle};
@ -261,6 +260,10 @@ in {
margin: 0px 5px 0px 0px;
}
#systemd-failed-units {
margin: 0px 5px 0px 0px;
}
#tray {
margin: 0px 0px 0px 5px;
}

View File

@ -17,19 +17,7 @@ in {
shellWrapperName = "y";
plugins = {
inherit
(pkgs.yaziPlugins)
chmod
diff
full-border
git
lazygit
mount
ouch
rsync
starship
sudo
; # smart-paste
inherit (pkgs.yaziPlugins) chmod diff full-border git lazygit mount ouch rsync starship sudo; # smart-paste
};
initLua = ''
@ -82,12 +70,7 @@ in {
{
run = ''mpv "$@"'';
orphan = true;
desc = "Play selection with mpv";
}
{
run = ''vlc "$@"'';
orphan = true;
desc = "Play selection with vlc";
desc = "Play selection";
}
];
edit = [
@ -100,16 +83,7 @@ in {
open = [
{
run = ''xdg-open "$@"'';
desc = "Open selection with xdg-open";
}
{
run = ''imv "$@"'';
desc = "Open selection with imv";
}
{
# TODO: For some reason, junction does not exit after choosing an application...
run = ''junction "$@"'';
desc = "Open selection with junction";
desc = "Open selection";
}
];
extract = [
@ -127,13 +101,13 @@ in {
plugin.prepend_fetchers = [
{
group = "git";
url = "*";
id = "git";
name = "*";
run = "git";
}
{
group = "git";
url = "*/";
id = "git";
name = "*/";
run = "git";
}
];
@ -183,66 +157,42 @@ in {
mgr.prepend_keymap = [
{
on = [
"<C-p>"
"m"
];
on = ["<C-p>" "m"];
run = "plugin mount";
desc = "Manage device mounts";
}
{
on = [
"<C-p>"
"c"
];
on = ["<C-p>" "c"];
run = "plugin chmod";
desc = "Chmod selection";
}
{
on = [
"<C-p>"
"g"
];
on = ["<C-p>" "g"];
run = "plugin lazygit";
desc = "Run LazyGit";
}
{
on = [
"<C-p>"
"a"
];
on = ["<C-p>" "a"];
run = "plugin ouch";
desc = "Add selection to archive";
}
{
on = [
"<C-p>"
"d"
];
on = ["<C-p>" "d"];
run = ''shell -- ripdrag -a -n "$@"'';
desc = "Drag & drop selection";
}
{
on = [
"<C-p>"
"D"
];
on = ["<C-p>" "D"];
run = "plugin diff";
desc = "Diff the selected with the hovered file";
}
{
on = [
"<C-p>"
"r"
];
on = ["<C-p>" "r"];
run = "plugin rsync";
desc = "Copy files using rsync";
}
{
on = [
"<C-p>"
"w"
];
on = ["<C-p>" "w"];
run = ''wl-copy < "$0"'';
desc = "Copy hovered file contents using wl-copy";
}
@ -254,10 +204,7 @@ in {
}
{
on = "y";
run = [
''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list''
"yank"
];
run = [''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list'' "yank"];
desc = "Copy files to system clipboard on yank";
}
# {
@ -276,9 +223,7 @@ in {
# https://github.com/catppuccin/yazi/blob/main/themes/mocha/catppuccin-mocha-lavender.toml
theme = {
mgr = {
cwd = {
fg = color.hexS.teal;
};
cwd = {fg = color.hexS.teal;};
hovered = {
fg = color.hexS.accentText;
@ -335,9 +280,7 @@ in {
};
border_symbol = "";
border_style = {
fg = color.hexS.overlay0;
};
border_style = {fg = color.hexS.overlay0;};
};
tabs = {
@ -406,104 +349,58 @@ in {
bg = color.hexS.surface0;
};
perm_type = {
fg = color.hexS.blue;
};
perm_read = {
fg = color.hexS.yellow;
};
perm_write = {
fg = color.hexS.red;
};
perm_exec = {
fg = color.hexS.green;
};
perm_sep = {
fg = color.hexS.overlay0;
};
perm_type = {fg = color.hexS.blue;};
perm_read = {fg = color.hexS.yellow;};
perm_write = {fg = color.hexS.red;};
perm_exec = {fg = color.hexS.green;};
perm_sep = {fg = color.hexS.overlay0;};
};
input = {
border = {
fg = color.hexS.accentDim;
};
border = {fg = color.hexS.accentDim;};
title = {};
value = {};
selected = {
reversed = true;
};
selected = {reversed = true;};
};
pick = {
border = {
fg = color.hexS.accentDim;
};
active = {
fg = color.hexS.accentHl;
};
border = {fg = color.hexS.accentDim;};
active = {fg = color.hexS.accentHl;};
inactive = {};
};
confirm = {
border = {
fg = color.hexS.accentDim;
};
title = {
fg = color.hexS.accentDim;
};
border = {fg = color.hexS.accentDim;};
title = {fg = color.hexS.accentDim;};
content = {};
list = {};
btn_yes = {
reversed = true;
};
btn_yes = {reversed = true;};
btn_no = {};
};
cmp = {
border = {
fg = color.hexS.accentDim;
};
border = {fg = color.hexS.accentDim;};
};
tasks = {
border = {
fg = color.hexS.accentDim;
};
border = {fg = color.hexS.accentDim;};
title = {};
hovered = {
underline = true;
};
hovered = {underline = true;};
};
which = {
cand = {
fg = color.hexS.accent;
};
desc = {
fg = color.hexS.accentHl;
};
mask = {
bg = color.hexS.surface0;
};
rest = {
fg = color.hexS.surface0;
};
cand = {fg = color.hexS.accent;};
desc = {fg = color.hexS.accentHl;};
mask = {bg = color.hexS.surface0;};
rest = {fg = color.hexS.surface0;};
separator = " ";
separator_style = {
fg = color.hexS.text;
};
separator_style = {fg = color.hexS.text;};
};
help = {
on = {
fg = color.hexS.accent;
};
run = {
fg = color.hexS.accentHl;
};
desc = {
fg = color.hexS.text;
};
on = {fg = color.hexS.accent;};
run = {fg = color.hexS.accentHl;};
desc = {fg = color.hexS.text;};
hovered = {
fg = color.hexS.accentText; # TODO: This is not applied
@ -518,31 +415,19 @@ in {
};
notify = {
title_info = {
fg = color.hexS.teal;
};
title_warn = {
fg = color.hexS.yellow;
};
title_error = {
fg = color.hexS.red;
};
title_info = {fg = color.hexS.teal;};
title_warn = {fg = color.hexS.yellow;};
title_error = {fg = color.hexS.red;};
};
spot = {
border = {
fg = color.hexS.lavender;
};
title = {
fg = color.hexS.lavender;
};
border = {fg = color.hexS.lavender;};
title = {fg = color.hexS.lavender;};
tbl_cell = {
fg = color.hexS.lavender;
reversed = true;
};
tbl_col = {
bold = true;
};
tbl_col = {bold = true;};
};
# Default rules good enough

View File

@ -1,199 +0,0 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}: let
inherit (config.homemodules) zed color;
in {
options.homemodules.zed = import ./options.nix {inherit lib mylib;};
config = lib.mkIf zed.enable {
programs.zed-editor = {
enable = true;
package = pkgs.zed-editor;
enableMcpIntegration = true;
mutableUserKeymaps = false;
mutableUserSettings = false;
mutableUserTasks = false;
mutableUserDebug = false;
extensions = [
"catppuccin"
"catppuccin-icons"
"comment"
"git-firefly"
"nix"
"perl"
"fish"
"lua"
"toml"
"csharp"
"java"
"latex"
"typst"
"haskell"
"glsl"
"mermaid"
"clojure"
"verilog"
"qml"
"plantuml"
"graphviz"
"dockerfile"
"docker-compose"
"html"
"xml"
"scss"
"rainbow-csv"
"sql"
"svelte"
"svelte-mcp"
"jinja2"
"just"
"make"
"neocmake"
"assembly"
"wat"
"linkerscript"
"r"
];
themes = {};
userDebug = [];
# TODO: Add neovim keymaps
userKeymaps = [
{
context = "Workspace";
bindings = {
"ctrl-/" = "terminal_panel::Toggle";
};
}
{
context = "Editor";
unbind = {
"ctrl-/" = [
"editor::ToggleComments"
{
advance_downwards = false;
}
];
};
}
{
context = "(vim_mode == normal || vim_mode == visual) && !menu";
bindings = {
"ctrl-c" = "editor::ToggleComments";
};
}
];
userSettings = {
buffer_font_family = config.homemodules.color.font;
terminal.font_family = config.homemodules.color.font;
theme = "Catppuccin Mocha";
icon_theme = "Catppuccin Mocha";
ui_font_size = 16;
buffer_font_size = 14;
project_panel.dock = "left";
outline_panel.dock = "left";
collaboration_panel.dock = "left";
git_panel = {
dock = "left";
tree_view = true;
};
# TODO: Doesn't work, although perlnavigator advertises Perl::Tidy autoformatting...
languages = {
Perl = {
formatter = "language_server";
};
};
auto_signature_help = true;
lsp = {
nil = {
initialization_options = {
formatting = {
# command = null;
command = ["${pkgs.alejandra}/bin/alejandra"];
};
};
};
nixd = {
initialization_options = {
formatting = {
command = ["${pkgs.alejandra}/bin/alejandra"];
};
};
};
# No idea how to configure the formatter
# perlnavigator-server = let
# # TODO: Duplicated in neovim/default.nix. Need Perl module.
# perl = pkgs.perl.withPackages (p:
# with p; [
# PLS
# PerlCritic
# PerlTidy
# NetOpenSSH
# DateTime
# DBI
# DBDMariaDB
# CursesUI
# TextCSV_XS
# ]);
# in {
# initialization_options = {
# "perlnavigator.perlPath" = "${perl}/bin";
# "perlnavigator.includePaths" = ["${perl}/lib/perl5"];
# };
# };
};
disable_ai = false;
agent = {
dock = "right";
sidebar_side = "right";
};
agent_servers = {
claude-acp = {
type = "registry";
};
codex-acp = {
type = "registry";
};
gemini = {
type = "registry";
};
mistral-vibe = {
type = "registry";
};
opencode = {
type = "registry";
};
};
telemetry = {
diagnostics = false;
metrics = false;
};
vim_mode = true;
which_key = {
enabled = true;
delay_ms = 10;
};
};
userTasks = [];
};
};
}

View File

@ -1,7 +0,0 @@
{
lib,
mylib,
...
}: {
enable = lib.mkEnableOption "Enable zed editor";
}

View File

@ -1,13 +0,0 @@
{
inputs,
pkgs,
lib,
...
}: {
# Standard DockerHub login used by all oci-container services.
# Usage: login = mylib.containers.mkDockerLogin config;
mkDockerLogin = config: {
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
}

View File

@ -13,5 +13,4 @@
rofi = import ./rofi.nix {inherit inputs pkgs lib;};
generators = import ./generators.nix {inherit inputs pkgs lib;};
color = import ./color.nix {inherit inputs pkgs lib;};
containers = import ./containers.nix {inherit inputs pkgs lib;};
}

View File

@ -43,8 +43,6 @@
routers,
nameservers,
routable,
# Extra addresses declared without creating routes (e.g. IPv6 ULA).
extraAddresses ? [],
}: {
enable = true;
@ -58,8 +56,7 @@
address = ips;
gateway = routers;
dns = nameservers;
routes = builtins.map (r: {Gateway = r;}) routers;
addresses = builtins.map (a: {Address = a;}) extraAddresses;
routes = builtins.map (r: {Gateway = r;}) routers; # TODO: We need to add a way to specify addresses without routes (IPv6 ULA)
# See man systemd.network
networkConfig = {

View File

@ -4,50 +4,6 @@
lib,
...
}: {
# Common nix daemon settings shared between NixOS and nix-darwin.
# Darwin additionally needs nix.enable = true.
mkCommonNixSettings = username: {
enable = true;
package = pkgs.nixVersions.stable;
extraOptions = ''
experimental-features = nix-command flakes pipe-operators
'';
settings = {
trusted-users = ["root" username];
auto-optimise-store = true;
download-buffer-size = 524288000; # 500MB
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
# "https://app.cachix.org/cache/nixos-rocm"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
];
};
gc = {
automatic = false;
options = "--delete-older-than 5d";
};
optimise = {
automatic = true;
};
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
nixPath = [
"nixpkgs=${inputs.nixpkgs.outPath}"
"home-manager=${inputs.home-manager.outPath}"
];
};
mkNixosConfigWithHomeManagerModule = {
system,
mylib,
@ -73,6 +29,7 @@
# Import the toplevel system configuration module.
../system
../system/cachix.nix
# Host specific configuration
../system/${hostname}
@ -146,11 +103,14 @@
# to allow installation of unfree software and my own overlays.
{nixpkgs.pkgs = pkgs;}
# Import the toplevel system configuration module.
../system/cachix.nix
# Host specific configuration
../system/${hostname}
# Import all of my custom system modules
../system/systemmodules/darwin.nix
# ../system/systemmodules # TODO:
]
extraModules

View File

@ -3,164 +3,79 @@
pkgs,
lib,
...
}: {
}: rec {
# Receives attrs like:
# {
# "Poweroff" = "poweroff";
# "Reload Hyprland" = "hyprctl reload";
# }
# mkSimpleMenu = let
# # Makes a string like ''"Poweroff" "Reload Hyprland"''
# unpack-options = attrs: "\"${lib.concatStringsSep "\" \"" (builtins.attrNames attrs)}\"";
#
# mkCase = option: action: "else if test \"${option}\" = $OPTION\n set ACTION \"${action}\"";
#
# cases = attrs:
# attrs
# |> builtins.mapAttrs mkCase
# |> builtins.attrValues
# |> builtins.concatStringsSep "\n";
# in
# {
# prompt,
# attrs,
# command ? ''rofi -dmenu -i'',
# }:
# pkgs.writeScriptBin "rofi-menu-${prompt}" ''
# #! ${pkgs.fish}/bin/fish
#
# # OPTIONS contains all possible values Rofi will display
# set OPTIONS ${unpack-options attrs}
#
# # We choose a single OPTION using Rofi
# set OPTION (echo -e (string join "\n" $OPTIONS) | ${command} -p "${prompt}")
#
# # Check if the chosen OPTION is a valid choice from OPTIONS
# if not contains $OPTION $OPTIONS
# exit
# end
#
# # Set a command to execute based on the chosen OPTION
# if false
# exit # Easier to generate with this
# ${cases attrs}
# else
# exit
# end
#
# # Execute the command
# eval $ACTION
# '';
mkSimpleMenu = let
# Makes a string like ''"Poweroff" "Reload Hyprland"''
unpack-options = attrs: "\"${lib.concatStringsSep "\" \"" (builtins.attrNames attrs)}\"";
# Rofi/Dmenu menu generator.
#
# Each element in `layers` is one of:
# - attrset { "Label" = "value"; } # static options: selected value → $OPTIONn
# - string "shell-cmd" # dynamic options from command: selected text → $OPTIONn
# # may reference $OPTION0, $OPTION1, ... from earlier layers
#
# The "command" is the last action, it can reference $OPTION0, $OPTION1, ...
# If no "command" is given and the last layer is a static attrset, its selected value is evaluated directly.
#
# The "prompts" list are optional per-layer prompt strings (falls back to "prompt" if not provided).
#
# vpn.fish equivalent:
# mkMenu {
# prompt = "vpn";
# layers = [
# "cat /etc/rofi-vpns"
# { "start" = "start"; "stop" = "stop"; "status" = "status"; }
# ];
# command = "systemctl $OPTION1 $OPTION0.service";
# }
#
# lectures.fish equivalent:
# mkMenu {
# prompt = "lecture";
# layers = [
# "eza -1 -D ~/Notes/TU"
# "eza -1 ~/Notes/TU/$OPTION0/Lecture | grep '.pdf'"
# ];
# command = "xdg-open ~/Notes/TU/$OPTION0/Lecture/$OPTION1";
# }
mkMenu = {
prompt,
layers,
prompts ? [],
command ? null,
rofiCmd ? "rofi -dmenu -i",
}: let
isStaticLayer = layer: builtins.isAttrs layer && !(layer ? options);
isDynamicLayer = layer: builtins.isString layer;
mkCase = option: action: "else if test \"${option}\" = $OPTION\n set ACTION \"${action}\"";
escStr = s: builtins.replaceStrings [''"'' "\\"] [''\"'' "\\\\"] s;
cases = attrs:
attrs
|> builtins.mapAttrs mkCase
|> builtins.attrValues
|> builtins.concatStringsSep "\n";
in
{
prompt,
attrs,
command ? ''rofi -dmenu -p " ${prompt} " -i'',
}:
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
#! ${pkgs.fish}/bin/fish
layerPrompt = i:
if i < builtins.length prompts
then lib.elemAt prompts i
else prompt;
# OPTIONS contains all possible values Rofi will display
set OPTIONS ${unpack-options attrs}
# Static layer: attrset of label -> value
# Displays labels in rofi; maps selected label to its value -> $OPTIONi
mkStaticLayer = i: attrs: let
lp = layerPrompt i;
labels = builtins.attrNames attrs;
optsStr = "\"${lib.concatStringsSep "\" \"" (map escStr labels)}\"";
mkCase = label: value: "else if test \"${escStr label}\" = $_LABEL${toString i}\n set OPTION${toString i} \"${escStr value}\"";
casesStr =
builtins.concatStringsSep "\n"
(builtins.attrValues (builtins.mapAttrs mkCase attrs));
in {
script = ''
set _OPTS${toString i} ${optsStr}
set _LABEL${toString i} (echo -e (string join "\n" $_OPTS${toString i}) | ${rofiCmd} -p "${lp}")
if not contains $_LABEL${toString i} $_OPTS${toString i}
# We choose a single OPTION using Rofi
set OPTION (echo -e (string join "\n" $OPTIONS) | ${command})
# Check if the chosen OPTION is a valid choice from OPTIONS
if not contains $OPTION $OPTIONS
exit
end
# Set a command to execute based on the chosen OPTION
if false
exit
${casesStr}
exit # Easier to generate with this
${cases attrs}
else
exit
end
# Execute the command
eval $ACTION
'';
};
# Dynamic layer: shell command string whose output is piped to rofi
# Selected text -> $OPTIONi; may reference earlier $OPTIONn variables
mkDynamicLayer = i: cmd: let
lp = layerPrompt i;
in {
script = ''
set OPTION${toString i} (${cmd} | ${rofiCmd} -p "${lp}")
if test -z $OPTION${toString i}
exit
end
'';
};
# TODO: I want to generate the containers menu using the actionsA and actionsB attrs:
# - actionsA will be generated from the stuff in oci-containers.containers
# - actionsB will be set statically for start, stop, status
mkLayer = i: layer:
if isStaticLayer layer
then mkStaticLayer i layer
else if isDynamicLayer layer
then mkDynamicLayer i layer
else throw "mkMenu: layer ${toString i} has invalid type";
layerResults = lib.imap0 mkLayer layers; # Map with 0-based index
layerScripts = map (r: r.script) layerResults;
lastLayer = lib.last layers;
finalCmd =
if command != null
then command
else if isStaticLayer lastLayer
then "$OPTION${toString (builtins.length layers - 1)}"
else throw "mkMenu: 'command' must be set when the last layer is not a static attrset";
# Receives attrs like:
# {
# optionA = "exa -1 -D ~/Notes/TU";
# optionB = "exa -1 -D ~/Notes/TU/$OPTIONA/Lecture | grep \".pdf\"";
# commandB = "xdg-open ~/Notes/TU/$OPTIONA/Lecture/$OPTIONB";
# }
#
# Keys:
# - optionA, optionB # Command that generates Rofi options:
# exa -1 -D ~/Notes/TU
# cat /etc/rofi-vpns
# - commandA, commandB # Action to execute after sth. was chosen (mutually excl. with command)
# - actionsA, actionsB # Configure actions by lookup (mutually excl. with command):
# actionsB = {"status" = "systemctl status..."}
# - colorA, colorB # Configure highlighting conditions:
# colorA = {"red" = "systemctl ... | grep ..."};
#
# Use $OPTIONA and $OPTIONB to use the options chosen by option<A/B>-command and rofi
# Use $EVALA and $EVALB to use the outputs generated by command<A/B>
mkMenu = let
in
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
#! ${pkgs.fish}/bin/fish
${lib.concatStringsSep "\n" layerScripts}
eval "${finalCmd}"
'';
prompt: attrs: "";
}

16
system/cachix.nix Normal file
View File

@ -0,0 +1,16 @@
# WARN: this file will get overwritten by $ cachix use <name>
{
pkgs,
lib,
...
}: let
folder = ./cachix;
toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
imports =
lib.mapAttrsToList toImport
(lib.filterAttrs filterCaches (builtins.readDir folder));
in {
inherit imports;
nix.settings.substituters = ["https://cache.nixos.org/"];
}

View File

@ -0,0 +1,14 @@
{
nix.settings = {
substituters = [
"https://nix-community.cachix.org"
# "https://app.cachix.org/cache/nixos-rocm"
# "https://ai.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
# "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
];
};
}

View File

@ -7,94 +7,34 @@
config,
inputs,
publicKeys,
hostname,
...
}: {
systemmodules = {
sops-nix.bootSecrets.${username} = [
"user-password"
nix = {
package = pkgs.nixVersions.stable;
extraOptions = ''
experimental-features = nix-command flakes pipe-operators
'';
settings.trusted-users = ["root" "${username}"];
gc.automatic = false;
gc.options = "--delete-older-than 5d";
settings.auto-optimise-store = true;
optimise.automatic = true;
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
nixPath = [
"nixpkgs=${inputs.nixpkgs.outPath}"
"home-manager=${inputs.home-manager.outPath}"
];
sops-nix.secrets.${username} = [
"ssh-private-key"
"nix-github-token"
"docker-password"
"jellyfin-password"
];
};
nix = mylib.nixos.mkCommonNixSettings username;
networking = {
hostName = "${hostname}";
localHostName = "${hostname}";
computerName = "${hostname}";
applicationFirewall = {
enable = true;
enableStealthMode = false;
allowSigned = true;
allowSignedApp = true;
blockAllIncoming = false;
};
knownNetworkServices = [
"Wi-Fi"
"Thunderbold Bridge"
];
dns = [
"192.168.86.26"
"8.8.8.8"
"8.8.4.4"
];
# wg-quick = {};
};
power = {
# restartAfterFreeze = false;
# restartAfterPowerFailure = false;
sleep = {
computer = 10; # 10 minutes until sleep
display = 5;
harddisk = 5;
};
};
system = {
primaryUser = "${username}";
# TODO:
defaults = {
# dock = {};
trackpad = {
ActuateDetents = true; # Haptic feedback
ActuationStrength = 1;
Clicking = true; # Tap to click
Dragging = true; # Double tap to drag
TrackpadRightClick = true;
TrackpadPinch = true;
};
};
keyboard = {
enableKeyMapping = true;
swapLeftCtrlAndFn = false;
swapLeftCommandAndLeftAlt = false;
};
};
users.users.${username} = {
name = "${username}";
description = "Christoph";
uid = 501;
gid = 20;
createHome = false;
home = "/Users/${username}";
isHidden = false;
description = "Christoph";
home = "/Users/${username}";
createHome = false;
# NOTE: Not set if the user already exists on darwin, so use chsh for the root user
shell = pkgs.fish;
@ -106,61 +46,16 @@
# packages = with pkgs; [];
};
environment.shells = with pkgs; [pkgs.fish];
environment.systemPackages = with pkgs; [
alejandra
neovim
wget
];
fonts.packages = with pkgs; [
nerd-fonts.jetbrains-mono
monolisa
];
programs = {
fish.enable = true;
};
services = {
# For another time maybe
# sketchybar = {};
# skhd = {};
# yabai = {};
};
# NOTE: Not installed automatically
homebrew = {
enable = true;
enableFishIntegration = true;
onActivation = {
autoUpdate = true;
cleanup = "zap"; # Uninstall unlisted casks and associated files on rebuild
upgrade = true;
};
# taps = [
# "homebrew-zathura/zathura"
# ];
brews = [];
casks = [
"alt-tab"
"discord"
"iina"
"nextcloud"
"obsidian"
"protonvpn"
"signal"
# "zathura"
# "zathura-pdf-mupdf"
"zotero"
];
};
# Set Git commit hash for darwin-version.
# system.configurationRevision = self.rev or self.dirtyRev or null;

View File

@ -91,7 +91,6 @@ with mylib.networking; {
"ssh-private-key"
"nix-github-token"
"docker-password"
"jellyfin-password"
];
};
@ -105,7 +104,31 @@ with mylib.networking; {
};
# Enable flakes
nix = mylib.nixos.mkCommonNixSettings username;
nix = {
package = pkgs.nixVersions.stable;
extraOptions = ''
experimental-features = nix-command flakes pipe-operators
'';
settings.trusted-users = ["root" "${username}"];
# Auto garbage-collect and optimize store
gc.automatic = false; # Done by nh.clean.enable;
gc.options = "--delete-older-than 5d";
settings.auto-optimise-store = true;
optimise.automatic = true;
# This will add your inputs as registries, making operations with them (such
# as nix shell nixpkgs#name) consistent with your flake inputs.
# (Registry contains flakes)
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
# Set NIX_PATH to find nixpgks
nixPath = [
"nixpkgs=${inputs.nixpkgs.outPath}"
"home-manager=${inputs.home-manager.outPath}"
];
};
# Bootloader/Kernel stuff
boot = {
@ -144,7 +167,7 @@ with mylib.networking; {
documentation = {
# NOTE: Disable this while configuring stuff, it's slow
enable = false;
enable = true;
man.enable = config.documentation.enable;
man.cache.enable = true; # Slow but needed for neovim man picker
info.enable = config.documentation.enable;
@ -235,7 +258,6 @@ with mylib.networking; {
description = "Christoph";
group = "users";
uid = 1000;
home = "/home/${username}";
extraGroups = [
"networkmanager"
"wheel"

View File

@ -12,6 +12,7 @@
./disks.nix
# General services
../services/comfyui.nix
../services/fileflows-node.nix
];
@ -155,7 +156,7 @@
};
boot = {
kernelPackages = pkgs.linuxPackages_zen;
# kernelPackages = pkgs.linuxPackages_zen;
# kernelPackages = pkgs.linuxPackages_latest;
# Why do I need to know if something fails during boot???
@ -190,25 +191,7 @@
# };
};
environment.systemPackages = with pkgs; [
spice
spice-gtk
];
virtualisation = {
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
# ovmf.enable = true; # deprecated
swtpm.enable = true;
runAsRoot = true;
};
};
spiceUSBRedirection.enable = true;
};
networking.firewall.trustedInterfaces = ["virbr0"]; # libvirt
# environment.systemPackages = with pkgs; [];
programs = {
ausweisapp = {
@ -220,8 +203,6 @@
enable = true;
gdb = true;
};
virt-manager.enable = true;
};
services = {
@ -231,52 +212,76 @@
fileSystems = ["/"];
};
# Temporarily ban IPs for SSH after failed login attempts
fail2ban = {
enable = true;
};
greetd = {
enable = false;
restart = false;
useTextGreeter = true;
settings = {
terminal.vt = 1;
default_session = {
# command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd $SHELL";
command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd niri-session";
user = "greeter";
};
};
};
kmscon = {
enable = false;
hwRender = true;
useXkbConfig = true;
# autologinUser = username;
config = let
color = config.home-manager.users.${username}.homemodules.color;
in {
# term=xterm-256color
hwaccel = true;
font-name = color.font;
font-size = 14;
mode = "3440x1440";
palette = "custom";
palette-black = "0,0,0";
pallette-white = "255,255,255";
palette-red = color.rgbS.red;
palette-light-red = color.rgbS.red;
palette-green = color.rgbS.green;
palette-light-green = color.rgbS.green;
palette-yellow = color.rgbS.yellow;
palette-light-yellow = color.rgbS.yellow;
palette-blue = color.rgbS.blue;
palette-light-blue = color.rgbS.blue;
palette-magenta = color.rgbS.pink;
palette-light-magenta = color.rgbS.pink;
palette-cyan = color.rgbS.teal;
palette-light-cyan = color.rgbS.teal;
palette-foreground = color.rgbS.text;
palette-background = "0,0,0";
};
fonts = [
{
name = "MonoLisa Alt Script";
package = pkgs.monolisa;
}
];
# NOTE: Do NOT use multline strings here!
# This will create a linebreak in the systemd service and break login!
extraOptions = "";
extraConfig = let
color = config.home-manager.users.${username}.homemodules.color;
in ''
# term=xterm-256color
font-size=14
mode=3440x1440
palette=custom
palette-black=0,0,0
pallette-white=255,255,255
palette-red=${color.rgbS.red}
palette-light-red=${color.rgbS.red}
palette-green=${color.rgbS.green}
palette-light-green=${color.rgbS.green}
palette-yellow=${color.rgbS.yellow}
palette-light-yellow=${color.rgbS.yellow}
palette-blue=${color.rgbS.blue}
palette-light-blue=${color.rgbS.blue}
palette-magenta=${color.rgbS.pink}
palette-light-magenta=${color.rgbS.pink}
palette-cyan=${color.rgbS.teal}
palette-light-cyan=${color.rgbS.teal}
palette-foreground=${color.rgbS.text}
palette-background=0,0,0
'';
};
openssh = {

View File

@ -82,8 +82,7 @@
};
"swap" = {
mountpoint = "/swap";
# Configured in hardware-configuration.nix
# swap.swapfile.size = "64G";
swap.swapfile.size = "16G";
};
};
};

View File

@ -121,13 +121,18 @@
fsType = "nfs";
options = ["defaults" "rw" "noatime" "_netdev" "bg" "hard"];
};
"/media/Box" = {
device = "192.168.86.20:/mnt/Seagate4TB/Box";
fsType = "nfs";
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
};
};
swapDevices = [
{
device = "/swap/swapfile";
size = 1024 * 64; # Without hibernation 4.0 GB to 0.5 x RAM
randomEncryption.enable = false; # The disk is already encrypted. Useless and might lead to system freeze.
device = "/var/swap";
size = 1024 * 16; # Without hibernation 4.0 GB to 0.5 x RAM
}
];

View File

@ -24,6 +24,7 @@
# General services
../services/authelia.nix
../services/bazarr.nix
../services/box.nix
../services/fileflows.nix
../services/gitea.nix
../services/immich.nix
@ -31,7 +32,6 @@
../services/kiwix.nix
../services/kopia.nix
../services/nextcloud.nix
../services/ntfy.nix
../services/nginx-proxy-manager.nix
../services/paperless.nix
# ../services/plex.nix # Their monetization strategy is absolutely atrocious
@ -65,13 +65,52 @@
useNetworkManager = false;
networks = {
"10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {
interface = "ens18";
ips = ["192.168.86.25/24"];
routers = ["192.168.86.5"]; # Don't add IPv6 gateway, rely on router advertisement instead
nameservers = ["8.8.8.8" "8.8.4.4" "2001:4860:4860:8888" "2001:4860:4860:8844"]; # NOTE: Use reliable DNS for servers instead of 192.168.86.26
routable = true;
extraAddresses = ["fd00::19/64"]; # IPv6 ULA — declared without creating a route
# "10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {
# interface = "ens18";
# ips = ["192.168.86.25/24" "fd00::19/64"];
# routers = ["192.168.86.5" "fd00::5"];
# nameservers = ["8.8.8.8" "2001:4860:4860::8888"]; # NOTE: Use reliable DNS for servers instead of 192.168.86.26
# routable = true;
# };
# TODO: mylib.networking.mkStaticSystemdNetwork needs improvement to accomodate for this
"10-ether-1G" = rec {
enable = true;
# See man systemd.link, man systemd.netdev, man systemd.network
matchConfig = {
# This corresponds to the [MATCH] section
Name = "ens18"; # Match ethernet interface
};
# Static IP + DNS + Gateway
address = ["192.168.86.25/24"];
gateway = ["192.168.86.5"]; # Don't add IPv6 gateway, rely on router advertisement instead
dns = ["8.8.8.8" "8.8.4.4" "2001:4860:4860:8888" "2001:4860:4860:8844"];
routes = builtins.map (r: {Gateway = r;}) gateway;
# See man systemd.network
networkConfig = {
# This corresponds to the [NETWORK] section
DHCP = "no";
IPv6AcceptRA = "yes"; # Accept Router Advertisements
# MulticastDNS = "no";
# LLMNR = "no";
# LinkLocalAddressing = "ipv6";
};
addresses = [
{
# Don't add this to address, we don't want to create any routes with this
Address = "fd00::19/64";
}
];
linkConfig = {
# This corresponds to the [LINK] section
RequiredForOnline = "routable";
};
};
};
@ -110,8 +149,6 @@
"kopia-server-password"
"kopia-user-password"
"paperless-nextcloud-sync-password"
"ntfy-auth-users"
"ntfy-auth-tokens"
];
};

View File

@ -69,6 +69,12 @@
fsType = "nfs";
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
};
"/media/Box" = {
device = "192.168.86.20:/mnt/Seagate4TB/Box";
fsType = "nfs";
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
};
};
swapDevices = [
@ -86,7 +92,7 @@
nvidia-container-toolkit.enable = true;
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.legacy_580;
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = false;
open = false; # GTX 1070 is too old for open drivers

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -17,7 +16,14 @@ in {
image = "TEMPLATE:${TEMPLATEVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "adguard/adguardhome:${adguardVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "authelia/authelia:${autheliaVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/bazarr:${bazarrVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

59
system/services/box.nix Normal file
View File

@ -0,0 +1,59 @@
{
config,
lib,
pkgs,
...
}: let
boxVersion = "v0.30.1";
in {
virtualisation.oci-containers.containers = {
box = {
image = "stashapp/stash:${boxVersion}";
autoStart = true;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
ports = [
# "9999:9999"
];
volumes = [
"/etc/localtime:/etc/localtime:ro"
"/media/Box:/data"
"box_config:/root/.stash"
"box_metadata:/metadata"
"box_cache:/cache"
"box_blobs:/blobs"
"box_generated:/generated"
];
environment = {
PUID = "3000";
PGID = "3000";
TZ = "Europe/Berlin";
STASH_STASH = "/data/";
STASH_GENERATED = "/generated/";
STASH_METADATA = "/metadata/";
STASH_CACHE = "/cache/";
};
extraOptions = [
"--privileged"
"--device=nvidia.com/gpu=all"
"--net=behind-nginx"
];
};
};
}

View File

@ -0,0 +1,54 @@
{
config,
lib,
pkgs,
...
}: let
comfyuiVersion = "cu128-slim-20260316";
in {
virtualisation.oci-containers.containers = {
comfyui = {
image = "yanwk/comfyui-boot:${comfyuiVersion}";
autoStart = false;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
ports = [
"8188:8188"
];
volumes = let
rootDir = "/home/christoph/Games/ComfyUI";
in [
"${rootDir}/storage:/root"
"${rootDir}/storage-models/models:/root/ComfyUI/models"
"${rootDir}/storage-models/hf-hub:/root/.cache/huggingface/hub"
"${rootDir}/storage-models/torch-hub:/root/.cache/torch/hub"
"${rootDir}/storage-user/input:/root/ComfyUI/input"
"${rootDir}/storage-user/output:/root/ComfyUI/output"
"${rootDir}/storage-user/workflows:/root/ComfyUI/user/default/workflows"
];
environment = {
PUID = "1000";
PGID = "1000";
TZ = "Europe/Berlin";
};
extraOptions = [
"--privileged"
"--device=nvidia.com/gpu=all"
# "--net=behind-nginx"
];
};
};
}

View File

@ -1,18 +1,24 @@
{
mylib,
config,
lib,
pkgs,
...
}: let
fileflowsVersion = "26.06";
fileflowsVersion = "26.01";
in {
virtualisation.oci-containers.containers = {
fileflows-node = {
image = "revenz/fileflows:${fileflowsVersion}";
autoStart = false;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,18 +1,24 @@
{
mylib,
config,
lib,
pkgs,
...
}: let
version = "26.06";
version = "26.01";
in {
virtualisation.oci-containers.containers = {
fileflows = {
image = "revenz/fileflows:${version}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -28,7 +27,14 @@ in {
image = "postgres:14";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -53,7 +59,14 @@ in {
image = "gitea/gitea:${giteaVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
"gitea-db"
@ -94,7 +107,14 @@ in {
image = "gitea/act_runner:${runnerVersion}"; # NOTE: vegardit has other runner images
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
"gitea"

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -40,7 +39,14 @@ in {
image = "redis";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/jellyfin:${jellyfinVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
# "pihole"

View File

@ -18,7 +18,8 @@ in {
];
volumes = [
"/home/christoph/ssd/kiwix:/data"
# TODO: Add network location for .zim files
"kiwix_data:/data"
];
environment = {

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -19,7 +18,14 @@ in {
image = "kopia/kopia:${kopiaVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,11 +1,10 @@
{
mylib,
config,
lib,
pkgs,
...
}: let
nextcloudVersion = "33.0.5-apache";
nextcloudVersion = "31.0.6-apache";
in {
systemd.services.nextcloud-cron = {
enable = true;
@ -34,7 +33,14 @@ in {
image = "postgres:alpine";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -61,7 +67,14 @@ in {
image = "redis:alpine";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -84,7 +97,14 @@ in {
image = "nextcloud:${nextcloudVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
"nextcloud-db"

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "jc21/nginx-proxy-manager:${nginxVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,79 +0,0 @@
{
mylib,
config,
lib,
pkgs,
...
}: let
ntfyVersion = "v2.21";
in {
# If we need to pass secrets to containers we can't use plain env variables.
sops.templates."ntfy_secrets.env".content = ''
NTFY_AUTH_USERS=${config.sops.placeholder.ntfy-auth-users}
NTFY_AUTH_TOKENS=${config.sops.placeholder.ntfy-auth-tokens}
'';
virtualisation.oci-containers.containers = {
# NTFY_AUTH_USERS='admin:$2b$10$13iMkFcSNXcb/DKlUSS03OM25saLd8/hDlKkowFtXYctu2fQBoLJK:admin,christoph:$2b$10$8jgrgBltBXj/Qw0BxBWf1eIfH53VV6wTdlJZEqWBIH3htwEP9PKgq:user'
# NTFY_AUTH_TOKENS="christoph:tk_rx8fd6hojuz4ekcb72j7juugkbmga:FAIL*-Notif"
# NTFY_BASE_URL="https://ntfy.vps.chriphost.de"
# NTFY_BEHIND_PROXY="true"
# NTFY_AUTH_FILE="/var/lib/ntfy/auth.db"
# NTFY_AUTH_DEFAULT_ACCESS="deny-all"
# NTFY_ENABLE_LOGIN="true"
# NTFY_REQUIRE_LOGIN="true"
# NTFY_ATTACHMENT_CACHE_DIR="/var/cache/ntfy/attachments"
# NTFY_CACHE_FILE="/var/cache/ntfy/cache.db"
# NTFY_UPSTREAM_BASE_URL="https://ntfy.sh"
# NTFY_AUTH_ACCESS="christoph:*:read-write"
ntfy = {
image = "binwiederhier/ntfy:${ntfyVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
dependsOn = [];
ports = [
"8042:80"
];
volumes = [
"ntfy_cache:/var/cache/ntfy"
"ntfy_attachments:/var/cache/ntfy/attachments"
"ntfy_lib:/var/lib/ntfy"
"ntfy_etc:/etc/ntfy"
];
cmd = ["serve"];
environment = {
PUID = "1000";
PGID = "1000";
TZ = "Europe/Berlin";
NTFY_BASE_URL = "https://ntfy.vps.chriphost.de";
NTFY_BEHIND_PROXY = "true";
NTFY_AUTH_FILE = "/var/lib/ntfy/auth.db";
NTFY_AUTH_DEFAULT_ACCESS = "deny-all";
NTFY_ENABLE_LOGIN = "true";
NTFY_REQUIRE_LOGIN = "true";
NTFY_ATTACHMENT_CACHE_DIR = "/var/cache/ntfy/attachments";
NTFY_CACHE_FILE = "/var/cache/ntfy/cache.db";
NTFY_UPSTREAM_BASE_URL = "https://ntfy.sh";
NTFY_AUTH_ACCESS = "christoph:*:read-write";
};
environmentFiles = [
config.sops.templates."ntfy_secrets.env".path
];
extraOptions = [
# "--privileged"
# "--device=nvidia.com/gpu=all"
"--net=behind-nginx"
];
};
};
}

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -17,7 +16,14 @@ in {
image = "flor1der/paperless-nextcloud-sync:${paperlessNCVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -53,7 +59,14 @@ in {
image = "redis:7";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -74,7 +87,14 @@ in {
image = "postgres:15";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "plexinc/pms-docker:${plexVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
# "pihole"

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -14,7 +13,14 @@ in {
image = "portainer/agent:${portainerVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -13,7 +12,14 @@ in {
image = "portainer/portainer-ce:${portainerVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/prowlarr:${prowlarrVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "rcourtman/pulse:${pulseVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/radarr:${radarrVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/sabnzbd:${sabnzbdVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/sabnzbd:${sabnzbdVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/sonarr:${sonarrVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,18 +1,24 @@
{
mylib,
config,
lib,
pkgs,
...
}: let
teamspeakVersion = "6.0.0-beta10";
teamspeakVersion = "v6.0.0-beta7";
in {
virtualisation.oci-containers.containers = {
teamspeak = {
image = "teamspeaksystems/teamspeak6-server:${teamspeakVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -24,8 +30,7 @@ in {
];
volumes = [
# "teamspeak_data:/var/tsserver"
"teamspeak_data2:/var/tsserver"
"teamspeak_data:/var/tsserver"
];
environment = {

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "tinymediamanager/tinymediamanager:${version}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "getwud/wud:${wudVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
# "pihole"

View File

@ -1,5 +0,0 @@
{...}: {
imports = [
./sops-nix
];
}

View File

@ -72,6 +72,7 @@ in {
if docker.podman
then "podman"
else "docker"; # "docker" or "podman"
libvirtd.enable = true;
};
systemd.services = let

View File

@ -69,9 +69,7 @@ in {
# https://github.com/nix-community/impermanence/issues/253
(mkRDir "/usr/systemd-placeholder" m755)
# TODO: Why does this use the mandb user?
# (mkDir "mandb" "/var/cache/man" m755)
(mkDir "mandb" "/var/cache/man" m755)
# (mkRDir "/var/cache/restic-backups-synology" m755)
(mkRDir "/var/db/sudo" m711)
@ -120,64 +118,49 @@ in {
# The shit some applications add to ~/ without asking
# (mkUDir ".android" m755) # Unity
(mkUDir ".claude" m755)
# (mkUDir ".comfy" m755)
(mkUDir ".docker" m755)
# (mkUDir ".gradle" m755) # Unity
(mkUDir ".java" m755) # JetBrains
(mkUDir ".lmstudio" m755)
(mkUDir ".MakeMKV" m755)
(mkUDir ".mozilla/firefox" m755) # TODO: Remove this someday
(mkUDir ".mozilla/native-messaging-hosts" m755)
(mkUDir ".nix-package-search" m755)
(mkUDir ".npm" m755) # Contains mcp servers :/
# (mkUDir ".nv" m755) # Unity
# (mkUDir ".ollama" m755)
# (mkUDir ".plastic4" m755) # Unity
(mkUDir ".tableplus" m755)
(mkUDir ".tiddl" m755)
(mkUDir ".var/app" m755)
(mkUDir ".vim/undo" m755)
(mkUDir ".vscode" m755)
(mkUDir ".zotero" m755)
# Cache that's actually useful
(mkUDir ".cache/claude-cli-nodejs" m755)
(mkUDir ".cache/elephant" m755)
(mkUDir ".cache/fish/generated_completions" m755)
(mkUDir ".cache/nix" m755)
(mkUDir ".cache/nix-index" m755)
(mkUDir ".cache/nix-search-tv" m755)
(mkUDir ".cache/nvim" m755)
(mkUDir ".cache/JetBrains" m755)
(mkUDir ".cache/keepassxc" m755)
(mkUDir ".cache/opencode" m755)
(mkUDir ".cache/uv" m755)
# Config
# (mkUDir ".config/.android" m755) # Unity
# (mkUDir ".config/beekeeper-studio" m755)
(mkUDir ".config/beets" m755)
(mkUDir ".config/blender" m755)
(mkUDir ".config/chromium" m755) # TODO: Remove this someday
(mkUDir ".config/Code" m755)
(mkUDir ".config/Ferdium" m755)
(mkUDir ".config/feishin" m755)
(mkUDir ".config/fish/completions" m755)
(mkUDir ".config/ghidra" m755)
(mkUDir ".config/impermanence" m755)
(mkUDir ".config/jellyfin-mpv-shim" m755)
# (mkUDir ".config/jellyfin-tui" m755) # Configured using nix
(mkUDir ".config/jellyfin-tui" m755) # TODO: Generate this config file, have to use sops because it includes the password in cleartext
(mkUDir ".config/JetBrains" m755)
(mkUDir ".config/kdeconnect" m755)
(mkUDir ".config/keepassxc" m755)
(mkUDir ".config/LM Studio" m755)
(mkUDir ".config/Msty" m755)
(mkUDir ".config/Nextcloud" m755)
# (mkUDir ".config/niri/dms" m755)
(mkUDir ".config/niri/dms" m755)
(mkUDir ".config/obsidian" m755)
(mkUDir ".config/obs-studio" m755)
(mkUDir ".config/opencode" m755)
(mkUDir ".config/Signal" m755)
# (mkUDir ".config/singularitygroup-hotreload" m755) # Unity
(mkUDir ".config/TeamSpeak" m755)
@ -185,7 +168,6 @@ in {
(mkUDir ".config/tidal_dl_ng" m755)
# (mkUDir ".config/unity3d" m755) # Unity
# (mkUDir ".config/unityhub" m755) # Unity
(mkUDir ".config/Vector 35" m755)
(mkUDir ".config/vlc" m755)
(mkUDir ".config/Zeal" m755)
(mkUDir ".config/zed" m755)
@ -209,7 +191,6 @@ in {
(mkUDir ".local/share/net.lrclib.lrcget" m755)
(mkUDir ".local/share/nix" m755)
(mkUDir ".local/share/nvim" m755)
(mkUDir ".local/share/opencode" m755)
(mkUDir ".local/share/qutebrowser" m755)
(mkUDir ".local/share/systemd" m755)
# (mkUDir ".local/share/unity3d" m755) # Unity
@ -222,7 +203,6 @@ in {
(mkUDir ".local/state/lazygit" m755)
(mkUDir ".local/state/nix" m755)
(mkUDir ".local/state/nvim" m755)
(mkUDir ".local/state/opencode" m755)
(mkUDir ".local/state/waypaper" m755)
(mkUDir ".local/state/wireplumber" m755)
];

Some files were not shown because too many files have changed in this diff Show More