Compare commits
294 Commits
master
...
51d2796ba0
| Author | SHA1 | Date | |
|---|---|---|---|
|
51d2796ba0
|
|||
|
559bb1d471
|
|||
|
b9649d4a58
|
|||
|
c513749219
|
|||
|
cb22c507cf
|
|||
|
48bd5f4bcd
|
|||
|
f66e6cdd87
|
|||
|
ed7178b731
|
|||
|
be063f3329
|
|||
|
7404a25391
|
|||
|
725e17a86a
|
|||
|
b7131b817a
|
|||
|
f2ce5eb64c
|
|||
|
6e50052e29
|
|||
|
59c6c2cbac
|
|||
|
35c370732a
|
|||
|
ff72abc318
|
|||
|
da85e39d7d
|
|||
|
8516a5f463
|
|||
|
9518dceff5
|
|||
|
cb086876fd
|
|||
|
81873c0f68
|
|||
|
96cbf1f428
|
|||
|
a1dbcf00b4
|
|||
|
e0b9c7187e
|
|||
|
f0dc6ede97
|
|||
|
00cadeed67
|
|||
|
a558b811bf
|
|||
|
cf7fdb2aec
|
|||
|
8fd939bc34
|
|||
|
a5ca09b7ec
|
|||
|
4edd789c20
|
|||
|
f5f23388ce
|
|||
|
97a9f4d78a
|
|||
|
60fe34de9d
|
|||
|
7ed23a63a3
|
|||
|
7fbab2b1f6
|
|||
|
df1cadae60
|
|||
|
b5cb085083
|
|||
|
2a2d96d97e
|
|||
|
307a8b5fb7
|
|||
|
9861866c6f
|
|||
|
05dd3fd75f
|
|||
|
15e2290267
|
|||
|
3646bceff9
|
|||
|
f429a50206
|
|||
|
024908500a
|
|||
|
c7098e2208
|
|||
|
0e86ca0371
|
|||
|
663f21bdda
|
|||
|
2533183d80
|
|||
|
f259b7d326
|
|||
|
ac1b8c9f07
|
|||
|
00e3713682
|
|||
|
84eabaa4d3
|
|||
|
d0916c49e5
|
|||
|
91c35fd55c
|
|||
|
166c35caec
|
|||
|
c204312423
|
|||
|
ddc5722bbe
|
|||
|
cadd7bd949
|
|||
|
2fbf61c052
|
|||
|
5d699a2d58
|
|||
|
593437fa94
|
|||
|
00e412cb20
|
|||
|
1290f14cb7
|
|||
|
132e52e4ad
|
|||
|
29970472f8
|
|||
|
6507cbc0e0
|
|||
|
7e3985bd34
|
|||
|
57b8980ebe
|
|||
|
f1ddccb0df
|
|||
|
0fb5c79df4
|
|||
|
b2915bdd90
|
|||
|
49ef17ac33
|
|||
|
debe85da8e
|
|||
|
558c497c74
|
|||
|
c4451939d5
|
|||
|
d1f010dcc8
|
|||
|
3d5a0f8cb5
|
|||
|
0831730903
|
|||
|
004eff3abf
|
|||
|
592e7e4bb9
|
|||
|
ec7247bc77
|
|||
|
e1d041f010
|
|||
|
84fec63204
|
|||
|
b434aaaccc
|
|||
|
4639fd8c7e
|
|||
|
7f22089765
|
|||
|
8c53eaf570
|
|||
|
c9a4b1a428
|
|||
|
288496afa1
|
|||
|
34f61d4f27
|
|||
|
77f169fef4
|
|||
|
8576db096f
|
|||
|
d20ce66646
|
|||
|
226b72dccf
|
|||
|
6147801194
|
|||
|
a1b8bc9555
|
|||
|
83ffca5e21
|
|||
|
eb782a67cb
|
|||
|
85a12edbcc
|
|||
|
a056e4d98b
|
|||
|
5f17a04fbb
|
|||
|
f514387f64
|
|||
|
c328c188b8
|
|||
|
585f74ce0f
|
|||
|
8263fe01eb
|
|||
|
d61e6f8b9c
|
|||
|
7c7c195083
|
|||
|
2e78898c5a
|
|||
|
1f61e9958c
|
|||
|
c8954e5854
|
|||
|
e772d93f23
|
|||
|
4c17560020
|
|||
|
e1542a1168
|
|||
|
a351bf59ba
|
|||
|
7a62f38084
|
|||
|
b50c5f9f71
|
|||
|
0087145957
|
|||
|
48c77e9654
|
|||
|
71d06d61b1
|
|||
|
75d024111e
|
|||
|
b67aee2a64
|
|||
|
554a76b585
|
|||
|
d9e7e315da
|
|||
|
daee8da3ae
|
|||
|
c2b661adbb
|
|||
|
aa4ebfbc06
|
|||
|
db850552e3
|
|||
|
63afac3d04
|
|||
|
645fc64ead
|
|||
|
6561d4c979
|
|||
|
f1ed339968
|
|||
|
50d14ecf83
|
|||
|
1cdc3f25e0
|
|||
|
9e62f755bb
|
|||
|
d0e6fe072a
|
|||
|
86ea11c8e8
|
|||
|
1adacf5e1e
|
|||
|
e53787deae
|
|||
|
efce5c6293
|
|||
|
6069a12e64
|
|||
|
91bd79a051
|
|||
|
9bec5f42b1
|
|||
|
602aa4cd56
|
|||
|
3573a705af
|
|||
|
615d886a98
|
|||
|
4416f39f0c
|
|||
|
0bb481c037
|
|||
|
98a3788f4f
|
|||
|
ac4b005f9b
|
|||
|
901f58a527
|
|||
|
9a5bc3e981
|
|||
|
fe69d39769
|
|||
|
2f675e96f0
|
|||
|
56512194ef
|
|||
|
d1a6aafed5
|
|||
|
6305d9ca2e
|
|||
|
887f7db0c7
|
|||
|
d8dbdbc5de
|
|||
|
4014ed0318
|
|||
|
87fa954937
|
|||
|
934644c5e2
|
|||
|
0bda035ccd
|
|||
|
6e999ffa02
|
|||
|
807388d032
|
|||
|
9b1a7c73e6
|
|||
|
da729f8c22
|
|||
|
d08d795adf
|
|||
|
ffc2516353
|
|||
|
135e1e5701
|
|||
|
5b2fc78889
|
|||
|
4cbe9885b2
|
|||
|
9b43074248
|
|||
|
be3f6baa17
|
|||
|
837233b552
|
|||
|
ca0c718f3b
|
|||
|
3c68574aea
|
|||
|
aa668d04d3
|
|||
|
d16b645078
|
|||
|
b71264b864
|
|||
|
6ed1882429
|
|||
|
952802d4f7
|
|||
|
53fc6eedc8
|
|||
|
2e0f378c9e
|
|||
|
abab1cf2b4
|
|||
|
ad3210f150
|
|||
|
afe74b8fa1
|
|||
|
8f5a9d753f
|
|||
|
d45a9946bb
|
|||
|
c0f8356205
|
|||
|
72a8dcb8d5
|
|||
|
da548f10bb
|
|||
|
9bfbbc0dc9
|
|||
|
26ac3a8e02
|
|||
|
632fcc3dab
|
|||
|
a204951964
|
|||
|
9aea533693
|
|||
|
a07499813d
|
|||
|
6e2a64a50c
|
|||
|
80d932838f
|
|||
|
4bed2e7021
|
|||
|
75ffcc5c6e
|
|||
|
cb14d79586
|
|||
|
9b41d5552e
|
|||
|
3d50b8fea7
|
|||
|
5aec2aa971
|
|||
|
b799d86823
|
|||
|
d505394753
|
|||
|
06cf86fa20
|
|||
|
a4272ea92c
|
|||
|
89739e3af0
|
|||
|
52a99db8e0
|
|||
|
7848fb7274
|
|||
|
397d1b014c
|
|||
|
7f1ce57994
|
|||
|
a1f495f138
|
|||
|
4e9003e0c5
|
|||
|
380e11edb2
|
|||
|
a2153c4418
|
|||
|
abdcbe2ce9
|
|||
|
fa286dce16
|
|||
|
c4454daab6
|
|||
|
a03c9d8227
|
|||
|
9db5d91da6
|
|||
|
72716230ea
|
|||
|
2919e797ed
|
|||
|
86d669c2ab
|
|||
|
77ac5b70b8
|
|||
|
54839be395
|
|||
|
714e3e0683
|
|||
|
a8d7d1e666
|
|||
|
40bcc14304
|
|||
|
fa5bd0eefd
|
|||
|
6182ada581
|
|||
|
4acddcec09
|
|||
|
5c14817464
|
|||
|
38920bd3d7
|
|||
|
b89934d13f
|
|||
|
734dfcadfc
|
|||
|
2c959fdc0c
|
|||
|
e00c4f49f5
|
|||
|
61131ca598
|
|||
|
9c1a39d699
|
|||
|
32de6e24b7
|
|||
|
78e554cc30
|
|||
|
f65617deed
|
|||
|
aa3a881d58
|
|||
|
7f99b73635
|
|||
|
c1360e5c2c
|
|||
|
ca9e66bc35
|
|||
|
eac705bdfb
|
|||
|
69beab4812
|
|||
|
515110ff7d
|
|||
|
9a9bffd637
|
|||
|
f1b269e3ee
|
|||
|
f09dee5ad8
|
|||
|
f246eacdb3
|
|||
|
b7e2bba8f0
|
|||
|
25ae0f4b85
|
|||
|
d12b247368
|
|||
|
25e9128875
|
|||
|
eee28f57fc
|
|||
|
ea03e2266f
|
|||
|
5e422d05c9
|
|||
|
eaa36cfce2
|
|||
|
572d0bfe9e
|
|||
|
385ca27f8c
|
|||
|
4c18fd8c8e
|
|||
|
bf0c55669c
|
|||
|
86a5e79079
|
|||
|
7d429a4720
|
|||
|
2e9a4b13d1
|
|||
|
73eeff9a0e
|
|||
|
d216a8018d
|
|||
|
b09d854e50
|
|||
|
ff39dd1df2
|
|||
|
98c520e0bd
|
|||
|
7e3d3ca4a5
|
|||
|
c8a76751f3
|
|||
|
12a10bee82
|
|||
|
767309885a
|
|||
|
6d360ed782
|
|||
|
ddccd51b5a
|
|||
|
1fef42e5d4
|
|||
|
0d20883f4f
|
|||
|
cec5ec5493
|
|||
|
5833dff19e
|
|||
|
7b4c2df7af
|
|||
|
1643f30906
|
|||
|
79c617cc91
|
|||
|
474a8badf4
|
|||
|
17368396cf
|
BIN
FastFetch.png
BIN
FastFetch.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 2.6 MiB |
BIN
NeoVim.png
BIN
NeoVim.png
Binary file not shown.
|
Before Width: | Height: | Size: 747 KiB |
172
README.md
172
README.md
@ -1,159 +1,43 @@
|
||||
# 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
|
||||

