Compare commits
123
Commits
master
..
135e1e5701
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
@@ -1,128 +0,0 @@
|
||||
# AGENTS.md
|
||||
|
||||
## Common Commands
|
||||
|
||||
```bash
|
||||
# Enter the dev shell (provides helper utilities)
|
||||
nix develop
|
||||
|
||||
# Preferred shorthand (nh must be enabled in config)
|
||||
nh os switch # rebuild and switch
|
||||
nh os boot # new boot entry without switching
|
||||
|
||||
# Direct nixos-rebuild (fallback)
|
||||
sudo nixos-rebuild switch --flake .#nixinator
|
||||
sudo nixos-rebuild switch --flake .#nixtop
|
||||
sudo nixos-rebuild switch --flake .#servenix
|
||||
sudo nixos-rebuild switch --flake .#thinknix
|
||||
sudo darwin-rebuild switch --flake .#darwinix
|
||||
|
||||
# Validate flake without building
|
||||
nix flake check
|
||||
|
||||
# Dev shell helpers (run inside `nix develop`)
|
||||
list-system-packages # show installed system packages
|
||||
list-user-packages # show installed user packages
|
||||
store-optimise # nix store --optimise
|
||||
store-verify # nix store --verify --repair
|
||||
```
|
||||
|
||||
## MCP Tools
|
||||
|
||||
The **nixos** MCP server is available and should be used for any Nix-related lookups instead of `nix search` or manual web searches. It queries live APIs (search.nixos.org, NixHub, FlakeHub) and is more current than training data.
|
||||
|
||||
```
|
||||
# Common intents
|
||||
nix {"action":"info","query":"<pkg>","channel":"unstable"} # package info
|
||||
nix {"action":"search","query":"<term>","type":"options"} # NixOS options
|
||||
nix {"action":"search","source":"home-manager","query":"<term>"} # HM options
|
||||
nix {"action":"cache","query":"<pkg>"} # binary cache status
|
||||
nix_versions {"package":"<attr>","version":"<ver>"} # commit that shipped a version
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
This is a multi-host NixOS/nix-darwin flake. Home-manager runs **as a NixOS module** — not standalone. A single `nixos-rebuild switch` rebuilds system and user config together. The HM config can access the system config via the `nixosConfig` special arg.
|
||||
|
||||
### Hosts
|
||||
|
||||
| Host | Type | Notes |
|
||||
|------|------|-------|
|
||||
| `nixinator` | Desktop (x86_64) | Primary machine; disko, lanzaboote, impermanence |
|
||||
| `nixtop` | Laptop (x86_64) | Intel GPU, NetworkManager |
|
||||
| `servenix` | Server (x86_64) | Headless; runs OCI container services |
|
||||
| `thinknix` | Headless (x86_64) | Generic headless config |
|
||||
| `darwinix` | macOS (aarch64) | Darwin-specific configuration |
|
||||
|
||||
### Config Layering (resolved in this order)
|
||||
|
||||
1. **Global defaults** — `system/default.nix` / `home/christoph/default.nix`
|
||||
2. **Host overrides** — `system/<hostname>/default.nix` / `home/christoph/<hostname>/default.nix`
|
||||
3. **Hardware** — `system/<hostname>/hardware-configuration.nix` (auto-generated, **do not hand-edit**)
|
||||
|
||||
The builder (`lib/nixos.nix`: `mkNixosConfigWithHomeManagerModule`) wires these together.
|
||||
|
||||
### Special Args
|
||||
|
||||
Injected into **all system and HM modules**:
|
||||
`inputs` `system` `hostname` `mylib` `username` `publicKeys` `headless`
|
||||
|
||||
Use `headless` (boolean) to gate anything graphical. Use `mylib.<fn>` instead of reimplementing helpers.
|
||||
|
||||
### Module System
|
||||
|
||||
Two parallel hierarchies, identical pattern:
|
||||
|
||||
| Scope | Path | Option prefix |
|
||||
|-------|------|---------------|
|
||||
| System | `system/systemmodules/<name>/` | `systemmodules.<name>.*` |
|
||||
| Home-manager | `home/homemodules/<name>/` | `homemodules.<name>.*` |
|
||||
|
||||
**System modules** — `system/systemmodules/<name>/`
|
||||
- `options.nix` — declares `systemmodules.<name>.*` options
|
||||
- `default.nix` — imports `./options.nix`, implements `lib.mkIf <name>.enable { ... }`
|
||||
|
||||
**Home-manager modules** — `home/homemodules/<name>/`
|
||||
- `options.nix` — declares `homemodules.<name>.*` options
|
||||
- `default.nix` — same pattern under `homemodules.*`
|
||||
|
||||
When adding a new module, copy from `0_template/` in either hierarchy. Modules under `1_deprecated/` are kept for reference only — not imported anywhere.
|
||||
|
||||
HM modules are placed in `home-manager.sharedModules` (not `users.<user>.imports`) — this enables proper nixd completions.
|
||||
|
||||
### Custom Library (`lib/`)
|
||||
|
||||
Always available as `mylib`. Key files:
|
||||
- `nixos.nix` — host config builders, `mkNixosConfigWithHomeManagerModule`, `mkDarwinConfigWithHomeManagerModule`
|
||||
- `modules.nix` — `mkBoolOption`, `mkElse`, `attrName`, `attrValue`, `contains`
|
||||
- `networking.nix` — `mkSystemdNetwork`, `mkStaticSystemdNetwork`
|
||||
- `generators.nix` — `toLuaObject`, `toLuaKeymap` (used by Neovim module)
|
||||
- `containers.nix` — OCI container helpers for services
|
||||
- `color.nix` — theming
|
||||
|
||||
Always use `mylib.<fn>` (available as a special arg) rather than reimplementing these utilities.
|
||||
|
||||
### Services
|
||||
|
||||
Server services are OCI containers (podman/docker) defined in `system/services/`. Each file defines one or more containers. These are only enabled on `servenix`. Use the template at `system/services/0_TEMPLATE.nix`.
|
||||
|
||||
### Secrets
|
||||
|
||||
Managed via **sops-nix**. Age keys stored in `flake.nix` under `publicKeys.christoph`. Encrypted `.yaml`/`.json` files live alongside the module that uses them, referenced as `sops.secrets.<name>`.
|
||||
|
||||
### Overlays and Custom Derivations
|
||||
|
||||
- `overlays/default.nix` — package overrides (e.g., patched JetBrains CLion version)
|
||||
- `derivations/default.nix` — custom packages: `monolisa`, `msty`, `unityhub`, `tidal-dl-ng`, `tiddl`
|
||||
- `derivations/1_deprecated/` — kept for reference, not imported
|
||||
|
||||
### Sub-projects
|
||||
|
||||
`config/flake.nix` is a separate, reusable development-project template — **not part of the main NixOS flake**. It uses `flake-utils` for multi-system shells.
|
||||
|
||||
## Constraints
|
||||
|
||||
- No CI, no tests, no linting — this is a configuration repo
|
||||
- `nix flake check` is the only validation available
|
||||
- `documentation.enable = false` by default (slow); toggle it if you need man pages
|
||||
- Hardware config files are auto-generated — never edit them by hand
|
||||
BIN
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.0 MiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 747 KiB After Width: | Height: | Size: 2.0 MiB |
@@ -1,159 +1,50 @@
|
||||
# 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 Hyprland (yikes) or Niri for a tiling/scrolling desktop.
|
||||
|
||||
## Screenshots
|
||||

|
||||
|
||||

|
||||
<p float="left" align="middle">
|
||||
<img src="/NeoVim.png" width="33%" />
|
||||
<img src="/Rmpc.png" width="33%" />
|
||||
<img src="/Btop.png" width="33%" />
|
||||
</p>
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
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`.
|
||||
|
||||
## Hosts
|
||||
## NixFlake/system
|
||||
|
||||
| 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 |
|
||||
Contains all the system configurations.
|
||||
|
||||
## Usage
|
||||
- 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`
|
||||
|
||||
```bash
|
||||
# Enter dev shell (provides helper utilities)
|
||||
nix develop
|
||||
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.
|
||||
|
||||
# Rebuild system + user config together
|
||||
nh os switch
|
||||
nh os boot
|
||||
## NixFlake/home
|
||||
|
||||
# Or with nixos-rebuild
|
||||
sudo nixos-rebuild switch --flake .#nixinator
|
||||
```
|
||||
Contains all the home-manager configurations.
|
||||
|
||||
## Info
|
||||
- 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`
|
||||
|
||||
Home-manager runs as a NixOS module (not standalone). A single `nixos-rebuild switch` rebuilds both system and user configuration together.
|
||||
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.
|
||||
|
||||
### Components
|
||||
## NixFlake/derivations
|
||||
|
||||
Per-host config consists of three layers:
|
||||
Contains all the stuff I packaged.
|
||||
Each derivation is loaded into `NixFlake/derivations/default.nix`.
|
||||
|
||||
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`
|
||||
## NixFlake/overlays
|
||||
|
||||
### 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.
|
||||
|
||||
+18
-45
@@ -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)
|
||||
|
||||
@@ -356,7 +356,7 @@ background_alpha=0.8
|
||||
################ INTERACTION #################
|
||||
|
||||
### Change toggle keybinds for the hud & logging
|
||||
toggle_hud=Shift_R+F12
|
||||
# toggle_hud=Shift_R+F12
|
||||
# toggle_hud_position=Shift_R+F11
|
||||
# toggle_preset=Shift_R+F10
|
||||
# toggle_fps_limit=Shift_L+F1
|
||||
|
||||
@@ -206,12 +206,12 @@ dos2unix <file>
|
||||
$ file: eza -1
|
||||
|
||||
% unix2dos
|
||||
# Convert line endings to dos format
|
||||
Convert line endings to dos format
|
||||
unix2dos <file>
|
||||
$ file: eza -1
|
||||
|
||||
% tiddl
|
||||
# Download stuff from tidal
|
||||
Download stuff from tidal
|
||||
tiddl download --track-quality max --path ~/Downloads/Beet/Albums --videos none url "<url>"
|
||||
|
||||
; ===========================
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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); */
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
.fullwidth-images img {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
.justify-text.cm-s-obsidian,
|
||||
.justify-text.markdown-preview-view {
|
||||
text-align: justify;
|
||||
hyphens: auto;
|
||||
}
|
||||
@@ -4,19 +4,17 @@
|
||||
pkgs,
|
||||
}: let
|
||||
pythonPkgs = pkgs.python314Packages.overrideScope (self: super: {
|
||||
# NOTE: Typer override apparently no longer required on 2026-08-31
|
||||
#
|
||||
# typer = super.typer.overridePythonAttrs (old: {
|
||||
# version = "0.20.1";
|
||||
# src = pkgs.fetchPypi {
|
||||
# pname = "typer";
|
||||
# version = "0.20.0";
|
||||
# sha256 = "sha256-Gq9klAMXk+SHb7C6z6apErVRz0PB5jyADfixqGZyDDc=";
|
||||
# };
|
||||
# propagatedBuildInputs = with pythonPkgs; [
|
||||
# typing-extensions
|
||||
# ];
|
||||
# });
|
||||
typer = super.typer.overridePythonAttrs (old: {
|
||||
version = "0.20.1";
|
||||
src = pkgs.fetchPypi {
|
||||
pname = "typer";
|
||||
version = "0.20.0";
|
||||
sha256 = "sha256-Gq9klAMXk+SHb7C6z6apErVRz0PB5jyADfixqGZyDDc=";
|
||||
};
|
||||
propagatedBuildInputs = with pythonPkgs; [
|
||||
typing-extensions
|
||||
];
|
||||
});
|
||||
|
||||
aiofiles = super.aiofiles.overridePythonAttrs (old: {
|
||||
version = "25.1.0";
|
||||
@@ -36,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;
|
||||
|
||||
Generated
+485
-819
File diff suppressed because it is too large
Load Diff
@@ -12,12 +12,8 @@
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
hardware.url = "github:nixos/nixos-hardware";
|
||||
|
||||
# Darwin
|
||||
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# NOTE: Update this after May and November
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
|
||||
# Home Manager
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
@@ -36,7 +32,7 @@
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Secure boot
|
||||
lanzaboote.url = "github:nix-community/lanzaboote/v1.1.0";
|
||||
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.3";
|
||||
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Nix User Repository (e.g. Firefox addons)
|
||||
@@ -47,10 +43,6 @@
|
||||
nps.url = "github:OleMussmann/nps";
|
||||
nps.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Nix Gaming
|
||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||
nix-gaming.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Run unpatched binaries on NixOS
|
||||
nix-alien.url = "github:thiagokokada/nix-alien";
|
||||
# Don't follow nixpkgs:
|
||||
@@ -58,24 +50,57 @@
|
||||
# nix-alien.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Niri
|
||||
# niri.url = "github:sodiboo/niri-flake";
|
||||
niri.url = "github:epireyn/niri-flake"; # NOTE: Updated fork of sodiboo's
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
niri.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Hyprland
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
# hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hyprland-plugins.url = "github:hyprwm/hyprland-plugins";
|
||||
hyprland-plugins.inputs.hyprland.follows = "hyprland";
|
||||
# Quickshell
|
||||
quickshell.url = "github:quickshell-mirror/quickshell";
|
||||
quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Walker
|
||||
elephant.url = "github:abenz1267/elephant";
|
||||
walker.url = "github:abenz1267/walker";
|
||||
walker.inputs.elephant.follows = "elephant";
|
||||
# Noctalia shell
|
||||
noctalia.url = "github:noctalia-dev/noctalia-shell";
|
||||
noctalia.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# noctalia.inputs.quickshell.follows = "quickshell";
|
||||
|
||||
# Lol
|
||||
waifu-cursors.url = "github:kagurazakei/waifu-cursors";
|
||||
|
||||
# Caelestia shell
|
||||
caelestia.url = "github:caelestia-dots/shell";
|
||||
caelestia.inputs.nixpkgs.follows = "nixpkgs";
|
||||
caelestia.inputs.quickshell.follows = "quickshell";
|
||||
# caelestia-cli.url = "github:caelestia-dots/cli";
|
||||
# caelestia-cli.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# DankMaterialShell
|
||||
# dgop.url = "github:AvengeMedia/dgop";
|
||||
# dgop.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# dms-cli.url = "github:AvengeMedia/danklinux";
|
||||
# dms-cli.inputs.nixpkgs.follows = "nixpkgs";
|
||||
dank-material-shell.url = "github:AvengeMedia/DankMaterialShell";
|
||||
dank-material-shell.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# dank-material-shell.inputs.dgop.follows = "dgop";
|
||||
danksearch.url = "github:AvengeMedia/danksearch";
|
||||
danksearch.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Hyprland (use flake so plugins are not built from source)
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# HyprPlugins
|
||||
hyprland-plugins.url = "github:hyprwm/hyprland-plugins";
|
||||
hyprland-plugins.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hyprland-plugins.inputs.hyprland.follows = "hyprland";
|
||||
hypr-dynamic-cursors.url = "github:VirtCode/hypr-dynamic-cursors";
|
||||
hypr-dynamic-cursors.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hypr-dynamic-cursors.inputs.hyprland.follows = "hyprland";
|
||||
hyprspace.url = "github:KZDKM/Hyprspace";
|
||||
# hyprspace.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hyprspace.inputs.hyprland.follows = "hyprland";
|
||||
|
||||
# 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";
|
||||
@@ -89,26 +114,13 @@
|
||||
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";
|
||||
|
||||
claude-desktop.url = "github:aaddrick/claude-desktop-debian";
|
||||
claude-desktop.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Unofficial
|
||||
codex-desktop-linux.url = "github:ilysenko/codex-desktop-linux";
|
||||
codex-desktop-linux.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
stylix.url = "github:nix-community/stylix";
|
||||
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# HyTale
|
||||
hytale-launcher.url = "github:JPyke3/hytale-launcher-nix";
|
||||
# ComfyUI
|
||||
# nixified-ai.url = "github:nixified-ai/flake";
|
||||
# comfyui-nix.url = "github:utensils/comfyui-nix";
|
||||
|
||||
masssprings.url = "git+https://gitea.local.chriphost.de/christoph/cpp-masssprings";
|
||||
masssprings.inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -120,14 +132,12 @@
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nix-darwin,
|
||||
...
|
||||
} @ inputs: let
|
||||
# Our configuration is buildable on the following system/platform.
|
||||
# Configs can support more than a single system simultaneously,
|
||||
# e.g. NixOS (linux) and MacOS (darwin) or Arm.
|
||||
system = "x86_64-linux";
|
||||
darwinSystem = "aarch64-darwin";
|
||||
|
||||
# We configure our global packages here.
|
||||
# Usually, "nixpkgs.legacyPackages.${system}" is used (and more efficient),
|
||||
@@ -163,33 +173,13 @@
|
||||
inputs.nur.overlays.default
|
||||
inputs.niri.overlays.niri
|
||||
# inputs.emacs-overlay.overlay
|
||||
inputs.claude-desktop.overlays.default
|
||||
# inputs.comfyui-nix.overlays.default
|
||||
|
||||
# All my own overlays (derivations + modifications)
|
||||
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
|
||||
];
|
||||
};
|
||||
|
||||
darwinPkgs = import nixpkgs {
|
||||
system = darwinSystem;
|
||||
|
||||
hostPlatform = darwinSystem;
|
||||
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;})
|
||||
];
|
||||
};
|
||||
|
||||
# My own library functions are imported here.
|
||||
# They are made available to the system and HM configs by inheriting mylib.
|
||||
mylib = import ./lib {
|
||||
@@ -204,15 +194,8 @@
|
||||
inherit (nixpkgs) lib;
|
||||
};
|
||||
|
||||
darwinMylib = import ./lib {
|
||||
inherit inputs darwinPkgs;
|
||||
|
||||
inherit (nixpkgs) lib;
|
||||
|
||||
pkgs = darwinPkgs;
|
||||
};
|
||||
|
||||
# NOTE: Keep public keys here so they're easy to rotate
|
||||
|
||||
publicKeys.christoph = {
|
||||
# /home/christoph/.ssh/id_ed25519.pub
|
||||
ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJAoJac+GdGtzblCMA0lBfMdSR6aQ4YyovrNglCFGIny christoph.urlacher@protonmail.com";
|
||||
@@ -236,23 +219,6 @@
|
||||
# Local shell for NixFlake directory
|
||||
devShells.${system}.default = import ./shell.nix {inherit pkgs;};
|
||||
|
||||
# Usage: sudo darwin-rebuild switch --flake .#darwinix
|
||||
darwinConfigurations = {
|
||||
darwinix = darwinMylib.nixos.mkDarwinConfigWithHomeManagerModule {
|
||||
inherit publicKeys;
|
||||
|
||||
system = darwinSystem;
|
||||
mylib = darwinMylib;
|
||||
hostname = "darwinix";
|
||||
username = "christoph";
|
||||
headless = false;
|
||||
extraModules = [
|
||||
inputs.sops-nix.darwinModules.sops
|
||||
inputs.stylix.darwinModules.stylix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# We give each configuration a (host)name to choose a configuration when rebuilding.
|
||||
# This makes it easy to add different configurations (e.g. for a laptop).
|
||||
# Usage: sudo nixos-rebuild switch --flake .#nixinator
|
||||
@@ -275,9 +241,8 @@
|
||||
extraModules =
|
||||
[
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nix-gaming.nixosModules.platformOptimizations
|
||||
inputs.codex-desktop-linux.nixosModules.default
|
||||
# inputs.nixified-ai.nixosModules.comfyui
|
||||
# inputs.comfyui-nix.nixosModules.default
|
||||
]
|
||||
++ commonModules;
|
||||
};
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
nixosConfig,
|
||||
config,
|
||||
lib,
|
||||
mylib,
|
||||
username,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
paths = rec {
|
||||
nixflake = "${config.home.homeDirectory}/NixFlake";
|
||||
dotfiles = "${nixflake}/config";
|
||||
};
|
||||
|
||||
homemodules = {
|
||||
color = {
|
||||
scheme = "catppuccin-mocha";
|
||||
accent = "mauve";
|
||||
accentHl = "pink";
|
||||
accentDim = "lavender";
|
||||
accentText = "base";
|
||||
|
||||
font = "MonoLisa Alt Script";
|
||||
};
|
||||
|
||||
packages.enable = true;
|
||||
terminal.enable = true;
|
||||
};
|
||||
|
||||
home = {
|
||||
inherit username;
|
||||
|
||||
homeDirectory = "/Users/${config.home.username}";
|
||||
enableNixpkgsReleaseCheck = true;
|
||||
|
||||
sessionVariables = {
|
||||
LANG = "en_US.UTF-8";
|
||||
EDITOR = "nvim";
|
||||
MANPAGER = "nvim +Man!";
|
||||
TERMINAL = "kitty";
|
||||
};
|
||||
|
||||
# packages = with pkgs; []; # Configured in homemodules/packages
|
||||
|
||||
stateVersion = "25.11";
|
||||
};
|
||||
|
||||
programs = {};
|
||||
|
||||
services = {};
|
||||
};
|
||||
}
|
||||
+575
-110
@@ -34,7 +34,8 @@ in
|
||||
|
||||
homemodules = {
|
||||
beets.enable = !headless;
|
||||
cava.enable = !headless;
|
||||
|
||||
btop.enable = true;
|
||||
|
||||
chromium = {
|
||||
enable = !headless;
|
||||
@@ -46,15 +47,14 @@ in
|
||||
extraPackages = with pkgs; [
|
||||
papirus-icon-theme
|
||||
bibata-cursors
|
||||
# Lol
|
||||
# inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all
|
||||
inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all
|
||||
];
|
||||
|
||||
cursor = "Bibata-Modern-Classic";
|
||||
cursorSize = 24;
|
||||
cursorPackage = pkgs.bibata-cursors;
|
||||
|
||||
iconTheme = "Papirus-Dark";
|
||||
iconTheme = "Papirus";
|
||||
iconPackage = pkgs.papirus-icon-theme;
|
||||
|
||||
scheme = "catppuccin-mocha";
|
||||
@@ -77,91 +77,97 @@ in
|
||||
disableTabBar = true;
|
||||
};
|
||||
|
||||
fish.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
|
||||
userName = "Christoph Urlacher";
|
||||
userEmail = "christoph.urlacher@protonmail.com";
|
||||
signCommits = true;
|
||||
};
|
||||
|
||||
hyprland = {
|
||||
enable = nixosConfig.programs.hyprland.enable;
|
||||
dunst.enable = !config.homemodules.hyprpanel.enable; # Disable for hyprpanel
|
||||
bars.enable = false;
|
||||
hyprpanel.enable = false;
|
||||
dynamicCursor.enable = false;
|
||||
trails.enable = true;
|
||||
hyprspace.enable = false; # Always broken
|
||||
hyprpanel.enable = true;
|
||||
caelestia.enable = false;
|
||||
|
||||
keybindings = {
|
||||
main-mod = "SUPER";
|
||||
|
||||
bindings = let
|
||||
sessionMenu = mylib.rofi.mkMenu {
|
||||
prompt = "Session2";
|
||||
layers = [
|
||||
{
|
||||
" 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";
|
||||
};
|
||||
in
|
||||
lib.mergeAttrsList [
|
||||
{
|
||||
"$mainMod SHIFT, a" = ["exec, walker -m providerlist"];
|
||||
"$mainMod, a" = ["exec, walker -m desktopapplications"];
|
||||
"$mainMod, c" = ["exec, walker -m clipboard"];
|
||||
"$mainMod, Escape" = ["exec, ${sessionMenu}/bin/rofi-menu-Session2"];
|
||||
"$mainMod CTRL, w" = ["exec, waypaper"];
|
||||
}
|
||||
{
|
||||
# Applications
|
||||
"$mainMod, t" = ["exec, kitty"];
|
||||
"$mainMod, e" = ["exec, kitty --title=Yazi yazi"];
|
||||
"$mainMod, n" = ["exec, neovide"];
|
||||
# "$mainMod, r" = ["exec, kitty --title=Rmpc rmpc"];
|
||||
"$mainMod CTRL, n" = ["exec, kitty --title=Navi navi"];
|
||||
"$mainMod SHIFT, n" = ["exec, neovide ${config.paths.dotfiles}/navi/christoph.cheat"];
|
||||
"$mainMod SHIFT, f" = ["exec, neovide ${config.paths.dotfiles}/flake.nix"];
|
||||
# "ALT, tab" = ["exec, rofi -show window"];
|
||||
bindings = lib.mergeAttrsList [
|
||||
# Use Rofi if we don't have caelestia
|
||||
(lib.optionalAttrs (!config.homemodules.hyprland.caelestia.enable) {
|
||||
"$mainMod, a" = ["exec, rofi -drun-show-actions -show drun"];
|
||||
"$mainMod, c" = ["exec, clipman pick --tool=rofi"];
|
||||
"$mainMod SHIFT, l" = ["exec, loginctl lock-session"];
|
||||
})
|
||||
|
||||
# Screenshots
|
||||
"$mainMod, p" = ["exec, hyprpicker --autocopy --format=hex"];
|
||||
"$mainMod, s" = ["exec, grim -g \"$(slurp)\""];
|
||||
"$mainMod SHIFT, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
|
||||
# Caelestia
|
||||
(lib.optionalAttrs (config.homemodules.hyprland.caelestia.enable) {
|
||||
"$mainMod, a" = ["exec, caelestia shell drawers toggle launcher"];
|
||||
# "$mainMod, c" = ["exec, caelestia clipboard"];
|
||||
"$mainMod SHIFT, l" = ["exec, caelestia shell lock lock"];
|
||||
|
||||
# Audio
|
||||
", XF86AudioRaiseVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"];
|
||||
", XF86AudioLowerVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"];
|
||||
", XF86AudioPlay" = ["exec, playerctl play-pause"];
|
||||
", XF86AudioPrev" = ["exec, playerctl previous"];
|
||||
", XF86AudioNext" = ["exec, playerctl next"];
|
||||
"$mainMod, escape" = ["exec, caelestia shell drawers toggle session"];
|
||||
})
|
||||
|
||||
# Brightness
|
||||
", XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset gamma -10"];
|
||||
", XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset gamma +10"];
|
||||
"$mainMod, XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset temperature 5750"];
|
||||
"$mainMod, XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset identity"];
|
||||
{
|
||||
# Applications
|
||||
"$mainMod, t" = ["exec, kitty"];
|
||||
"$mainMod, e" = ["exec, kitty --title=Yazi yazi"];
|
||||
"$mainMod, n" = ["exec, neovide"];
|
||||
# "$mainMod, r" = ["exec, kitty --title=Rmpc rmpc"];
|
||||
"$mainMod CTRL, n" = ["exec, kitty --title=Navi navi"];
|
||||
"$mainMod SHIFT, n" = ["exec, neovide ${config.paths.dotfiles}/navi/christoph.cheat"];
|
||||
"$mainMod SHIFT, f" = ["exec, neovide ${config.paths.dotfiles}/flake.nix"];
|
||||
# "ALT, tab" = ["exec, rofi -show window"];
|
||||
|
||||
"CTRL ALT, f" = let
|
||||
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
|
||||
grep = "${pkgs.gnugrep}/bin/grep";
|
||||
awk = "${pkgs.gawk}/bin/gawk";
|
||||
notify = "${pkgs.libnotify}/bin/notify-send";
|
||||
# Screenshots
|
||||
"$mainMod, p" = ["exec, hyprpicker --autocopy --format=hex"];
|
||||
"$mainMod, s" = ["exec, grim -g \"$(slurp)\""];
|
||||
"$mainMod SHIFT, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
|
||||
|
||||
toggleMouseFocus = pkgs.writeScriptBin "hypr-toggle-mouse-focus" ''
|
||||
CURRENT=$(${hyprctl} getoption input:follow_mouse | ${grep} int | ${awk} -F' ' '{print $2}')
|
||||
# Audio
|
||||
", XF86AudioRaiseVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"];
|
||||
", XF86AudioLowerVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"];
|
||||
", XF86AudioPlay" = ["exec, playerctl play-pause"];
|
||||
", XF86AudioPrev" = ["exec, playerctl previous"];
|
||||
", XF86AudioNext" = ["exec, playerctl next"];
|
||||
|
||||
if [[ "$CURRENT" == "1" ]]; then
|
||||
${hyprctl} keyword input:follow_mouse 0
|
||||
${notify} "Disabled Mouse Focus!"
|
||||
else
|
||||
${hyprctl} keyword input:follow_mouse 1
|
||||
${notify} "Enabled Mouse Focus!"
|
||||
fi
|
||||
'';
|
||||
in ["exec, ${toggleMouseFocus}/bin/hypr-toggle-mouse-focus"];
|
||||
# Brightness
|
||||
", XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset gamma -10"];
|
||||
", XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset gamma +10"];
|
||||
"$mainMod, XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset temperature 5750"];
|
||||
"$mainMod, XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset identity"];
|
||||
|
||||
# "CTRL ALT, t" = ["exec, bash -c 'systemctl --user restart hyprpanel.service'"];
|
||||
}
|
||||
];
|
||||
"CTRL ALT, f" = let
|
||||
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
|
||||
grep = "${pkgs.gnugrep}/bin/grep";
|
||||
awk = "${pkgs.gawk}/bin/gawk";
|
||||
notify = "${pkgs.libnotify}/bin/notify-send";
|
||||
|
||||
toggleMouseFocus = pkgs.writeScriptBin "hypr-toggle-mouse-focus" ''
|
||||
CURRENT=$(${hyprctl} getoption input:follow_mouse | ${grep} int | ${awk} -F' ' '{print $2}')
|
||||
|
||||
if [[ "$CURRENT" == "1" ]]; then
|
||||
${hyprctl} keyword input:follow_mouse 0
|
||||
${notify} "Disabled Mouse Focus!"
|
||||
else
|
||||
${hyprctl} keyword input:follow_mouse 1
|
||||
${notify} "Enabled Mouse Focus!"
|
||||
fi
|
||||
'';
|
||||
in ["exec, ${toggleMouseFocus}/bin/hypr-toggle-mouse-focus"];
|
||||
|
||||
# "CTRL ALT, t" = ["exec, bash -c 'systemctl --user restart hyprpanel.service'"];
|
||||
}
|
||||
];
|
||||
|
||||
ws-bindings = {
|
||||
# "<Workspace>" = "<Key>";
|
||||
@@ -177,33 +183,33 @@ in
|
||||
"10" = "0";
|
||||
};
|
||||
|
||||
# special-ws-bindings = {
|
||||
# "ferdium" = "x";
|
||||
# "msty" = "z";
|
||||
# "btop" = "b";
|
||||
# "rmpc" = "r";
|
||||
# };
|
||||
special-ws-bindings = {
|
||||
"ferdium" = "x";
|
||||
"msty" = "z";
|
||||
"btop" = "b";
|
||||
"rmpc" = "r";
|
||||
};
|
||||
};
|
||||
|
||||
autostart = {
|
||||
immediate = [
|
||||
"kitty --hold fastfetch"
|
||||
# "zeal"
|
||||
# "protonvpn-app"
|
||||
"zeal"
|
||||
"nextcloud --background"
|
||||
"protonvpn-app"
|
||||
|
||||
# "kdeconnect-indicator" # started by services.kdeconnect.indicator
|
||||
];
|
||||
|
||||
delayed = [
|
||||
# "keepassxc" # The tray doesn't work when started too early
|
||||
"nextcloud --background"
|
||||
"keepassxc" # The tray doesn't work when started too early
|
||||
];
|
||||
|
||||
special-silent = {
|
||||
# "ferdium" = ["ferdium"];
|
||||
# "msty" = ["msty"];
|
||||
# "btop" = ["kitty --title=Btop btop"];
|
||||
# "rmpc" = ["kitty --title=Rmpc rmpc"];
|
||||
"ferdium" = ["ferdium"];
|
||||
"msty" = ["msty"];
|
||||
"btop" = ["kitty --title=Btop btop"];
|
||||
"rmpc" = ["kitty --title=Rmpc rmpc"];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -215,15 +221,15 @@ in
|
||||
|
||||
workspacerules = {
|
||||
"1" = [];
|
||||
"2" = ["neovide" "code-url-handler" "dev.zed.Zed" "code" "jetbrains-(.+)"];
|
||||
"3" = ["obsidian" "Zotero"];
|
||||
"2" = ["Zotero" "neovide" "code-url-handler"];
|
||||
"3" = ["obsidian"];
|
||||
"4" = ["firefox" "Google-chrome" "chromium-browser" "org.qutebrowser.qutebrowser"];
|
||||
"5" = ["steam"];
|
||||
"6" = ["steam_app_(.+)" "factorio"];
|
||||
"6" = ["steam_app_(.+)"];
|
||||
"7" = ["signal"];
|
||||
"8" = [];
|
||||
"8" = ["tidal-hifi"];
|
||||
"9" = ["discord"];
|
||||
"10" = [];
|
||||
"10" = ["python3"];
|
||||
};
|
||||
|
||||
floating = [
|
||||
@@ -234,10 +240,9 @@ in
|
||||
}
|
||||
{class = "ffplay";}
|
||||
{class = "Unity";}
|
||||
{class = "code-url-handler";}
|
||||
];
|
||||
|
||||
transparent-opacity = "0.85";
|
||||
transparent-opacity = "0.75";
|
||||
|
||||
transparent = [
|
||||
"kitty"
|
||||
@@ -264,15 +269,29 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
# hyprpanel.enable = !headless; # Enabled by hyprland module
|
||||
|
||||
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;
|
||||
waybar.enable = !headless;
|
||||
|
||||
rofi = {
|
||||
enable = !headless;
|
||||
};
|
||||
|
||||
waybar.enable = false; # Use hyprpanel
|
||||
yazi.enable = true;
|
||||
zathura.enable = !headless;
|
||||
};
|
||||
|
||||
@@ -323,11 +342,9 @@ in
|
||||
|
||||
# Enable wayland
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
# QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
# ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
SDL_VIDEODRIVER = "wayland"; # Leave unset as gamescope uses xwayland
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
|
||||
# Run SSH_ASKPASS as GUI, not TTY for Obsidian git
|
||||
SSH_ASKPASS_REQUIRE = "prefer";
|
||||
@@ -436,13 +453,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
|
||||
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
|
||||
binsider # Analyze binaries
|
||||
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 = 3;
|
||||
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 = {
|
||||
@@ -470,6 +848,11 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
navi = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
};
|
||||
|
||||
nix-index = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
@@ -499,6 +882,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 = false;
|
||||
|
||||
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 = {
|
||||
@@ -549,18 +1018,14 @@ in
|
||||
# Force Wayland by default
|
||||
# Context.sockets = ["wayland" "!x11" "!fallback-x11"]; # NOTE: Makes discord + steam crash
|
||||
|
||||
Context.filesystems = [
|
||||
"/nix/store:ro"
|
||||
"${config.home.homeDirectory}/.themes:ro"
|
||||
"${config.home.homeDirectory}/.config/gtk-4.0:ro"
|
||||
];
|
||||
Context.filesystems = ["/nix/store:ro"];
|
||||
|
||||
Environment = {
|
||||
# Fix un-themed cursor in some Wayland apps
|
||||
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
|
||||
|
||||
# Force correct theme for some GTK apps
|
||||
GTK_THEME = config.gtk.theme.name;
|
||||
GTK_THEME = "Adwaita:light";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
pkgs,
|
||||
nixosConfig,
|
||||
config,
|
||||
hostname,
|
||||
lib,
|
||||
mylib,
|
||||
username,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
@@ -18,8 +16,6 @@
|
||||
# because it forces en-US keyboard layout.
|
||||
fcitx.enable = true;
|
||||
|
||||
helix.enable = true;
|
||||
|
||||
hyprland = {
|
||||
keyboard = {
|
||||
layout = "us";
|
||||
@@ -35,8 +31,6 @@
|
||||
x = 1920;
|
||||
y = 0;
|
||||
scale = 1;
|
||||
bitdepth = 10;
|
||||
cm = "auto"; # with render:cm_auto_hdr, we don't need hdr here
|
||||
};
|
||||
|
||||
"DP-2" = {
|
||||
@@ -67,333 +61,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
waybar.monitors = ["DP-1" "DP-2"];
|
||||
vscode.enable = true;
|
||||
zed.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
claude-code = {
|
||||
enable = true;
|
||||
enableMcpIntegration = true;
|
||||
};
|
||||
|
||||
codexDesktopLinux = {
|
||||
enable = true;
|
||||
linuxFeatures = [
|
||||
"frameless-titlebar"
|
||||
"global-dictation"
|
||||
"read-aloud"
|
||||
"tray-usage"
|
||||
"ui-tweaks"
|
||||
];
|
||||
};
|
||||
|
||||
# NOTE: Starts extremely slow
|
||||
ghostty = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
systemd.enable = true;
|
||||
|
||||
settings = {
|
||||
theme = "catppuccin-mocha";
|
||||
font-family = config.homemodules.color.font;
|
||||
font-size = 12;
|
||||
window-padding-x = 10;
|
||||
window-padding-y = 10;
|
||||
adjust-cursor-thickness = 1;
|
||||
|
||||
cursor-click-to-move = true;
|
||||
gtk-single-instance = true;
|
||||
# link-previews = true;
|
||||
};
|
||||
|
||||
themes = let
|
||||
color = config.homemodules.color;
|
||||
in {
|
||||
catppuccin-mocha = {
|
||||
background = color.hex.base;
|
||||
cursor-color = color.hex.rosewater;
|
||||
foreground = color.hex.text;
|
||||
palette = [
|
||||
"0=#${color.hex.surface1}"
|
||||
"1=#${color.hex.red}"
|
||||
"2=#${color.hex.green}"
|
||||
"3=#${color.hex.yellow}"
|
||||
"4=#${color.hex.blue}"
|
||||
"5=#${color.hex.pink}"
|
||||
"6=#${color.hex.teal}"
|
||||
"7=#${color.hex.subtext1}"
|
||||
"8=#${color.hex.surface2}"
|
||||
"9=#${color.hex.red}"
|
||||
"10=#${color.hex.green}"
|
||||
"11=#${color.hex.yellow}"
|
||||
"12=#${color.hex.blue}"
|
||||
"13=#${color.hex.pink}"
|
||||
"14=#${color.hex.teal}"
|
||||
"15=#${color.hex.subtext0}"
|
||||
];
|
||||
selection-background = color.hex.surface1;
|
||||
selection-foreground = color.hex.text;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mcp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
context7 = {
|
||||
command = "npx";
|
||||
args = ["-y" "@upstash/context7-mcp"];
|
||||
env = {
|
||||
CONTEXT7_API_KEY.file = nixosConfig.sops.secrets.context7-api-key.path;
|
||||
};
|
||||
};
|
||||
# deepwiki = {
|
||||
# # https://mcpservers.org/servers/devin/deepwiki
|
||||
# url = "https://mcp.deepwiki.com/mcp";
|
||||
# };
|
||||
# github = {
|
||||
# # https://mcpservers.org/servers/github-mcp-server
|
||||
# url = "https://api.githubcopilot.com/mcp/";
|
||||
# headers = {
|
||||
# Authorization = "Bearer ${input:github_mcp_pat}";
|
||||
# };
|
||||
# };
|
||||
nixos = {
|
||||
command = "uvx";
|
||||
args = ["mcp-nixos"];
|
||||
};
|
||||
obsidian = {
|
||||
command = "uvx";
|
||||
args = ["mcp-obsidian"];
|
||||
env = {
|
||||
OBSIDIAN_API_KEY.file = nixosConfig.sops.secrets.obsidian-rest-api-key.path;
|
||||
OBSIDIAN_HOST = "127.0.0.1";
|
||||
OBSIDIAN_PORT = "27124";
|
||||
};
|
||||
};
|
||||
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"];
|
||||
};
|
||||
zotero = {
|
||||
command = "uvx";
|
||||
args = ["zotero-mcp-server"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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"
|
||||
"lmstudio"
|
||||
];
|
||||
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";
|
||||
"awk *" = "ask"; # Can modify files
|
||||
"basename *" = "allow";
|
||||
"cmp *" = "allow";
|
||||
"cut *" = "allow";
|
||||
"df *" = "allow";
|
||||
"dirname *" = "allow";
|
||||
"du *" = "allow";
|
||||
"echo *" = "allow";
|
||||
"fd *" = "ask"; # Can execute commands
|
||||
"file *" = "allow";
|
||||
"find *" = "ask"; # Can execute commands
|
||||
"grep *" = "allow";
|
||||
"head *" = "allow";
|
||||
"ls *" = "allow";
|
||||
"nl *" = "allow";
|
||||
"od *" = "allow";
|
||||
"pwd *" = "allow";
|
||||
"readlink *" = "allow";
|
||||
"rg *" = "ask"; # Can execute commands
|
||||
"sed *" = "ask"; # Can modify files
|
||||
"sha256sum *" = "allow";
|
||||
"sha512sum *" = "allow";
|
||||
"sort *" = "ask"; # Can modify files
|
||||
"stat *" = "allow";
|
||||
"tail *" = "allow";
|
||||
"test *" = "allow";
|
||||
"tr *" = "allow";
|
||||
"uniq *" = "ask"; # Can modify files
|
||||
"wc *" = "allow";
|
||||
"which *" = "allow";
|
||||
"xargs *" = "ask"; # Can modify files
|
||||
|
||||
"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 store diff-closures *" = "allow";
|
||||
|
||||
"git branch *" = "ask";
|
||||
"git check-ignore *" = "allow";
|
||||
"git diff *" = "allow";
|
||||
"git log *" = "allow";
|
||||
"git ls-files *" = "allow";
|
||||
"git ls-tree *" = "allow";
|
||||
"git remote *" = "ask";
|
||||
"git rev-list *" = "allow";
|
||||
"git rev-parse *" = "allow";
|
||||
"git stash *" = "ask";
|
||||
"git status *" = "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
|
||||
# "opencode-lmstudio@0.3.1"
|
||||
# "@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 = {};
|
||||
};
|
||||
waybar.monitor = "DP-1";
|
||||
};
|
||||
|
||||
home = let
|
||||
@@ -451,9 +119,12 @@
|
||||
# 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
|
||||
|
||||
# AI stuff
|
||||
# comfy-ui-cuda # Use module
|
||||
|
||||
# Unity Stuff
|
||||
# unityhub
|
||||
@@ -462,7 +133,6 @@
|
||||
# mono
|
||||
# steam-run-free # nix-alien doesn't seem to run unity apps, this does...
|
||||
|
||||
inputs.hytale-launcher.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
(blender.override {cudaSupport = true;})
|
||||
godot_4
|
||||
(obs-studio.override {cudaSupport = true;})
|
||||
@@ -472,37 +142,36 @@
|
||||
makemkv
|
||||
lrcget
|
||||
# msty
|
||||
# jellyfin-media-player # CVE, can't install
|
||||
jellyfin-desktop
|
||||
jellyfin-mpv-shim
|
||||
# tidal-hifi
|
||||
# tidal-dl-ng # TODO: Borked
|
||||
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
|
||||
];
|
||||
|
||||
file = lib.mkMerge [
|
||||
{
|
||||
# ".local/share/applications/jetbrains-rider.desktop".source = let
|
||||
# desktopFile = pkgs.makeDesktopItem {
|
||||
# name = "jetbrains-rider";
|
||||
# desktopName = "Rider";
|
||||
# exec = "\"${rider-unity}/bin/rider\"";
|
||||
# icon = "rider";
|
||||
# type = "Application";
|
||||
# # Don't show desktop icon in search or run launcher
|
||||
# extraConfig.NoDisplay = "true";
|
||||
# };
|
||||
# in "${desktopFile}/share/applications/jetbrains-rider.desktop";
|
||||
|
||||
".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source =
|
||||
../../../config/mangohud/MangoHud.conf;
|
||||
}
|
||||
# {
|
||||
# ".local/share/applications/jetbrains-rider.desktop".source = let
|
||||
# desktopFile = pkgs.makeDesktopItem {
|
||||
# name = "jetbrains-rider";
|
||||
# desktopName = "Rider";
|
||||
# exec = "\"${rider-unity}/bin/rider\"";
|
||||
# icon = "rider";
|
||||
# type = "Application";
|
||||
# # Don't show desktop icon in search or run launcher
|
||||
# extraConfig.NoDisplay = "true";
|
||||
# };
|
||||
# in "${desktopFile}/share/applications/jetbrains-rider.desktop";
|
||||
#
|
||||
# ".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source =
|
||||
# ../../../config/mangohud/MangoHud.conf;
|
||||
# }
|
||||
(lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) {
|
||||
".MakeMKV/settings.conf".source =
|
||||
config.lib.file.mkOutOfStoreSymlink
|
||||
@@ -515,50 +184,18 @@
|
||||
stateVersion = "22.05";
|
||||
};
|
||||
|
||||
# Cyberpunk 2077 NXM handler
|
||||
xdg.desktopEntries."modorganizer2-nxm-handler-cyberpunk" = {
|
||||
type = "Application";
|
||||
categories = ["Game"];
|
||||
name = "Mod Organizer 2 NXM Handler (Cyberpunk 2077)";
|
||||
mimeType = ["x-scheme-handler/nxm"];
|
||||
exec = let
|
||||
# Paths seen from inside the Flatpak Steam sandbox
|
||||
steam = "$HOME/.steam/steam";
|
||||
steamapps = "$HOME/Games/SteamLibrary/steamapps";
|
||||
proton = "Proton - Experimental";
|
||||
|
||||
# Runs inside flatpak's sandbox
|
||||
innerCommand = ''
|
||||
export STEAM_COMPAT_CLIENT_INSTALL_PATH="${steam}"
|
||||
export STEAM_COMPAT_DATA_PATH="${steamapps}/compatdata/1091500"
|
||||
exec "${steam}/steamapps/common/${proton}/proton" run \
|
||||
"$HOME/Games/CyberpunkMO2/nxmhandler.exe" "$1"
|
||||
'';
|
||||
|
||||
# Important: Run through flatpak's/steam's runtimes
|
||||
nxmHandler = pkgs.writeShellScript "cyberpunk-nxm-handler" ''
|
||||
exec flatpak run --command=sh com.valvesoftware.Steam -c ${lib.escapeShellArg innerCommand} _ "$1"
|
||||
'';
|
||||
in "${nxmHandler} %u";
|
||||
};
|
||||
|
||||
services = {
|
||||
flatpak = {
|
||||
packages = [
|
||||
"com.valvesoftware.Steam"
|
||||
"com.valvesoftware.Steam.Utility.steamtinkerlaunch"
|
||||
"org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/25.08" # TODO: Doesn't work
|
||||
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/25.08"
|
||||
"io.github.Foldex.AdwSteamGtk"
|
||||
"com.vysp3r.ProtonPlus"
|
||||
"com.github.Matoking.protontricks"
|
||||
# "com.valvesoftware.Steam"
|
||||
# "com.valvesoftware.Steam.Utility.steamtinkerlaunch"
|
||||
# "net.davidotek.pupgui2"
|
||||
# "org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
|
||||
# "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
|
||||
|
||||
"org.prismlauncher.PrismLauncher"
|
||||
"com.usebottles.bottles"
|
||||
"io.github.lawstorant.boxflat"
|
||||
|
||||
"org.onlyoffice.desktopeditors"
|
||||
# "io.github.lawstorant.boxflat"
|
||||
|
||||
# "com.unity.UnityHub"
|
||||
];
|
||||
@@ -572,37 +209,12 @@
|
||||
];
|
||||
};
|
||||
|
||||
"com.github.Matoking.protontricks".Context = {
|
||||
"com.valvesoftware.Steam".Context = {
|
||||
filesystems = [
|
||||
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
|
||||
"${config.home.homeDirectory}/Games"
|
||||
];
|
||||
};
|
||||
|
||||
"com.valvesoftware.Steam" = {
|
||||
Environment = {
|
||||
PATH = "/app/bin:/app/utils/bin:/usr/bin:/usr/lib/extensions/vulkan/gamescope/bin";
|
||||
};
|
||||
Context = {
|
||||
filesystems = [
|
||||
"${config.home.homeDirectory}/Games"
|
||||
|
||||
# This is Proton-GE installed from flatpak. ProtonUpQT doesn't require it.
|
||||
"/var/lib/flatpak/runtime/com.valvesoftware.Steam.CompatibilityTool.Proton-GE"
|
||||
|
||||
# This is gamescope installed from flatpak
|
||||
"/usr/lib/extensions/vulkan/gamescope/bin"
|
||||
|
||||
# So ModOrganizer2 can load this plugin symlinked from here
|
||||
"${config.home.homeDirectory}/Projects/ModOrganizer2_Cyberpunk_Plugin"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
"com.valvesoftware.Steam.Utility.steamtinkerlaunch".Context = {
|
||||
filesystems = [
|
||||
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
|
||||
"${config.home.homeDirectory}/Games"
|
||||
# This is Proton-GE installed from flatpak. ProtonUpQT doesn't require it.
|
||||
"/var/lib/flatpak/runtime/com.valvesoftware.Steam.CompatibilityTool.Proton-GE"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -613,13 +225,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
"com.vysp3r.ProtonPlus".Context = {
|
||||
filesystems = [
|
||||
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
|
||||
"${config.home.homeDirectory}/Games"
|
||||
];
|
||||
};
|
||||
|
||||
"com.usebottles.bottles".Context = {
|
||||
filesystems = [
|
||||
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
{pkgs, ...}: {
|
||||
config = {
|
||||
homemodules = {
|
||||
# TODO: Niri config (needs to modularize niri module)
|
||||
|
||||
hyprland = {
|
||||
keyboard = {
|
||||
layout = "us";
|
||||
@@ -27,7 +25,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
waybar.monitors = ["eDP-1"];
|
||||
waybar.monitor = "eDP-1";
|
||||
};
|
||||
|
||||
home = {
|
||||
|
||||
+7
-7
@@ -15,10 +15,10 @@ in {
|
||||
options.homemodules.helix = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# home.sessionVariables = {
|
||||
# EDITOR = "hx";
|
||||
# VISUAL = "hx";
|
||||
# };
|
||||
home.sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
VISUAL = "hx";
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
@@ -40,11 +40,11 @@ in {
|
||||
|
||||
# https://docs.helix-editor.com/configuration.html
|
||||
settings = {
|
||||
theme = "catppuccin_mocha";
|
||||
theme = "catppuccin_latte";
|
||||
editor = {
|
||||
scrolloff = 10;
|
||||
mouse = true;
|
||||
middle-click-paste = true;
|
||||
mouse = false; # Default true
|
||||
middle-click-paste = false; # Default true
|
||||
line-number = "relative";
|
||||
cursorline = true;
|
||||
color-modes = true;
|
||||
@@ -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
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable bat";
|
||||
}
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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}'";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable cava";
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
{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
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
inputs.textfox.homeManagerModules.default
|
||||
];
|
||||
}
|
||||
@@ -3,56 +3,41 @@
|
||||
# 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
|
||||
./helix
|
||||
./hyprland
|
||||
./hyprpanel
|
||||
./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.codex-desktop-linux.homeManagerModules.default
|
||||
# inputs.stylix.homeModules.stylix
|
||||
# inputs.direnv-instant.homeModules.direnv-instant
|
||||
# inputs.niri.homeModules.niri # Imported by system module
|
||||
# inputs.noctalia.homeModules.default
|
||||
# inputs.caelestia.homeManagerModules.default
|
||||
# inputs.dank-material-shell.homeModules.dank-material-shell
|
||||
# inputs.dank-material-shell.homeModules.niri
|
||||
# inputs.danksearch.homeModules.default
|
||||
inputs.noctalia.homeModules.default
|
||||
inputs.caelestia.homeManagerModules.default
|
||||
inputs.dank-material-shell.homeModules.dank-material-shell
|
||||
inputs.dank-material-shell.homeModules.niri
|
||||
inputs.danksearch.homeModules.default
|
||||
|
||||
# NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse)
|
||||
# inputs.impermanence.homeManagerModules.impermanence
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable fastfetch";
|
||||
}
|
||||
@@ -63,7 +63,7 @@ in [
|
||||
# Coding
|
||||
|
||||
{
|
||||
name = "Code";
|
||||
name = "Coding";
|
||||
bookmarks = [
|
||||
(mkBm "C++Ref" "https://en.cppreference.com/w/")
|
||||
(mkBm "Rust" "https://doc.rust-lang.org/stable/book/ch03-00-common-programming-concepts.html")
|
||||
@@ -72,21 +72,21 @@ in [
|
||||
(mkBm "Godbolt" "https://godbolt.org")
|
||||
];
|
||||
}
|
||||
# {
|
||||
# name = "AI";
|
||||
# bookmarks = [
|
||||
# (mkBm "Mistral Chat" "https://chat.mistral.ai/chat")
|
||||
# (mkBm "DeepSeek Chat" "https://chat.deepseek.com/")
|
||||
# (mkBm "Claude Chat" "https://claude.ai/new")
|
||||
# (mkBm "ChatGPT" "https://chatgpt.com/")
|
||||
# (mkBm "DeepWiki" "https://deepwiki.com/")
|
||||
# "separator"
|
||||
# (mkBm "Mistral API" "https://console.mistral.ai/usage")
|
||||
# (mkBm "DeepSeek API" "https://platform.deepseek.com/usage")
|
||||
# (mkBm "Claude API" "https://console.anthropic.com/usage")
|
||||
# (mkBm "OpenRouter API" "https://openrouter.ai/activity")
|
||||
# ];
|
||||
# }
|
||||
{
|
||||
name = "\"AI\"";
|
||||
bookmarks = [
|
||||
(mkBm "Mistral Chat" "https://chat.mistral.ai/chat")
|
||||
(mkBm "DeepSeek Chat" "https://chat.deepseek.com/")
|
||||
(mkBm "Claude Chat" "https://claude.ai/new")
|
||||
(mkBm "ChatGPT" "https://chatgpt.com/")
|
||||
(mkBm "DeepWiki" "https://deepwiki.com/")
|
||||
"separator"
|
||||
(mkBm "Mistral API" "https://console.mistral.ai/usage")
|
||||
(mkBm "DeepSeek API" "https://platform.deepseek.com/usage")
|
||||
(mkBm "Claude API" "https://console.anthropic.com/usage")
|
||||
(mkBm "OpenRouter API" "https://openrouter.ai/activity")
|
||||
];
|
||||
}
|
||||
(mkBm "GH" "https://github.com/churl")
|
||||
(mkBm "GL" "https://gitlab.com/churl")
|
||||
(mkBm "SO" "https://stackoverflow.com/users/saves/17337508/all")
|
||||
@@ -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/")
|
||||
|
||||
@@ -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
|
||||
@@ -197,14 +194,14 @@ in {
|
||||
|
||||
nixos-packages = {
|
||||
name = "Nix Packages";
|
||||
urls = [{template = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";}];
|
||||
urls = [{template = "https://search.nixos.org/packages?channel=unstable?query={searchTerms}";}];
|
||||
iconMapObj."16" = "https://nixos.org/favicon.ico";
|
||||
definedAliases = ["@np"];
|
||||
};
|
||||
|
||||
nixos-options = {
|
||||
name = "NixOS Options";
|
||||
urls = [{template = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";}];
|
||||
urls = [{template = "https://search.nixos.org/options?channel=unstable?query={searchTerms}";}];
|
||||
iconMapObj."16" = "https://nixos.org/favicon.ico";
|
||||
definedAliases = ["@no"];
|
||||
};
|
||||
|
||||
+150
-229
@@ -42,243 +42,164 @@ 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 = {
|
||||
enable = true;
|
||||
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
||||
|
||||
# Same as above but with args for bat
|
||||
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
|
||||
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
|
||||
|
||||
# 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);
|
||||
# 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
|
||||
|
||||
# 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.hostPlatform.isDarwin {
|
||||
shellInit = ''
|
||||
set fish_greeting
|
||||
yes | fish_config theme save "system-theme"
|
||||
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||||
# stty start undef
|
||||
# stty stop undef
|
||||
# stty lwrap undef
|
||||
# stty lnext undef
|
||||
|
||||
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;
|
||||
'';
|
||||
# The command function allows one to alias this function to `nnn` without
|
||||
# making an infinitely recursive alias
|
||||
command nnn $argv
|
||||
|
||||
shellAbbrs = 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";})
|
||||
];
|
||||
if test -e $NNN_TMPFILE
|
||||
source $NNN_TMPFILE
|
||||
rm $NNN_TMPFILE
|
||||
end
|
||||
'';
|
||||
};
|
||||
})
|
||||
|
||||
# Linux exclusive config
|
||||
(lib.mkIf pkgs.stdenv.hostPlatform.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
|
||||
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
|
||||
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
|
||||
|
||||
# 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
|
||||
|
||||
# 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 command function allows one to alias this function to `nnn` without
|
||||
# making an infinitely recursive alias
|
||||
command nnn $argv
|
||||
|
||||
if test -e $NNN_TMPFILE
|
||||
source $NNN_TMPFILE
|
||||
rm $NNN_TMPFILE
|
||||
end
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
shellAbbrs = lib.mkMerge [
|
||||
# Abbrs that are always available are defined here.
|
||||
{
|
||||
# Tools
|
||||
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
||||
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
||||
|
||||
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra"; # env var for wayland
|
||||
}
|
||||
|
||||
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
||||
|
||||
# Doesn't work with abbrify because I have nnn.override...
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";})
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";})
|
||||
|
||||
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
||||
|
||||
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
|
||||
|
||||
# (abbrify pkgs.sd {sed = "sd";})
|
||||
];
|
||||
})
|
||||
|
||||
# Common config
|
||||
{
|
||||
enable = true;
|
||||
|
||||
shellAbbrs = lib.mkMerge [
|
||||
{
|
||||
# Shell
|
||||
c = "clear";
|
||||
q = "exit";
|
||||
mkdir = "mkdir -p"; # also create parents (-p)
|
||||
watch = "watch -d -c -n 0.5";
|
||||
sy = "sudo 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";
|
||||
|
||||
# Systemctl
|
||||
st = "sudo systemctl-tui";
|
||||
sf = "systemctl --failed";
|
||||
}
|
||||
|
||||
# Abbrs only available if package is installed
|
||||
(abbrify pkgs.rsync rec {
|
||||
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
||||
copy = rsync;
|
||||
})
|
||||
|
||||
(abbrify pkgs.duf {
|
||||
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
||||
alldisks = "duf";
|
||||
})
|
||||
|
||||
(abbrify pkgs.ripgrep {
|
||||
rg = "rg --trim --pretty";
|
||||
# grep = rg;
|
||||
})
|
||||
|
||||
(abbrify pkgs.eza {
|
||||
ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions";
|
||||
lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l";
|
||||
lsa = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l -a";
|
||||
tre = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -T -L 2";
|
||||
})
|
||||
|
||||
(abbrify pkgs.fd {find = "fd";})
|
||||
|
||||
(abbrify pkgs.fzf {fuzzy = "fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'";})
|
||||
|
||||
(abbrify pkgs.gdu {
|
||||
# du = "gdu";
|
||||
storage = "gdu";
|
||||
})
|
||||
|
||||
(abbrify pkgs.git {
|
||||
gs = "git status";
|
||||
gd = "git diff --output-indicator-new=' ' --output-indicator-old=' '";
|
||||
gl = "git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
|
||||
ga = "git add";
|
||||
gap = "git add --patch";
|
||||
gc = "git commit --verbose";
|
||||
gcm = "git commit -m";
|
||||
gcl = "git clone";
|
||||
})
|
||||
|
||||
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
|
||||
|
||||
(abbrify pkgs.lazygit {lg = "lazygit";})
|
||||
];
|
||||
|
||||
plugins = [];
|
||||
}
|
||||
];
|
||||
|
||||
plugins = [];
|
||||
|
||||
shellInit = ''
|
||||
set fish_greeting
|
||||
yes | fish_config theme save "system-theme"
|
||||
'';
|
||||
|
||||
shellAbbrs = let
|
||||
# Only add " | bat" if bat is installed
|
||||
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
|
||||
|
||||
# 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 [
|
||||
# Abbrs that are always available are defined here.
|
||||
{
|
||||
# Shell basics
|
||||
c = "clear";
|
||||
q = "exit";
|
||||
|
||||
# Fish
|
||||
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
|
||||
abbrs = batifyWithArgs "abbr" "-l fish";
|
||||
|
||||
# Tools
|
||||
cd = "z"; # zoxide for quickjump to previously visited locations
|
||||
cdd = "zi";
|
||||
b = "z -"; # jump to previous dir
|
||||
mkdir = "mkdir -p"; # also create parents (-p)
|
||||
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
||||
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
||||
watch = "watch -d -c -n 0.5";
|
||||
nps = "nps -e";
|
||||
nd = "nix develop";
|
||||
nb = "nix build -L";
|
||||
ns = "nix shell nixpkgs#";
|
||||
nr = "nix run";
|
||||
}
|
||||
|
||||
# Abbrs only available if package is installed
|
||||
|
||||
(abbrify pkgs.duf {
|
||||
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*'";
|
||||
alldisks = "duf";
|
||||
})
|
||||
|
||||
(abbrify pkgs.eza {
|
||||
ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions";
|
||||
lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l";
|
||||
lsa = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l -a";
|
||||
tre = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -T -L 2";
|
||||
})
|
||||
|
||||
(abbrify pkgs.fd {find = "fd";})
|
||||
|
||||
(abbrify pkgs.fzf {fuzzy = "fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'";})
|
||||
|
||||
(abbrify pkgs.gdu {
|
||||
# du = "gdu";
|
||||
storage = "gdu";
|
||||
})
|
||||
|
||||
(abbrify pkgs.ghidra {
|
||||
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra";
|
||||
})
|
||||
|
||||
(abbrify pkgs.git {
|
||||
gs = "git status";
|
||||
gd = "git diff --output-indicator-new=' ' --output-indicator-old=' '";
|
||||
gl = "git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
|
||||
ga = "git add";
|
||||
gap = "git add --patch";
|
||||
gc = "git commit --verbose";
|
||||
gcm = "git commit -m";
|
||||
gcl = "git clone";
|
||||
})
|
||||
|
||||
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
|
||||
|
||||
(abbrify pkgs.lazygit {lg = "lazygit";})
|
||||
|
||||
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
||||
|
||||
# Doesn't work with abbrify because I have nnn.override...
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";})
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";})
|
||||
|
||||
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
||||
|
||||
(abbrify pkgs.ripgrep rec {
|
||||
rg = "rg --trim --pretty";
|
||||
# grep = rg;
|
||||
})
|
||||
|
||||
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
|
||||
|
||||
(abbrify pkgs.rsync rec {
|
||||
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
||||
copy = rsync;
|
||||
})
|
||||
|
||||
# (abbrify pkgs.sd {sed = "sd";})
|
||||
];
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
|
||||
@@ -5,12 +5,16 @@
|
||||
hyprland,
|
||||
}:
|
||||
builtins.concatLists [
|
||||
(lib.optionals hyprland.dunst.enable ["dunst"]) # Notifications
|
||||
(lib.optionals hyprland.hyprpanel.enable ["hyprpanel"]) # Panel
|
||||
(lib.optionals hyprland.caelestia.enable ["caelestia shell"]) # Panel/Shell # TODO: Crashes on startup
|
||||
[
|
||||
# Start clipboard management
|
||||
"wl-paste -t text --watch clipman store --no-persist"
|
||||
"wl-paste -p -t text --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\""
|
||||
|
||||
"hyprctl setcursor ${config.home.pointerCursor.name} ${builtins.toString config.home.pointerCursor.size}"
|
||||
"hyprsunset --identity"
|
||||
"waypaper --restore"
|
||||
"fcitx5"
|
||||
|
||||
# HACK: Hyprland doesn't set the xwayland/x11 keymap correctly
|
||||
"setxkbmap -layout ${hyprland.keyboard.layout} -variant ${hyprland.keyboard.variant} -option ${hyprland.keyboard.option} -model pc104"
|
||||
@@ -22,11 +26,6 @@ builtins.concatLists [
|
||||
# This is used for example when running systemd commands without root.
|
||||
# "systemctl --user start hyprpolkitagent.service"
|
||||
# "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1"
|
||||
|
||||
# TODO: This is started by niri already (extract to module so niri/hyprland can both use it)
|
||||
# "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||
|
||||
# TODO: This is started by niri already (extract to module so niri/hyprland can both use it)
|
||||
"dunst"
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||
]
|
||||
]
|
||||
|
||||
@@ -0,0 +1,516 @@
|
||||
{
|
||||
config,
|
||||
hyprland,
|
||||
color,
|
||||
}: {
|
||||
enable = hyprland.caelestia.enable;
|
||||
|
||||
systemd = {
|
||||
enable = false; # Start from hyprland autostart
|
||||
target = "graphical-session.target";
|
||||
environment = [];
|
||||
};
|
||||
|
||||
settings = {
|
||||
appearance = {
|
||||
anim = {durations = {scale = 1;};};
|
||||
font = {
|
||||
family = {
|
||||
clock = "Rubik";
|
||||
material = "Material Symbols Rounded";
|
||||
mono = color.font;
|
||||
sans = color.font;
|
||||
};
|
||||
size = {scale = 1;};
|
||||
};
|
||||
|
||||
padding = {scale = 1;};
|
||||
rounding = {scale = 1;};
|
||||
spacing = {scale = 1;};
|
||||
|
||||
transparency = {
|
||||
base = 0.85;
|
||||
enabled = false;
|
||||
layers = 0.4;
|
||||
};
|
||||
};
|
||||
|
||||
background = {
|
||||
desktopClock = {enabled = false;};
|
||||
enabled = true;
|
||||
|
||||
# Lags when visible on both monitors (different refresh rates?)
|
||||
visualiser = {
|
||||
autoHide = true;
|
||||
blur = true;
|
||||
enabled = false;
|
||||
rounding = 1;
|
||||
spacing = 1;
|
||||
};
|
||||
};
|
||||
|
||||
bar = {
|
||||
clock = {showIcon = true;};
|
||||
dragThreshold = 20;
|
||||
|
||||
entries = [
|
||||
{
|
||||
enabled = true;
|
||||
id = "logo";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "workspaces";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "spacer";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "activeWindow";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "spacer";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "clock";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "tray";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "statusIcons";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "power";
|
||||
}
|
||||
];
|
||||
|
||||
persistent = true;
|
||||
|
||||
popouts = {
|
||||
activeWindow = true;
|
||||
statusIcons = true;
|
||||
tray = true;
|
||||
};
|
||||
|
||||
scrollActions = {
|
||||
brightness = false;
|
||||
volume = true;
|
||||
workspaces = true;
|
||||
};
|
||||
|
||||
showOnHover = true;
|
||||
|
||||
status = {
|
||||
showAudio = true;
|
||||
showBattery = false;
|
||||
showBluetooth = true;
|
||||
showKbLayout = false;
|
||||
showLockStatus = true;
|
||||
showMicrophone = false;
|
||||
showNetwork = true;
|
||||
};
|
||||
|
||||
tray = {
|
||||
background = true;
|
||||
compact = false;
|
||||
iconSubs = [];
|
||||
recolour = false;
|
||||
};
|
||||
|
||||
workspaces = {
|
||||
activeIndicator = true;
|
||||
activeLabel = "";
|
||||
activeTrail = true;
|
||||
label = " ";
|
||||
occupiedBg = false;
|
||||
occupiedLabel = "";
|
||||
perMonitorWorkspaces = false;
|
||||
showWindows = false;
|
||||
shown = 10;
|
||||
|
||||
# Pick them here: https://fonts.google.com/icons
|
||||
specialWorkspaceIcons = [
|
||||
{
|
||||
icon = "music_note";
|
||||
name = "rmpc";
|
||||
}
|
||||
{
|
||||
icon = "memory";
|
||||
name = "btop";
|
||||
}
|
||||
{
|
||||
icon = "mark_chat_unread";
|
||||
name = "ferdium";
|
||||
}
|
||||
{
|
||||
icon = "network_intelligence";
|
||||
name = "msty";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
border = {
|
||||
rounding = 25;
|
||||
thickness = 10;
|
||||
};
|
||||
|
||||
dashboard = {
|
||||
dragThreshold = 50;
|
||||
enabled = true;
|
||||
mediaUpdateInterval = 500;
|
||||
showOnHover = true;
|
||||
};
|
||||
|
||||
general = {
|
||||
apps = {
|
||||
audio = ["kitty" "--title=NcpaMixer" "-e" "ncpamixer"];
|
||||
explorer = ["kitty" "--title=Yazi" "-e" "yazi"];
|
||||
playback = ["mpv"];
|
||||
terminal = ["kitty"];
|
||||
};
|
||||
|
||||
battery = {
|
||||
criticalLevel = 3;
|
||||
warnLevels = [
|
||||
{
|
||||
icon = "battery_android_frame_2";
|
||||
level = 20;
|
||||
message = "You might want to plug in a charger";
|
||||
title = "Low battery";
|
||||
}
|
||||
{
|
||||
icon = "battery_android_frame_1";
|
||||
level = 10;
|
||||
message = "You should probably plug in a charger <b>now</b>";
|
||||
title = "Did you see the previous message?";
|
||||
}
|
||||
{
|
||||
critical = true;
|
||||
icon = "battery_android_alert";
|
||||
level = 5;
|
||||
message = "PLUG THE CHARGER RIGHT NOW!!";
|
||||
title = "Critical battery level";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
idle = {
|
||||
inhibitWhenAudio = true;
|
||||
lockBeforeSleep = true;
|
||||
timeouts = [
|
||||
{
|
||||
idleAction = "lock";
|
||||
timeout = 600;
|
||||
}
|
||||
{
|
||||
# idleAction = "dpms off";
|
||||
# returnAction = "dpms on";
|
||||
idleAction = "echo 'idle'";
|
||||
returnAction = "echo 'return'";
|
||||
timeout = 10000;
|
||||
}
|
||||
{
|
||||
# idleAction = ["systemctl" "suspend-then-hibernate"];
|
||||
idleAction = ["echo" "'idle'"];
|
||||
timeout = 20000;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
launcher = {
|
||||
actionPrefix = ">";
|
||||
actions = [
|
||||
{
|
||||
command = ["autocomplete" "calc"];
|
||||
dangerous = false;
|
||||
description = "Do simple math equations (powered by Qalc)";
|
||||
enabled = true;
|
||||
icon = "calculate";
|
||||
name = "Calculator";
|
||||
}
|
||||
{
|
||||
command = ["autocomplete" "scheme"];
|
||||
dangerous = false;
|
||||
description = "Change the current colour scheme";
|
||||
enabled = true;
|
||||
icon = "palette";
|
||||
name = "Scheme";
|
||||
}
|
||||
{
|
||||
command = ["autocomplete" "wallpaper"];
|
||||
dangerous = false;
|
||||
description = "Change the current wallpaper";
|
||||
enabled = true;
|
||||
icon = "image";
|
||||
name = "Wallpaper";
|
||||
}
|
||||
{
|
||||
command = ["autocomplete" "variant"];
|
||||
dangerous = false;
|
||||
description = "Change the current scheme variant";
|
||||
enabled = true;
|
||||
icon = "colors";
|
||||
name = "Variant";
|
||||
}
|
||||
{
|
||||
command = ["autocomplete" "transparency"];
|
||||
dangerous = false;
|
||||
description = "Change shell transparency";
|
||||
enabled = false;
|
||||
icon = "opacity";
|
||||
name = "Transparency";
|
||||
}
|
||||
{
|
||||
command = ["caelestia" "wallpaper" "-r"];
|
||||
dangerous = false;
|
||||
description = "Switch to a random wallpaper";
|
||||
enabled = false;
|
||||
icon = "casino";
|
||||
name = "Random";
|
||||
}
|
||||
{
|
||||
command = ["setMode" "light"];
|
||||
dangerous = false;
|
||||
description = "Change the scheme to light mode";
|
||||
enabled = true;
|
||||
icon = "light_mode";
|
||||
name = "Light";
|
||||
}
|
||||
{
|
||||
command = ["setMode" "dark"];
|
||||
dangerous = false;
|
||||
description = "Change the scheme to dark mode";
|
||||
enabled = true;
|
||||
icon = "dark_mode";
|
||||
name = "Dark";
|
||||
}
|
||||
{
|
||||
command = ["systemctl" "poweroff"];
|
||||
dangerous = true;
|
||||
description = "Shutdown the system";
|
||||
enabled = true;
|
||||
icon = "power_settings_new";
|
||||
name = "Shutdown";
|
||||
}
|
||||
{
|
||||
command = ["systemctl" "reboot"];
|
||||
dangerous = true;
|
||||
description = "Reboot the system";
|
||||
enabled = true;
|
||||
icon = "cached";
|
||||
name = "Reboot";
|
||||
}
|
||||
{
|
||||
command = ["loginctl" "terminate-user" ""];
|
||||
dangerous = true;
|
||||
description = "Log out of the current session";
|
||||
enabled = true;
|
||||
icon = "exit_to_app";
|
||||
name = "Logout";
|
||||
}
|
||||
{
|
||||
command = ["loginctl" "lock-session"];
|
||||
dangerous = false;
|
||||
description = "Lock the current session";
|
||||
enabled = true;
|
||||
icon = "lock";
|
||||
name = "Lock";
|
||||
}
|
||||
{
|
||||
command = ["systemctl" "suspend-then-hibernate"];
|
||||
dangerous = false;
|
||||
description = "Suspend then hibernate";
|
||||
enabled = false;
|
||||
icon = "bedtime";
|
||||
name = "Sleep";
|
||||
}
|
||||
];
|
||||
|
||||
dragThreshold = 50;
|
||||
enableDangerousActions = true;
|
||||
hiddenApps = [];
|
||||
maxShown = 7;
|
||||
maxWallpapers = 9;
|
||||
showOnHover = false;
|
||||
specialPrefix = "@";
|
||||
useFuzzy = {
|
||||
actions = false;
|
||||
apps = false;
|
||||
schemes = false;
|
||||
variants = false;
|
||||
wallpapers = false;
|
||||
};
|
||||
vimKeybinds = false;
|
||||
};
|
||||
|
||||
lock = {recolourLogo = false;};
|
||||
|
||||
notifs = {
|
||||
actionOnClick = false;
|
||||
clearThreshold = 0.3;
|
||||
defaultExpireTimeout = 5000;
|
||||
expandThreshold = 20;
|
||||
expire = true;
|
||||
};
|
||||
|
||||
osd = {
|
||||
enableBrightness = false;
|
||||
enableMicrophone = true;
|
||||
enabled = true;
|
||||
hideDelay = 2000;
|
||||
};
|
||||
|
||||
paths = {
|
||||
mediaGif = "root:/assets/bongocat.gif";
|
||||
sessionGif = "root:/assets/kurukuru.gif";
|
||||
wallpaperDir = "~/NixFlake/wallpapers";
|
||||
};
|
||||
|
||||
services = {
|
||||
audioIncrement = 0.1;
|
||||
defaultPlayer = "MPD";
|
||||
gpuType = "";
|
||||
maxVolume = 1;
|
||||
playerAliases = [
|
||||
{
|
||||
from = "com.github.th_ch.youtube_music";
|
||||
to = "YT Music";
|
||||
}
|
||||
];
|
||||
smartScheme = true;
|
||||
useFahrenheit = false;
|
||||
useTwelveHourClock = false;
|
||||
visualiserBars = 45;
|
||||
weatherLocation = "Dortmund, Germany";
|
||||
};
|
||||
|
||||
session = {
|
||||
commands = {
|
||||
hibernate = ["systemctl" "hibernate"];
|
||||
logout = ["loginctl" "terminate-user" ""];
|
||||
reboot = ["systemctl" "reboot"];
|
||||
shutdown = ["systemctl" "poweroff"];
|
||||
};
|
||||
dragThreshold = 30;
|
||||
enabled = true;
|
||||
vimKeybinds = false;
|
||||
};
|
||||
|
||||
sidebar = {
|
||||
dragThreshold = 80;
|
||||
enabled = true;
|
||||
};
|
||||
|
||||
utilities = {
|
||||
enabled = true;
|
||||
maxToasts = 4;
|
||||
toasts = {
|
||||
audioInputChanged = true;
|
||||
audioOutputChanged = true;
|
||||
capsLockChanged = true;
|
||||
chargingChanged = true;
|
||||
configLoaded = true;
|
||||
dndChanged = true;
|
||||
gameModeChanged = true;
|
||||
kbLayoutChanged = false;
|
||||
nowPlaying = false;
|
||||
numLockChanged = true;
|
||||
vpnChanged = true;
|
||||
};
|
||||
|
||||
vpn = {
|
||||
enabled = false;
|
||||
provider = [
|
||||
{
|
||||
displayName = "Wireguard (Your VPN)";
|
||||
interface = "your-connection-name";
|
||||
name = "wireguard";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cli = {
|
||||
enable = hyprland.caelestia.enable;
|
||||
|
||||
settings = {
|
||||
record = {extraArgs = [];};
|
||||
|
||||
theme = {
|
||||
enableBtop = false;
|
||||
enableDiscord = false;
|
||||
enableFuzzel = false;
|
||||
enableGtk = false;
|
||||
enableHypr = false;
|
||||
enableQt = false;
|
||||
enableSpicetify = false;
|
||||
enableTerm = false;
|
||||
};
|
||||
|
||||
toggles = {
|
||||
communication = {
|
||||
discord = {
|
||||
command = ["discord"];
|
||||
enable = false;
|
||||
match = [{class = "discord";}];
|
||||
move = true;
|
||||
};
|
||||
whatsapp = {
|
||||
enable = false;
|
||||
match = [{class = "whatsapp";}];
|
||||
move = true;
|
||||
};
|
||||
};
|
||||
|
||||
music = {
|
||||
feishin = {
|
||||
enable = false;
|
||||
match = [{class = "feishin";}];
|
||||
move = true;
|
||||
};
|
||||
spotify = {
|
||||
command = ["spicetify" "watch" "-s"];
|
||||
enable = false;
|
||||
match = [{class = "Spotify";} {initialTitle = "Spotify";} {initialTitle = "Spotify Free";}];
|
||||
move = true;
|
||||
};
|
||||
};
|
||||
|
||||
sysmon = {
|
||||
btop = {
|
||||
command = ["kitty" "--title" "Btop" "-e" "btop"];
|
||||
enable = false;
|
||||
match = [
|
||||
{
|
||||
class = "btop";
|
||||
title = "Btop";
|
||||
workspace = {name = "special:sysmon";};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
todo = {
|
||||
todoist = {
|
||||
command = ["todoist"];
|
||||
enable = false;
|
||||
match = [{class = "Todoist";}];
|
||||
move = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
wallpaper = {postHook = "echo $WALLPAPER_PATH";};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -34,6 +34,10 @@ in {
|
||||
assertion = builtins.hasAttr "hyprlock" nixosConfig.security.pam.services;
|
||||
message = "Can't enable Hyprland module without Hyprlock PAM service!";
|
||||
}
|
||||
{
|
||||
assertion = hyprland.hyprpanel.enable != hyprland.caelestia.enable;
|
||||
message = "Can't enable Hyprpanel and Caelestia at the same time!";
|
||||
}
|
||||
];
|
||||
|
||||
gtk = {
|
||||
@@ -48,7 +52,6 @@ in {
|
||||
|
||||
home = {
|
||||
pointerCursor = {
|
||||
enable = true;
|
||||
gtk.enable = lib.mkDefault true;
|
||||
x11.enable = lib.mkDefault true;
|
||||
package = lib.mkDefault color.cursorPackage;
|
||||
@@ -57,55 +60,110 @@ in {
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
hyprpaper # Wallpaper setter
|
||||
hyprpicker # Color picker
|
||||
# hyprpolkitagent # Ugly polkit authentication GUI
|
||||
hyprland-qt-support
|
||||
hyprsunset # Blue light filter
|
||||
|
||||
wl-clipboard
|
||||
# clipman # Clipboard manager (wl-paste)
|
||||
clipman # Clipboard manager (wl-paste)
|
||||
libnotify
|
||||
inotify-tools # Includes inotifywait
|
||||
|
||||
# ncpamixer # Audio control
|
||||
ncpamixer # Audio control
|
||||
slurp # Region selector for screensharing
|
||||
grim # Grab images from compositor
|
||||
|
||||
# Deps for Qt5 and Qt6 apps (e.g., Nextcloud)
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
|
||||
# xwayland
|
||||
# wayland-protocols
|
||||
];
|
||||
|
||||
file = {
|
||||
".config/hypr/keybindings.info".text = let
|
||||
fixupHomeDir = key:
|
||||
builtins.replaceStrings ["/home/${username}"] ["~"] key;
|
||||
|
||||
fixupNixStore = key: let
|
||||
# The pattern has to match the entire string, otherwise it won't work
|
||||
matches = builtins.match ".*/nix/store/(.*)/.*" key;
|
||||
in
|
||||
if (matches == null)
|
||||
then key
|
||||
else builtins.replaceStrings matches ["..."] key;
|
||||
|
||||
fixupNoMod = key:
|
||||
builtins.replaceStrings ["<-"] ["<"] key;
|
||||
|
||||
mkBindHelpKey = key:
|
||||
builtins.replaceStrings ["$mainMod" " " ","] ["${hyprland.keybindings.main-mod}" "-" ""] key;
|
||||
|
||||
mkBindHelpAction = action:
|
||||
builtins.replaceStrings [","] [""] action;
|
||||
|
||||
mkBindHelp = key: action: "<${mkBindHelpKey key}>: ${mkBindHelpAction action}";
|
||||
|
||||
mkBindsHelp = key: actions:
|
||||
actions
|
||||
|> builtins.map (mkBindHelp key)
|
||||
|> builtins.map fixupNoMod
|
||||
|> builtins.map fixupNixStore
|
||||
|> builtins.map fixupHomeDir;
|
||||
in
|
||||
(hyprland.keybindings.bindings // always-bind)
|
||||
|> builtins.mapAttrs mkBindsHelp
|
||||
|> builtins.attrValues
|
||||
|> builtins.concatLists
|
||||
|> builtins.concatStringsSep "\n";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
hyprlock = import ./hyprlock.nix {inherit config hyprland color;};
|
||||
caelestia = import ./caelestia.nix {inherit config hyprland color;};
|
||||
};
|
||||
|
||||
services = {
|
||||
dunst = import ./dunst.nix {inherit pkgs config hyprland color;};
|
||||
hypridle = import ./hypridle.nix {inherit config hyprland color;};
|
||||
hyprpaper = import ./hyprpaper.nix {inherit config hyprland color;};
|
||||
};
|
||||
|
||||
# Make sure the units only start when using Hyprland
|
||||
systemd.user.services.hypridle.Install.WantedBy = lib.mkForce ["hyprland-session.target"];
|
||||
systemd.user.services.hypridle.Unit.After = lib.mkForce ["hyprland-session.target"];
|
||||
systemd.user.services.hypridle.Unit.PartOf = lib.mkForce ["hyprland-session.target"];
|
||||
systemd.user.services.elephant.Install.WantedBy = lib.mkForce ["hyprland-session.target" "graphical-session.target"];
|
||||
systemd.user.services.elephant.Unit.After = lib.mkForce ["hyprland-session.target" "graphical-session.target"];
|
||||
systemd.user.services.elephant.Unit.PartOf = lib.mkForce ["hyprland-session.target" "graphical-session.target"];
|
||||
systemd.user.services.dunst.Unit.After = lib.mkIf hyprland.dunst.enable (lib.mkForce ["hyprland-session.target"]);
|
||||
systemd.user.services.dunst.Unit.PartOf = lib.mkIf hyprland.dunst.enable (lib.mkForce ["hyprland-session.target"]);
|
||||
systemd.user.services.hypridle.Install.WantedBy = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||
systemd.user.services.hypridle.Unit.After = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||
systemd.user.services.hypridle.Unit.PartOf = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||
systemd.user.services.hyprpaper.Install.WantedBy = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||
systemd.user.services.hyprpaper.Unit.After = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||
systemd.user.services.hyprpaper.Unit.PartOf = lib.mkIf (!hyprland.caelestia.enable) (lib.mkForce ["hyprland-session.target"]);
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
configType = "hyprlang";
|
||||
|
||||
systemd.enable = true; # Enable hyprland-session.target
|
||||
systemd.variables = ["--all"]; # Import PATH into systemd
|
||||
xwayland.enable = true;
|
||||
|
||||
plugins = builtins.concatLists [
|
||||
(lib.optionals
|
||||
hyprland.bars.enable
|
||||
[inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars])
|
||||
(lib.optionals
|
||||
hyprland.dynamicCursor.enable
|
||||
[inputs.hypr-dynamic-cursors.packages.${pkgs.stdenv.hostPlatform.system}.hypr-dynamic-cursors])
|
||||
(lib.optionals
|
||||
hyprland.trails.enable
|
||||
[inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprtrails])
|
||||
(lib.optionals
|
||||
hyprland.hyprspace.enable
|
||||
[inputs.hyprspace.packages.${pkgs.stdenv.hostPlatform.system}.Hyprspace])
|
||||
];
|
||||
|
||||
settings = import ./settings.nix {
|
||||
inherit
|
||||
lib
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
hyprland,
|
||||
color,
|
||||
}: {
|
||||
enable = hyprland.dunst.enable;
|
||||
|
||||
iconTheme.package = color.iconPackage;
|
||||
iconTheme.name = color.iconTheme;
|
||||
|
||||
settings = {
|
||||
global = {
|
||||
monitor = config.homemodules.waybar.monitor;
|
||||
font = "${color.font} 11";
|
||||
offset = "10x10";
|
||||
background = color.hexS.base;
|
||||
foreground = color.hexS.text;
|
||||
frame_width = 2;
|
||||
corner_radius = 6;
|
||||
separator_color = "frame";
|
||||
};
|
||||
|
||||
urgency_low = {
|
||||
frame_color = color.hexS.green;
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
frame_color = color.hexS.green;
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
frame_color = color.hexS.red;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
hyprland,
|
||||
color,
|
||||
}: {
|
||||
enable = true;
|
||||
enable = !hyprland.caelestia.enable;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
config,
|
||||
hyprland,
|
||||
color,
|
||||
}: {
|
||||
enable = !hyprland.caelestia.enable;
|
||||
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
splash_offset = 2.0;
|
||||
|
||||
# Wallpapers have to be preloaded to be displayed
|
||||
preload = let
|
||||
mkPreload = name: "${config.paths.nixflake}/wallpapers/${name}.jpg";
|
||||
in
|
||||
color.wallpapers |> builtins.map mkPreload;
|
||||
|
||||
wallpaper = let
|
||||
mkWallpaper = monitor:
|
||||
"${monitor}, "
|
||||
+ "${config.paths.nixflake}/wallpapers/${color.wallpaper}.jpg";
|
||||
in
|
||||
hyprland.monitors
|
||||
|> builtins.attrNames
|
||||
|> builtins.map mkWallpaper;
|
||||
};
|
||||
}
|
||||
@@ -5,8 +5,13 @@
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Hyprland Window Manager + Compositor";
|
||||
|
||||
dunst.enable = lib.mkEnableOption "Enable Dunst notification daemon";
|
||||
bars.enable = lib.mkEnableOption "Enable window bars";
|
||||
dynamicCursor.enable = lib.mkEnableOption "Enable dynamic cursors";
|
||||
trails.enable = lib.mkEnableOption "Enable dynamic window trails";
|
||||
hyprspace.enable = lib.mkEnableOption "Enable Hyprspace workspace overview";
|
||||
hyprpanel.enable = lib.mkEnableOption "Enable Hyprpanel";
|
||||
caelestia.enable = lib.mkEnableOption "Enable Caelestia";
|
||||
|
||||
keyboard = {
|
||||
layout = lib.mkOption {
|
||||
|
||||
@@ -137,12 +137,8 @@
|
||||
hyprland.windowrules
|
||||
];
|
||||
|
||||
render = {
|
||||
cm_enabled = true;
|
||||
cm_auto_hdr = true;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
@@ -241,5 +237,123 @@
|
||||
on_double_click = "hyprctl dispatch fullscreen 1";
|
||||
};
|
||||
})
|
||||
|
||||
(lib.optionalAttrs hyprland.dynamicCursor.enable {
|
||||
dynamic-cursors = {
|
||||
# enables the plugin
|
||||
enabled = true;
|
||||
|
||||
# sets the cursor behaviour, supports these values:
|
||||
# tilt - tilt the cursor based on x-velocity
|
||||
# rotate - rotate the cursor based on movement direction
|
||||
# stretch - stretch the cursor shape based on direction and velocity
|
||||
# none - do not change the cursors behaviour
|
||||
mode = "rotate";
|
||||
|
||||
# minimum angle difference in degrees after which the shape is changed
|
||||
# smaller values are smoother, but more expensive for hw cursors
|
||||
threshold = 2;
|
||||
|
||||
# for mode = rotate
|
||||
rotate = {
|
||||
# length in px of the simulated stick used to rotate the cursor
|
||||
# most realistic if this is your actual cursor size
|
||||
length = 20;
|
||||
|
||||
# clockwise offset applied to the angle in degrees
|
||||
# this will apply to ALL shapes
|
||||
offset = 0.0;
|
||||
};
|
||||
|
||||
# for mode = tilt
|
||||
tilt = {
|
||||
# controls how powerful the tilt is, the lower, the more power
|
||||
# this value controls at which speed (px/s) the full tilt is reached
|
||||
# the full tilt being 60° in both directions
|
||||
limit = 1000;
|
||||
|
||||
# relationship between speed and tilt, supports these values:
|
||||
# linear - a linear function is used
|
||||
# quadratic - a quadratic function is used (most realistic to actual air drag)
|
||||
# negative_quadratic - negative version of the quadratic one, feels more aggressive
|
||||
# see `activation` in `src/mode/utils.cpp` for how exactly the calculation is done
|
||||
function = "negative_quadratic";
|
||||
|
||||
# time window (ms) over which the speed is calculated
|
||||
# higher values will make slow motions smoother but more delayed
|
||||
window = 100;
|
||||
};
|
||||
|
||||
# configure shake to find
|
||||
# magnifies the cursor if its is being shaken
|
||||
shake = {
|
||||
# enables shake to find
|
||||
enabled = false;
|
||||
|
||||
# use nearest-neighbour (pixelated) scaling when shaking
|
||||
# may look weird when effects are enabled
|
||||
nearest = true;
|
||||
|
||||
# controls how soon a shake is detected
|
||||
# lower values mean sooner
|
||||
threshold = 3.0;
|
||||
|
||||
# magnification level immediately after shake start
|
||||
base = 1.5;
|
||||
# magnification increase per second when continuing to shake
|
||||
speed = 0.0;
|
||||
# how much the speed is influenced by the current shake intensitiy
|
||||
influence = 0.0;
|
||||
|
||||
# maximal magnification the cursor can reach
|
||||
# values below 1 disable the limit (e.g. 0)
|
||||
limit = 0.0;
|
||||
|
||||
# time in millseconds the cursor will stay magnified after a shake has ended
|
||||
timeout = 1000;
|
||||
|
||||
# show cursor behaviour `tilt`, `rotate`, etc. while shaking
|
||||
effects = true;
|
||||
|
||||
# enable ipc events for shake
|
||||
# see the `ipc` section below
|
||||
ipc = false;
|
||||
};
|
||||
|
||||
# use hyprcursor to get a higher resolution texture when the cursor is magnified
|
||||
# see the `hyprcursor` section below
|
||||
hyprcursor = {
|
||||
# use nearest-neighbour (pixelated) scaling when magnifing beyond texture size
|
||||
# this will also have effect without hyprcursor support being enabled
|
||||
# 0 / false - never use pixelated scaling
|
||||
# 1 / true - use pixelated when no highres image
|
||||
# 2 - always use pixleated scaling
|
||||
nearest = true;
|
||||
|
||||
# enable dedicated hyprcursor support
|
||||
enabled = true;
|
||||
|
||||
# resolution in pixels to load the magnified shapes at
|
||||
# be warned that loading a very high-resolution image will take a long time and might impact memory consumption
|
||||
# -1 means we use [normal cursor size] * [shake:base option]
|
||||
resolution = -1;
|
||||
|
||||
# shape to use when clientside cursors are being magnified
|
||||
# see the shape-name property of shape rules for possible names
|
||||
# specifying clientside will use the actual shape, but will be pixelated
|
||||
fallback = "clientside";
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
(lib.optionalAttrs hyprland.trails.enable {
|
||||
hyprtrails = {
|
||||
color = "rgb(${color.hex.accent})";
|
||||
};
|
||||
})
|
||||
|
||||
(lib.optionalAttrs hyprland.hyprspace.enable {
|
||||
overview = {};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
darwinConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.homemodules) jellyfin-tui color;
|
||||
|
||||
systemConfig =
|
||||
if pkgs.stdenv.hostPlatform.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.hostPlatform.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.hostPlatform.isLinux {
|
||||
".config/jellyfin-tui/config.yaml".text = configFile;
|
||||
})
|
||||
(lib.optionalAttrs pkgs.stdenv.hostPlatform.isDarwin {
|
||||
"Library/Application Support/jellyfin-tui/config.yaml".text = configFile;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable jellyfin-tui";
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
config,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.homemodules) kitty color;
|
||||
@@ -26,111 +25,98 @@ in {
|
||||
"kitty_mod+j" = "next_window";
|
||||
"kitty_mod+k" = "previous_window";
|
||||
"kitty_mod+l" = "next_layout";
|
||||
"kitty_mod+p" = "command_palette";
|
||||
|
||||
"kitty_mod+c" = "copy_to_clipboard";
|
||||
"ctrl+c" = "copy_or_interrupt";
|
||||
"kitty_mod+v" = "paste_from_clipboard";
|
||||
"ctrl+v" = "paste_from_clipboard";
|
||||
};
|
||||
|
||||
settings = lib.mkMerge [
|
||||
# Linux config
|
||||
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
|
||||
allow_remote_control = true; # For nnn file preview or nvim scrollback
|
||||
listen_on = lib.mkDefault "unix:@mykitty"; # This conflicts with direnv-instant
|
||||
})
|
||||
settings = {
|
||||
editor = config.home.sessionVariables.EDITOR;
|
||||
scrollback_lines = 10000;
|
||||
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
|
||||
# hide_window_decorations = "yes";
|
||||
enabled_layouts = "grid,vertical,horizontal";
|
||||
|
||||
# Common config
|
||||
{
|
||||
editor = config.home.sessionVariables.EDITOR;
|
||||
scrollback_lines = 10000;
|
||||
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;
|
||||
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
|
||||
listen_on = "unix:@mykitty";
|
||||
|
||||
tab_bar_min_tabs = 2; # Don't show a single tab
|
||||
tab_bar_edge = "bottom";
|
||||
tab_bar_style = "powerline";
|
||||
tab_powerline_style = "round";
|
||||
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
|
||||
tab_bar_min_tabs = 2; # Don't show a single tab
|
||||
tab_bar_edge = "bottom";
|
||||
tab_bar_style = "powerline";
|
||||
tab_powerline_style = "round";
|
||||
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
|
||||
|
||||
#
|
||||
# Color Theme
|
||||
#
|
||||
#
|
||||
# Color Theme
|
||||
#
|
||||
|
||||
# The basic colors
|
||||
background = color.hexS.base;
|
||||
foreground = color.hexS.text;
|
||||
selection_foreground = color.hexS.base;
|
||||
selection_background = color.hexS.rosewater;
|
||||
# The basic colors
|
||||
background = color.hexS.base;
|
||||
foreground = color.hexS.text;
|
||||
selection_foreground = color.hexS.base;
|
||||
selection_background = color.hexS.rosewater;
|
||||
|
||||
# Cursor colors
|
||||
cursor = color.hexS.rosewater;
|
||||
cursor_text_color = color.hexS.base;
|
||||
# Cursor colors
|
||||
cursor = color.hexS.rosewater;
|
||||
cursor_text_color = color.hexS.base;
|
||||
|
||||
# URL underline color when hovering with mouse
|
||||
url_color = color.hexS.rosewater;
|
||||
# URL underline color when hovering with mouse
|
||||
url_color = color.hexS.rosewater;
|
||||
|
||||
# Kitty window border colors
|
||||
active_border_color = color.hexS.lavender;
|
||||
inactive_border_color = color.hexS.overlay0;
|
||||
bell_border_color = color.hexS.yellow;
|
||||
# Kitty window border colors
|
||||
active_border_color = color.hexS.lavender;
|
||||
inactive_border_color = color.hexS.overlay0;
|
||||
bell_border_color = color.hexS.yellow;
|
||||
|
||||
# OS Window titlebar colors
|
||||
wayland_titlebar_color = "system";
|
||||
macos_titlebar_color = "system";
|
||||
# OS Window titlebar colors
|
||||
wayland_titlebar_color = "system";
|
||||
macos_titlebar_color = "system";
|
||||
|
||||
# Tab bar colors
|
||||
active_tab_foreground = color.hexS.base;
|
||||
active_tab_background = color.hexS.lavender;
|
||||
inactive_tab_foreground = color.hexS.text;
|
||||
inactive_tab_background = color.hexS.crust;
|
||||
tab_bar_background = color.hexS.base;
|
||||
# Tab bar colors
|
||||
active_tab_foreground = color.hexS.base;
|
||||
active_tab_background = color.hexS.lavender;
|
||||
inactive_tab_foreground = color.hexS.text;
|
||||
inactive_tab_background = color.hexS.crust;
|
||||
tab_bar_background = color.hexS.base;
|
||||
|
||||
# Color for marks (marked text in the terminal)
|
||||
mark1_foreground = color.hexS.base;
|
||||
mark1_background = color.hexS.lavender;
|
||||
mark2_foreground = color.hexS.base;
|
||||
mark2_background = color.hexS.mauve;
|
||||
mark3_foreground = color.hexS.base;
|
||||
mark3_background = color.hexS.sapphire;
|
||||
# Color for marks (marked text in the terminal)
|
||||
mark1_foreground = color.hexS.base;
|
||||
mark1_background = color.hexS.lavender;
|
||||
mark2_foreground = color.hexS.base;
|
||||
mark2_background = color.hexS.mauve;
|
||||
mark3_foreground = color.hexS.base;
|
||||
mark3_background = color.hexS.sapphire;
|
||||
|
||||
# The 16 terminal colors
|
||||
# black
|
||||
color0 = color.hexS.subtext1;
|
||||
color8 = color.hexS.subtext0;
|
||||
# The 16 terminal colors
|
||||
# black
|
||||
color0 = color.hexS.subtext1;
|
||||
color8 = color.hexS.subtext0;
|
||||
|
||||
# red
|
||||
color1 = color.hexS.red;
|
||||
color9 = color.hexS.red;
|
||||
# red
|
||||
color1 = color.hexS.red;
|
||||
color9 = color.hexS.red;
|
||||
|
||||
# green
|
||||
color2 = color.hexS.green;
|
||||
color10 = color.hexS.green;
|
||||
# green
|
||||
color2 = color.hexS.green;
|
||||
color10 = color.hexS.green;
|
||||
|
||||
# yellow
|
||||
color3 = color.hexS.yellow;
|
||||
color11 = color.hexS.yellow;
|
||||
# yellow
|
||||
color3 = color.hexS.yellow;
|
||||
color11 = color.hexS.yellow;
|
||||
|
||||
# blue
|
||||
color4 = color.hexS.blue;
|
||||
color12 = color.hexS.blue;
|
||||
# blue
|
||||
color4 = color.hexS.blue;
|
||||
color12 = color.hexS.blue;
|
||||
|
||||
# magenta
|
||||
color5 = color.hexS.pink;
|
||||
color13 = color.hexS.pink;
|
||||
# magenta
|
||||
color5 = color.hexS.pink;
|
||||
color13 = color.hexS.pink;
|
||||
|
||||
# cyan
|
||||
color6 = color.hexS.teal;
|
||||
color14 = color.hexS.teal;
|
||||
# cyan
|
||||
color6 = color.hexS.teal;
|
||||
color14 = color.hexS.teal;
|
||||
|
||||
# white
|
||||
color7 = color.hexS.surface2;
|
||||
color15 = color.hexS.surface1;
|
||||
}
|
||||
];
|
||||
# white
|
||||
color7 = color.hexS.surface2;
|
||||
color15 = color.hexS.surface1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -30,62 +30,53 @@ 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
|
||||
])
|
||||
|
||||
[
|
||||
@@ -95,54 +86,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
|
||||
pygments
|
||||
pyyaml
|
||||
]))
|
||||
|
||||
(rWrapper.override {
|
||||
packages = with rPackages; [
|
||||
languageserver
|
||||
ggplot2
|
||||
ggalluvial
|
||||
plotly
|
||||
shiny
|
||||
readr
|
||||
tibble
|
||||
svglite
|
||||
dplyr
|
||||
tidyr
|
||||
scales
|
||||
];
|
||||
})
|
||||
|
||||
nixd
|
||||
alejandra # nix
|
||||
]
|
||||
@@ -150,8 +93,6 @@ in {
|
||||
};
|
||||
|
||||
programs.nixvim = {
|
||||
# nixpkgs.pkgs = pkgs;
|
||||
|
||||
defaultEditor = true;
|
||||
enable = true;
|
||||
enableMan = false; # Nixvim man pages
|
||||
@@ -159,15 +100,6 @@ in {
|
||||
viAlias = neovim.alias;
|
||||
vimAlias = neovim.alias;
|
||||
|
||||
# extraPackages = let
|
||||
# yazi-termfix = pkgs.writeShellScriptBin "yazi" ''
|
||||
# export TERM=xterm-kitty
|
||||
# exec ${pkgs.yazi}/bin/yazi "@$"
|
||||
# '';
|
||||
# in [
|
||||
# yazi-termfix
|
||||
# ];
|
||||
|
||||
# Configured using plugin
|
||||
# colorschemes.catppuccin = {
|
||||
# enable = true;
|
||||
@@ -183,7 +115,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;
|
||||
};
|
||||
@@ -193,7 +125,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;
|
||||
|
||||
@@ -226,16 +158,6 @@ in {
|
||||
# fg = "#${color.hex.dark.text}";
|
||||
# bold = false;
|
||||
# };
|
||||
# NeoTreeNormal = {bg = "#${color.hex.base}";};
|
||||
# NeoTreeNormalNC = {bg = "#${color.hex.base}";};
|
||||
# NeoTreeWinSeparator = {
|
||||
# fg = "#${color.hex.crust}";
|
||||
# bg = "#${color.hex.base}";
|
||||
# };
|
||||
# NeoTreeVertSplit = {
|
||||
# fg = "#${color.hex.crust}";
|
||||
# bg = "#${color.hex.base}";
|
||||
# };
|
||||
};
|
||||
|
||||
# extraLuaPackages = with pkgs.lua51Packages; [];
|
||||
@@ -253,7 +175,7 @@ in {
|
||||
# local renderer = require("neo-tree.ui.renderer")
|
||||
# local state = manager.get_state("filesystem")
|
||||
# local window_exists = renderer.window_exists(state)
|
||||
#
|
||||
|
||||
# if window_exists then
|
||||
# require("neo-tree.sources.filesystem.commands").refresh(state)
|
||||
# end
|
||||
@@ -329,15 +251,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;
|
||||
|
||||
@@ -387,7 +300,6 @@ in {
|
||||
light = "latte";
|
||||
dark = "mocha";
|
||||
};
|
||||
term_colors = true;
|
||||
# https://github.com/catppuccin/nvim/tree/main?tab=readme-ov-file#integrations
|
||||
default_integrations = true;
|
||||
integrations = {
|
||||
@@ -424,7 +336,6 @@ in {
|
||||
# custom_bg = "crust";
|
||||
};
|
||||
notify = true;
|
||||
terminal = true;
|
||||
treesitter = true;
|
||||
ufo = true;
|
||||
rainbow_delimiters = true;
|
||||
@@ -436,15 +347,6 @@ in {
|
||||
};
|
||||
which_key = true;
|
||||
};
|
||||
|
||||
highlight_overrides.mocha.__raw = ''
|
||||
function(colors)
|
||||
return {
|
||||
NeoTreeWinSeparator = { fg = colors.crust, bg = colors.base, },
|
||||
NeoTreeVertSplit = { fg = colors.crust, bg = colors.base, },
|
||||
}
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -466,7 +368,6 @@ in {
|
||||
# pkg = inputs.blink-cmp.packages.${system}.default;
|
||||
pkg = pkgs.vimPlugins.blink-cmp;
|
||||
lazy = true;
|
||||
dependencies = [luasnip];
|
||||
event = ["InsertEnter"];
|
||||
config = mkDefaultConfig name;
|
||||
|
||||
@@ -514,17 +415,13 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
snippets = {
|
||||
preset = "luasnip";
|
||||
};
|
||||
|
||||
fuzzy = {
|
||||
frecency.enabled = true;
|
||||
use_proximity = true;
|
||||
};
|
||||
|
||||
sources = {
|
||||
default = ["lsp" "path" "snippets" "omni"]; # No "buffer"
|
||||
default = ["lsp" "path" "snippets"]; # No "buffer"
|
||||
};
|
||||
|
||||
cmdline = {
|
||||
@@ -625,13 +522,10 @@ in {
|
||||
make = ["bake"];
|
||||
markdown = ["prettierd" "prettier"];
|
||||
nix = ["alejandra"];
|
||||
perl = ["perltidy"];
|
||||
python = ["black"];
|
||||
qml = ["qmlformat"];
|
||||
r = ["air"];
|
||||
rust = ["rustfmt"];
|
||||
svelte = ["prettierd" "prettier"];
|
||||
toml = ["tombi"];
|
||||
typescript = ["prettierd" "prettier"];
|
||||
typst = ["typstyle"];
|
||||
};
|
||||
@@ -656,21 +550,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;
|
||||
@@ -964,8 +843,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 = {
|
||||
@@ -1008,15 +888,16 @@ in {
|
||||
{name = "html";} # vscode-langservers-extracted
|
||||
{name = "just";}
|
||||
{name = "lua_ls";}
|
||||
# {
|
||||
# name = "ltex";
|
||||
# extraOptions.settings = {
|
||||
# ltex = {
|
||||
# checkFrequency = "save";
|
||||
# enabled = ["markdown" "org" "tex" "latex" "plaintext"];
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
{
|
||||
name = "ltex";
|
||||
extraOptions.settings = {
|
||||
ltex = {
|
||||
checkFrequency = "save";
|
||||
enabled = ["markdown" "org" "tex" "latex" "plaintext"];
|
||||
};
|
||||
};
|
||||
}
|
||||
{name = "autotools-language-server";}
|
||||
# {name = "nil_ls";}
|
||||
{
|
||||
name = "nixd";
|
||||
@@ -1058,8 +939,6 @@ in {
|
||||
};
|
||||
};
|
||||
}
|
||||
{name = "perlpls";}
|
||||
{name = "perlnavigator";}
|
||||
{
|
||||
name = "qmlls";
|
||||
extraOptions.cmd = [
|
||||
@@ -1067,8 +946,6 @@ in {
|
||||
"-E" # Use QML_IMPORT_PATH env variable
|
||||
];
|
||||
}
|
||||
# {name = "pyrefly";} # TODO: Config
|
||||
{name = "r_language_server";}
|
||||
{name = "svelte";}
|
||||
{name = "tailwindcss";}
|
||||
{name = "texlab";}
|
||||
@@ -1080,7 +957,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
|
||||
@@ -1158,7 +1034,6 @@ in {
|
||||
pkg = pkgs.vimPlugins.lualine-nvim;
|
||||
lazy = true;
|
||||
event = ["BufReadPost" "BufNewFile"];
|
||||
# dependencies = [opencode];
|
||||
config = ''
|
||||
function(_, opts)
|
||||
local lualine = require("lualine")
|
||||
@@ -1258,7 +1133,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 = {}, } }'';
|
||||
};
|
||||
@@ -1424,19 +1298,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;
|
||||
@@ -1498,32 +1372,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;
|
||||
@@ -1748,7 +1596,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;
|
||||
@@ -1784,20 +1632,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;
|
||||
@@ -1828,7 +1662,6 @@ in {
|
||||
function(line)
|
||||
local base = { fg = "#${color.hex.base}", bg = "#${color.hex.base}" }
|
||||
local crust = { fg = "#${color.hex.crust}", bg = "#${color.hex.crust}" }
|
||||
local mantle = { fg = "#${color.hex.mantle}", bg = "#${color.hex.mantle}" }
|
||||
local text = { fg = "#${color.hex.text}", bg = "#${color.hex.crust}" }
|
||||
local accent = { fg = "#${color.hex.accent}", bg = "#${color.hex.accent}" }
|
||||
|
||||
@@ -1854,14 +1687,14 @@ in {
|
||||
line.sep(sep_start, accent, crust),
|
||||
tab.number(),
|
||||
tab.name(),
|
||||
line.sep(sep_end, crust, mantle),
|
||||
line.sep(sep_end, crust, base),
|
||||
hl = hl,
|
||||
margin = " ",
|
||||
}
|
||||
end),
|
||||
|
||||
-- Background
|
||||
hl = mantle,
|
||||
hl = bg,
|
||||
}
|
||||
end
|
||||
'';
|
||||
@@ -1869,7 +1702,7 @@ in {
|
||||
};
|
||||
|
||||
_plenary = {
|
||||
name = "plenary.nvim";
|
||||
name = "plenary";
|
||||
pkg = pkgs.vimPlugins.plenary-nvim;
|
||||
lazy = true;
|
||||
};
|
||||
@@ -1970,12 +1803,11 @@ in {
|
||||
shell = "fish";
|
||||
direction = "horizontal"; # 'vertical' | 'horizontal' | 'window' | 'float'
|
||||
auto_scroll = true;
|
||||
# clear_env = false;
|
||||
|
||||
float_opts = {
|
||||
border = "curved"; # 'single' | 'double' | 'shadow' | 'curved'
|
||||
width.__raw = "function() return math.floor(vim.o.columns * 0.95) end";
|
||||
height.__raw = "function() return math.floor(vim.o.lines * 0.85) end";
|
||||
width = 80;
|
||||
height = 80;
|
||||
winblend = 0;
|
||||
};
|
||||
};
|
||||
@@ -2148,40 +1980,18 @@ in {
|
||||
pkg = pkgs.vimPlugins.vimtex;
|
||||
init = ''
|
||||
function()
|
||||
vim.g.vimtex_mappings_enabled = true
|
||||
vim.g.vimtex_mappings_enabled = false
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.g.vimtex_syntax_conceal_disable = false
|
||||
vim.g.vimtex_syntax_conceal = {
|
||||
accents = 1,
|
||||
ligatures = 1,
|
||||
cites = 1,
|
||||
fancy = 1,
|
||||
texTabularChar = 1,
|
||||
spacing = 1,
|
||||
greek = 1,
|
||||
math_bounds = 1,
|
||||
math_delimiters = 1,
|
||||
math_fracs = 1,
|
||||
math_super_sub = 1,
|
||||
math_symbols = 1,
|
||||
sections = 1,
|
||||
styles = 1,
|
||||
}
|
||||
|
||||
vim.g.vimtex_compiler_method = "latexmk"
|
||||
vim.g.vimtex_compiler_clean_paths = {"_minted*", "svg-inkscape*"}
|
||||
vim.g.vimtex_compiler_latexmk = {
|
||||
options = {
|
||||
"-verbose",
|
||||
"-shell-escape",
|
||||
"-file-line-error",
|
||||
"-synctex=1",
|
||||
"-interaction=nonstopmode",
|
||||
"-shell-escape",
|
||||
},
|
||||
aux_dir = ".aux",
|
||||
out_dir = ".out",
|
||||
}
|
||||
|
||||
end
|
||||
'';
|
||||
};
|
||||
@@ -2311,12 +2121,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;
|
||||
@@ -2348,7 +2158,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
|
||||
@@ -2378,7 +2187,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
|
||||
|
||||
@@ -60,27 +60,9 @@ end, {
|
||||
|
||||
-- Toggle Rmpc
|
||||
local Terminal = require("toggleterm.terminal").Terminal
|
||||
local rmpc = Terminal:new({
|
||||
cmd = "rmpc",
|
||||
hidden = true,
|
||||
close_on_exit = true,
|
||||
auto_scroll = false,
|
||||
direction = "float",
|
||||
})
|
||||
local rmpc =
|
||||
Terminal:new({ cmd = "rmpc", hidden = true, close_on_exit = true, auto_scroll = false, direction = "float" })
|
||||
|
||||
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
|
||||
|
||||
@@ -20,7 +20,7 @@ if g.neovide then
|
||||
|
||||
-- Neovide Fonts
|
||||
-- o.guifont = "JetBrainsMono Nerd Font Mono:h12:Medium"
|
||||
o.guifont = "MonoLisa Alt Script:h12:Medium"
|
||||
o.guifont = "MonoLisa Alt:h12:Medium"
|
||||
else
|
||||
-- require("notify").notify("Not running in NeoVide")
|
||||
end
|
||||
|
||||
@@ -340,12 +340,6 @@ _: let
|
||||
action = "<cmd>lua vim.g.toggle_rmpc()<cr>"; # Defined in extraConfigLua.lua
|
||||
options.desc = "Show Rmpc";
|
||||
}
|
||||
{
|
||||
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";
|
||||
@@ -414,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";
|
||||
@@ -563,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 = [
|
||||
@@ -937,12 +837,6 @@ _: let
|
||||
action = "<cmd>Trouble diagnostics toggle focus=false win.position=bottom<cr>";
|
||||
options.desc = "Trouble Diagnostics";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>tT";
|
||||
action = "<cmd>ToggleTerm direction=float<cr>";
|
||||
options.desc = "Floating Terminal";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>tD";
|
||||
@@ -1062,7 +956,6 @@ in
|
||||
no-leader
|
||||
|
||||
leader
|
||||
leader-opencode
|
||||
leader-file
|
||||
leader-help
|
||||
leader-quit
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fork = true # Start neovide detached
|
||||
frame = "full" # full, buttonless, none
|
||||
frame = "none" # full, buttonless, none
|
||||
idle = true # Don't render frames without changes
|
||||
title-hidden = true
|
||||
tabs = false
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local isn = ls.indent_snippet_node
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local d = ls.dynamic_node
|
||||
local r = ls.restore_node
|
||||
local extras = require("luasnip.extras")
|
||||
local rep = extras.rep
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local fmta = require("luasnip.extras.fmt").fmta
|
||||
|
||||
return {
|
||||
-- The first list contains manually expanded snippts
|
||||
--
|
||||
@@ -33,7 +18,7 @@ return {
|
||||
|
||||
-- \begin{environment}
|
||||
s(
|
||||
{ trig = "beg", name = "begin/end", descr = "begin/end environment (generic)" },
|
||||
"beg",
|
||||
fmta(
|
||||
[[
|
||||
\begin{<>}
|
||||
@@ -43,28 +28,6 @@ return {
|
||||
{ i(1), i(0), rep(1) }
|
||||
)
|
||||
),
|
||||
s(
|
||||
{ trig = "item", name = "itemize", dscr = "bullet points (itemize)" },
|
||||
fmta(
|
||||
[[
|
||||
\begin{itemize}
|
||||
\item <>
|
||||
\end{itemize}
|
||||
]],
|
||||
{ i(0) }
|
||||
)
|
||||
),
|
||||
s(
|
||||
{ trig = "enum", name = "enumerate", dscr = "bullet points (enumerate)" },
|
||||
fmta(
|
||||
[[
|
||||
\begin{enumerate}
|
||||
\item <>
|
||||
\end{enumerate}
|
||||
]],
|
||||
{ i(0) }
|
||||
)
|
||||
),
|
||||
}, {
|
||||
-- The second list contains autosnippets
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
+158
-982
File diff suppressed because it is too large
Load Diff
@@ -1,261 +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)
|
||||
|
||||
# TODO: Still broken on 2026-09-09
|
||||
# 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.hostPlatform.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
|
||||
inotify-tools
|
||||
xdotool
|
||||
gnome-keyring
|
||||
|
||||
# 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.hostPlatform.isLinux && (!headless)) [
|
||||
wl-clipboard
|
||||
asciicam
|
||||
|
||||
# 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
|
||||
claude-desktop
|
||||
opencode-desktop
|
||||
upscayl
|
||||
calibre
|
||||
|
||||
# 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 because I hate nice software
|
||||
# gnome-calculator
|
||||
# gnome-calendar
|
||||
# helvum # unmaintained
|
||||
crosspipe
|
||||
# nautilus # This is the worst file manager I've ever used
|
||||
font-manager # Previews fonts, but doesn't set them
|
||||
gparted
|
||||
resources
|
||||
# celluloid
|
||||
# cine
|
||||
# eyedropper
|
||||
hyprpicker
|
||||
junction
|
||||
])
|
||||
|
||||
# Darwin exclusive packages
|
||||
(lib.optionals pkgs.stdenv.hostPlatform.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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable common packages";
|
||||
}
|
||||
@@ -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",
|
||||
),
|
||||
(
|
||||
|
||||
@@ -35,72 +35,168 @@ in {
|
||||
sidebar-mode = false;
|
||||
};
|
||||
|
||||
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#basic-layout-structure
|
||||
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#base-widgets
|
||||
theme = let
|
||||
mkLiteral = config.lib.formats.rasi.mkLiteral;
|
||||
in
|
||||
import ./theme.nix {inherit color mkLiteral;};
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
|
||||
trans = "rgba(0, 0, 0, 0)";
|
||||
in {
|
||||
"element-text,element-icon,mode-switcher" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
|
||||
"window" = {
|
||||
height = mkLiteral "50%";
|
||||
width = mkLiteral "33%";
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 6;
|
||||
border-color = mkLiteral color.hexS.accent;
|
||||
|
||||
# This is not opacity but translucency
|
||||
background-color = mkLiteral "rgba(${color.rgbS.base}, 0.25)";
|
||||
};
|
||||
|
||||
"mainbox" = {
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
# TOP INPUT BAR START
|
||||
|
||||
"inputbar" = {
|
||||
children = builtins.map mkLiteral ["prompt" "entry"];
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
"prompt" = {
|
||||
background-color = mkLiteral color.hexS.accentHl;
|
||||
padding = 6;
|
||||
text-color = mkLiteral color.hexS.accentText;
|
||||
border-radius = 3;
|
||||
margin = mkLiteral "10px 0px 0px 10px";
|
||||
};
|
||||
|
||||
"entry" = {
|
||||
padding = 6;
|
||||
margin = mkLiteral "10px 10px 0px 5px";
|
||||
text-color = mkLiteral color.hexS.text;
|
||||
background-color = mkLiteral trans;
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 3;
|
||||
border-color = mkLiteral color.hexS.accentHl;
|
||||
};
|
||||
|
||||
# MESSAGEBOX (usually not visible)
|
||||
|
||||
"message" = {
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
"error-message" = {
|
||||
background-color = mkLiteral trans;
|
||||
margin = mkLiteral "0px 0px 10px 0px";
|
||||
};
|
||||
|
||||
"textbox" = {
|
||||
background-color = mkLiteral trans;
|
||||
padding = 6;
|
||||
margin = mkLiteral "10px 10px 0px 10px";
|
||||
border-radius = 3;
|
||||
};
|
||||
|
||||
# LISTVIEW
|
||||
|
||||
"listview" = {
|
||||
# border = mkLiteral "0px 0px 0px";
|
||||
padding = 0;
|
||||
margin = mkLiteral "5px 10px 10px 10px";
|
||||
columns = 1;
|
||||
background-color = mkLiteral trans;
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 3;
|
||||
border-color = mkLiteral color.hexS.accentDim;
|
||||
};
|
||||
|
||||
"element" = {
|
||||
padding = 5;
|
||||
margin = 0;
|
||||
background-color = mkLiteral trans;
|
||||
text-color = mkLiteral color.hexS.text;
|
||||
# border-radius = 3;
|
||||
};
|
||||
|
||||
"element-icon" = {
|
||||
size = 25;
|
||||
};
|
||||
|
||||
"element selected" = {
|
||||
background-color = mkLiteral color.hexS.accentDim;
|
||||
text-color = mkLiteral color.hexS.accentText;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# homemodules.hyprland.keybindings = let
|
||||
# vpn-menu =
|
||||
# pkgs.writeScriptBin
|
||||
# "rofi-menu-vpn"
|
||||
# (builtins.readFile ./menus/vpn.fish);
|
||||
#
|
||||
# keybinds-menu =
|
||||
# pkgs.writeScriptBin
|
||||
# "rofi-menu-keybinds"
|
||||
# (builtins.readFile ./menus/keybinds.fish);
|
||||
#
|
||||
# lectures-menu =
|
||||
# pkgs.writeScriptBin
|
||||
# "rofi-menu-lectures"
|
||||
# (builtins.readFile ./menus/lectures.fish);
|
||||
#
|
||||
# power-menu =
|
||||
# mylib.rofi.mkSimpleMenu
|
||||
# "power"
|
||||
# {
|
||||
# " Poweroff" = "poweroff";
|
||||
# " Reboot" = "reboot";
|
||||
# " Lock" = "loginctl lock-session";
|
||||
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
||||
# " Reload Hyprland" = "hyprctl reload";
|
||||
# " Exit Hyprland" = "hyprctl dispatch exit";
|
||||
# };
|
||||
#
|
||||
# wallpaper-menu = let
|
||||
# setWallpaperOnMonitor = name: monitor:
|
||||
# "hyprctl hyprpaper wallpaper "
|
||||
# + "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg";
|
||||
#
|
||||
# setWallpaperOnMonitors = monitors: name: {
|
||||
# ${name} =
|
||||
# monitors
|
||||
# |> builtins.map (setWallpaperOnMonitor name)
|
||||
# |> builtins.concatStringsSep " && ";
|
||||
# };
|
||||
#
|
||||
# monitors = builtins.attrNames config.homemodules.hyprland.monitors;
|
||||
# in
|
||||
# mylib.rofi.mkSimpleMenu
|
||||
# "wall"
|
||||
# (color.wallpapers
|
||||
# |> builtins.map (setWallpaperOnMonitors monitors)
|
||||
# |> lib.mergeAttrsList);
|
||||
# in
|
||||
# lib.mkIf (!config.homemodules.hyprland.caelestia.enable) {
|
||||
# bindings = lib.mergeAttrsList [
|
||||
# {
|
||||
# "$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
|
||||
# "$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""];
|
||||
# "$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""];
|
||||
# # "$mainMod, o" = ["exec, \"${lectures-menu}\""];
|
||||
# }
|
||||
# (lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) {
|
||||
# "$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
homemodules.hyprland.keybindings = let
|
||||
vpn-menu =
|
||||
pkgs.writeScriptBin
|
||||
"rofi-menu-vpn"
|
||||
(builtins.readFile ./menus/vpn.fish);
|
||||
|
||||
keybinds-menu =
|
||||
pkgs.writeScriptBin
|
||||
"rofi-menu-keybinds"
|
||||
(builtins.readFile ./menus/keybinds.fish);
|
||||
|
||||
lectures-menu =
|
||||
pkgs.writeScriptBin
|
||||
"rofi-menu-lectures"
|
||||
(builtins.readFile ./menus/lectures.fish);
|
||||
|
||||
power-menu =
|
||||
mylib.rofi.mkSimpleMenu
|
||||
"power"
|
||||
{
|
||||
" Poweroff" = "poweroff";
|
||||
" Reboot" = "reboot";
|
||||
" Lock" = "loginctl lock-session";
|
||||
" Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
||||
" Reload Hyprland" = "hyprctl reload";
|
||||
" Exit Hyprland" = "hyprctl dispatch exit";
|
||||
};
|
||||
|
||||
wallpaper-menu = let
|
||||
setWallpaperOnMonitor = name: monitor:
|
||||
"hyprctl hyprpaper wallpaper "
|
||||
+ "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg";
|
||||
|
||||
setWallpaperOnMonitors = monitors: name: {
|
||||
${name} =
|
||||
monitors
|
||||
|> builtins.map (setWallpaperOnMonitor name)
|
||||
|> builtins.concatStringsSep " && ";
|
||||
};
|
||||
|
||||
monitors = builtins.attrNames config.homemodules.hyprland.monitors;
|
||||
in
|
||||
mylib.rofi.mkSimpleMenu
|
||||
"wall"
|
||||
(color.wallpapers
|
||||
|> builtins.map (setWallpaperOnMonitors monitors)
|
||||
|> lib.mergeAttrsList);
|
||||
in
|
||||
lib.mkIf (!config.homemodules.hyprland.caelestia.enable) {
|
||||
bindings = lib.mergeAttrsList [
|
||||
{
|
||||
"$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
|
||||
"$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""];
|
||||
"$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""];
|
||||
# "$mainMod, o" = ["exec, \"${lectures-menu}\""];
|
||||
}
|
||||
(lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) {
|
||||
"$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#basic-layout-structure
|
||||
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#base-widgets
|
||||
{
|
||||
color,
|
||||
mkLiteral,
|
||||
}: let
|
||||
trans = "rgba(0, 0, 0, 0)";
|
||||
in {
|
||||
"element-text,element-icon,mode-switcher" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
|
||||
"window" = {
|
||||
height = mkLiteral "50%";
|
||||
width = mkLiteral "33%";
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 6;
|
||||
border-color = mkLiteral color.hexS.accent;
|
||||
|
||||
# This is not opacity but translucency
|
||||
background-color = mkLiteral "rgba(${color.rgbS.base}, 0.25)";
|
||||
};
|
||||
|
||||
"mainbox" = {
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
# TOP INPUT BAR START
|
||||
|
||||
"inputbar" = {
|
||||
children = builtins.map mkLiteral ["prompt" "entry"];
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
"prompt" = {
|
||||
background-color = mkLiteral color.hexS.accentHl;
|
||||
padding = 6;
|
||||
text-color = mkLiteral color.hexS.accentText;
|
||||
border-radius = 3;
|
||||
margin = mkLiteral "10px 0px 0px 10px";
|
||||
};
|
||||
|
||||
"entry" = {
|
||||
padding = 6;
|
||||
margin = mkLiteral "10px 10px 0px 5px";
|
||||
text-color = mkLiteral color.hexS.text;
|
||||
background-color = mkLiteral trans;
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 3;
|
||||
border-color = mkLiteral color.hexS.accentHl;
|
||||
};
|
||||
|
||||
# MESSAGEBOX (usually not visible)
|
||||
|
||||
"message" = {
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
"error-message" = {
|
||||
background-color = mkLiteral trans;
|
||||
margin = mkLiteral "0px 0px 10px 0px";
|
||||
};
|
||||
|
||||
"textbox" = {
|
||||
background-color = mkLiteral trans;
|
||||
padding = 6;
|
||||
margin = mkLiteral "10px 10px 0px 10px";
|
||||
border-radius = 3;
|
||||
};
|
||||
|
||||
# LISTVIEW
|
||||
|
||||
"listview" = {
|
||||
# border = mkLiteral "0px 0px 0px";
|
||||
padding = 0;
|
||||
margin = mkLiteral "5px 10px 10px 10px";
|
||||
columns = 1;
|
||||
background-color = mkLiteral trans;
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 3;
|
||||
border-color = mkLiteral color.hexS.accentDim;
|
||||
};
|
||||
|
||||
"element" = {
|
||||
padding = 5;
|
||||
margin = 0;
|
||||
background-color = mkLiteral trans;
|
||||
text-color = mkLiteral color.hexS.text;
|
||||
# border-radius = 3;
|
||||
};
|
||||
|
||||
"element-icon" = {
|
||||
size = 25;
|
||||
};
|
||||
|
||||
"element selected" = {
|
||||
background-color = mkLiteral color.hexS.accentDim;
|
||||
text-color = mkLiteral color.hexS.accentText;
|
||||
};
|
||||
}
|
||||
@@ -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.hostPlatform.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;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable ssh";
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable terminal tools";
|
||||
}
|
||||
@@ -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"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable tmux";
|
||||
}
|
||||
@@ -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 = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -21,251 +21,126 @@ in {
|
||||
spacing = 0;
|
||||
margin = "10px 10px 0px 10px";
|
||||
fixed-center = true;
|
||||
output = waybar.monitors;
|
||||
output = ["${waybar.monitor}"];
|
||||
|
||||
modules-left = ["custom/launcher" "niri/workspaces" "niri/window" "hyprland/workspaces" "hyprland/window"]; # "user"
|
||||
modules-center = ["mpris"]; # "systemd-failed-units"
|
||||
modules-right = ["privacy" "pulseaudio" "network" "disk" "cpu" "memory" "clock" "tray"];
|
||||
modules-left = ["custom/launcher" "user" "hyprland/window"];
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "clock" "tray"];
|
||||
|
||||
"custom/launcher" = {
|
||||
format = "<span></span>";
|
||||
format = "<span></span>";
|
||||
interval = "once";
|
||||
on-click = "walker -m desktopapplications";
|
||||
};
|
||||
|
||||
systemd-failed-units = {
|
||||
hide-on-ok = true;
|
||||
format = " {nr_failed}";
|
||||
format-ok = "✔️";
|
||||
system = true;
|
||||
user = true;
|
||||
};
|
||||
|
||||
"niri/workspaces" = {
|
||||
all-outputs = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
default = "";
|
||||
focused = "";
|
||||
active = "";
|
||||
};
|
||||
};
|
||||
|
||||
"niri/window" = {
|
||||
format = "{title}";
|
||||
separate-outputs = false;
|
||||
icon = true;
|
||||
icon-size = 22;
|
||||
on-click = "rofi -drun-show-actions -show drun";
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
all-outputs = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
default = "";
|
||||
focused = "";
|
||||
active = "";
|
||||
};
|
||||
persistent-workspaces = {
|
||||
DP-1 = [1 2 3 4 5 6 7 8 9];
|
||||
DP-2 = [0];
|
||||
};
|
||||
format = "{name}";
|
||||
on-click = "activate";
|
||||
sort-by-coordinates = false;
|
||||
sort-by-name = true;
|
||||
sort-by-number = false;
|
||||
};
|
||||
|
||||
"hyprland/window" = {
|
||||
format = "{title}";
|
||||
separate-outputs = false;
|
||||
icon = true;
|
||||
icon-size = 22;
|
||||
"pulseaudio" = {
|
||||
format = "<span></span> {volume}%";
|
||||
format-muted = "<span></span> ";
|
||||
on-click = "kitty ncpamixer -t o";
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format = "<span></span> {dynamic}";
|
||||
format-paused = "<span>{status_icon}</span> <i>{dynamic}</i>";
|
||||
dynamic-order = ["artist" "title"];
|
||||
status-icons = {
|
||||
paused = "";
|
||||
};
|
||||
};
|
||||
|
||||
privacy = {
|
||||
icon-spacing = 4;
|
||||
icon-size = 16;
|
||||
transition-duration = 250;
|
||||
modules = [
|
||||
{
|
||||
type = "screenshare";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 24;
|
||||
}
|
||||
# {
|
||||
# type = "audio-out";
|
||||
# tooltip = true;
|
||||
# tooltip-icon-size = 24;
|
||||
# }
|
||||
{
|
||||
type = "audio-in";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 24;
|
||||
}
|
||||
];
|
||||
ignore-monitor = true;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "<span></span> {volume}%";
|
||||
format-muted = "<span></span> ";
|
||||
on-click = "kitty --title=WireMix wiremix";
|
||||
};
|
||||
|
||||
network = {
|
||||
format = "<span></span> {ipaddr}";
|
||||
"network" = {
|
||||
format = "<span></span> {ipaddr}";
|
||||
format-disconnected = "<span></span> ";
|
||||
interface = "enp8s0";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
disk = {
|
||||
interval = 5;
|
||||
format = "<span></span> {percentage_used}%";
|
||||
on-click = "kitty --hold --title=Duf duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
||||
tooltip-format = "{ifname} via {gwaddr}";
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 1;
|
||||
# states = {
|
||||
# "critical" = 85;
|
||||
# };
|
||||
format = "<span></span> {load}%";
|
||||
# format-critical = "<span color='#${color.hex.red}'><span></span> {load}%</span>";
|
||||
on-click = "kitty --title=Btop btop";
|
||||
tooltip = false;
|
||||
format = "<span></span> {load}%";
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 1;
|
||||
# states = {
|
||||
# "critical" = 85;
|
||||
# };
|
||||
format = "<span></span> {percentage}%";
|
||||
# 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";
|
||||
format = "<span></span> {percentage}%";
|
||||
};
|
||||
|
||||
temperature = {
|
||||
format = "<span></span> {temperatureC}°C";
|
||||
thermal-zone = 3;
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "<span></span> {:%H:%M}";
|
||||
format = "<span></span> {:%H:%M}";
|
||||
timezone = "Europe/Berlin";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
weeks-pos = "right";
|
||||
mode-mon-col = 3;
|
||||
on-scroll = -1;
|
||||
format = {
|
||||
months = "<span color='#${color.hex.peach}'><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>";
|
||||
today = "<span color='#${color.hex.accent}'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 22;
|
||||
icon-size = 20;
|
||||
show-passive-items = true;
|
||||
spacing = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = let
|
||||
border-width = "2px";
|
||||
border-radius = "10px";
|
||||
in ''
|
||||
style = ''
|
||||
/* Order is Top-Right-Bottom-Left for combined properties */
|
||||
* {
|
||||
color: #${color.hex.dark.base};
|
||||
font-family: ${color.font};
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
border-style: solid;
|
||||
border-width: ${border-width};
|
||||
border-radius: ${border-radius};
|
||||
border-color: #${color.hex.accent};
|
||||
background-color: rgba(${color.rgbS.mantle}, 0.7);
|
||||
border-width: 2px;
|
||||
border-radius: 6px;
|
||||
border-color: #${color.hex.dark.lavender};
|
||||
background-color: rgba(${color.rgbString.light.base}, 0.3);
|
||||
}
|
||||
|
||||
tooltip {
|
||||
color: #${color.hex.text};
|
||||
font-weight: normal;
|
||||
border-style: solid;
|
||||
border-width: ${border-width};
|
||||
border-radius: ${border-radius};
|
||||
border-color: #${color.hex.accent};
|
||||
background-color: rgba(${color.rgbS.mantle}, 1.0);
|
||||
border-width: 2px;
|
||||
border-radius: 6px;
|
||||
border-color: #${color.hex.dark.lavender};
|
||||
background-color: rgba(${color.rgbString.light.base}, 0.7);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* 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.dark.lavender};}
|
||||
#user {background-color: #${color.hex.dark.pink};}
|
||||
#window {background-color: #${color.hex.dark.mauve};}
|
||||
#workspaces button {background-color: #${color.hex.dark.lavender};}
|
||||
#workspaces button.active {background-color: #${color.hex.dark.pink};}
|
||||
#pulseaudio {background-color: #${color.hex.dark.maroon};}
|
||||
#network {background-color: #${color.hex.dark.peach};}
|
||||
#cpu {background-color: #${color.hex.dark.yellow};}
|
||||
#memory {background-color: #${color.hex.dark.green};}
|
||||
#temperature {background-color: #${color.hex.dark.teal};}
|
||||
#clock {background-color: #${color.hex.dark.sky};}
|
||||
#tray {background-color: #${color.hex.dark.lavender};}
|
||||
|
||||
/* Square Widgets */
|
||||
#custom-launcher,
|
||||
#mpris,
|
||||
#workspaces button,
|
||||
#tray {
|
||||
color: #${color.hex.mantle};
|
||||
font-weight: bold;
|
||||
padding: 0px 10px 0px 10px;
|
||||
border-radius: ${border-radius};
|
||||
}
|
||||
|
||||
/* Workspaces */
|
||||
#workspaces button {
|
||||
color: #${color.hex.mantle};
|
||||
font-weight: bold;
|
||||
padding: 0px 2px 0px 2px;
|
||||
margin: 8px 2px 8px 2px;
|
||||
border-radius: ${border-radius};
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* Rectangle Widgets */
|
||||
#user,
|
||||
#window,
|
||||
#pulseaudio,
|
||||
#privacy,
|
||||
#network,
|
||||
#disk,
|
||||
#cpu,
|
||||
#memory,
|
||||
#temperature,
|
||||
#clock {
|
||||
color: #${color.hex.mantle};
|
||||
font-weight: bold;
|
||||
padding: 0px 10px 0px 10px;
|
||||
margin: 8px 5px 8px 5px;
|
||||
border-radius: ${border-radius};
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* Make window module transparent when no windows present */
|
||||
@@ -278,10 +153,14 @@ in {
|
||||
/* Tux Icon */
|
||||
#custom-launcher {
|
||||
font-size: 26px;
|
||||
padding-right: 13px;
|
||||
padding-right: 10px;
|
||||
margin: 0px 5px 0px 0px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
margin: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
margin: 0px 0px 0px 5px;
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ with lib;
|
||||
with mylib.modules; {
|
||||
enable = mkEnableOption "Waybar";
|
||||
|
||||
monitors = mkOption {
|
||||
type = types.listOf types.str;
|
||||
example = ''["HDMI-A-1", "DP-1"]'';
|
||||
monitor = mkOption {
|
||||
type = types.str;
|
||||
example = "HDMI-A-1";
|
||||
description = "What monitor to display the Waybar on";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 = ''
|
||||
@@ -65,10 +53,9 @@ in {
|
||||
'';
|
||||
|
||||
# https://yazi-rs.github.io/docs/configuration/yazi
|
||||
# %sN: The N-th selected file (1...n)
|
||||
# %s: All selected files
|
||||
# %h: The hovered file (shell keybindings)
|
||||
# File placeholders are shell-escaped by Yazi; do not quote them.
|
||||
# "$n": The n-th selected file (1...n)
|
||||
# "$@": All selected files
|
||||
# "$0": The hovered file
|
||||
settings = {
|
||||
mgr = {
|
||||
show_hidden = false;
|
||||
@@ -81,43 +68,27 @@ in {
|
||||
opener = {
|
||||
play = [
|
||||
{
|
||||
run = ''mpv %s'';
|
||||
run = ''mpv "$@"'';
|
||||
orphan = true;
|
||||
desc = "Play selection with mpv";
|
||||
}
|
||||
{
|
||||
run = ''vlc %s'';
|
||||
orphan = true;
|
||||
desc = "Play selection with vlc";
|
||||
desc = "Play selection";
|
||||
}
|
||||
];
|
||||
edit = [
|
||||
{
|
||||
run = ''$EDITOR %s'';
|
||||
run = ''$EDITOR "$@"'';
|
||||
block = true;
|
||||
desc = "Edit selection";
|
||||
}
|
||||
];
|
||||
open = [
|
||||
{
|
||||
run = ''xdg-open %s1'';
|
||||
orphan = true;
|
||||
desc = "Open first selected file with xdg-open";
|
||||
}
|
||||
{
|
||||
run = ''imv %s'';
|
||||
orphan = true;
|
||||
desc = "Open selection with imv";
|
||||
}
|
||||
{
|
||||
run = ''junction %s'';
|
||||
orphan = true;
|
||||
desc = "Open selection with junction";
|
||||
run = ''xdg-open "$@"'';
|
||||
desc = "Open selection";
|
||||
}
|
||||
];
|
||||
extract = [
|
||||
{
|
||||
run = ''ouch decompress -y %s'';
|
||||
run = ''ouch decompress -y "$@"'';
|
||||
desc = "Extract selection";
|
||||
}
|
||||
];
|
||||
@@ -130,13 +101,13 @@ in {
|
||||
|
||||
plugin.prepend_fetchers = [
|
||||
{
|
||||
group = "git";
|
||||
url = "*";
|
||||
id = "git";
|
||||
name = "*";
|
||||
run = "git";
|
||||
}
|
||||
{
|
||||
group = "git";
|
||||
url = "*/";
|
||||
id = "git";
|
||||
name = "*/";
|
||||
run = "git";
|
||||
}
|
||||
];
|
||||
@@ -186,67 +157,43 @@ 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"
|
||||
];
|
||||
run = "plugin ouch 7z";
|
||||
on = ["<C-p>" "a"];
|
||||
run = "plugin ouch";
|
||||
desc = "Add selection to archive";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"<C-p>"
|
||||
"d"
|
||||
];
|
||||
run = ''shell --orphan -- ripdrag -a -n %s'';
|
||||
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"
|
||||
];
|
||||
run = ''shell -- wl-copy < %h'';
|
||||
on = ["<C-p>" "w"];
|
||||
run = ''wl-copy < "$0"'';
|
||||
desc = "Copy hovered file contents using wl-copy";
|
||||
}
|
||||
|
||||
@@ -257,10 +204,7 @@ in {
|
||||
}
|
||||
{
|
||||
on = "y";
|
||||
run = [
|
||||
''shell -- for path in %s; 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";
|
||||
}
|
||||
# {
|
||||
@@ -273,20 +217,13 @@ in {
|
||||
run = "remove --permanently";
|
||||
desc = "Delete selection";
|
||||
}
|
||||
{
|
||||
on = ["g" "m"];
|
||||
run = ''cd ~/Notes/TU/MastersThesis'';
|
||||
desc = "Go to MastersThesis";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# 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;
|
||||
@@ -343,9 +280,7 @@ in {
|
||||
};
|
||||
|
||||
border_symbol = "│";
|
||||
border_style = {
|
||||
fg = color.hexS.overlay0;
|
||||
};
|
||||
border_style = {fg = color.hexS.overlay0;};
|
||||
};
|
||||
|
||||
tabs = {
|
||||
@@ -414,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
|
||||
|
||||
@@ -526,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
|
||||
|
||||
@@ -18,7 +18,6 @@ in [
|
||||
(mkIcon "Public" "")
|
||||
(mkIcon "Restic" "")
|
||||
(mkIcon "Shows" "")
|
||||
(mkIcon "SSD" "")
|
||||
(mkIcon "Unity" "")
|
||||
(mkIcon "Videos" "")
|
||||
]
|
||||
|
||||
@@ -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 = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable zed editor";
|
||||
}
|
||||
@@ -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}";
|
||||
};
|
||||
}
|
||||
@@ -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;};
|
||||
}
|
||||
|
||||
+1
-4
@@ -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 = {
|
||||
|
||||
+1
-114
@@ -4,54 +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 = rec {
|
||||
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"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-gaming.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
# "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
];
|
||||
};
|
||||
|
||||
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,
|
||||
@@ -77,6 +29,7 @@
|
||||
|
||||
# Import the toplevel system configuration module.
|
||||
../system
|
||||
../system/cachix.nix
|
||||
|
||||
# Host specific configuration
|
||||
../system/${hostname}
|
||||
@@ -127,72 +80,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
mkDarwinConfigWithHomeManagerModule = {
|
||||
system,
|
||||
mylib,
|
||||
hostname,
|
||||
username,
|
||||
publicKeys,
|
||||
extraModules ? [],
|
||||
headless ? false,
|
||||
}:
|
||||
inputs.nix-darwin.lib.darwinSystem {
|
||||
inherit system;
|
||||
|
||||
# Values in "specialArgs" are propagated to all system modules.
|
||||
specialArgs = {
|
||||
inherit inputs system hostname mylib username publicKeys headless;
|
||||
};
|
||||
|
||||
modules = builtins.concatLists [
|
||||
[
|
||||
# Replace the default "pkgs" with my configured version
|
||||
# to allow installation of unfree software and my own overlays.
|
||||
{nixpkgs.pkgs = pkgs;}
|
||||
|
||||
# Host specific configuration
|
||||
../system/${hostname}
|
||||
|
||||
# Import all of my custom system modules
|
||||
../system/systemmodules/darwin.nix
|
||||
]
|
||||
|
||||
extraModules
|
||||
|
||||
# HM is installed as a system module when using mkNixosConfigWithHomeManagerModule.
|
||||
[
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
# Values in "extraSpecialArgs" are propagated to all HM modules.
|
||||
extraSpecialArgs = {
|
||||
inherit inputs system hostname mylib username publicKeys headless;
|
||||
};
|
||||
|
||||
# Use the "pkgs" from the system configuration.
|
||||
# This disables "nixpkgs.*" options in HM modules.
|
||||
useGlobalPkgs = true;
|
||||
|
||||
# Packages in "users.${username}.packages" will be installed
|
||||
# to /etc/profiles instead of ~/.nix-profile.
|
||||
useUserPackages = true;
|
||||
|
||||
users.${username}.imports = [
|
||||
# Host specific configuration
|
||||
../home/${username}/${hostname}
|
||||
];
|
||||
|
||||
sharedModules = [
|
||||
# Import all of my custom HM modules.
|
||||
# Putting them into sharedModules enables correct nixd completions.
|
||||
../home/homemodules/darwin.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
]
|
||||
];
|
||||
};
|
||||
|
||||
mkNixosSystemConfig = {
|
||||
system,
|
||||
mylib,
|
||||
|
||||
+52
-141
@@ -3,164 +3,75 @@
|
||||
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:
|
||||
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) | rofi -dmenu -p " ${prompt} " -i)
|
||||
|
||||
# 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: "";
|
||||
}
|
||||
|
||||
+31
-37
@@ -29,36 +29,36 @@
|
||||
# Remove this after jetbrains.jdk builds again (nixpkgs issue 425328)
|
||||
# jetbrains.rider = pkgs-stable.jetbrains.rider;
|
||||
|
||||
# jetbrains =
|
||||
# prev.jetbrains
|
||||
# // {
|
||||
# clion = prev.jetbrains.clion.overrideAttrs (oldAttrs: rec {
|
||||
# version = "261.22158.47"; # March 6, 2026
|
||||
#
|
||||
# src = prev.fetchurl {
|
||||
# url = "https://download-cdn.jetbrains.com/cpp/CLion-${version}.tar.gz";
|
||||
#
|
||||
# # hash = "sha256-h6tnemVnV1YEsvIndwrq2sMsRZYuvTWMU5oqj/hkjdY="; # 261.21849.6
|
||||
# hash = "sha256-FUHNRioJvjwOWN+FkXEr3+NWR+QVxaZUOkJ0egQkcCQ="; # 261.22158.47
|
||||
# };
|
||||
#
|
||||
# # autoPatchelfIgnoreMissingDeps = [
|
||||
# # "libcrypto.so.1.1"
|
||||
# # "libssl.so.1.1"
|
||||
# # ];
|
||||
#
|
||||
# postFixup = ''
|
||||
# # Patch python3.12 shared libs that the upstream glob (python3.8) misses
|
||||
# find $out -path '*/python3.*/lib-dynload/*.so' -exec patchelf \
|
||||
# --replace-needed libssl.so.1.1 libssl.so \
|
||||
# --replace-needed libcrypto.so.1.1 libcrypto.so \
|
||||
# --replace-needed libcrypt.so.1 libcrypt.so \
|
||||
# {} +
|
||||
#
|
||||
# ${oldAttrs.postFixup or ""}
|
||||
# '';
|
||||
# });
|
||||
# };
|
||||
jetbrains =
|
||||
prev.jetbrains
|
||||
// {
|
||||
clion = prev.jetbrains.clion.overrideAttrs (oldAttrs: rec {
|
||||
version = "261.22158.47"; # March 6, 2026
|
||||
|
||||
src = prev.fetchurl {
|
||||
url = "https://download-cdn.jetbrains.com/cpp/CLion-${version}.tar.gz";
|
||||
|
||||
# hash = "sha256-h6tnemVnV1YEsvIndwrq2sMsRZYuvTWMU5oqj/hkjdY="; # 261.21849.6
|
||||
hash = "sha256-FUHNRioJvjwOWN+FkXEr3+NWR+QVxaZUOkJ0egQkcCQ="; # 261.22158.47
|
||||
};
|
||||
|
||||
# autoPatchelfIgnoreMissingDeps = [
|
||||
# "libcrypto.so.1.1"
|
||||
# "libssl.so.1.1"
|
||||
# ];
|
||||
|
||||
postFixup = ''
|
||||
# Patch python3.12 shared libs that the upstream glob (python3.8) misses
|
||||
find $out -path '*/python3.*/lib-dynload/*.so' -exec patchelf \
|
||||
--replace-needed libssl.so.1.1 libssl.so \
|
||||
--replace-needed libcrypto.so.1.1 libcrypto.so \
|
||||
--replace-needed libcrypt.so.1 libcrypt.so \
|
||||
{} +
|
||||
|
||||
${oldAttrs.postFixup or ""}
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
# Now in Nixpkgs
|
||||
# neovide = prev.neovide.overrideAttrs (finalAttrs: prevAttrs: {
|
||||
@@ -94,10 +94,4 @@
|
||||
};
|
||||
in
|
||||
# Composes a list of overlays and returns a single overlay function that combines them.
|
||||
nixpkgs.lib.composeManyExtensions [
|
||||
additions
|
||||
modifications
|
||||
|
||||
# This is already a complete overlay with final: prev:, so it must be composed directly
|
||||
(import ./latexminted.nix)
|
||||
]
|
||||
nixpkgs.lib.composeManyExtensions [additions modifications]
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
# Workaround for a broken `minted` in nixpkgs.
|
||||
#
|
||||
# The TeX Live snapshot in nixpkgs (2026-03-01) predates minted 3.8.0
|
||||
# (2026-03-04) and still ships 3.7.0 together with a bundled `latexminted`
|
||||
# 0.6.0 that does not run. Two independent replacements are needed:
|
||||
#
|
||||
# - the run container: minted.sty from the upstream 3.8.0 release, which
|
||||
# requires `latexminted` >= 0.7.0;
|
||||
# - the bin container: `pkgs.latexminted` (0.7.1), which works.
|
||||
#
|
||||
# The LaTeX package and the Python executable are versioned separately, hence
|
||||
# the two unrelated version numbers.
|
||||
#
|
||||
# Delete this file once nixpkgs ships minted >= 3.8.0.
|
||||
final: prev: let
|
||||
version = "3.8.0";
|
||||
|
||||
# Byte-identical to the CTAN 3.8.0 release, but pinned and already unpacked
|
||||
# (CTAN only ships minted.dtx, which would have to be run through docstrip).
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "gpoore";
|
||||
repo = "minted";
|
||||
rev = "631f7e8e93f37d4f6e7767ff45692d53e7c7360d"; # "[latex] minted v3.8.0"
|
||||
hash = "sha256-xUWScWRR62ikRxxz/YEauWLirvhsQPCcyE1O6cpWZRw=";
|
||||
};
|
||||
|
||||
minted = prev.texlive.pkgs.minted;
|
||||
|
||||
# texlive.withPackages reads pname/tlType/tlDeps/... off the containers, so
|
||||
# reuse the original metadata instead of reconstructing it.
|
||||
container = name: container: script:
|
||||
prev.runCommand "minted-${version}${name}" {
|
||||
inherit (container) meta;
|
||||
passthru =
|
||||
container.passthru
|
||||
// {
|
||||
inherit version;
|
||||
};
|
||||
}
|
||||
script;
|
||||
in {
|
||||
texlive =
|
||||
prev.texlive
|
||||
// {
|
||||
pkgs =
|
||||
prev.texlive.pkgs
|
||||
// {
|
||||
minted =
|
||||
minted
|
||||
// {
|
||||
tex = container "-tex" minted.tex ''
|
||||
install -Dm444 -t "$out"/tex/latex/minted \
|
||||
${src}/latex/minted/minted.sty \
|
||||
${src}/latex/minted/minted1.sty \
|
||||
${src}/latex/minted/minted2.sty
|
||||
'';
|
||||
|
||||
# A bare symlink is enough: texlive.withPackages resolves and wraps
|
||||
# everything under bin/ itself.
|
||||
out = container "" minted.out ''
|
||||
mkdir -p "$out"/bin
|
||||
ln -s ${prev.lib.getExe prev.latexminted} "$out"/bin/latexminted
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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/"];
|
||||
}
|
||||
@@ -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="
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
{
|
||||
self,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
username,
|
||||
config,
|
||||
inputs,
|
||||
publicKeys,
|
||||
hostname,
|
||||
...
|
||||
}: {
|
||||
systemmodules = {
|
||||
sops-nix.bootSecrets.${username} = [
|
||||
"user-password"
|
||||
];
|
||||
|
||||
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;
|
||||
|
||||
# NOTE: Not set if the user already exists on darwin, so use chsh for the root user
|
||||
shell = pkgs.fish;
|
||||
|
||||
openssh.authorizedKeys.keys = [
|
||||
publicKeys.${username}.ssh
|
||||
];
|
||||
|
||||
# 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;
|
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing.
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 6;
|
||||
}
|
||||
+54
-34
@@ -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"
|
||||
@@ -254,7 +276,7 @@ with mylib.networking; {
|
||||
shell = pkgs.fish;
|
||||
|
||||
openssh.authorizedKeys.keys = [
|
||||
publicKeys.${username}.ssh
|
||||
publicKeys.christoph.ssh
|
||||
];
|
||||
|
||||
# We do this with HomeManager
|
||||
@@ -337,8 +359,7 @@ with mylib.networking; {
|
||||
|
||||
niri = {
|
||||
enable = !headless;
|
||||
package = pkgs.niri;
|
||||
# package = pkgs.niri-unstable; # TODO: Can remove this again once niri-flake is updated for 25.11
|
||||
package = pkgs.niri-unstable; # TODO: Can remove this again once niri-flake is updated for 25.11
|
||||
};
|
||||
|
||||
ssh.startAgent = true; # Use gnupg
|
||||
@@ -394,9 +415,9 @@ with mylib.networking; {
|
||||
};
|
||||
|
||||
# Trims the journal if too large
|
||||
journald.settings.Journal = {
|
||||
SystemMaxUse = "50M";
|
||||
};
|
||||
journald.extraConfig = ''
|
||||
SystemMaxUse=50M
|
||||
'';
|
||||
|
||||
acpid.enable = true;
|
||||
dbus.enable = true;
|
||||
@@ -418,30 +439,29 @@ with mylib.networking; {
|
||||
|
||||
systemd = {
|
||||
# TODO: Technically this should be a user service if it runs as ${username}?
|
||||
timers."refresh-nps-cache" = {
|
||||
wantedBy = ["timers.target"];
|
||||
timerConfig = {
|
||||
OnCalendar = "weekly"; # or however often you'd like
|
||||
Persistent = true;
|
||||
Unit = "refresh-nps-cache.service";
|
||||
};
|
||||
};
|
||||
|
||||
# timers."refresh-nps-cache" = {
|
||||
# wantedBy = ["timers.target"];
|
||||
# timerConfig = {
|
||||
# OnCalendar = "weekly"; # or however often you'd like
|
||||
# Persistent = true;
|
||||
# Unit = "refresh-nps-cache.service";
|
||||
# };
|
||||
# };
|
||||
|
||||
# services."refresh-nps-cache" = {
|
||||
# # Make sure `nix` and `nix-env` are findable by systemd.services.
|
||||
# path = ["/run/current-system/sw/"];
|
||||
# after = ["network.target"];
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# User = "${username}";
|
||||
# };
|
||||
# script = ''
|
||||
# set -eu
|
||||
# echo "Start refreshing nps cache..."
|
||||
# ${inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/nps -dddd -e -r
|
||||
# echo "... finished nps cache with exit code $?."
|
||||
# '';
|
||||
# };
|
||||
services."refresh-nps-cache" = {
|
||||
# Make sure `nix` and `nix-env` are findable by systemd.services.
|
||||
path = ["/run/current-system/sw/"];
|
||||
after = ["network.target"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "${username}";
|
||||
};
|
||||
script = ''
|
||||
set -eu
|
||||
echo "Start refreshing nps cache..."
|
||||
${inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/nps -dddd -e -r
|
||||
echo "... finished nps cache with exit code $?."
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
./disks.nix
|
||||
|
||||
# General services
|
||||
../services/comfyui.nix
|
||||
../services/fileflows-node.nix
|
||||
];
|
||||
|
||||
@@ -139,8 +140,6 @@
|
||||
sops-nix.secrets.${username} = [
|
||||
"makemkv-app-key"
|
||||
"restic-repo-key"
|
||||
"context7-api-key"
|
||||
"obsidian-rest-api-key"
|
||||
];
|
||||
};
|
||||
|
||||
@@ -157,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???
|
||||
@@ -192,53 +191,7 @@
|
||||
# };
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
spice
|
||||
spice-gtk
|
||||
];
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = false;
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
|
||||
# TODO: Duplicated from fonts module (set this inside fonts module?)
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.noto-fonts-cjk-serif;
|
||||
name = "Noto Serif CJK SC";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.noto-fonts-cjk-sans;
|
||||
name = "Noto Sans CJK SC";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.monolisa;
|
||||
name = "MonoLisa Alt Script";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
|
||||
targets = {};
|
||||
};
|
||||
|
||||
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 = {
|
||||
@@ -246,77 +199,89 @@
|
||||
openFirewall = true; # Directly set port in firewall
|
||||
};
|
||||
|
||||
# TODO: Doesn't work with steam flatpak
|
||||
# gamescope = {
|
||||
# enable = true;
|
||||
# enableWsi = true;
|
||||
# };
|
||||
|
||||
ghidra = {
|
||||
enable = true;
|
||||
gdb = true;
|
||||
};
|
||||
|
||||
steam.platformOptimizations.enable = true; # From nix-gaming module
|
||||
virt-manager.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
# desktopManager.plasma6.enable = true;
|
||||
# displayManager.gdm.enable = true; # Somehow, Plasma's own manager didn't work
|
||||
|
||||
btrfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "weekly";
|
||||
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 = {
|
||||
|
||||
@@ -82,8 +82,7 @@
|
||||
};
|
||||
"swap" = {
|
||||
mountpoint = "/swap";
|
||||
# Configured in hardware-configuration.nix
|
||||
# swap.swapfile.size = "64G";
|
||||
swap.swapfile.size = "16G";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -92,102 +91,6 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# games = {
|
||||
# type = "disk";
|
||||
# device = "/dev/disk/by-id/nvme-WD_BLACK_SN850X_2000GB_231623802252";
|
||||
# content = {
|
||||
# type = "gpt";
|
||||
# partitions = {
|
||||
# luks = {
|
||||
# label = "LUKS_GAMES";
|
||||
# size = "100%";
|
||||
# content = {
|
||||
# type = "luks";
|
||||
# name = "crypted_games";
|
||||
#
|
||||
# extraOpenArgs = [
|
||||
# "--perf-no_read_workqueue"
|
||||
# "--perf-no_write_workqueue"
|
||||
# ];
|
||||
#
|
||||
# settings = {
|
||||
# allowDiscards = true;
|
||||
# crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10" "tries=5"];
|
||||
#
|
||||
# # Disable for interactive password entry
|
||||
# # This is contained on the main disk, so by unlocking the main disk with the password,
|
||||
# # the second disk can unlock automatically
|
||||
# keyFile = "/persist/home/christoph/.secrets/luks.keyfile";
|
||||
# fallbackToPassword = false;
|
||||
# };
|
||||
#
|
||||
# content = {
|
||||
# type = "btrfs";
|
||||
# extraArgs = ["-L" "GAMES" "-f"];
|
||||
# subvolumes = {
|
||||
# "data" = {
|
||||
# mountpoint = "/home/christoph/Games";
|
||||
# mountOptions = [
|
||||
# "compress=zstd"
|
||||
# "noatime"
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
# ssd = {
|
||||
# type = "disk";
|
||||
# device = "/dev/disk/by-id/nvme-eui.00253857019ebd67";
|
||||
# content = {
|
||||
# type = "gpt";
|
||||
# partitions = {
|
||||
# luks = {
|
||||
# label = "LUKS_SSD";
|
||||
# size = "100%";
|
||||
# content = {
|
||||
# type = "luks";
|
||||
# name = "crypted_ssd";
|
||||
#
|
||||
# extraOpenArgs = [
|
||||
# "--perf-no_read_workqueue"
|
||||
# "--perf-no_write_workqueue"
|
||||
# ];
|
||||
#
|
||||
# settings = {
|
||||
# allowDiscards = true;
|
||||
# crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10" "tries=5"];
|
||||
#
|
||||
# # Disable for interactive password entry
|
||||
# # This is contained on the main disk, so by unlocking the main disk with the password,
|
||||
# # the second disk can unlock automatically
|
||||
# keyFile = "/persist/home/christoph/.secrets/luks.keyfile";
|
||||
# fallbackToPassword = false;
|
||||
# };
|
||||
#
|
||||
# content = {
|
||||
# type = "btrfs";
|
||||
# extraArgs = ["-L" "SSD" "-f"];
|
||||
# subvolumes = {
|
||||
# "data" = {
|
||||
# mountpoint = "/home/christoph/SSD";
|
||||
# mountOptions = [
|
||||
# "compress=zstd"
|
||||
# "noatime"
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
];
|
||||
|
||||
@@ -160,9 +165,6 @@
|
||||
|
||||
# https://discourse.nixos.org/t/nvidia-open-breaks-hardware-acceleration/58770/3
|
||||
nvidia-vaapi-driver # Experimental, doesn't work with chromium
|
||||
|
||||
# Hdr in games with DXVK_HDR=1 ENABLE_HDR_WSI=1
|
||||
vulkan-hdr-layer-kwin6
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
+51
-18
@@ -19,12 +19,12 @@
|
||||
../services/formula10.nix
|
||||
../services/formula11.nix
|
||||
../services/formula12.nix
|
||||
# ../services/statespaces.nix
|
||||
../services/statespaces.nix
|
||||
|
||||
# General services
|
||||
../services/arcane-agent.nix
|
||||
../services/authelia.nix
|
||||
../services/bazarr.nix
|
||||
../services/box.nix
|
||||
../services/fileflows.nix
|
||||
../services/gitea.nix
|
||||
../services/immich.nix
|
||||
@@ -32,12 +32,11 @@
|
||||
../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
|
||||
# ../services/portainer-agent.nix
|
||||
# ../services/pulse-agent-servenix.nix
|
||||
../services/portainer-agent.nix
|
||||
../services/pulse-agent-servenix.nix
|
||||
../services/prowlarr.nix
|
||||
../services/radarr.nix
|
||||
../services/sabnzbd-movies.nix
|
||||
@@ -45,7 +44,7 @@
|
||||
../services/sonarr.nix
|
||||
../services/teamspeak.nix
|
||||
../services/tinymediamanager.nix
|
||||
# ../services/whats-up-docker.nix
|
||||
../services/whats-up-docker.nix
|
||||
];
|
||||
|
||||
systemmodules = {
|
||||
@@ -66,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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -85,7 +123,6 @@
|
||||
443 # HTTPS (Nginx Proxy Manager)
|
||||
|
||||
3000 # Gitea (runner needs to reach local gitea instance)
|
||||
3553 # Arcane
|
||||
|
||||
30033 # Teamspeak
|
||||
10080 # Teamspeak
|
||||
@@ -98,7 +135,6 @@
|
||||
443 # HTTPS (Nginx Proxy Manager)
|
||||
|
||||
3000 # Gitea (runner needs to reach local gitea instance)
|
||||
3553 # Arcane
|
||||
|
||||
5520 # HyTale
|
||||
|
||||
@@ -113,9 +149,6 @@
|
||||
"kopia-server-password"
|
||||
"kopia-user-password"
|
||||
"paperless-nextcloud-sync-password"
|
||||
"ntfy-auth-users"
|
||||
"ntfy-auth-tokens"
|
||||
"arcane-agent-key"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
{
|
||||
mylib,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
arcaneVersion = "v2.3.0";
|
||||
in {
|
||||
# If we need to pass secrets to containers we can't use plain env variables.
|
||||
sops.templates."arcane-agent_secrets.env".content = ''
|
||||
AGENT_TOKEN=${config.sops.placeholder.arcane-agent-key}
|
||||
'';
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
arcane-agent = {
|
||||
image = "ghcr.io/getarcaneapp/arcane-headless:${arcaneVersion}";
|
||||
autoStart = true;
|
||||
|
||||
login = mylib.containers.mkDockerLogin config;
|
||||
|
||||
dependsOn = [];
|
||||
|
||||
ports = [
|
||||
"3553:3553"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
|
||||
"arcane-agent_data:/app/data"
|
||||
"/media/synology-syncthing:/backups"
|
||||
];
|
||||
|
||||
environment = {
|
||||
MANAGER_API_URL = "https://arcane.think.chriphost.de";
|
||||
AGENT_MODE = "true";
|
||||
EDGE_TRANSPORT = "poll";
|
||||
|
||||
PUID = "1000";
|
||||
PGID = "1000";
|
||||
TZ = "Europe/Berlin";
|
||||
};
|
||||
|
||||
environmentFiles = [
|
||||
config.sops.templates."arcane-agent_secrets.env".path
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
# "--privileged"
|
||||
# "--device=nvidia.com/gpu=all"
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
{
|
||||
mylib,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
arcaneVersion = "v2.3.0";
|
||||
in {
|
||||
# If we need to pass secrets to containers we can't use plain env variables.
|
||||
sops.templates."arcane_secrets.env".content = ''
|
||||
ENCRYPTION_KEY=${config.sops.placeholder.arcane-encryption-key}
|
||||
JWT_SECRET=${config.sops.placeholder.arcane-jwt-secret}
|
||||
'';
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
arcane = {
|
||||
image = "ghcr.io/getarcaneapp/manager:${arcaneVersion}";
|
||||
autoStart = true;
|
||||
|
||||
login = mylib.containers.mkDockerLogin config;
|
||||
|
||||
dependsOn = [];
|
||||
|
||||
ports = [
|
||||
# "3552:3552"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
|
||||
"arcane_data:/app/data"
|
||||
"/media/synology-syncthing:/backups"
|
||||
];
|
||||
|
||||
environment = {
|
||||
APP_URL = "https://arcane.think.chriphost.de";
|
||||
|
||||
PUID = "1000";
|
||||
PGID = "1000";
|
||||
TZ = "Europe/Berlin";
|
||||
};
|
||||
|
||||
environmentFiles = [
|
||||
config.sops.templates."arcane_secrets.env".path
|
||||
];
|
||||
|
||||
extraOptions = [
|
||||
# "--privileged"
|
||||
# "--device=nvidia.com/gpu=all"
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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 = [];
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user