|
||||

|
||||
|
||||

|
||||
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`.
|
||||
|
||||

|
||||
## NixFlake/system
|
||||
|
||||

|
||||
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.
|
||||
|
||||
115
flake.lock
generated
115
flake.lock
generated
@ -60,11 +60,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781164160,
|
||||
"narHash": "sha256-dxo3aPnfaQJt9K/3NhgKfu2Q9B42z4d4Or9Izoug+68=",
|
||||
"lastModified": 1775706155,
|
||||
"narHash": "sha256-h7Rw0vlb0n0Jsk21WJPm7H+1T1bG+PEuxE5cJ2TZl8A=",
|
||||
"owner": "abenz1267",
|
||||
"repo": "elephant",
|
||||
"rev": "3296842820d04d5ec774afc7528492fcbb3c01f2",
|
||||
"rev": "376ee71c66db38683daabd57350bf3f6f086eaf8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -267,11 +267,11 @@
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781168557,
|
||||
"narHash": "sha256-LOnLQ2tpYF9gqIDDr3+j3DbpJJr/QCH6zPRT2GzEUOE=",
|
||||
"lastModified": 1780065812,
|
||||
"narHash": "sha256-SCSLUKBmwlSLGQ8Xbr8PjRFtiHNk0l9ktqkcmqdBkfE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "6358ff76821101c178e3ab4919a62799bfe3652e",
|
||||
"rev": "b76b5639c0593e0aeb0b5879ad62d4b30596c144",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -287,11 +287,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781305496,
|
||||
"narHash": "sha256-g8Vv4Qfc7n+lgov97REu3X6BeJtvYY0hlSUZR1GrGQQ=",
|
||||
"lastModified": 1779969295,
|
||||
"narHash": "sha256-HwIJ3tOcwSMiV75L7KqJXciXR9UfT+d7rwOZMX7cTnA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c87a39aa979acc4848016d2220c6238390d84779",
|
||||
"rev": "61e2c9659324181e0f0ed911958c536333b1d4f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -326,11 +326,11 @@
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781228795,
|
||||
"narHash": "sha256-OSofuO5j7FLg2R7c9YQdK5epMqkQLucExcDNF7dqCMo=",
|
||||
"lastModified": 1779815066,
|
||||
"narHash": "sha256-QVxEQivn5kA2H4Zf++wiwNR6yfJZJnvAWADUDqgtW0I=",
|
||||
"owner": "JPyke3",
|
||||
"repo": "hytale-launcher-nix",
|
||||
"rev": "efe21e31eb63d6db1a104c14bbb437ae5d03f73b",
|
||||
"rev": "7b527a3eeff0ee9a95106a056638a407aef1eb43",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -436,11 +436,11 @@
|
||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781234038,
|
||||
"narHash": "sha256-jo4a47qDgsx1F1i0MtHZl12FfzqKJOES25vbm0ZUxeI=",
|
||||
"lastModified": 1780062130,
|
||||
"narHash": "sha256-3XF+oy0PX4aajJw2RNB8rlMpyu0eXCG4pGH7fe94yBg=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "eb5789cba8d37802d330df5a13c691622c83121f",
|
||||
"rev": "3cb351d73c357a4e413f59c4551d219118791c14",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -469,11 +469,11 @@
|
||||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1780938415,
|
||||
"narHash": "sha256-QHyIMGSbCQW8d5qbOrMsm6gem10bO3Au2YLa3alJfHo=",
|
||||
"lastModified": 1780056110,
|
||||
"narHash": "sha256-t7lKVshV/srD0G06j4r5P5qj9zaDeZ9JYFCxHDGROZU=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "6f1a2c5f0e8274223d4204b1f8d6f7f91538967e",
|
||||
"rev": "f9f43d826ab4014a7c302be28d7da33e12f5be37",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -509,11 +509,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781242433,
|
||||
"narHash": "sha256-bchLZZ3sRn740zyvD2icZSnNoTaanN0nw7l6fjVXO+E=",
|
||||
"lastModified": 1779036909,
|
||||
"narHash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY=",
|
||||
"owner": "nix-darwin",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "aabb2037edfc0f210723b72cd5f528aab5dd3f0b",
|
||||
"rev": "56c666e108467d87d13508936aade6d567f2a501",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -578,11 +578,11 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1780952837,
|
||||
"narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=",
|
||||
"lastModified": 1779796641,
|
||||
"narHash": "sha256-ZsIrKmhp4vbBXoXXmR/tBXA/UCsAQiJL9vsgZEduhVY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e820eb4a444b46a19b2e03e8dfd2359439ff30fe",
|
||||
"rev": "25f538306313eae3927264466c70d7001dcea1df",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -594,11 +594,11 @@
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1780952837,
|
||||
"narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=",
|
||||
"lastModified": 1779796641,
|
||||
"narHash": "sha256-ZsIrKmhp4vbBXoXXmR/tBXA/UCsAQiJL9vsgZEduhVY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e820eb4a444b46a19b2e03e8dfd2359439ff30fe",
|
||||
"rev": "25f538306313eae3927264466c70d7001dcea1df",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -655,11 +655,11 @@
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1781074563,
|
||||
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
|
||||
"lastModified": 1779560665,
|
||||
"narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
|
||||
"rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -703,11 +703,11 @@
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1781074563,
|
||||
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
|
||||
"lastModified": 1779560665,
|
||||
"narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
|
||||
"rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -719,11 +719,11 @@
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1780336545,
|
||||
"narHash": "sha256-vhVhuXzFrIOfcssC/9hDHx7MHzDKjF3keHuREOQqQiQ=",
|
||||
"lastModified": 1779877693,
|
||||
"narHash": "sha256-NOF9NAREhxr50bbBfVcVOq+ArCMSoe8dP79Pk2uyARk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4df1b885d76a54e1aa1a318f8d16fd6005b6401f",
|
||||
"rev": "4100e830e085863741bc69b156ec4ccd53ab5be0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -756,11 +756,11 @@
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781287460,
|
||||
"narHash": "sha256-9hXtN4my7eBqHRVQ/t6FQZ4YqZ1KG6SsKSG4Hdtr+i0=",
|
||||
"lastModified": 1780056171,
|
||||
"narHash": "sha256-CXpH7axUH7AzI5izVHfOYawY350beplaAKFLDaQY128=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "f2029d9a26266eb67f46b0c79bd0a3713839a57a",
|
||||
"rev": "d7800d4b1c420e0c2dcaaddd58038c8b662e72a8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -800,11 +800,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781349989,
|
||||
"narHash": "sha256-PTgbtYdDqSzfANBCI8g0iA5DdMGr5imJuWUH1w0RmWY=",
|
||||
"lastModified": 1780066277,
|
||||
"narHash": "sha256-VfvIrI792pYYywcEfvMy5FC5hIIq4lFeUK2dcoSq1BQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "6b2f93e70e526d09559f73dfc3760d489a5504bf",
|
||||
"rev": "58bb8dda9943cc5c0827ece3b1a367d76b64af21",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -909,11 +909,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780547341,
|
||||
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=",
|
||||
"lastModified": 1777944972,
|
||||
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a",
|
||||
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -954,16 +954,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"
|
||||
}
|
||||
@ -1005,11 +1004,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780405768,
|
||||
"narHash": "sha256-WhPHaupeq5yWP53anFH6vr/ZMQQtAYGtpgUhzqWx9Ws=",
|
||||
"lastModified": 1779792099,
|
||||
"narHash": "sha256-HF5M0dr96kDPLS8ebRCG/YZglsKZZdvAhGIAf+lGUiU=",
|
||||
"owner": "adriankarlen",
|
||||
"repo": "textfox",
|
||||
"rev": "d6895da75f10fa17f1b637759aec3d84818b20e2",
|
||||
"rev": "2c35f1f04e6283d37b199f318874c57f7d37ef6a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1027,11 +1026,11 @@
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781164128,
|
||||
"narHash": "sha256-xPcYrHdDXWykIi5/XXkLvliBArRnfzvs+atB9El1qhI=",
|
||||
"lastModified": 1777789924,
|
||||
"narHash": "sha256-fX3ErzTmHRO9z1SzHC2VZUgKOgRfO13X/joC5a3QN7Q=",
|
||||
"owner": "abenz1267",
|
||||
"repo": "walker",
|
||||
"rev": "aa1e4b7d59237e8c43dde58636bae476f23d9bfb",
|
||||
"rev": "93d44d1cb41732e1370e4b949429ae8e34ea05a4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1060,11 +1059,11 @@
|
||||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1781226823,
|
||||
"narHash": "sha256-28696iIw8uE0ZUyFTtzhEM8xMh85clCYypMxkvUi+sc=",
|
||||
"lastModified": 1779745227,
|
||||
"narHash": "sha256-yqY7RtEJGJiENzR0GwL6q69tSAy6xAAmAcLuIhLjPf8=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "8575d0ef55d70f9b4c46b6bffb3accf912217e1e",
|
||||
"rev": "5d1efbc9dc3ab1c10160b656e0247f3325daf0f2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
pkgs,
|
||||
nixosConfig,
|
||||
config,
|
||||
hostname,
|
||||
lib,
|
||||
mylib,
|
||||
username,
|
||||
@ -42,189 +41,8 @@
|
||||
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
|
||||
|
||||
@ -135,9 +135,6 @@ in {
|
||||
readr
|
||||
tibble
|
||||
svglite
|
||||
dplyr
|
||||
tidyr
|
||||
scales
|
||||
];
|
||||
})
|
||||
|
||||
@ -308,15 +305,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;
|
||||
|
||||
@ -1121,7 +1109,6 @@ in {
|
||||
pkg = pkgs.vimPlugins.lualine-nvim;
|
||||
lazy = true;
|
||||
event = ["BufReadPost" "BufNewFile"];
|
||||
# dependencies = [opencode];
|
||||
config = ''
|
||||
function(_, opts)
|
||||
local lualine = require("lualine")
|
||||
@ -1221,7 +1208,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 +1373,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 +1447,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 +1671,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 +1707,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 +1777,7 @@ in {
|
||||
};
|
||||
|
||||
_plenary = {
|
||||
name = "plenary.nvim";
|
||||
name = "plenary";
|
||||
pkg = pkgs.vimPlugins.plenary-nvim;
|
||||
lazy = true;
|
||||
};
|
||||
@ -2250,12 +2196,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;
|
||||
@ -2317,7 +2263,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
|
||||
|
||||
@ -415,58 +415,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";
|
||||
@ -1057,7 +1005,6 @@ in
|
||||
no-leader
|
||||
|
||||
leader
|
||||
leader-opencode
|
||||
leader-file
|
||||
leader-help
|
||||
leader-quit
|
||||
|
||||
@ -160,8 +160,6 @@ in {
|
||||
czkawka-full # file deduplicator
|
||||
binaryninja-free # reverse engineering
|
||||
tableplus # database explorer
|
||||
# opencode-desktop
|
||||
lmstudio # TODO: Ollama
|
||||
|
||||
# Office
|
||||
kdePackages.wacomtablet # For xournalpp/krita
|
||||
|
||||
@ -5,10 +5,12 @@
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (config.homemodules) zed color;
|
||||
in {
|
||||
options.homemodules.zed = import ./options.nix {inherit lib mylib;};
|
||||
in
|
||||
{
|
||||
options.homemodules.zed = import ./options.nix { inherit lib mylib; };
|
||||
|
||||
config = lib.mkIf zed.enable {
|
||||
programs.zed-editor = {
|
||||
@ -65,8 +67,8 @@ in {
|
||||
"r"
|
||||
];
|
||||
|
||||
themes = {};
|
||||
userDebug = [];
|
||||
themes = { };
|
||||
userDebug = [ ];
|
||||
|
||||
# TODO: Add neovim keymaps
|
||||
userKeymaps = [
|
||||
@ -123,15 +125,14 @@ in {
|
||||
nil = {
|
||||
initialization_options = {
|
||||
formatting = {
|
||||
# command = null;
|
||||
command = ["${pkgs.alejandra}/bin/alejandra"];
|
||||
command = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
nixd = {
|
||||
initialization_options = {
|
||||
formatting = {
|
||||
command = ["${pkgs.alejandra}/bin/alejandra"];
|
||||
command = [ "${pkgs.alejandra}/bin/alejandra" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -170,13 +171,10 @@ in {
|
||||
codex-acp = {
|
||||
type = "registry";
|
||||
};
|
||||
gemini = {
|
||||
type = "registry";
|
||||
};
|
||||
mistral-vibe = {
|
||||
type = "registry";
|
||||
};
|
||||
opencode = {
|
||||
gemini = {
|
||||
type = "registry";
|
||||
};
|
||||
};
|
||||
@ -193,7 +191,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
userTasks = [];
|
||||
userTasks = [ ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@ -23,11 +23,15 @@
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://nix-community.cachix.org"
|
||||
# "https://comfyui.cachix.org"
|
||||
# "https://ai.cachix.org"
|
||||
# "https://app.cachix.org/cache/nixos-rocm"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
# "comfyui.cachix.org-1:33mf9VzoIjzVbp0zwj+fT51HG0y31ZTK3nzYZAX0rec="
|
||||
# "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
|
||||
# "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
|
||||
];
|
||||
};
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
./disks.nix
|
||||
|
||||
# General services
|
||||
../services/comfyui.nix
|
||||
../services/fileflows-node.nix
|
||||
];
|
||||
|
||||
@ -233,50 +234,53 @@
|
||||
|
||||
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 = {
|
||||
|
||||
@ -121,6 +121,12 @@
|
||||
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 = [
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
# General services
|
||||
../services/authelia.nix
|
||||
../services/bazarr.nix
|
||||
../services/box.nix
|
||||
../services/fileflows.nix
|
||||
../services/gitea.nix
|
||||
../services/immich.nix
|
||||
|
||||
@ -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
|
||||
|
||||
53
system/services/box.nix
Normal file
53
system/services/box.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
mylib,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
boxVersion = "v0.31.0";
|
||||
in {
|
||||
virtualisation.oci-containers.containers = {
|
||||
box = {
|
||||
image = "stashapp/stash:${boxVersion}";
|
||||
autoStart = true;
|
||||
|
||||
login = mylib.containers.mkDockerLogin config;
|
||||
|
||||
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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
79
system/services/comfyui.nix
Normal file
79
system/services/comfyui.nix
Normal file
@ -0,0 +1,79 @@
|
||||
{
|
||||
mylib,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
# comfyuiVersion = "cu128-slim-20260316";
|
||||
# comfyuiVersion = "cu128-megapak-20260413";
|
||||
# comfyuiVersion = "cu130-megapak-pt211-20260413";
|
||||
# comfyuiVersion = "cu130-megapak-pt211-20260508";
|
||||
comfyuiVersion = "cu130-megapak-pt211-20260604";
|
||||
in {
|
||||
virtualisation.oci-containers.containers = {
|
||||
comfyui = {
|
||||
image = "yanwk/comfyui-boot:${comfyuiVersion}";
|
||||
autoStart = false;
|
||||
|
||||
login = mylib.containers.mkDockerLogin config;
|
||||
|
||||
dependsOn = [];
|
||||
|
||||
ports = [
|
||||
"8188:8188"
|
||||
];
|
||||
|
||||
volumes = let
|
||||
rootDir = "/home/christoph/Games/ComfyUI";
|
||||
in [
|
||||
# cu128-slim / cu128-megapak
|
||||
# "${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"
|
||||
|
||||
# cu130-megapak
|
||||
"${rootDir}/storage-cache/dot-cache:/root/.cache"
|
||||
"${rootDir}/storage-cache/dot-config:/root/.config"
|
||||
"${rootDir}/storage-nodes/dot-local:/root/.local"
|
||||
"${rootDir}/storage-nodes/comfy-extras:/root/ComfyUI/comfy_extras"
|
||||
"${rootDir}/storage-nodes/custom_nodes:/root/ComfyUI/custom_nodes"
|
||||
"${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/user-profile:/root/ComfyUI/user"
|
||||
"${rootDir}/storage-user/user-scripts:/root/user-scripts"
|
||||
];
|
||||
|
||||
environment = {
|
||||
PUID = "1000";
|
||||
PGID = "1000";
|
||||
TZ = "Europe/Berlin";
|
||||
|
||||
# https://github.com/Comfy-Org/ComfyUI/blob/master/comfy/cli_args.py
|
||||
CLI_ARGS = lib.concatStringsSep " " [
|
||||
# "--cache-none" # Leads to single nodes being executed multiple times for each output connection :/
|
||||
# "--lowvram"
|
||||
# "--disable-smart-memory"
|
||||
# "--disable-pinned-memory"
|
||||
# "--disable-dynamic-vram"
|
||||
# "--disable-xformers"
|
||||
# "--use-sage-attention" # Crashes
|
||||
# "--reserve-vram 1" # (1 or 2) => Assume less vram is available to mitigate OOM due to wrong vram estimation
|
||||
];
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--privileged"
|
||||
"--device=nvidia.com/gpu=all"
|
||||
# "--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -5,7 +5,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
fileflowsVersion = "26.06";
|
||||
fileflowsVersion = "26.01";
|
||||
in {
|
||||
virtualisation.oci-containers.containers = {
|
||||
fileflows-node = {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
version = "26.06";
|
||||
version = "26.01";
|
||||
in {
|
||||
virtualisation.oci-containers.containers = {
|
||||
fileflows = {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
nextcloudVersion = "33.0.5-apache";
|
||||
nextcloudVersion = "31.0.6-apache";
|
||||
in {
|
||||
systemd.services.nextcloud-cron = {
|
||||
enable = true;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
teamspeakVersion = "6.0.0-beta10";
|
||||
teamspeakVersion = "v6.0.0-beta8";
|
||||
in {
|
||||
virtualisation.oci-containers.containers = {
|
||||
teamspeak = {
|
||||
|
||||
@ -70,6 +70,7 @@ in {
|
||||
(mkRDir "/usr/systemd-placeholder" m755)
|
||||
|
||||
# TODO: Why does this use the mandb user?
|
||||
# TODO: Why does this apparently conflict with comfyui-nix?
|
||||
# (mkDir "mandb" "/var/cache/man" m755)
|
||||
|
||||
# (mkRDir "/var/cache/restic-backups-synology" m755)
|
||||
@ -125,12 +126,10 @@ in {
|
||||
(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
|
||||
@ -143,16 +142,12 @@ in {
|
||||
|
||||
# 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
|
||||
@ -171,13 +166,11 @@ in {
|
||||
(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/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)
|
||||
@ -209,7 +202,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 +214,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)
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user