1

Compare commits

..

53 Commits

Author SHA1 Message Date
2c959fdc0c Services/Nginx: Expose hytale port 2026-01-29 16:33:45 +01:00
e00c4f49f5 Modules/Impermanence: Persist jellyfin-tui settings 2026-01-26 13:44:42 +01:00
61131ca598 Home: Add jellyfin-tui 2026-01-26 13:44:34 +01:00
9c1a39d699 Modules/Firefox: Disable darkmode plugin 2026-01-26 13:19:43 +01:00
32de6e24b7 Modules/Neovim: Enable autotools-language-server 2026-01-25 23:01:07 +01:00
78e554cc30 Modules/Impermanence: Persist feishin config 2026-01-25 19:23:15 +01:00
f65617deed Home: Add feishing 2026-01-25 19:14:11 +01:00
aa3a881d58 Derivations/TidalDL: Fix derivation after original repo got nuked 2026-01-24 19:46:42 +01:00
7f99b73635 System/Nixinator: Enable IPv6 networking 2026-01-24 19:22:11 +01:00
c1360e5c2c System/ServeNix: Enable IPv6 networking 2026-01-24 02:05:37 +01:00
ca9e66bc35 System/ThinkNix: Enable IPv6 networking 2026-01-24 01:32:31 +01:00
eac705bdfb Modules/Docker: Enable IP forwarding + add IPv6 fallback dns 2026-01-24 01:32:14 +01:00
69beab4812 Lib/Networking: Accept router advertisements 2026-01-24 01:31:54 +01:00
515110ff7d Modules/Neovim: Enable nixd + alejandra also for headless 2026-01-24 01:31:42 +01:00
9a9bffd637 Home: Add gnumake 2026-01-19 12:07:38 +01:00
f1b269e3ee Modules/Impermanence: Persist /var/lib/docker 2026-01-18 21:51:44 +01:00
f09dee5ad8 Home/Nixinator: Add zed + vscode 2026-01-18 21:45:47 +01:00
f246eacdb3 Modules/Impermanence: Persist docker build cache, zed config, jellyfin-desktop config 2026-01-18 21:45:36 +01:00
b7e2bba8f0 Update systemmodules/homemodules paths to allow nixd to differentiate between the two 2026-01-18 15:47:51 +01:00
25ae0f4b85 System: Rename system/modules to system/systemmodules 2026-01-18 15:34:46 +01:00
d12b247368 Home: Rename home/modules to home/homemodules 2026-01-18 15:34:36 +01:00
25e9128875 System/Nixinator: Reenable restic backup with NFS "hard" 2026-01-18 14:01:30 +01:00
eee28f57fc System: Replace NFS mounts "soft" option with "hard" 2026-01-18 14:00:16 +01:00
ea03e2266f System/Nixinator: Disable restic until I figure out why the repo breaks all the time 2026-01-18 01:19:19 +01:00
5e422d05c9 System/Nixinator: Disable rootless docker 2026-01-18 01:19:04 +01:00
eaa36cfce2 Modules/Neovim: Update clangd options 2026-01-18 00:01:14 +01:00
572d0bfe9e Modules/Neovim: Update nvim-treesitter config after update 2026-01-17 23:46:34 +01:00
385ca27f8c Modules/Niri: Disable workspace scroll on focus change 2026-01-17 23:46:19 +01:00
4c18fd8c8e Modules/Niri: Update DMS configuration after update 2026-01-17 23:00:44 +01:00
bf0c55669c Derivations/TidalDL: Disable broken derivation for now 2026-01-17 21:59:22 +01:00
86a5e79079 System/Nixinator: Enable 16G swap 2026-01-17 21:58:24 +01:00
7d429a4720 Derivations/TidalDL: Update src after the original repository was removed (thank you anna) 2026-01-17 20:29:17 +01:00
2e9a4b13d1 System: Fix after update 2026-01-17 20:28:40 +01:00
73eeff9a0e Home: Fix after update 2026-01-17 20:28:34 +01:00
d216a8018d Flake: Update lock 2026-01-17 20:20:57 +01:00
b09d854e50 Home/Nixinator: Disable ollama 2026-01-17 20:20:31 +01:00
ff39dd1df2 Modules/Neovim: Rewrite clangd root_dir expression for neovim v0.11 2026-01-17 19:50:05 +01:00
98c520e0bd Services/FileFlows: Don't mount MusicVideos into nixinator node 2026-01-17 19:32:45 +01:00
7e3d3ca4a5 Modules/Impermanence: Persist user docker images/containers 2026-01-17 19:23:35 +01:00
c8a76751f3 System/Nixinator: Remove GAMES disk mount 2026-01-17 19:23:05 +01:00
12a10bee82 Home: Rename dankMaterialShell to dank-material-shell after flake update 2026-01-17 19:22:45 +01:00
767309885a Flake: Update lock 2026-01-17 19:22:45 +01:00
6d360ed782 System/Servenix: Mount nfs share for music videos/recorded shows 2026-01-05 18:02:51 +01:00
ddccd51b5a Services/Box: Update to v0.30.1 2026-01-05 18:02:51 +01:00
1fef42e5d4 Home: Disable hyprland bc it's too woke 2025-12-26 13:45:40 +01:00
0d20883f4f Home: Enable hyprland + niri depending on their system module state 2025-12-26 13:07:07 +01:00
cec5ec5493 Modules/Niri: Update DMS default config 2025-12-14 17:16:16 +01:00
5833dff19e Home: Disable hyprland 2025-12-14 16:14:14 +01:00
7b4c2df7af Modules/Hyprland: Update to current config format 2025-12-14 16:14:07 +01:00
1643f30906 System/Nixinator: Switch to Nvidia beta driver since stable is currently broken on kernel 6.18 2025-12-12 19:52:06 +01:00
79c617cc91 Flake: Update lock 2025-12-12 19:52:06 +01:00
474a8badf4 Modules/Niri: Init DankMaterialShell config 2025-12-12 19:52:06 +01:00
17368396cf Services/Box: Init at v0.29.3 2025-12-09 03:26:30 +01:00
150 changed files with 3515 additions and 6402 deletions

1
.gitignore vendored
View File

@ -11,4 +11,3 @@ config/neovim/store
home/modules/ags/config/types home/modules/ags/config/types
home/modules/ags/config/tsconfig.json home/modules/ags/config/tsconfig.json
system/modules/agenix/secrets.nix system/modules/agenix/secrets.nix
config/neovim/nvim_bundle

BIN
Btop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 747 KiB

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
Niri.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 KiB

175
README.md
View File

@ -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 ![](FastFetch.png)
![Fastfetch](FastFetch.png) <p float="left" align="middle">
<img src="/NeoVim.png" width="33%" />
<img src="/Rmpc.png" width="33%" />
<img src="/Btop.png" width="33%" />
</p>
![Neovim](NeoVim.png) ![](Niri.png)
![Darwin](Darwin.png) To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
Alternatively, use `nh os switch` or `nh os boot`.
## Hosts ## NixFlake/system
| Host | Type | GPU | Features | Contains all the system configurations.
|-|-|-|-|
| `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 |
## 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 When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
# Enter dev shell (provides helper utilities) Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
nix develop
# Rebuild system + user config together ## NixFlake/home
nh os switch
nh os boot
# Or with nixos-rebuild Contains all the home-manager configurations.
sudo nixos-rebuild switch --flake .#nixinator
```
## 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) ## NixFlake/overlays
2. **Host Config**: `system/<hostname>/default.nix` (NixOS) / `home/christoph/<hostname>/default.nix` (home-manager)
3. **Hardware**: `system/<hostname>/hardware-configuration.nix`
### Modules Contains all overlays, e.g. package version overrides.
The `NixFlake/overlays/default.nix` imports all overlays and all derivations.
There are two module hierarchies (NixOS and home-manager modules): It is then imported by the top-level `NixFlake/flake.nix`, to make everything available to the system/home configurations.
```
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).

BIN
Rmpc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

@ -21,9 +21,6 @@ rec {
}: }:
# Create a shell (and possibly package) for each possible system, not only x86_64-linux # Create a shell (and possibly package) for each possible system, not only x86_64-linux
flake-utils.lib.eachDefaultSystem (system: let flake-utils.lib.eachDefaultSystem (system: let
# =========================================================================================
# Define pkgs/stdenvs
# =========================================================================================
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
@ -31,30 +28,208 @@ rec {
rust-overlay.overlays.default rust-overlay.overlays.default
]; ];
}; };
# clangPkgs = import nixpkgs {
# inherit system;
# config.allowUnfree = true;
# overlays = [];
#
# # Use this to change the compiler:
# # - GCC: pkgs.stdenv
# # - Clang: pkgs.clangStdenv
# # NixOS packages are built using GCC by default. Using clang requires a full rebuild/redownload.
# config.replaceStdenv = {pkgs}: pkgs.clangStdenv;
# };
# Package set for cross-compilation
# windowsPkgs = import nixpkgs {
# inherit system;
# crossSystem = {
# config = "x86_64-w64-mingw32";
# };
# config.allowUnfree = true;
# };
inherit (pkgs) lib stdenv; inherit (pkgs) lib stdenv;
# ===========================================================================================
# Define custom dependencies
# ===========================================================================================
# Python package example
# typed-ffmpeg = pkgs.python313Packages.buildPythonPackage rec {
# pname = "typed_ffmpeg";
# version = "3.6";
#
# src = pkgs.python313Packages.fetchPypi {
# inherit pname version;
# hash = "sha256-YPspq/lqI/jx/9FCQntmQPw4lrPIsdxtHTUg0F0QbrM=";
# };
#
# pyproject = true;
# build-system = [
# pkgs.python313Packages.setuptools
# pkgs.python313Packages.setuptools-scm
# ];
# };
# python = pkgs.python313.withPackages (p:
# with p; [
# # numpy
# # matplotlib
# # typed-ffmpeg
# # pyside6
# ]);
# rust = pkgs.rust-bin.stable.latest.default.override {
# extensions = ["rust-src"]; # Include the Rust stdlib source (for IntelliJ)
# };
# 64 bit C/C++ compilers that don't collide (use the same libc)
# bintools = pkgs.wrapBintoolsWith {
# bintools = pkgs.bintools.bintools; # Unwrapped bintools
# libc = pkgs.glibc;
# };
# gcc = pkgs.hiPrio (pkgs.wrapCCWith {
# cc = pkgs.gcc.cc; # Unwrapped gcc
# libc = pkgs.glibc;
# bintools = bintools;
# });
# clang = pkgs.wrapCCWith {
# cc = pkgs.clang.cc; # Unwrapped clang
# libc = pkgs.glibc;
# bintools = bintools;
# };
# Multilib C/C++ compilers that don't collide (use the same libc)
# bintools_multilib = pkgs.wrapBintoolsWith {
# bintools = pkgs.bintools.bintools; # Unwrapped bintools
# libc = pkgs.glibc_multi;
# };
# gcc_multilib = pkgs.hiPrio (pkgs.wrapCCWith {
# cc = pkgs.gcc.cc; # Unwrapped gcc
# libc = pkgs.glibc_multi;
# bintools = bintools_multilib;
# });
# clang_multilib = pkgs.wrapCCWith {
# cc = pkgs.clang.cc; # Unwrapped clang
# libc = pkgs.glibc_multi;
# bintools = bintools_multilib;
# };
# ===========================================================================================
# Specify dependencies
# https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-overview
# Just for a "nix develop" shell, buildInputs can be used for everything.
# ===========================================================================================
# Add dependencies to nativeBuildInputs if they are executed during the build:
# - Those which are needed on $PATH during the build, for example cmake and pkg-config
# - Setup hooks, for example makeWrapper
# - Interpreters needed by patchShebangs for build scripts (with the --build flag), which can be the case for e.g. perl
nativeBuildInputs = with pkgs; [
# Languages:
# python
# rust
# bintools
# gcc
# clang
# bintools_multilib
# gcc_multilib
# clang_multilib
# clojure
# jdk
# C/C++:
# gdb
# valgrind
# gnumake
# cmake
# pkg-config
# Clojure:
# leiningen
# clj-nix.packages.${system}.deps-lock
# Java:
# gradle
# Python:
# hatch
# py-spy
# Qt:
# qt6.wrapQtAppsHook # For the shellHook
];
# Add dependencies to buildInputs if they will end up copied or linked into the final output or otherwise used at runtime:
# - Libraries used by compilers, for example zlib
# - Interpreters needed by patchShebangs for scripts which are installed, which can be the case for e.g. perl
buildInputs = with pkgs; [
# C/C++:
# boost
# sfml
# Qt:
# qt6.qtbase
# qt6.full
];
# ===========================================================================================
# Define buildable + installable packages
# ===========================================================================================
# package = stdenv.mkDerivation {
# inherit nativeBuildInputs buildInputs;
# pname = "";
# version = "1.0.0";
# src = ./.;
#
# installPhase = ''
# mkdir -p $out/bin
# mv ./BINARY $out/bin
# '';
# };
# package = clj-nix.lib.mkCljApp {
# inherit pkgs;
# modules = [
# # Option list: https://jlesquembre.github.io/clj-nix/options/
# {
# name = "";
# version = "1.0.0";
# main-ns = "";
# projectSrc = ./.;
# withLeiningen = true;
# buildCommand = "lein uberjar"; # Requires "withLeiningen = true;"
# jdk = pkgs.jdk; # Default is pkgs.jdk_headless
# # customJdk.enable = true;
# # nativeImage.enable = true;
# }
# ];
# };
in rec {
# Provide package for "nix build"
# defaultPackage = package;
# defaultApp = flake-utils.lib.mkApp {
# drv = defaultPackage;
# };
# Provide environment for "nix develop"
devShell = pkgs.mkShell {
inherit nativeBuildInputs buildInputs;
name = description;
# =========================================================================================
# Define environment variables
# =========================================================================================
# Rust stdlib source:
# RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library";
# Custom dynamic libraries:
# LD_LIBRARY_PATH = builtins.concatStringsSep ":" [
# # Rust Bevy GUI app:
# # "${pkgs.xorg.libX11}/lib"
# # "${pkgs.xorg.libXcursor}/lib"
# # "${pkgs.xorg.libXrandr}/lib"
# # "${pkgs.xorg.libXi}/lib"
# # "${pkgs.libGL}/lib"
#
# # JavaFX app:
# # "${pkgs.libGL}/lib"
# # "${pkgs.gtk3}/lib"
# # "${pkgs.glib.out}/lib"
# # "${pkgs.xorg.libXtst}/lib"
# ];
# Dynamic libraries from buildinputs:
# LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath buildInputs;
# QT imports to use with "qmlls -E"
# QML_IMPORT_PATH = "${pkgs.qt6.full}/lib/qt-6/qml";
# Set PYTHONPATH
# PYTHONPATH = ".";
# Set matplotlib backend
# MPLBACKEND = "TkAgg";
# ========================================================================================= # =========================================================================================
# Define shell environment # Define shell environment
# ========================================================================================= # =========================================================================================
@ -98,65 +273,38 @@ rec {
buildDebug = mkBuildScript "Debug"; buildDebug = mkBuildScript "Debug";
buildRelease = mkBuildScript "Release"; buildRelease = mkBuildScript "Release";
# Add project-local fish abbrs here # Use this to specify commands that should be ran after entering fish shell
abbrs = { 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: # 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++: # C/C++:
# cmake-debug = "${cmakeDebug}"; # abbr -a cmake-debug "${cmakeDebug}"
# cmake-release = "${cmakeRelease}"; # abbr -a cmake-release "${cmakeRelease}"
# build-debug = "${buildDebug}"; # abbr -a build-debug "${buildDebug}"
# build-release = "${buildRelease}"; # abbr -a build-release "${buildRelease}"
# Clojure: # Clojure:
# clojure-deps = "deps-lock --lein"; # abbr -a clojure-deps "deps-lock --lein"
# Python: # Python:
# run = "python ./app/main.py"; # abbr -a run "python ./app/main.py"
# profile = "py-spy record -o profile.svg -- python ./app/main.py && firefox profile.svg"; # abbr -a profile "py-spy record -o profile.svg -- python ./app/main.py && firefox profile.svg"
# ptop = "py-spy top -- python ./app/main.py"; # abbr -a 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)}
''; '';
in in
builtins.concatStringsSep "\n" [ builtins.concatStringsSep "\n" [
# Launch into pure fish shell # Launch into pure fish shell
'' ''
# Determine the project root, used e.g. in cmake scripts exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
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}"
'' ''
# Qt: Launch into wrapped fish shell (direnv incompatible) # Qt: Launch into wrapped fish shell
# https://nixos.org/manual/nixpkgs/stable/#sec-language-qt # https://nixos.org/manual/nixpkgs/stable/#sec-language-qt
# '' # ''
# fishdir=$(mktemp -d) # fishdir=$(mktemp -d)
@ -164,268 +312,6 @@ rec {
# exec "$fishdir/fish" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'" # exec "$fishdir/fish" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
# '' # ''
]; ];
# ===========================================================================================
# Define custom dependencies
# ===========================================================================================
# Python package example
# typed-ffmpeg = pkgs.python313Packages.buildPythonPackage rec {
# pname = "typed_ffmpeg";
# version = "3.6";
#
# src = pkgs.python313Packages.fetchPypi {
# inherit pname version;
# hash = "sha256-YPspq/lqI/jx/9FCQntmQPw4lrPIsdxtHTUg0F0QbrM=";
# };
#
# pyproject = true;
# build-system = [
# pkgs.python313Packages.setuptools
# pkgs.python313Packages.setuptools-scm
# ];
# };
# python = pkgs.python313.withPackages (p:
# with p; [
# # numpy
# # matplotlib
# # typed-ffmpeg
# # pyside6
# ]);
# rust = pkgs.rust-bin.stable.latest.default.override {
# extensions = ["rust-src"]; # Include the Rust stdlib source (for IntelliJ)
# };
# 64 bit C/C++ compilers that don't collide (use the same libc)
# bintools = pkgs.wrapBintoolsWith {
# bintools = pkgs.bintools.bintools; # Unwrapped bintools
# libc = pkgs.glibc;
# };
# gcc = lib.hiPrio (pkgs.wrapCCWith {
# cc = pkgs.gcc.cc; # Unwrapped gcc
# libc = pkgs.glibc;
# bintools = bintools;
# });
# clang = pkgs.wrapCCWith {
# cc = pkgs.clang.cc; # Unwrapped clang
# libc = pkgs.glibc;
# bintools = bintools;
# };
# Multilib C/C++ compilers that don't collide (use the same libc)
# bintools_multilib = pkgs.wrapBintoolsWith {
# bintools = pkgs.bintools.bintools; # Unwrapped bintools
# libc = pkgs.glibc_multi;
# };
# gcc_multilib = lib.hiPrio (pkgs.wrapCCWith {
# cc = pkgs.gcc.cc; # Unwrapped gcc
# libc = pkgs.glibc_multi;
# bintools = bintools_multilib;
# });
# clang_multilib = pkgs.wrapCCWith {
# cc = pkgs.clang.cc; # Unwrapped clang
# libc = pkgs.glibc_multi;
# bintools = bintools_multilib;
# };
# ===========================================================================================
# Specify dependencies
# https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-overview
# Just for a "nix develop" shell, buildInputs can be used for everything.
# ===========================================================================================
# Add dependencies to nativeBuildInputs if they are executed during the build:
# - Those which are needed on $PATH during the build, for example cmake and pkg-config
# - Setup hooks, for example makeWrapper
# - Interpreters needed by patchShebangs for build scripts (with the --build flag), which can be the case for e.g. perl
nativeBuildInputs = with pkgs; [
# Languages:
# python
# rust
# bintools
# gcc
# clang
# bintools_multilib
# gcc_multilib
# clang_multilib
# clojure
# jdk
# C/C++:
# pkg-config
# cmake
# gnumake
# ninja
# gdb
# valgrind
# kdePackages.kcachegrind
# perf
# hotspot
# Clojure:
# leiningen
# clj-nix.packages.${system}.deps-lock
# Java:
# gradle
# Python:
# hatch
# py-spy
# Qt:
# qt6.wrapQtAppsHook # For the shellHook
];
# Add dependencies to buildInputs if they will end up copied or linked into the final output or otherwise used at runtime:
# - Libraries used by compilers, for example zlib
# - Interpreters needed by patchShebangs for scripts which are installed, which can be the case for e.g. perl
buildInputs = with pkgs; [
# C/C++:
# boost
# sfml
# raylib
# backward-cpp
# Qt:
# qt6.qtbase
# qt6.full
];
# ===========================================================================================
# Define buildable + installable packages
# ===========================================================================================
# package = stdenv.mkDerivation {
# inherit nativeBuildInputs buildInputs;
# pname = "";
# version = "1.0.0";
# src = ./.;
#
# installPhase = ''
# runHook preInstall
#
# mkdir -p $out/bin
# cp -rv ./${pname} $out/bin/
#
# runHook postInstall
# '';
# };
# windowsPackage = windowsPkgs.stdenv.mkDerivation rec {
# pname = "";
# version = "1.0.0";
# src = ./.;
#
# # nativeBuildInputs must be from the build-platform (not cross)
# # so we use "pkgs" here, not "windowsPkgs"
# nativeBuildInputs = with pkgs; [
# cmake
# ];
#
# buildInputs = with windowsPkgs; [];
#
# cmakeFlags = [
# "-DCMAKE_SYSTEM_NAME=Windows"
# ];
#
# installPhase = ''
# runHook preInstall
#
# mkdir -p $out/bin
# cp ./${pname}.exe $out/bin/
#
# runHook postInstall
# '';
# };
# package = clj-nix.lib.mkCljApp {
# inherit pkgs;
# modules = [
# # Option list: https://jlesquembre.github.io/clj-nix/options/
# {
# name = "";
# version = "1.0.0";
# main-ns = "";
# projectSrc = ./.;
# withLeiningen = true;
# buildCommand = "lein uberjar"; # Requires "withLeiningen = true;"
# jdk = pkgs.jdk; # Default is pkgs.jdk_headless
# # customJdk.enable = true;
# # nativeImage.enable = true;
# }
# ];
# };
in rec {
# Provide package for "nix build"
# packages = {
# default = package;
# windows = windowsPackage;
# };
# apps = {
# default = flake-utils.lib.mkApp {drv = package;};
# };
devShells = {
# Provide default environment for "nix develop".
# Other environments can be added below.
default = pkgs.mkShell {
inherit nativeBuildInputs buildInputs shellHook;
name = description;
# =========================================================================================
# Define environment variables
# =========================================================================================
# Rust stdlib source:
# RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library";
# Custom dynamic libraries:
# LD_LIBRARY_PATH = builtins.concatStringsSep ":" [
# # Rust Bevy GUI app:
# # "${pkgs.libx11}/lib"
# # "${pkgs.libxcursor}/lib"
# # "${pkgs.libxrandr}/lib"
# # "${pkgs.libxi}/lib"
# # "${pkgs.libGL}/lib"
#
# # JavaFX app:
# # "${pkgs.libGL}/lib"
# # "${pkgs.gtk3}/lib"
# # "${pkgs.glib.out}/lib"
# # "${pkgs.xorg.libXtst}/lib"
# ];
# Dynamic libraries from buildinputs:
# LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath buildInputs;
# QT imports to use with "qmlls -E"
# QML_IMPORT_PATH = "${pkgs.qt6.full}/lib/qt-6/qml";
# Set PYTHONPATH
# PYTHONPATH = ".";
# Set matplotlib backend
# MPLBACKEND = "TkAgg";
};
# Provide environment with clang stdenv for "nix develop .#clang"
# clang =
# pkgs.mkShell.override {
# stdenv = pkgs.clangStdenv;
# } {
# inherit shellHook;
# name = description;
#
# # If not required, use pkgs instead of clangPkgs for a lighter build
# nativeBuildInputs = with pkgs; [];
# buildInputs = with pkgs; [];
#
# # =========================================================================================
# # Define environment variables
# # =========================================================================================
#
# # Dynamic libraries from buildinputs:
# LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath buildInputs;
# };
}; };
}); });
} }

View File

@ -210,10 +210,6 @@ Convert line endings to dos format
unix2dos <file> unix2dos <file>
$ file: eza -1 $ file: eza -1
% tiddl
Download stuff from tidal
tiddl download --track-quality max --path ~/Downloads/Beet/Albums --videos none url "<url>"
; =========================== ; ===========================
; SECRETS ; SECRETS
; =========================== ; ===========================
@ -238,11 +234,11 @@ $ mode: echo -e "--export \tExport public key\n--export-secret-keys\t
% sops % sops
# Edit secrets.yaml # Edit secrets.yaml
sops ~/NixFlake/system/systemmodules/sops-nix/secrets.yaml sops ~/NixFlake/system/modules/sops-nix/secrets.yaml
% sops % sops
# Rekey secrets.yaml # Rekey secrets.yaml
sops updatekeys ~/NixFlake/system/systemmodules/sops-nix/secrets.yaml sops updatekeys ~/NixFlake/system/modules/sops-nix/secrets.yaml
% ssh % ssh
# Generate a new SSH key # Generate a new SSH key
@ -308,33 +304,27 @@ mkdir -p "<name>" && cd "<name>" && spotdl --client-id (cat /home/christoph/.sec
% ffmpeg % ffmpeg
# Create a slow motion version of a video with interpolated/blended frames # 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 $ input: eza -f -1
% ffmpeg % ffmpeg
# Detect black bar dimensions automatically by looking at the first 10 frames # 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 $ input: eza -f -1
% ffmpeg % ffmpeg
# Preview video with applied crop settings # 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 $ input: eza -f -1
% ffmpeg % ffmpeg
# Re-encode the video with applied crop settings # 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 $ input: eza -f -1
% ffmpeg % ffmpeg
# Reencode and compress the video using the h265 codec # Reencode and compress the video using the h265 codec
ffmpeg -i <input> -vcodec libx265 -crf <quality> 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"
% 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>
$ input: eza -f -1 $ input: eza -f -1
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n" $ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"

View File

@ -1,204 +0,0 @@
#!/usr/bin/env python3
import argparse
import os
import re
import shutil
import subprocess
from typing import cast
from urllib.request import urlretrieve
INIT_LUA: str = "/home/christoph/.config/nvim/init.lua"
def patch_paths(text: str, mappings: dict[str, str]) -> str:
"""Patches /nix/store paths in init.lua"""
patched = text
for old, new in mappings.items():
print(f"Patching init.lua: {old} -> {new}")
patched = patched.replace(old, new)
return patched
def patch_various(text: str) -> str:
"""Patches various incompatibilities with NixVim init.lua"""
# Install lazy
print("Patching init.lua: Bootstrap lazy.nvim")
patched = (
"""-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
"""
+ text
)
# print("Patching init.lua: Disabling vim.loader")
# patched = patched.replace("vim.loader.enable(true)", "vim.loader.enable(false)")
return patched
def copy_plugins(text: str, path: str) -> dict[str, str]:
"""Copies NeoVim plugins from the Nix Store"""
os.makedirs(path, exist_ok=True)
plugins_path: str = re.findall(r"\"(/nix/store/.*-lazy-plugins)\"", text)[0]
print(f"Copying: {plugins_path} -> {path}/plugins")
_ = shutil.copytree(plugins_path, f"{path}/plugins")
treesitter_path: str = re.findall(
r"\"(/nix/store/.*-vimplugin-nvim-treesitter.*)\"", text
)[0]
print(f"Copying: {treesitter_path} -> {path}/treesitter")
_ = shutil.copytree(treesitter_path, f"{path}/treesitter")
parsers_path: str = re.findall(r"\"(/nix/store/.*-treesitter-parsers)\"", text)[0]
print(f"Copying: {parsers_path} -> {path}/parsers")
_ = shutil.copytree(parsers_path, f"{path}/parsers")
return {
plugins_path: "./plugins",
treesitter_path: "./treesitter",
parsers_path: "./parsers",
}
def write_file(text: str, path: str) -> None:
"""Write text to a file"""
with open(path, "w") as file:
_ = file.write(text)
# TODO: Could add etc. nvim/lsp/formatter/linter binaries here
# TODO: Needs "install recipe", as in most cases the download will be an archive
DOWNLOADS: list[tuple[str, str]] = [
# (
# "https://github.com/neovim/neovim/releases/download/v0.11.6/nvim-linux-x86_64.tar.gz",
# "nvim",
# ),
]
def download_binaries(path: str, urls: list[tuple[str, str]]) -> None:
"""Download required binaries"""
os.makedirs(f"{path}/bin", exist_ok=True)
def download(url: str, path: str) -> None:
"""Download from URL"""
print(f"Downloading: {url}")
_ = urlretrieve(url, path)
for url, name in urls:
download(url, f"{path}/bin/{name}")
def build_nvim(path: str) -> None:
"""Builds a static nvim binary against musl"""
# TODO: Build etc. is working, but on the target system there are
# lua-ffi errors from noice.nvim with the static binary.
# This does not happen with nvim from system package repository.
def run(command: list[str]) -> None:
"""Run a subprocess"""
print(f"Running: {' '.join(command)}")
_ = subprocess.run(command)
os.makedirs(f"{path}/nvim-build", exist_ok=True)
with open(f"{path}/nvim-build/build-nvim.sh", "w") as file:
_ = file.write(
"\n".join(
[
"#!/bin/sh",
"git clone https://github.com/neovim/neovim",
"cd neovim",
"git checkout stable",
'make -j$(nproc) CMAKE_BUILD_TYPE=Release CMAKE_EXTRA_FLAGS="-DSTATIC_BUILD=1"',
"make CMAKE_INSTALL_PREFIX=/workdir/install install",
]
)
)
run(
[
"docker",
"run",
"--rm",
"-it",
"-v",
f"{os.path.abspath(path)}/nvim-build:/workdir",
"-w",
"/workdir",
"alpine:3.23.3",
"/bin/sh",
"-c",
"apk add build-base cmake coreutils curl gettext-tiny-dev git && chmod +x ./build-nvim.sh && ./build-nvim.sh",
]
)
_ = shutil.copytree(f"{path}/nvim-build/install/bin", f"{path}/bin")
_ = shutil.copytree(f"{path}/nvim-build/install/lib", f"{path}/lib")
_ = shutil.copytree(f"{path}/nvim-build/install/share", f"{path}/share")
_ = shutil.rmtree(f"{path}/nvim-build")
def bundle() -> None:
"""Creates a standalone NeoVim bundle from the NixVim configuration"""
parser = argparse.ArgumentParser()
_ = parser.add_argument(
"--config",
type=str,
default=INIT_LUA,
help="init.lua or other config file",
)
_ = parser.add_argument(
"--out",
type=str,
default="./nvim_bundle",
help="destination folder",
)
args = parser.parse_args()
args.config = cast(str, args.config)
args.out = cast(str, args.out)
with open(args.config, "r") as file:
patched_init_lua: str = file.read()
path_mappings = copy_plugins(patched_init_lua, args.out)
patched_init_lua = patch_paths(patched_init_lua, path_mappings)
patched_init_lua = patch_various(patched_init_lua)
write_file(patched_init_lua, f"{args.out}/init.lua")
# build_nvim(args.out)
# download_binaries(args.out, DOWNLOADS)
if __name__ == "__main__":
bundle()

View File

@ -1,6 +0,0 @@
# NeoVim Portable
## Requirements
- Base packages: `sudo apt install neovim git direnv ripgrep curl fzf`
- Link or copy the generated `nvim_bundle` to `~/.config/nvim` on the target machine

View File

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

View File

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

View File

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

View File

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

View File

@ -9,5 +9,4 @@
msty = pkgs.callPackage ./msty {}; msty = pkgs.callPackage ./msty {};
unityhub = pkgs.callPackage ./unityhub {}; unityhub = pkgs.callPackage ./unityhub {};
tidal-dl-ng = pkgs.callPackage ./tidal-dl-ng {}; tidal-dl-ng = pkgs.callPackage ./tidal-dl-ng {};
tiddl = pkgs.callPackage ./tiddl {};
} }

View File

@ -50,8 +50,8 @@
# }); # });
tidalDlNg = pythonPkgs.buildPythonApplication rec { tidalDlNg = pythonPkgs.buildPythonApplication rec {
pname = "tidal_dl_ng_for_dj"; pname = "tidal_dl_ng";
version = "0.33.2"; version = "0.33.0";
format = "pyproject"; format = "pyproject";
# The official repo was deleted # The official repo was deleted
@ -62,20 +62,24 @@
# sha256 = "sha256-PUT0anx1yivgXwW21jah7Rv1/BabOT+KPoW446NFNyg="; # sha256 = "sha256-PUT0anx1yivgXwW21jah7Rv1/BabOT+KPoW446NFNyg=";
# }; # };
# Package now also deleted from PyPi # Alternative repo
# src = pythonPkgs.fetchPypi { # src = pkgs.fetchFromGitHub {
# inherit pname version; # owner = "rodvicj";
# sha256 = "sha256-rOMyxnT7uVnMbn678DFtqAu4+Uc5VFGcqGI0jxplnpc="; # repo = "tidal_dl_ng-Project";
# rev = "4573142c76ef045ebf8e80c34657dd2bec96f17d";
# sha256 = "sha256-3sO2qj8V4KXOWK7vQsFAOYeTZo2rsc/M36SwRnC0oVg=";
# }; # };
# TODO: Borked # Package is still on PyPi
# "For DJ"-Fork
src = pythonPkgs.fetchPypi { src = pythonPkgs.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-605cgBqZV6L7sxWtEa4Ki+9hBqX4m3Rk+X5oY5bv/FQ="; sha256 = "sha256-rOMyxnT7uVnMbn678DFtqAu4+Uc5VFGcqGI0jxplnpc=";
}; };
doCheck = false;
dontCheckRuntimeDeps = true; dontCheckRuntimeDeps = true;
catchConflicts = false;
strictDeps = false;
nativeBuildInputs = with pythonPkgs; [poetry-core setuptools]; nativeBuildInputs = with pythonPkgs; [poetry-core setuptools];
@ -128,7 +132,7 @@
tidal-dl-ng-gui-desktopfile = pkgs.stdenv.mkDerivation { tidal-dl-ng-gui-desktopfile = pkgs.stdenv.mkDerivation {
pname = "tdng"; pname = "tdng";
version = "0.33.2"; version = "0.31.3";
dontUnpack = true; dontUnpack = true;
nativeBuildInputs = [pkgs.makeWrapper]; nativeBuildInputs = [pkgs.makeWrapper];

View File

@ -1,63 +0,0 @@
{
lib,
stdenv,
pkgs,
}: let
pythonPkgs = pkgs.python314Packages.overrideScope (self: super: {
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";
src = pkgs.fetchFromGitHub {
owner = "Tinche";
repo = "aiofiles";
tag = "v25.1.0";
hash = "sha256-NBmzoUb2una3+eWqR1HraVPibaRb9I51aYwskrjxskQ=";
};
# Build system changed in this version
build-system = with pythonPkgs; [
hatchling
hatch-vcs
];
});
});
in
pythonPkgs.buildPythonApplication rec {
pname = "tiddl";
version = "3.4.3";
format = "pyproject";
src = pythonPkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-45KHNS1IP59DsH8i2uQ7sua6T21vW/Yw1PQg55jzLGs=";
};
dontCheckRuntimeDeps = true;
build-system = with pythonPkgs; [
poetry-core
setuptools
];
propagatedBuildInputs = with pythonPkgs; [
# Nixpkgs
aiofiles
aiohttp
m3u8
mutagen
pydantic
requests
requests-cache
typer
];
}

View File

@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
with pkgs; with pkgs;
[ [
# Unity Hub binary dependencies # Unity Hub binary dependencies
libxrandr xorg.libXrandr
xdg-utils xdg-utils
# GTK filepicker # GTK filepicker
@ -72,14 +72,14 @@ stdenv.mkDerivation rec {
dbus dbus
at-spi2-core at-spi2-core
pango pango
libxcomposite xorg.libXcomposite
libxext xorg.libXext
libxdamage xorg.libXdamage
libxfixes xorg.libXfixes
libxcb xorg.libxcb
libxshmfence xorg.libxshmfence
libxScrnSaver xorg.libXScrnSaver
libxtst xorg.libXtst
# Unity Hub additional dependencies # Unity Hub additional dependencies
libva libva
@ -97,8 +97,8 @@ stdenv.mkDerivation rec {
# Unity Editor dependencies # Unity Editor dependencies
libglvnd # provides ligbl libglvnd # provides ligbl
libx11 xorg.libX11
libxcursor xorg.libXcursor
glib glib
gdk-pixbuf gdk-pixbuf
libxml2-legacy libxml2-legacy
@ -111,8 +111,8 @@ stdenv.mkDerivation rec {
vulkan-loader vulkan-loader
# Unity Bug Reporter specific dependencies # Unity Bug Reporter specific dependencies
libICE xorg.libICE
libSM xorg.libSM
# Fonts used by built-in and third party editor tools # Fonts used by built-in and third party editor tools
corefonts corefonts

1126
flake.lock generated

File diff suppressed because it is too large Load Diff

111
flake.nix
View File

@ -12,12 +12,8 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware"; 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 # 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
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
@ -57,14 +53,52 @@
niri.url = "github:sodiboo/niri-flake"; niri.url = "github:sodiboo/niri-flake";
niri.inputs.nixpkgs.follows = "nixpkgs"; niri.inputs.nixpkgs.follows = "nixpkgs";
# Walker # Quickshell
elephant.url = "github:abenz1267/elephant"; quickshell.url = "github:quickshell-mirror/quickshell";
walker.url = "github:abenz1267/walker"; quickshell.inputs.nixpkgs.follows = "nixpkgs";
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";
# 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 # NeoVim <3
nixvim.url = "github:nix-community/nixvim"; nixvim.url = "github:nix-community/nixvim";
# nixvim.inputs.nixpkgs.follows = "nixpkgs"; nixvim.inputs.nixpkgs.follows = "nixpkgs";
# Emacs nightly # Emacs nightly
# emacs-overlay.url = "github:nix-community/emacs-overlay"; # emacs-overlay.url = "github:nix-community/emacs-overlay";
@ -78,19 +112,9 @@
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest"; nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
# nix-flatpak.inputs.nixpkgs.follows = "nixpkgs"; # nix-flatpak doesn't have this # 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 # Realtime audio
# musnix.url = "github:musnix/musnix"; # musnix.url = "github:musnix/musnix";
# musnix.inputs.nixpkgs.follows = "nixpkgs"; # musnix.inputs.nixpkgs.follows = "nixpkgs";
# HyTale
hytale-launcher.url = "github:JPyke3/hytale-launcher-nix";
masssprings.url = "git+https://gitea.local.chriphost.de/christoph/cpp-masssprings";
masssprings.inputs.nixpkgs.follows = "nixpkgs";
}; };
# Outputs is a function that takes the inputs as arguments. # Outputs is a function that takes the inputs as arguments.
@ -99,14 +123,12 @@
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
nix-darwin,
... ...
} @ inputs: let } @ inputs: let
# Our configuration is buildable on the following system/platform. # Our configuration is buildable on the following system/platform.
# Configs can support more than a single system simultaneously, # Configs can support more than a single system simultaneously,
# e.g. NixOS (linux) and MacOS (darwin) or Arm. # e.g. NixOS (linux) and MacOS (darwin) or Arm.
system = "x86_64-linux"; system = "x86_64-linux";
darwinSystem = "aarch64-darwin";
# We configure our global packages here. # We configure our global packages here.
# Usually, "nixpkgs.legacyPackages.${system}" is used (and more efficient), # Usually, "nixpkgs.legacyPackages.${system}" is used (and more efficient),
@ -148,26 +170,6 @@
]; ];
}; };
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. # My own library functions are imported here.
# They are made available to the system and HM configs by inheriting mylib. # They are made available to the system and HM configs by inheriting mylib.
mylib = import ./lib { mylib = import ./lib {
@ -182,15 +184,8 @@
inherit (nixpkgs) lib; 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 # NOTE: Keep public keys here so they're easy to rotate
publicKeys.christoph = { publicKeys.christoph = {
# /home/christoph/.ssh/id_ed25519.pub # /home/christoph/.ssh/id_ed25519.pub
ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJAoJac+GdGtzblCMA0lBfMdSR6aQ4YyovrNglCFGIny christoph.urlacher@protonmail.com"; ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJAoJac+GdGtzblCMA0lBfMdSR6aQ4YyovrNglCFGIny christoph.urlacher@protonmail.com";
@ -214,22 +209,6 @@
# Local shell for NixFlake directory # Local shell for NixFlake directory
devShells.${system}.default = import ./shell.nix {inherit pkgs;}; 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
];
};
};
# We give each configuration a (host)name to choose a configuration when rebuilding. # 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). # This makes it easy to add different configurations (e.g. for a laptop).
# Usage: sudo nixos-rebuild switch --flake .#nixinator # Usage: sudo nixos-rebuild switch --flake .#nixinator

View File

@ -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 = {};
};
}

View File

@ -34,7 +34,8 @@ in
homemodules = { homemodules = {
beets.enable = !headless; beets.enable = !headless;
cava.enable = !headless;
btop.enable = true;
chromium = { chromium = {
enable = !headless; enable = !headless;
@ -46,8 +47,7 @@ in
extraPackages = with pkgs; [ extraPackages = with pkgs; [
papirus-icon-theme papirus-icon-theme
bibata-cursors 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"; cursor = "Bibata-Modern-Classic";
@ -77,15 +77,221 @@ in
disableTabBar = true; 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;
dynamicCursor.enable = false;
trails.enable = true;
hyprspace.enable = false; # Always broken
hyprpanel.enable = true;
caelestia.enable = false;
keybindings = {
main-mod = "SUPER";
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"];
})
# 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"];
"$mainMod, escape" = ["exec, caelestia shell drawers toggle session"];
})
{
# 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"];
# Screenshots
"$mainMod, p" = ["exec, hyprpicker --autocopy --format=hex"];
"$mainMod, s" = ["exec, grim -g \"$(slurp)\""];
"$mainMod SHIFT, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
# 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"];
# 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, 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>";
"1" = "1";
"2" = "2";
"3" = "3";
"4" = "4";
"5" = "5";
"6" = "6";
"7" = "7";
"8" = "8";
"9" = "9";
"10" = "0";
};
special-ws-bindings = {
"ferdium" = "x";
"msty" = "z";
"btop" = "b";
"rmpc" = "r";
};
};
autostart = {
immediate = [
"kitty --hold fastfetch"
"zeal"
"nextcloud --background"
"protonvpn-app"
# "kdeconnect-indicator" # started by services.kdeconnect.indicator
];
delayed = [
"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"];
};
};
windowrules = [
# Fix jetbrains tooltip flicker
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, float 1"
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, no_initial_focus 1"
];
workspacerules = {
"1" = [];
"2" = ["Zotero" "neovide" "code-url-handler"];
"3" = ["obsidian"];
"4" = ["firefox" "Google-chrome" "chromium-browser" "org.qutebrowser.qutebrowser"];
"5" = ["steam"];
"6" = ["steam_app_(.+)"];
"7" = ["signal"];
"8" = ["tidal-hifi"];
"9" = ["discord"];
"10" = ["python3"];
};
floating = [
{class = "org.kde.polkit-kde-authentication-agent-1";}
{
class = "thunar";
title = "File Operation Progress";
}
{class = "ffplay";}
{class = "Unity";}
];
transparent-opacity = "0.75";
transparent = [
"kitty"
"Alacritty"
"discord"
"signal"
"vesktop"
"Spotify"
"tidal-hifi"
"obsidian"
"firefox"
"org.qutebrowser.qutebrowser"
"jetbrains-clion"
"jetbrains-idea"
"jetbrains-pycharm"
"jetbrains-rustrover"
"jetbrains-rider"
"jetbrains-webstorm"
"code-url-handler"
"neovide"
"steam"
"ferdium"
"Msty"
];
};
# hyprpanel.enable = !headless; # Enabled by hyprland module
kitty.enable = !headless;
lazygit.enable = true;
mpd.enable = !headless; mpd.enable = !headless;
neovim = {
enable = true;
alias = true;
neovide = !headless;
};
niri.enable = nixosConfig.programs.niri.enable; niri.enable = nixosConfig.programs.niri.enable;
nnn.enable = false; # Use yazi nnn.enable = false; # Use yazi
packages.enable = true;
qutebrowser.enable = !headless; qutebrowser.enable = !headless;
rmpc.enable = !headless; rmpc.enable = !headless;
rofi.enable = false;
terminal.enable = true; rofi = {
waybar.enable = !headless; enable = !headless;
};
waybar.enable = false; # Use hyprpanel
yazi.enable = true;
zathura.enable = !headless; zathura.enable = !headless;
}; };
@ -224,15 +430,6 @@ in
"start_app_minimized": true "start_app_minimized": true
} }
''; '';
# KeePassXC
".config/QtProject.conf".text = ''
[FileDialog]
history=@Invalid()
lastVisited=file:///home/christoph/Documents/KeePass
qtVersion=5.15.18
viewMode=Detail
'';
}) })
]; ];
@ -247,13 +444,364 @@ in
}; };
# Add stuff for your user as you see fit: # Add stuff for your user as you see fit:
# packages = with pkgs; []; # Configured in homemodules/packages # TODO: Make the headless installations smaller
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
# 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
# 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
vlc
audacity
ferdium
gparted
# feishin # electron :(
jellyfin-tui
# 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
])
];
}; };
# home.file.".options-doc".source = "${pkgs.modules-options-doc}"; # home.file.".options-doc".source = "${pkgs.modules-options-doc}";
# Packages with extra options managed by HomeManager natively # Packages with extra options managed by HomeManager natively
programs = { 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 = { imv = {
enable = !headless; enable = !headless;
settings = { settings = {
@ -281,6 +829,11 @@ in
}; };
}; };
navi = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
nix-index = { nix-index = {
enable = true; enable = true;
enableFishIntegration = config.homemodules.fish.enable; enableFishIntegration = config.homemodules.fish.enable;
@ -310,6 +863,73 @@ in
# pointer # 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";
};
};
};
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 = { services = {
@ -360,18 +980,14 @@ in
# Force Wayland by default # Force Wayland by default
# Context.sockets = ["wayland" "!x11" "!fallback-x11"]; # NOTE: Makes discord + steam crash # Context.sockets = ["wayland" "!x11" "!fallback-x11"]; # NOTE: Makes discord + steam crash
Context.filesystems = [ Context.filesystems = ["/nix/store:ro"];
"/nix/store:ro"
"${config.home.homeDirectory}/.themes:ro"
"${config.home.homeDirectory}/.config/gtk-4.0:ro"
];
Environment = { Environment = {
# Fix un-themed cursor in some Wayland apps # Fix un-themed cursor in some Wayland apps
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons"; XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
# Force correct theme for some GTK apps # Force correct theme for some GTK apps
GTK_THEME = config.gtk.theme.name; GTK_THEME = "Adwaita:light";
}; };
}; };

View File

@ -3,11 +3,9 @@
pkgs, pkgs,
nixosConfig, nixosConfig,
config, config,
hostname,
lib, lib,
mylib, mylib,
username, username,
inputs,
... ...
}: { }: {
config = { config = {
@ -18,213 +16,52 @@
# because it forces en-US keyboard layout. # because it forces en-US keyboard layout.
fcitx.enable = true; fcitx.enable = true;
waybar.monitors = ["DP-1" "DP-2"]; hyprland = {
vscode.enable = true; keyboard = {
zed.enable = true; layout = "us";
variant = "altgr-intl";
option = "nodeadkeys";
}; };
programs = { monitors = {
claude-code = { "DP-1" = {
enable = true; width = 3440;
enableMcpIntegration = true; height = 1440;
rate = 165;
x = 1920;
y = 0;
scale = 1;
}; };
mcp = { "DP-2" = {
enable = true; width = 1920;
servers = { height = 1080;
nixos = { rate = 60;
command = "uvx"; x = 0;
args = ["mcp-nixos"]; y = 0;
}; scale = 1;
svelte = {
# claude mcp add -t stdio -s [scope] svelte -- npx -y @sveltejs/mcp
command = "npx";
args = ["-y" "@sveltejs/mcp"];
type = "stdio";
};
shadcn = {
# npx shadcn@latest mcp init --client claude
command = "npx";
args = ["-y" "shadcn@latest" "mcp"];
};
}; };
}; };
opencode = { workspaces = {
enable = true; "DP-1" = [1 2 3 4 5 6 7 8 9];
enableMcpIntegration = true; "DP-2" = [10];
extraPackages = with pkgs; [ };
# opencode-claude-auth # Installed using npm
autostart = {
delayed = [
"fcitx5"
]; ];
};
# Writes opencode.json floating = [
settings = { {
attachment = { class = "fcitx";
image = { }
auto_resize = true;
max_width = 2000;
max_height = 2000;
max_base64_bytes = 5242880;
};
};
autoupdate = false;
compaction = {
auto = true;
prune = true;
reserved = 10000;
};
default_agent = "plan";
enabled_providers = [
"opencode"
"opencode-go"
"anthropic"
]; ];
formatter = {
nixfmt = {
disabled = true;
};
alejandra = {
command = ["alejandra" "$FILE"];
extensions = [".nix"];
};
perltidy = {
command = ["perltidy" "$FILE"];
extensions = [".pl"];
};
};
lsp = {
nixd = {
command = ["nixd"];
extensions = [".nix"];
initialization = {
preferences = {
nixd = {
nixpkgs = {expr = "import <nixpkgs> {}";};
options = {
nixos = {expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.${hostname}.options";};
home-manager = {expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.\"${hostname}\".options.home-manager.users.type.getSubOptions []";};
};
diagnostic = {
suppress = ["sema-escaping-with" "var-bind-to-this" "escaping-this-with"];
};
};
};
};
};
perlnavigator = {
command = ["perlnavigator"];
extensions = [".pl"];
initialization = {
preferences = {};
};
};
# perlpls = {
# command = ["pls"];
# extensions = [".pl"];
# initialization = {
# preferences = {
# perl = {
# perlcritic = {enabled = false;};
# syntax = {enabled = true;};
# };
# };
# };
# };
r-language-server = {
command = ["R" "--no-echo" "-e" "languageserver::run()"];
extensions = [".r" ".rmd" ".quarto"];
};
};
permission = {
"*" = "ask";
"bash" = {
"*" = "ask";
"ls *" = "allow";
"find *" = "ask"; # Don't want find -exec
"file *" = "allow";
"wc *" = "allow";
"grep *" = "allow";
"rg *" = "allow";
"test *" = "allow";
"echo *" = "allow";
"which *" = "allow";
"pwd *" = "allow";
"dirname *" = "allow";
"basename *" = "allow";
"readlink *" = "allow";
"cat *.env" = "deny";
"cat *.env.*" = "deny";
"cat *.env.example" = "allow";
"printenv *" = "deny";
"env *" = "deny";
"nix eval *" = "allow";
"nix flake metadata *" = "allow";
"nix flake show *" = "allow";
"nix path-info *" = "allow";
"nix why-depends *" = "allow";
"nix derivation show *" = "allow";
"nix store ping *" = "allow";
"nix stire diff-closures *" = "allow";
"git status *" = "allow";
"git log *" = "allow";
"git diff *" = "allow";
};
"external_directory" = {
"/nix/store/**" = "allow";
"/tmp" = "allow";
"/tmp/*" = "allow";
};
"read" = {
"*" = "allow";
"*.env" = "deny";
"*.env.*" = "deny";
"*.env.example" = "allow";
};
"grep" = "allow";
"glob" = "allow";
"lsp" = "allow";
"skill" = "allow";
"task" = "ask";
"todowrite" = "allow";
"webfetch" = "allow";
"websearch" = "allow";
"question" = "allow";
};
plugin = [
"opencode-claude-auth@latest" # https://github.com/griffinmartin/opencode-claude-auth
"@tarquinen/opencode-dcp@latest" # better compacting
# "@slkiser/opencode-quota"
];
share = "disabled";
shell = "fish";
snapshot = false;
watcher = {
ignore = ["node_modules/**" "dist/**" ".git/**"];
};
}; };
# Writes tui.json waybar.monitor = "DP-1";
tui = {
theme = "system";
diff_style = "auto";
mouse = true;
attention = {
enabled = true;
notifications = true;
sound = true;
volume = "0.3";
};
};
agents = {};
commands = {};
context = '''';
skills = {};
tools = {};
};
}; };
home = let home = let
@ -276,15 +113,14 @@
# Intel FPGA design software # Intel FPGA design software
# quartus-prime-lite # quartus-prime-lite
jetbrains.clion # jetbrains.clion
# jetbrains.rust-rover # jetbrains.rust-rover
# jetbrains.pycharm-professional # jetbrains.pycharm-professional
# jetbrains.idea-ultimate # jetbrains.idea-ultimate
# jetbrains.webstorm # jetbrains.webstorm
# jetbrains.rider # jetbrains.rider
# ghidra # launch with _JAVA_AWT_WM_NONREPARENTING=1 (use programs.ghidra) zed-editor
# zed-editor # Using module vscode
# vscode # Using module
# Unity Stuff # Unity Stuff
# unityhub # unityhub
@ -293,12 +129,10 @@
# mono # mono
# steam-run-free # nix-alien doesn't seem to run unity apps, this does... # 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;}) (blender.override {cudaSupport = true;})
godot_4 godot_4
(obs-studio.override {cudaSupport = true;}) (obs-studio.override {cudaSupport = true;})
kdePackages.kdenlive kdePackages.kdenlive
# davinci-resolve
krita krita
makemkv makemkv
lrcget lrcget
@ -307,22 +141,16 @@
jellyfin-desktop jellyfin-desktop
jellyfin-mpv-shim jellyfin-mpv-shim
# tidal-hifi # tidal-hifi
# tidal-dl-ng # TODO: Borked tidal-dl-ng # TODO: Borked
# spotdl
tiddl
picard picard
handbrake handbrake
teamspeak6-client teamspeak6-client
# virt-manager # use system program option
virt-viewer
gnome-boxes # doesn't list VMs imported using virsh
steam-devices-udev-rules steam-devices-udev-rules
]; ];
file = lib.mkMerge [ file = lib.mkMerge [
{ # {
# ".local/share/applications/jetbrains-rider.desktop".source = let # ".local/share/applications/jetbrains-rider.desktop".source = let
# desktopFile = pkgs.makeDesktopItem { # desktopFile = pkgs.makeDesktopItem {
# name = "jetbrains-rider"; # name = "jetbrains-rider";
@ -334,10 +162,10 @@
# extraConfig.NoDisplay = "true"; # extraConfig.NoDisplay = "true";
# }; # };
# in "${desktopFile}/share/applications/jetbrains-rider.desktop"; # in "${desktopFile}/share/applications/jetbrains-rider.desktop";
#
".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source = # ".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source =
../../../config/mangohud/MangoHud.conf; # ../../../config/mangohud/MangoHud.conf;
} # }
(lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) { (lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) {
".MakeMKV/settings.conf".source = ".MakeMKV/settings.conf".source =
config.lib.file.mkOutOfStoreSymlink config.lib.file.mkOutOfStoreSymlink
@ -351,21 +179,46 @@
}; };
services = { services = {
ollama = {
enable = false;
acceleration = "cuda";
# home = "/var/lib/ollama";
# loadModels = [
# "deepseek-r1:8b" # Default
# "deepseek-r1:14b"
# ];
# https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server
environmentVariables = {
# Flash Attention is a feature of most modern models
# that can significantly reduce memory usage as the context size grows.
OLLAMA_FLASH_ATTENTION = "1";
# The K/V context cache can be quantized to significantly
# reduce memory usage when Flash Attention is enabled.
OLLAMA_KV_CACHE_TYPE = "q8_0"; # f16, q8_0 q4_0
# To improve Retrieval-Augmented Generation (RAG) performance, you should increase
# the context length to 8192+ tokens in your Ollama model settings.
OLLAMA_CONTEXT_LENGTH = "8192";
};
host = "127.0.0.1";
port = 11434;
};
flatpak = { flatpak = {
packages = [ packages = [
"com.valvesoftware.Steam" # "com.valvesoftware.Steam"
"com.valvesoftware.Steam.Utility.steamtinkerlaunch" # "com.valvesoftware.Steam.Utility.steamtinkerlaunch"
"org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
"io.github.Foldex.AdwSteamGtk"
"com.vysp3r.ProtonPlus"
# "net.davidotek.pupgui2" # "net.davidotek.pupgui2"
# "org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
# "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
"org.prismlauncher.PrismLauncher" "org.prismlauncher.PrismLauncher"
"com.usebottles.bottles" "com.usebottles.bottles"
"io.github.lawstorant.boxflat" # "io.github.lawstorant.boxflat"
"org.onlyoffice.desktopeditors"
# "com.unity.UnityHub" # "com.unity.UnityHub"
]; ];
@ -395,13 +248,6 @@
]; ];
}; };
"com.vysp3r.ProtonPlus".Context = {
filesystems = [
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
"${config.home.homeDirectory}/Games"
];
};
"com.usebottles.bottles".Context = { "com.usebottles.bottles".Context = {
filesystems = [ filesystems = [
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam" "${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"

View File

@ -1,39 +1,35 @@
# Here goes the stuff that will only be enabled on the laptop # Here goes the stuff that will only be enabled on the laptop
{pkgs, ...}: { {...}: {
config = { config = {
homemodules = { homemodules = {
# TODO: Niri config (needs to modularize niri module) hyprland = {
keyboard = {
layout = "us";
variant = "altgr-intl";
option = "nodeadkeys";
};
# hyprland = { monitors = {
# keyboard = { "eDP-1" = {
# layout = "us"; width = 1920;
# variant = "altgr-intl"; height = 1080;
# option = "nodeadkeys"; rate = 60;
# }; x = 0;
# y = 0;
# monitors = { scale = 1;
# "eDP-1" = { };
# width = 1920; };
# height = 1080;
# rate = 60;
# x = 0;
# y = 0;
# scale = 1;
# };
# };
#
# workspaces = {
# "eDP-1" = [1 2 3 4 5 6 7 8 9];
# };
# };
waybar.monitors = ["eDP-1"]; workspaces = {
"eDP-1" = [1 2 3 4 5 6 7 8 9];
};
};
waybar.monitor = "eDP-1";
}; };
home = { home = {
packages = with pkgs; [ # packages = with pkgs; [];
brightnessctl
];
# Do not change. # Do not change.
# This marks the version when NixOS was installed for backwards-compatibility. # This marks the version when NixOS was installed for backwards-compatibility.

View File

@ -1,44 +0,0 @@
{
keyboard = {
layout = "us";
variant = "altgr-intl";
option = "nodeadkeys";
};
monitors = {
"DP-1" = {
width = 3440;
height = 1440;
rate = 165;
x = 1920;
y = 0;
scale = 1;
};
"DP-2" = {
width = 1920;
height = 1080;
rate = 60;
x = 0;
y = 0;
scale = 1;
};
};
workspaces = {
"DP-1" = [1 2 3 4 5 6 7 8 9];
"DP-2" = [10];
};
autostart = {
delayed = [
"fcitx5"
];
};
floating = [
{
class = "fcitx";
}
];
}

View File

@ -1,186 +0,0 @@
{
nixosConfig,
config,
lib,
pkgs,
}: {
enable = nixosConfig.programs.hyprland.enable;
dunst.enable = !config.homemodules.hyprpanel.enable; # Disable for hyprpanel
bars.enable = false;
dynamicCursor.enable = false;
trails.enable = true;
hyprspace.enable = false; # Always broken
hyprpanel.enable = true;
caelestia.enable = false;
keybindings = {
main-mod = "SUPER";
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"];
})
# 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"];
"$mainMod, escape" = ["exec, caelestia shell drawers toggle session"];
})
{
# 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"];
# Screenshots
"$mainMod, p" = ["exec, hyprpicker --autocopy --format=hex"];
"$mainMod, s" = ["exec, grim -g \"$(slurp)\""];
"$mainMod SHIFT, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
# 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"];
# 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, 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>";
"1" = "1";
"2" = "2";
"3" = "3";
"4" = "4";
"5" = "5";
"6" = "6";
"7" = "7";
"8" = "8";
"9" = "9";
"10" = "0";
};
special-ws-bindings = {
"ferdium" = "x";
"msty" = "z";
"btop" = "b";
"rmpc" = "r";
};
};
autostart = {
immediate = [
"kitty --hold fastfetch"
"zeal"
"nextcloud --background"
"protonvpn-app"
# "kdeconnect-indicator" # started by services.kdeconnect.indicator
];
delayed = [
"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"];
};
};
windowrules = [
# Fix jetbrains tooltip flicker
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, float 1"
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, no_initial_focus 1"
];
workspacerules = {
"1" = [];
"2" = ["Zotero" "neovide" "code-url-handler"];
"3" = ["obsidian"];
"4" = ["firefox" "Google-chrome" "chromium-browser" "org.qutebrowser.qutebrowser"];
"5" = ["steam"];
"6" = ["steam_app_(.+)"];
"7" = ["signal"];
"8" = ["tidal-hifi"];
"9" = ["discord"];
"10" = ["python3"];
};
floating = [
{class = "org.kde.polkit-kde-authentication-agent-1";}
{
class = "thunar";
title = "File Operation Progress";
}
{class = "ffplay";}
{class = "Unity";}
];
transparent-opacity = "0.75";
transparent = [
"kitty"
"Alacritty"
"discord"
"signal"
"vesktop"
"Spotify"
"tidal-hifi"
"obsidian"
"firefox"
"org.qutebrowser.qutebrowser"
"jetbrains-clion"
"jetbrains-idea"
"jetbrains-pycharm"
"jetbrains-rustrover"
"jetbrains-rider"
"jetbrains-webstorm"
"code-url-handler"
"neovide"
"steam"
"ferdium"
"Msty"
];
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,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
];
}

View File

@ -3,51 +3,40 @@
# Obsolete modules are kept in "1_deprecated" for reference. # Obsolete modules are kept in "1_deprecated" for reference.
# My own HM modules # My own HM modules
./bat
./beets ./beets
./btop ./btop
./cava
./chromium ./chromium
./color ./color
./docs ./docs
./fastfetch
./fcitx ./fcitx
./firefox ./firefox
./fish ./fish
./git ./git
./jellyfin-tui ./hyprland
./hyprpanel
./kitty ./kitty
./lazygit ./lazygit
./mpd ./mpd
./neovim ./neovim
./niri ./niri
./nnn ./nnn
./packages
./paths ./paths
./qutebrowser ./qutebrowser
./rmpc ./rmpc
./rofi ./rofi
./waybar ./waybar
./ssh
./terminal
./tmux
./vscode
./yazi ./yazi
./zathura ./zathura
./zed
# HM modules imported from the flake inputs # HM modules imported from the flake inputs
inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.nixvim.homeModules.nixvim inputs.nixvim.homeModules.nixvim
inputs.textfox.homeManagerModules.default inputs.textfox.homeManagerModules.default
inputs.walker.homeManagerModules.default
# inputs.direnv-instant.homeModules.direnv-instant
# inputs.niri.homeModules.niri # Imported by system module # inputs.niri.homeModules.niri # Imported by system module
# inputs.noctalia.homeModules.default inputs.noctalia.homeModules.default
# inputs.caelestia.homeManagerModules.default inputs.caelestia.homeManagerModules.default
# inputs.dank-material-shell.homeModules.dank-material-shell inputs.dank-material-shell.homeModules.dank-material-shell
# inputs.dank-material-shell.homeModules.niri 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) # NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse)
# inputs.impermanence.homeManagerModules.impermanence # inputs.impermanence.homeManagerModules.impermanence

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@ in [
(mkBm "Package Search" "https://search.nixos.org/packages") (mkBm "Package Search" "https://search.nixos.org/packages")
(mkBm "Option Search" "https://search.nixos.org/options?") (mkBm "Option Search" "https://search.nixos.org/options?")
(mkBm "Function Search" "https://noogle.dev/") (mkBm "Function Search" "https://noogle.dev/")
(mkBm "HM Search" "https://home-manager-options.extranix.com/") (mkBm "HM Search" "https://mipmip.github.io/home-manager-option-search/")
(mkBm "NUR Search" "https://nur.nix-community.org/") (mkBm "NUR Search" "https://nur.nix-community.org/")
(mkBm "Nixpkgs Version Search" "https://lazamar.co.uk/nix-versions/") (mkBm "Nixpkgs Version Search" "https://lazamar.co.uk/nix-versions/")
(mkBm "Nixpkgs PR Tracker" "https://nixpk.gs/pr-tracker.html") (mkBm "Nixpkgs PR Tracker" "https://nixpk.gs/pr-tracker.html")
@ -69,7 +69,6 @@ in [
(mkBm "Rust" "https://doc.rust-lang.org/stable/book/ch03-00-common-programming-concepts.html") (mkBm "Rust" "https://doc.rust-lang.org/stable/book/ch03-00-common-programming-concepts.html")
(mkBm "RustOS" "https://os.phil-opp.com/") (mkBm "RustOS" "https://os.phil-opp.com/")
(mkBm "Interpreters" "https://craftinginterpreters.com/contents.html") (mkBm "Interpreters" "https://craftinginterpreters.com/contents.html")
(mkBm "Godbolt" "https://godbolt.org")
]; ];
} }
{ {
@ -103,9 +102,9 @@ in [
(mkBm "Heise" "https://www.heise.de/") (mkBm "Heise" "https://www.heise.de/")
(mkBm "HN" "https://news.ycombinator.com/news") (mkBm "HN" "https://news.ycombinator.com/news")
(mkBm "Reddit" "https://www.reddit.com/user/FightingMushroom/saved/") (mkBm "Reddit" "https://www.reddit.com/user/FightingMushroom/saved/")
# (mkBm "F10" "https://f10.local.chriphost.de/race/Everyone") (mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
(mkBm "F12" "https://f12.local.chriphost.gay/racepicks") (mkBm "F11" "https://f11.local.chriphost.de/racepicks")
(mkBm "F12PB" "https://f12pb.local.chriphost.de/_/") (mkBm "F11PB" "https://f11pb.local.chriphost.de/_/#/collections?collection=pbc_1736455494&filter=&sort=-%40rowid")
(mkBm "ISBNDB" "https://isbndb.com/") (mkBm "ISBNDB" "https://isbndb.com/")
(mkBm "Music" "https://bandcamp.com/chriphost") (mkBm "Music" "https://bandcamp.com/chriphost")
(mkBm "Albums" "https://www.albumoftheyear.org/user/chriphost/list/307966/2025/") (mkBm "Albums" "https://www.albumoftheyear.org/user/chriphost/list/307966/2025/")

View File

@ -13,7 +13,7 @@ in {
config = lib.mkIf firefox.enable { config = lib.mkIf firefox.enable {
textfox = { textfox = {
enable = firefox.textfox; enable = firefox.textfox;
# useLegacyExtensions = false; useLegacyExtensions = false;
profiles = ["default"]; profiles = ["default"];
config = { config = {
@ -54,9 +54,7 @@ in {
}; };
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [vdhcoapp];
# vdhcoapp # No longer required since VDH >= 10
];
home.sessionVariables = lib.mkMerge [ home.sessionVariables = lib.mkMerge [
{ {
@ -86,9 +84,6 @@ in {
programs.firefox = { programs.firefox = {
enable = true; 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 # firefox-unwrapped is the pure firefox browser, wrapFirefox adds configuration ontop
package = pkgs.wrapFirefox pkgs.firefox-unwrapped { package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
# About policies: https://github.com/mozilla/policy-templates#enterprisepoliciesenabled # About policies: https://github.com/mozilla/policy-templates#enterprisepoliciesenabled
@ -166,19 +161,12 @@ in {
"google" "google"
]; ];
engines = let engines = {
mkMan = section: page: p: {
name = "Man Pages - ${section}";
urls = [{template = "https://man7.org/linux/man-pages/man${page}/{searchTerms}.${page}${p}.html";}];
iconMapObj."16" = "https://man7.org/favicon.ico";
definedAliases = ["@man${page}"];
};
in {
kagi = { kagi = {
name = "Kagi"; name = "Kagi";
urls = [{template = "https://kagi.com/search?q={searchTerms}";}]; urls = [{template = "https://kagi.com/search?q={searchTerms}";}];
iconMapObj."16" = "https://kagi.com/favicon.ico"; iconMapObj."16" = "https://kagi.com/favicon.ico";
definedAliases = ["@kg"]; definedAliases = ["@k"];
}; };
wiki = { wiki = {
@ -188,34 +176,13 @@ in {
definedAliases = ["@w"]; definedAliases = ["@w"];
}; };
searchix = { nixos-packages = {
name = "Searchix"; name = "NixOS Packages";
urls = [{template = "https://searchix.ovh/?query={searchTerms}";}]; urls = [{template = "https://searchix.ovh/?query={searchTerms}";}];
iconMapObj."16" = "https://nixos.org/favicon.ico"; iconMapObj."16" = "https://nixos.org/favicon.ico";
definedAliases = ["@ns"];
};
nixos-packages = {
name = "Nix Packages";
urls = [{template = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";}];
iconMapObj."16" = "https://nixos.org/favicon.ico";
definedAliases = ["@np"]; definedAliases = ["@np"];
}; };
nixos-options = {
name = "NixOS Options";
urls = [{template = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";}];
iconMapObj."16" = "https://nixos.org/favicon.ico";
definedAliases = ["@no"];
};
home-manager-options = {
name = "Home Manager Options";
urls = [{template = "https://home-manager-options.extranix.com/?query={searchTerms}";}];
iconMapObj."16" = "https://nixos.org/favicon.ico";
definedAliases = ["@hm"];
};
nixos-functions = { nixos-functions = {
name = "NixOS Functions"; name = "NixOS Functions";
urls = [{template = "https://noogle.dev/q?term={searchTerms}";}]; urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
@ -223,13 +190,6 @@ in {
definedAliases = ["@nf"]; definedAliases = ["@nf"];
}; };
nixpkgs-issues = {
name = "Nixpkgs Issues";
urls = [{template = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue%20{searchTerms}";}];
iconMapObj."16" = "https://github.com/favicon.ico";
definedAliases = ["@ni"];
};
nixos-wiki = { nixos-wiki = {
name = "NixOS Wiki"; name = "NixOS Wiki";
urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}]; urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}];
@ -244,6 +204,13 @@ in {
definedAliases = ["@aw"]; definedAliases = ["@aw"];
}; };
nixpkgs-issues = {
name = "Nixpkgs Issues";
urls = [{template = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue%20{searchTerms}";}];
iconMapObj."16" = "https://github.com/favicon.ico";
definedAliases = ["@i"];
};
github = { github = {
name = "GitHub"; name = "GitHub";
urls = [{template = "https://github.com/search?q={searchTerms}&type=repositories";}]; urls = [{template = "https://github.com/search?q={searchTerms}&type=repositories";}];
@ -251,32 +218,6 @@ in {
definedAliases = ["@gh"]; definedAliases = ["@gh"];
}; };
man0 = mkMan "POSIX" "0" "p";
man1 = mkMan "Commands" "1" "";
man2 = mkMan "Syscalls" "2" "";
man3 = mkMan "C Functions" "3" "";
stackoverflow = {
name = "Stack Overflow";
urls = [{template = "https://stackoverflow.com/search?q={searchTerms}";}];
iconMapObj."16" = "https://stackoverflow.com/favicon.ico";
definedAliases = ["@so"];
};
x86 = {
name = "x86 Ref";
urls = [{template = "https://www.felixcloutier.com/x86/{searchTerms}";}];
iconMapObj."16" = "https://www.felixcloutier.com/favicon.ico";
definedAliases = ["@x86"];
};
youtube = {
name = "YouTube";
urls = [{template = "https://www.youtube.com/results?search_query={searchTerms}";}];
iconMapObj."16" = "https://www.youtube.com/favicon.ico";
definedAliases = ["@yt"];
};
google.metaData.alias = "@g"; google.metaData.alias = "@g";
# Hide bullshit # Hide bullshit

View File

@ -42,94 +42,10 @@ in {
fish_pager_color_description ${color.hex.overlay0} fish_pager_color_description ${color.hex.overlay0}
''; '';
programs.fish = let programs.fish = {
# Only add " | bat" if bat is installed enable = true;
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 [
# Darwin exclusive config
(lib.mkIf pkgs.stdenv.isDarwin {
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
set --global --export HOMEBREW_REPOSITORY "/opt/homebrew"
fish_add_path --global --move --path "/opt/homebrew/bin" "/opt/homebrew/sbin"
if test -n "$MANPATH[1]"; set --global --export MANPATH ''' $MANPATH; end;
if not contains "/opt/homebrew/share/info" $INFOPATH; set --global --export INFOPATH "/opt/homebrew/share/info" $INFOPATH; end;
'';
shellAbbrs = lib.mkMerge [
{
rebuild = "sudo darwin-rebuild switch --flake .#darwinix";
}
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'darwin,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
];
})
# Linux exclusive config
(lib.mkIf pkgs.stdenv.isLinux {
generateCompletions = nixosConfig.programs.fish.generateCompletions; 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 [ functions = lib.mergeAttrsList [
(lib.optionalAttrs config.homemodules.nnn.enable { (lib.optionalAttrs config.homemodules.nnn.enable {
nnncd = { nnncd = {
@ -171,74 +87,59 @@ in {
}) })
]; ];
shellAbbrs = lib.mkMerge [ 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. # Abbrs that are always available are defined here.
{ {
# Tools # Shell basics
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"; c = "clear";
q = "exit"; 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 # Fish
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
abbrs = batifyWithArgs "abbr" "-l fish"; abbrs = batifyWithArgs "abbr" "-l fish";
# Nix # 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"; nd = "nix develop";
nb = "nix build -L"; nb = "nix build -L";
ns = "nix shell nixpkgs#"; ns = "nix shell nixpkgs#";
nr = "nix run";
nps = "nps -e";
} }
# Abbrs only available if package is installed # Abbrs only available if package is installed
(abbrify pkgs.rsync rec {
rsync = "rsync -ahv --inplace --partial --info=progress2";
copy = rsync;
})
(abbrify pkgs.duf { (abbrify pkgs.duf {
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120"; disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*'";
alldisks = "duf"; alldisks = "duf";
}) })
(abbrify pkgs.ripgrep {
rg = "rg --trim --pretty";
# grep = rg;
})
(abbrify pkgs.eza { (abbrify pkgs.eza {
ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions"; 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"; lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l";
@ -269,11 +170,30 @@ in {
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";}) (lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
(abbrify pkgs.lazygit {lg = "lazygit";}) (abbrify pkgs.lazygit {lg = "lazygit";})
];
plugins = []; (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 = { programs.starship = {
enable = true; enable = true;

View File

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

View File

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

View File

@ -3,7 +3,6 @@
config, config,
lib, lib,
mylib, mylib,
pkgs,
... ...
}: let }: let
inherit (config.homemodules) kitty color; inherit (config.homemodules) kitty color;
@ -28,21 +27,15 @@ in {
"kitty_mod+l" = "next_layout"; "kitty_mod+l" = "next_layout";
}; };
settings = lib.mkMerge [ settings = {
# Linux config
(lib.mkIf pkgs.stdenv.isLinux {
allow_remote_control = true; # For nnn file preview or nvim scrollback
listen_on = lib.mkDefault "unix:@mykitty"; # This conflicts with direnv-instant
})
# Common config
{
editor = config.home.sessionVariables.EDITOR; editor = config.home.sessionVariables.EDITOR;
scrollback_lines = 10000; scrollback_lines = 10000;
window_padding_width = 10; # Looks stupid with editors if bg doesn't match window_padding_width = 10; # Looks stupid with editors if bg doesn't match
# hide_window_decorations = "yes"; # hide_window_decorations = "yes";
enabled_layouts = "grid,vertical,horizontal"; 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_min_tabs = 2; # Don't show a single tab
tab_bar_edge = "bottom"; tab_bar_edge = "bottom";
@ -123,8 +116,7 @@ in {
# white # white
color7 = color.hexS.surface2; color7 = color.hexS.surface2;
color15 = color.hexS.surface1; color15 = color.hexS.surface1;
} };
];
}; };
}; };
} }

View File

@ -30,62 +30,50 @@ in {
(lib.optionals (!headless) [ (lib.optionals (!headless) [
# Language servers # Language servers
autotools-language-server
basedpyright
clang-tools clang-tools
clojure-lsp clojure-lsp
cmake-language-server cmake-language-server
haskell-language-server haskell-language-server
jdt-language-server jdt-language-server
just-lsp
ltex-ls # TODO: Only enable on-demand ltex-ls # TODO: Only enable on-demand
lua-language-server lua-language-server
nil # nil
# perl5Packages.PLS basedpyright
perlnavigator
pyrefly pyrefly
# rPackages.languageserver ty
rust-analyzer rust-analyzer
svelte-language-server svelte-language-server
tailwindcss-language-server tailwindcss-language-server
tex-fmt tex-fmt
texlab texlab
tinymist tinymist
ty
typescript typescript
vscode-langservers-extracted # includes nodejs vscode-langservers-extracted # includes nodejs
autotools-language-server
# Linters # Linters
checkstyle # java checkstyle # java
clippy # rust clippy # rust
clj-kondo # clojure clj-kondo # clojure
eslint_d # javascript eslint_d # javascript
# python313Packages.ruff python313Packages.ruff
# python313Packages.flake8 python313Packages.flake8
# python313Packages.pylint python313Packages.pylint
lua54Packages.luacheck lua54Packages.luacheck
vale # text vale # text
# statix # nix (doesn't recognize pipe operator) # statix # nix (doesn't recognize pipe operator)
# Formatters # Formatters
air-formatter
cljfmt cljfmt
python313Packages.black
google-java-format google-java-format
html-tidy html-tidy
jq # json 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 # prettierd # Use prettier instead because of plugins
# python313Packages.black # nodePackages_latest.prettier # Use local install as plugins change per project
rustfmt rustfmt
stylua stylua
tombi
typstyle typstyle
nodejs_latest
uv
]) ])
[ [
@ -95,52 +83,6 @@ in {
lua54Packages.jsregexp # For tree-sitter lua54Packages.jsregexp # For tree-sitter
# nodejs_latest # nodejs_latest
# TODO: Create a perl module where I can add packages to, so I don't end up with multiple perl installations
# TODO: The same is required for python and R (below)
(perl.withPackages (p:
with p; [
PLS
PerlCritic
PerlTidy
NetOpenSSH
DateTime
DBI
DBDMariaDB
CursesUI
TextCSV_XS
]))
(python314.withPackages (p:
with p; [
# Linters
ruff
flake8
pylint
# Formatters
black
numpy
matplotlib
requests
]))
(rWrapper.override {
packages = with rPackages; [
languageserver
ggplot2
ggalluvial
plotly
shiny
readr
tibble
svglite
dplyr
tidyr
scales
];
})
nixd nixd
alejandra # nix alejandra # nix
] ]
@ -148,8 +90,6 @@ in {
}; };
programs.nixvim = { programs.nixvim = {
# nixpkgs.pkgs = pkgs;
defaultEditor = true; defaultEditor = true;
enable = true; enable = true;
enableMan = false; # Nixvim man pages enableMan = false; # Nixvim man pages
@ -172,7 +112,7 @@ in {
performance.byteCompileLua = { performance.byteCompileLua = {
enable = true; enable = true;
configs = true; configs = true;
initLua = true; # When debugging init.lua turn this off initLua = false; # When debugging init.lua turn this off
nvimRuntime = true; nvimRuntime = true;
plugins = true; plugins = true;
}; };
@ -182,7 +122,7 @@ in {
maplocalleader = ","; maplocalleader = ",";
}; };
opts = import ./vim_opts.nix {inherit config lib mylib;}; opts = import ./vim_opts.nix {inherit lib mylib;};
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua; extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
extraConfigLua = builtins.readFile ./extraConfigLua.lua; extraConfigLua = builtins.readFile ./extraConfigLua.lua;
@ -308,15 +248,6 @@ in {
require("${name}").setup(opts) require("${name}").setup(opts)
end 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 { in {
enable = true; enable = true;
@ -420,7 +351,7 @@ in {
clangd-extensions = rec { clangd-extensions = rec {
name = "clangd_extensions"; name = "clangd_extensions";
pkg = pkgs.vimPlugins.clangd_extensions-nvim; pkg = pkgs.vimPlugins.clangd_extensions-nvim;
lazy = false; lazy = true;
config = mkDefaultConfig name; config = mkDefaultConfig name;
opts = { opts = {
inlay_hints = { inlay_hints = {
@ -582,19 +513,14 @@ in {
html = ["prettierd" "prettier"]; html = ["prettierd" "prettier"];
java = ["google-java-format"]; java = ["google-java-format"];
javascript = ["prettierd" "prettier"]; javascript = ["prettierd" "prettier"];
just = ["just"];
latex = ["tex-fmt"]; latex = ["tex-fmt"];
lua = ["stylua"]; lua = ["stylua"];
make = ["bake"];
markdown = ["prettierd" "prettier"]; markdown = ["prettierd" "prettier"];
nix = ["alejandra"]; nix = ["alejandra"];
perl = ["perltidy"];
python = ["black"]; python = ["black"];
qml = ["qmlformat"]; qml = ["qmlformat"];
r = ["air"];
rust = ["rustfmt"]; rust = ["rustfmt"];
svelte = ["prettierd" "prettier"]; svelte = ["prettierd" "prettier"];
toml = ["tombi"];
typescript = ["prettierd" "prettier"]; typescript = ["prettierd" "prettier"];
typst = ["typstyle"]; typst = ["typstyle"];
}; };
@ -619,21 +545,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 = { direnv = {
name = "direnv"; name = "direnv";
pkg = pkgs.vimPlugins.direnv-vim; pkg = pkgs.vimPlugins.direnv-vim;
@ -927,8 +838,9 @@ in {
dependencies = [_lazydev]; dependencies = [_lazydev];
config = let config = let
servers = mylib.generators.toLuaObject [ servers = mylib.generators.toLuaObject [
{name = "autotools-language-server";}
{name = "basedpyright";} {name = "basedpyright";}
# {name = "pyrefly";} # TODO: Config
# {name = "ty";} # TODO: Config
{ {
name = "clangd"; name = "clangd";
extraOptions = { extraOptions = {
@ -943,15 +855,12 @@ in {
cmd = [ cmd = [
"clangd" "clangd"
"--all-scopes-completion"
"--background-index" "--background-index"
"--clang-tidy" "--clang-tidy"
"--completion-style=detailed"
"--fallback-style=llvm"
"--function-arg-placeholders=0"
"--header-insertion=iwyu" "--header-insertion=iwyu"
"--header-insertion-decorators" "--completion-style=detailed"
"--pch-storage=memory" "--function-arg-placeholders"
"--fallback-style=llvm"
]; ];
capabilities = { capabilities = {
@ -969,7 +878,6 @@ in {
{name = "cmake";} {name = "cmake";}
{name = "cssls";} {name = "cssls";}
{name = "html";} # vscode-langservers-extracted {name = "html";} # vscode-langservers-extracted
{name = "just";}
{name = "lua_ls";} {name = "lua_ls";}
{ {
name = "ltex"; name = "ltex";
@ -980,6 +888,7 @@ in {
}; };
}; };
} }
{name = "autotools-language-server";}
# {name = "nil_ls";} # {name = "nil_ls";}
{ {
name = "nixd"; name = "nixd";
@ -1021,8 +930,6 @@ in {
}; };
}; };
} }
{name = "perlpls";}
{name = "perlnavigator";}
{ {
name = "qmlls"; name = "qmlls";
extraOptions.cmd = [ extraOptions.cmd = [
@ -1030,8 +937,6 @@ in {
"-E" # Use QML_IMPORT_PATH env variable "-E" # Use QML_IMPORT_PATH env variable
]; ];
} }
# {name = "pyrefly";} # TODO: Config
{name = "r_language_server";}
{name = "svelte";} {name = "svelte";}
{name = "tailwindcss";} {name = "tailwindcss";}
{name = "texlab";} {name = "texlab";}
@ -1043,7 +948,6 @@ in {
semanticTokens = "disable"; semanticTokens = "disable";
}; };
} }
# {name = "ty";} # TODO: Config
# {name = "jdtls";} # Don't set up when using nvim-jdtls # {name = "jdtls";} # Don't set up when using nvim-jdtls
# {name = "rust_analyzer";} # Don't set up when using rustaceanvim # {name = "rust_analyzer";} # Don't set up when using rustaceanvim
@ -1121,7 +1025,6 @@ in {
pkg = pkgs.vimPlugins.lualine-nvim; pkg = pkgs.vimPlugins.lualine-nvim;
lazy = true; lazy = true;
event = ["BufReadPost" "BufNewFile"]; event = ["BufReadPost" "BufNewFile"];
# dependencies = [opencode];
config = '' config = ''
function(_, opts) function(_, opts)
local lualine = require("lualine") local lualine = require("lualine")
@ -1221,7 +1124,6 @@ in {
lualine_c.__raw = ''{}''; # Use __raw: Nixvim does nothing with "[]", so the default config would be used lualine_c.__raw = ''{}''; # Use __raw: Nixvim does nothing with "[]", so the default config would be used
lualine_x.__raw = ''{}''; lualine_x.__raw = ''{}'';
# lualine_x.__raw = ''{ { require("opencode").statusline, }, }'';
lualine_y = ["filetype" "encoding" "fileformat"]; lualine_y = ["filetype" "encoding" "fileformat"];
lualine_z.__raw = ''{ { "location", separator = {}, } }''; lualine_z.__raw = ''{ { "location", separator = {}, } }'';
}; };
@ -1387,19 +1289,19 @@ in {
}; };
_nui = { _nui = {
name = "nui.nvim"; name = "nui"; # For noice
pkg = pkgs.vimPlugins.nui-nvim; pkg = pkgs.vimPlugins.nui-nvim;
lazy = true; lazy = true;
}; };
noice = rec { noice = rec {
name = "noice.nvim"; name = "noice";
pkg = pkgs.vimPlugins.noice-nvim; pkg = pkgs.vimPlugins.noice-nvim;
lazy = false; lazy = false;
dependencies = [ dependencies = [
_nui _nui
]; ];
config = mkDefaultConfigFor "noice"; config = mkDefaultConfig name;
opts = { opts = {
presets = { presets = {
bottom_search = false; bottom_search = false;
@ -1461,32 +1363,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 { # obsidian = rec {
# name = "obsidian"; # name = "obsidian";
# pkg = pkgs.vimPlugins.obsidian-nvim; # pkg = pkgs.vimPlugins.obsidian-nvim;
@ -1670,7 +1546,7 @@ in {
icon = " "; icon = " ";
key = "s"; key = "s";
desc = "Restore Session"; desc = "Restore Session";
action = "<cmd>Persisted select<cr>"; action = "<cmd>lua require('persisted').select()<cr>";
} }
{ {
icon = "󰒲 "; icon = "󰒲 ";
@ -1711,7 +1587,7 @@ in {
gitbrowse.enabled = false; gitbrowse.enabled = false;
image.enabled = false; image.enabled = false;
indent.enabled = false; indent.enabled = false;
input.enabled = true; input.enabled = false;
keymap.enabled = false; keymap.enabled = false;
layout.enabled = false; layout.enabled = false;
lazygit.enabled = true; lazygit.enabled = true;
@ -1747,20 +1623,6 @@ in {
truncate = 80; 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; profiler.enabled = false;
@ -1831,7 +1693,7 @@ in {
}; };
_plenary = { _plenary = {
name = "plenary.nvim"; name = "plenary";
pkg = pkgs.vimPlugins.plenary-nvim; pkg = pkgs.vimPlugins.plenary-nvim;
lazy = true; lazy = true;
}; };
@ -2125,39 +1987,6 @@ in {
''; '';
}; };
visual-whitespace = rec {
name = "visual-whitespace";
pkg = pkgs.vimPlugins.visual-whitespace-nvim;
event = ["ModeChanged *:[vV\22]"];
config = mkDefaultConfig name;
opts = {
enabled = true;
highlight = {
link = "Visual";
default = true;
};
match_types = {
space = true;
tab = true;
nbsp = true;
lead = false;
trail = false;
};
list_chars = {
space = "·";
tab = "";
nbsp = "";
lead = "";
trail = "";
};
fileformat_chars = {
unix = "";
mac = "";
dos = "";
};
};
};
# wakatime = { # wakatime = {
# name = "wakatime"; # name = "wakatime";
# pkg = pkgs.vimPlugins.vim-wakatime; # pkg = pkgs.vimPlugins.vim-wakatime;
@ -2250,12 +2079,12 @@ in {
}; };
yazi = rec { yazi = rec {
name = "yazi.nvim"; name = "yazi";
pkg = pkgs.vimPlugins.yazi-nvim; pkg = pkgs.vimPlugins.yazi-nvim;
lazy = true; lazy = true;
event = ["VeryLazy"]; event = ["VeryLazy"];
dependencies = [_plenary]; dependencies = [_plenary];
config = mkDefaultConfigFor "yazi"; config = mkDefaultConfig name;
opts = { opts = {
open_for_directories = true; open_for_directories = true;
highlight_hovered_buffers_in_same_directory = false; highlight_hovered_buffers_in_same_directory = false;
@ -2287,7 +2116,6 @@ in {
# dap # Debug adapter protocol # TODO: # dap # Debug adapter protocol # TODO:
# dap-ui # Debugger UI # TODO: # dap-ui # Debugger UI # TODO:
devdocs
diffview # Git diff # TODO: Check the keybindings diffview # Git diff # TODO: Check the keybindings
direnv # Automatically load local environments direnv # Automatically load local environments
@ -2317,7 +2145,6 @@ in {
noice # Modern UI overhaul, e.g. floating cmdline noice # Modern UI overhaul, e.g. floating cmdline
# obsidian # Integration with Obsidian.md # 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: # overseer # Run tasks from within neovim (e.g. cargo) # TODO:
persisted # Session management persisted # Session management
@ -2341,7 +2168,6 @@ in {
typst-preview # Typst support typst-preview # Typst support
ufo # Code folding ufo # Code folding
vimtex # LaTeX support vimtex # LaTeX support
visual-whitespace
# wakatime # Time tracking # wakatime # Time tracking
web-devicons # Icons for many plugins web-devicons # Icons for many plugins
which-key # Live keybinding help which-key # Live keybinding help

View File

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

View File

@ -20,7 +20,7 @@ if g.neovide then
-- Neovide Fonts -- Neovide Fonts
-- o.guifont = "JetBrainsMono Nerd Font Mono:h12:Medium" -- o.guifont = "JetBrainsMono Nerd Font Mono:h12:Medium"
o.guifont = "MonoLisa Alt:h12:Medium" o.guifont = "MonoLisa Alt Script:h12:Medium"
else else
-- require("notify").notify("Not running in NeoVide") -- require("notify").notify("Not running in NeoVide")
end end

View File

@ -340,13 +340,6 @@ _: let
action = "<cmd>lua vim.g.toggle_rmpc()<cr>"; # Defined in extraConfigLua.lua action = "<cmd>lua vim.g.toggle_rmpc()<cr>"; # Defined in extraConfigLua.lua
options.desc = "Show Rmpc"; options.desc = "Show Rmpc";
} }
# TODO: Something with the environment activation doesn't work
# {
# mode = "n";
# key = "<leader>.";
# action = "<cmd>lua vim.g.toggle_failnix()<cr>"; # Defined in extraConfigLua.lua
# options.desc = "Show FailNix";
# }
{ {
mode = "n"; mode = "n";
key = "<leader>i"; key = "<leader>i";
@ -415,58 +408,6 @@ _: let
} }
]; ];
leader-opencode = [
{
mode = ["n" "v"];
key = "<leader>o";
action = "+opencode";
}
{
mode = ["n" "v"];
key = "<leader>oo";
action.__raw = ''function() require("opencode").ask("@this: ") end'';
options.desc = "Ask about @this";
}
{
mode = ["n" "v"];
key = "<leader>od";
action.__raw = ''function() require("opencode").prompt("Explain @diagnostics") end'';
options.desc = "Explain @diagnostics";
}
{
mode = ["n" "v"];
key = "<leader>oe";
action.__raw = ''function() require("opencode").prompt("Explain @this and its context") end'';
options.desc = "Explain @this";
}
{
mode = ["n" "v"];
key = "<leader>or";
action.__raw = ''function() require("opencode").prompt("Review @this for correctness and readability") end'';
options.desc = "Review @this";
}
{
mode = ["n" "v"];
key = "<leader>os";
action.__raw = ''function() require("opencode").select() end'';
options.desc = "Select Action";
}
{
mode = "n";
key = "<leader>oa";
action.__raw = ''function() return require("opencode").operator("@this ") .. "_" end'';
options.desc = "Append Line to Prompt";
options.expr = true;
}
{
mode = "v";
key = "<leader>oa";
action.__raw = ''function() return require("opencode").operator("@this ") end'';
options.desc = "Append Range to Prompt";
options.expr = true;
}
];
leader-file = [ leader-file = [
{ {
mode = "n"; mode = "n";
@ -564,48 +505,6 @@ _: let
action = "<cmd>lua Snacks.picker.help()<cr>"; action = "<cmd>lua Snacks.picker.help()<cr>";
options.desc = "Helptags Picker"; 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 = [ leader-quit = [
@ -637,19 +536,19 @@ _: let
{ {
mode = "n"; mode = "n";
key = "<leader>sl"; key = "<leader>sl";
action = "<cmd>Persisted select<cr>"; action = "<cmd>lua require('persisted').select()<cr>";
options.desc = "Restore Session"; options.desc = "Restore Session";
} }
{ {
mode = "n"; mode = "n";
key = "<leader>ss"; key = "<leader>ss";
action = "<cmd>Persisted save<cr>"; action = "<cmd>SessionSave<cr>";
options.desc = "Save Session"; options.desc = "Save Session";
} }
{ {
mode = "n"; mode = "n";
key = "<leader>sd"; key = "<leader>sd";
action = "<cmd>Persisted delete<cr>"; action = "<cmd>SessionDelete<cr>";
options.desc = "Delete Session"; options.desc = "Delete Session";
} }
]; ];
@ -935,19 +834,19 @@ _: let
{ {
mode = "n"; mode = "n";
key = "<leader>tt"; key = "<leader>tt";
action = "<cmd>Trouble diagnostics toggle focus=false win.position=bottom<cr>"; action = "<cmd>Trouble diagnostics toggle focus=false win.position=left<cr>";
options.desc = "Trouble Diagnostics"; options.desc = "Trouble Diagnostics";
} }
{ {
mode = "n"; mode = "n";
key = "<leader>tD"; key = "<leader>tD";
action = "<cmd>Trouble todo toggle focus=false win.position=bottom<cr>"; action = "<cmd>Trouble todo toggle focus=false win.position=left<cr>";
options.desc = "Toggle TODOs"; options.desc = "Toggle TODOs";
} }
{ {
mode = "n"; mode = "n";
key = "<leader>ts"; key = "<leader>ts";
action = "<cmd>Trouble symbols toggle focus=false win.position=bottom<cr>"; action = "<cmd>Trouble symbols toggle focus=false win.position=left<cr>";
options.desc = "Trouble Symbols"; options.desc = "Trouble Symbols";
} }
{ {
@ -1057,7 +956,6 @@ in
no-leader no-leader
leader leader
leader-opencode
leader-file leader-file
leader-help leader-help
leader-quit leader-quit

View File

@ -1,5 +1,5 @@
fork = true # Start neovide detached fork = true # Start neovide detached
frame = "full" # full, buttonless, none frame = "none" # full, buttonless, none
idle = true # Don't render frames without changes idle = true # Don't render frames without changes
title-hidden = true title-hidden = true
tabs = false tabs = false

View File

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

View File

@ -29,78 +29,10 @@
# This is generated from the DMS settings dialog. # This is generated from the DMS settings dialog.
# Run: nix eval --impure --expr 'builtins.fromJSON (builtins.readFile ~/.config/DankMaterialShell/settings.json)' # Run: nix eval --impure --expr 'builtins.fromJSON (builtins.readFile ~/.config/DankMaterialShell/settings.json)'
settings = { settings = {
acLockTimeout = 0; # Bar
acMonitorTimeout = 0;
acProfileName = "";
acSuspendBehavior = 0;
acSuspendTimeout = 0;
activeDisplayProfile = {};
animationSpeed = 1;
appDrawerSectionViewModes = {};
appIdSubstitutions = [
{
pattern = "Spotify";
replacement = "spotify";
type = "exact";
}
{
pattern = "beepertexts";
replacement = "beeper";
type = "exact";
}
{
pattern = "home assistant desktop";
replacement = "homeassistant-desktop";
type = "exact";
}
{
pattern = "com.transmissionbt.transmission";
replacement = "transmission-gtk";
type = "contains";
}
{
pattern = "^steam_app_(\\d+)$";
replacement = "steam_icon_$1";
type = "regex";
}
];
appLauncherGridColumns = 4;
appLauncherViewMode = "list";
appPickerViewMode = "grid";
appsDockActiveColorMode = "primary";
appsDockColorizeActive = false;
appsDockEnlargeOnHover = false;
appsDockEnlargePercentage = 125;
appsDockHideIndicators = false;
appsDockIconSizePercentage = 100;
audioInputDevicePins = {};
audioOutputDevicePins = {};
audioScrollMode = "volume";
audioVisualizerEnabled = true;
audioWheelScrollAmount = 5;
barConfigs = [ barConfigs = [
{ {
autoHide = false; # Widgets
autoHideDelay = 250;
borderColor = "surfaceText";
borderEnabled = false;
borderOpacity = 1;
borderThickness = 2;
bottomGap = 0;
centerWidgets = [
{
enabled = true;
id = "music";
mediaSize = 1;
}
];
enabled = true;
fontScale = 1.1;
gothCornerRadiusOverride = false;
gothCornerRadiusValue = 12;
gothCornersEnabled = false;
id = "default";
innerPadding = 4;
leftWidgets = [ leftWidgets = [
{ {
enabled = true; enabled = true;
@ -116,18 +48,14 @@
id = "focusedWindow"; id = "focusedWindow";
} }
]; ];
maximizeDetection = true; centerWidgets = [
name = "Main Bar";
noBackground = false;
openOnOverview = true;
popupGapsAuto = true;
popupGapsManual = 4;
position = 0;
rightWidgets = [
{ {
enabled = true; enabled = true;
id = "privacyIndicator"; id = "music";
mediaSize = 1;
} }
];
rightWidgets = [
{ {
enabled = true; enabled = true;
id = "cpuUsage"; id = "cpuUsage";
@ -142,18 +70,10 @@
enabled = true; enabled = true;
id = "diskUsage"; id = "diskUsage";
} }
{
enabled = true;
id = "colorPicker";
}
{ {
enabled = true; enabled = true;
id = "clipboard"; id = "clipboard";
} }
{
enabled = true;
id = "vpn";
}
{ {
enabled = true; enabled = true;
id = "controlCenterButton"; id = "controlCenterButton";
@ -172,54 +92,95 @@
id = "notificationButton"; id = "notificationButton";
} }
]; ];
screenPreferences = ["all"];
showOnLastDisplay = true; enabled = true;
id = "default";
name = "Main Bar";
# Behavior
autoHide = false;
autoHideDelay = 250;
maximizeDetection = true;
openOnOverview = false;
# Border
borderColor = "surfaceText";
borderEnabled = false;
borderOpacity = 1;
borderThickness = 2;
gothCornerRadiusOverride = false;
gothCornerRadiusValue = 12;
gothCornersEnabled = false;
# Styling
position = 0;
fontScale = 1.1;
bottomGap = 0;
innerPadding = 4;
noBackground = false;
popupGapsAuto = true;
popupGapsManual = 4;
spacing = 0; spacing = 0;
squareCorners = true;
transparency = 1; transparency = 1;
visible = true;
widgetOutlineColor = "primary"; widgetOutlineColor = "primary";
widgetOutlineEnabled = false; widgetOutlineEnabled = false;
widgetOutlineOpacity = 1; widgetOutlineOpacity = 1;
widgetOutlineThickness = 2; widgetOutlineThickness = 2;
widgetTransparency = 1; widgetTransparency = 1;
squareCorners = true;
screenPreferences = ["all"];
showOnLastDisplay = true;
visible = true;
} }
]; ];
barMaxVisibleApps = 0;
barMaxVisibleRunningApps = 0; # Power saving
barShowOverflowBadge = true; acLockTimeout = 0;
batteryChargeLimit = 100; acMonitorTimeout = 0;
acProfileName = "";
acSuspendBehavior = 0;
acSuspendTimeout = 0;
animationSpeed = 1;
# Launcher
appLauncherGridColumns = 4;
appLauncherViewMode = "list";
launchPrefix = "";
launcherLogoBrightness = 0.5;
launcherLogoColorInvertOnMode = false;
launcherLogoColorOverride = "";
launcherLogoContrast = 1;
launcherLogoCustomPath = "";
launcherLogoMode = "os";
launcherLogoSizeOffset = 0;
# Audio
audioInputDevicePins = {};
audioOutputDevicePins = {};
audioVisualizerEnabled = true;
# Battery
batteryLockTimeout = 0; batteryLockTimeout = 0;
batteryMonitorTimeout = 0; batteryMonitorTimeout = 0;
batteryProfileName = ""; batteryProfileName = "";
batterySuspendBehavior = 0; batterySuspendBehavior = 0;
batterySuspendTimeout = 0; batterySuspendTimeout = 0;
bluetoothDevicePins = {};
# Wallpaper
blurWallpaperOnOverview = true; blurWallpaperOnOverview = true;
blurredWallpaperLayer = true; blurredWallpaperLayer = false;
brightnessDevicePins = {}; wallpaperFillMode = "Fill";
browserPickerViewMode = "grid";
browserUsageHistory = {}; # Control center
builtInPluginSettings = {dms_settings_search = {trigger = "?";};};
buttonColorMode = "primary";
centeringMode = "index";
clipboardEnterToPaste = false;
clockCompactMode = false;
clockDateFormat = "yyyy-MM-dd";
configVersion = 5;
controlCenterShowAudioIcon = true; controlCenterShowAudioIcon = true;
controlCenterShowAudioPercent = false;
controlCenterShowBatteryIcon = false; controlCenterShowBatteryIcon = false;
controlCenterShowBluetoothIcon = true; controlCenterShowBluetoothIcon = true;
controlCenterShowBrightnessIcon = false; controlCenterShowBrightnessIcon = false;
controlCenterShowBrightnessPercent = false;
controlCenterShowMicIcon = true; controlCenterShowMicIcon = true;
controlCenterShowMicPercent = false;
controlCenterShowNetworkIcon = true; controlCenterShowNetworkIcon = true;
controlCenterShowPrinterIcon = false; controlCenterShowPrinterIcon = false;
controlCenterShowScreenSharingIcon = true;
controlCenterShowVpnIcon = true; controlCenterShowVpnIcon = true;
controlCenterTileColorMode = "primary";
controlCenterWidgets = [ controlCenterWidgets = [
{ {
enabled = true; enabled = true;
@ -262,242 +223,70 @@
width = 50; width = 50;
} }
]; ];
cornerRadius = 10;
currentThemeCategory = "registry"; # Theme
currentThemeName = "custom"; currentThemeName = "custom";
cursorSettings = { currentThemeCategory = "registry";
dwl = {cursorHideTimeout = 0;}; customThemeFile = "${config.paths.dotfiles}/dankmaterialshell/catppuccin-mauve.json";
hyprland = {
hideOnKeyPress = false; # Styling
hideOnTouch = false; cornerRadius = 10;
inactiveTimeout = 0;
};
niri = {
hideAfterInactiveMs = 0;
hideWhenTyping = false;
};
size = 24;
theme = "System Default";
};
customAnimationDuration = 500; customAnimationDuration = 500;
customPowerActionHibernate = "";
customPowerActionLock = "";
customPowerActionLogout = "";
customPowerActionPowerOff = "";
customPowerActionReboot = "";
customPowerActionSuspend = "";
customThemeFile = "/home/christoph/NixFlake/config/dankmaterialshell/catppuccin-mauve.json";
dankLauncherV2BorderColor = "primary";
dankLauncherV2BorderEnabled = false;
dankLauncherV2BorderThickness = 2;
dankLauncherV2ShowFooter = true;
dankLauncherV2Size = "compact";
dankLauncherV2UnloadOnClose = false;
desktopClockColorMode = "primary";
desktopClockCustomColor = {
a = 1;
b = 1;
g = 1;
hslHue = -1;
hslLightness = 1;
hslSaturation = 0;
hsvHue = -1;
hsvSaturation = 0;
hsvValue = 1;
r = 1;
valid = true;
};
desktopClockDisplayPreferences = ["all"];
desktopClockEnabled = false;
desktopClockHeight = 180;
desktopClockShowAnalogNumbers = false;
desktopClockShowAnalogSeconds = true;
desktopClockShowDate = true;
desktopClockStyle = "analog";
desktopClockTransparency = 0.8;
desktopClockWidth = 280;
desktopClockX = -1;
desktopClockY = -1;
desktopWidgetGridSettings = {};
desktopWidgetGroups = [];
desktopWidgetInstances = [];
desktopWidgetPositions = {};
displayNameMode = "system";
displayProfileAutoSelect = false;
displayProfiles = {};
displayShowDisconnected = false;
displaySnapToEdge = true;
dockAutoHide = false;
dockBorderColor = "surfaceText";
dockBorderEnabled = false;
dockBorderOpacity = 1;
dockBorderThickness = 1;
dockBottomGap = 0;
dockGroupByApp = false;
dockIconSize = 40;
dockIndicatorStyle = "circle";
dockIsolateDisplays = false;
dockLauncherEnabled = false;
dockLauncherLogoBrightness = 0.5;
dockLauncherLogoColorOverride = "";
dockLauncherLogoContrast = 1;
dockLauncherLogoCustomPath = "";
dockLauncherLogoMode = "apps";
dockLauncherLogoSizeOffset = 0;
dockMargin = 0;
dockMaxVisibleApps = 0;
dockMaxVisibleRunningApps = 0;
dockOpenOnOverview = false;
dockPosition = 1;
dockShowOverflowBadge = true;
dockSmartAutoHide = false;
dockSpacing = 4;
dockTransparency = 1;
dwlShowAllTags = false;
enableFprint = false;
enableRippleEffects = true;
enabledGpuPciIds = [];
fadeToDpmsEnabled = true;
fadeToDpmsGracePeriod = 5;
fadeToLockEnabled = true;
fadeToLockGracePeriod = 5;
filePickerUsageHistory = {};
focusedWindowCompactMode = false;
fontFamily = "MonoLisa Normal"; fontFamily = "MonoLisa Normal";
monoFontFamily = "MonoLisa Normal";
fontScale = 1; fontScale = 1;
fontWeight = 500; fontWeight = 500;
groupWorkspaceApps = true;
gtkThemingEnabled = false; gtkThemingEnabled = false;
hideBrightnessSlider = false;
hyprlandLayoutBorderSize = -1;
hyprlandLayoutGapsOverride = -1;
hyprlandLayoutRadiusOverride = -1;
hyprlandOutputSettings = {};
iconTheme = "System Default"; iconTheme = "System Default";
keyboardLayoutNameCompactMode = false;
launchPrefix = ""; # Lock
launcherLogoBrightness = 0.5; fadeToLockEnabled = true;
launcherLogoColorInvertOnMode = false; fadeToLockGracePeriod = 5;
launcherLogoColorOverride = "";
launcherLogoContrast = 1;
launcherLogoCustomPath = "";
launcherLogoMode = "os";
launcherLogoSizeOffset = 0;
launcherPluginOrder = [];
launcherPluginVisibility = {};
lockAtStartup = false;
lockBeforeSuspend = false; lockBeforeSuspend = false;
lockDateFormat = "yyyy-MM-dd"; lockDateFormat = "yyyy-MM-dd";
lockScreenActiveMonitor = "all"; lockScreenActiveMonitor = "all";
lockScreenInactiveColor = "#000000"; lockScreenInactiveColor = "#000000";
lockScreenNotificationMode = 0;
lockScreenPowerOffMonitorsOnLock = false;
lockScreenShowDate = true; lockScreenShowDate = true;
lockScreenShowMediaPlayer = true;
lockScreenShowPasswordField = true; lockScreenShowPasswordField = true;
lockScreenShowPowerActions = true; lockScreenShowPowerActions = true;
lockScreenShowProfileImage = true; lockScreenShowProfileImage = true;
lockScreenShowSystemIcons = true; lockScreenShowSystemIcons = true;
lockScreenShowTime = true; lockScreenShowTime = true;
loginctlLockIntegration = true; loginctlLockIntegration = true;
mangoLayoutBorderSize = -1;
mangoLayoutGapsOverride = -1; # Notifications
mangoLayoutRadiusOverride = -1;
matugenScheme = "scheme-tonal-spot";
matugenTargetMonitor = "";
matugenTemplateAlacritty = true;
matugenTemplateDgop = true;
matugenTemplateEmacs = true;
matugenTemplateEquibop = true;
matugenTemplateFirefox = true;
matugenTemplateFoot = true;
matugenTemplateGhostty = true;
matugenTemplateGtk = true;
matugenTemplateHyprland = true;
matugenTemplateKcolorscheme = true;
matugenTemplateKitty = true;
matugenTemplateMangowc = true;
matugenTemplateNeovim = true;
matugenTemplateNiri = true;
matugenTemplatePywalfox = true;
matugenTemplateQt5ct = true;
matugenTemplateQt6ct = true;
matugenTemplateVesktop = true;
matugenTemplateVscode = true;
matugenTemplateWezterm = true;
matugenTemplateZenBrowser = true;
maxFprintTries = 15;
maxWorkspaceIcons = 3;
mediaSize = 1;
modalAnimationSpeed = 1;
modalCustomAnimationDuration = 150;
modalDarkenBackground = true;
monoFontFamily = "MonoLisa Normal";
networkPreference = "auto";
nightModeEnabled = false;
niriLayoutBorderSize = -1;
niriLayoutGapsOverride = -1;
niriLayoutRadiusOverride = -1;
niriOutputSettings = {};
niriOverviewOverlayEnabled = true;
notepadFontFamily = "";
notepadFontSize = 14;
notepadLastCustomTransparency = 0.7;
notepadShowLineNumbers = false;
notepadTransparencyOverride = -1;
notepadUseMonospace = true;
notificationAnimationSpeed = 1;
notificationCompactMode = false;
notificationCustomAnimationDuration = 400;
notificationHistoryEnabled = true;
notificationHistoryMaxAgeDays = 7;
notificationHistoryMaxCount = 50;
notificationHistorySaveCritical = true;
notificationHistorySaveLow = true;
notificationHistorySaveNormal = true;
notificationOverlayEnabled = false; notificationOverlayEnabled = false;
notificationPopupPosition = 0; notificationPopupPosition = 0;
notificationPopupPrivacyMode = false;
notificationPopupShadowEnabled = true;
notificationRules = [];
notificationTimeoutCritical = 0; notificationTimeoutCritical = 0;
notificationTimeoutLow = 5000; notificationTimeoutLow = 5000;
notificationTimeoutNormal = 5000; notificationTimeoutNormal = 5000;
# OSD
osdAlwaysShowValue = true; osdAlwaysShowValue = true;
osdAudioOutputEnabled = true; osdAudioOutputEnabled = true;
osdBrightnessEnabled = true; osdBrightnessEnabled = true;
osdCapsLockEnabled = true; osdCapsLockEnabled = true;
osdIdleInhibitorEnabled = true; osdIdleInhibitorEnabled = true;
osdMediaPlaybackEnabled = true;
osdMediaVolumeEnabled = true; osdMediaVolumeEnabled = true;
osdMicMuteEnabled = true; osdMicMuteEnabled = true;
osdPosition = 7; osdPosition = 7;
osdPowerProfileEnabled = false; osdPowerProfileEnabled = false;
osdVolumeEnabled = true; osdVolumeEnabled = true;
padHours12Hour = false;
popoutAnimationSpeed = 1; # Power menu
popoutCustomAnimationDuration = 150;
popupTransparency = 1;
powerActionConfirm = true; powerActionConfirm = true;
powerActionHoldDuration = 0.5; powerActionHoldDuration = 0.5;
powerMenuActions = ["reboot" "logout" "poweroff" "lock" "restart"]; powerMenuActions = ["reboot" "logout" "poweroff" "lock" "restart"];
powerMenuDefaultAction = "poweroff"; powerMenuDefaultAction = "poweroff";
powerMenuGridLayout = false; powerMenuGridLayout = false;
privacyShowCameraIcon = false;
privacyShowMicIcon = false; # Settings
privacyShowScreenShareIcon = false; focusedWindowCompactMode = false;
qtThemingEnabled = false; hideBrightnessSlider = false;
registryThemeVariants = {}; keyboardLayoutNameCompactMode = false;
reverseScrolling = false; modalDarkenBackground = true;
runDmsMatugenTemplates = false; nightModeEnabled = false;
runUserMatugenTemplates = false; niriOverviewOverlayEnabled = true;
runningAppsCompactMode = true;
runningAppsCurrentMonitor = false;
runningAppsCurrentWorkspace = false;
runningAppsGroupByApp = false;
screenPreferences = {};
scrollTitleEnabled = true;
selectedGpuIndex = 0;
showBattery = false; showBattery = false;
showCapsLockIndicator = false; showCapsLockIndicator = false;
showClipboard = true; showClipboard = true;
@ -513,92 +302,127 @@
showMusic = true; showMusic = true;
showNotificationButton = true; showNotificationButton = true;
showOccupiedWorkspacesOnly = false; showOccupiedWorkspacesOnly = false;
showOnLastDisplay = {};
showPrivacyButton = false; showPrivacyButton = false;
showSeconds = true;
showSystemTray = true; showSystemTray = true;
showWeather = true;
showWorkspaceApps = false; showWorkspaceApps = false;
showWorkspaceIndex = false; showWorkspaceIndex = false;
showWorkspaceName = false;
showWorkspacePadding = false; showWorkspacePadding = false;
showWorkspaceSwitcher = true; showWorkspaceSwitcher = true;
sortAppsAlphabetically = false;
soundNewNotification = true; soundNewNotification = true;
soundPluggedIn = true; soundPluggedIn = true;
soundVolumeChanged = true; soundVolumeChanged = true;
soundsEnabled = false; soundsEnabled = false;
# Launcher
sortAppsAlphabetically = false;
spotlightCloseNiriOverview = true; spotlightCloseNiriOverview = true;
spotlightModalViewMode = "list"; spotlightModalViewMode = "list";
spotlightSectionViewModes = {};
syncComponentAnimationSpeeds = true; # Clock
syncModeWithPortal = true;
systemMonitorColorMode = "primary";
systemMonitorCustomColor = {
a = 1;
b = 1;
g = 1;
hslHue = -1;
hslLightness = 1;
hslSaturation = 0;
hsvHue = -1;
hsvSaturation = 0;
hsvValue = 1;
r = 1;
valid = true;
};
systemMonitorDisplayPreferences = ["all"];
systemMonitorEnabled = false;
systemMonitorGpuPciId = "";
systemMonitorGraphInterval = 60;
systemMonitorHeight = 480;
systemMonitorLayoutMode = "auto";
systemMonitorShowCpu = true;
systemMonitorShowCpuGraph = true;
systemMonitorShowCpuTemp = true;
systemMonitorShowDisk = true;
systemMonitorShowGpuTemp = false;
systemMonitorShowHeader = true;
systemMonitorShowMemory = true;
systemMonitorShowMemoryGraph = true;
systemMonitorShowNetwork = true;
systemMonitorShowNetworkGraph = true;
systemMonitorShowTopProcesses = false;
systemMonitorTopProcessCount = 3;
systemMonitorTopProcessSortBy = "cpu";
systemMonitorTransparency = 0.8;
systemMonitorVariants = [];
systemMonitorWidth = 320;
systemMonitorX = -1;
systemMonitorY = -1;
terminalsAlwaysDark = false;
updaterCustomCommand = "";
updaterHideWidget = false;
updaterTerminalAdditionalParams = "";
updaterUseCustomCommand = false;
use24HourClock = true; use24HourClock = true;
useAutoLocation = false; showSeconds = true;
useFahrenheit = false; clockCompactMode = false;
useSystemSoundTheme = false; clockDateFormat = "yyyy-MM-dd";
wallpaperFillMode = "Fill";
# Media
waveProgressEnabled = true; waveProgressEnabled = true;
scrollTitleEnabled = true;
# Weather
showWeather = true;
useFahrenheit = false;
useAutoLocation = false;
weatherCoordinates = "51.5142273,7.4652789";
weatherEnabled = true; weatherEnabled = true;
weatherLocation = "Dortmund, Nordrhein-Westfalen";
# Workspaces
workspaceNameIcons = {};
workspaceScrolling = false;
workspacesPerMonitor = true;
# Dock
dockAutoHide = false;
dockBorderColor = "surfaceText";
dockBorderEnabled = false;
dockBorderOpacity = 1;
dockBorderThickness = 1;
dockBottomGap = 0;
dockGroupByApp = false;
dockIconSize = 40;
dockIndicatorStyle = "circle";
dockMargin = 0;
dockOpenOnOverview = false;
dockPosition = 1;
dockSpacing = 4;
dockTransparency = 1;
# Random shit
widgetBackgroundColor = "sc"; widgetBackgroundColor = "sc";
widgetColorMode = "default"; widgetColorMode = "default";
wifiNetworkPins = {}; wifiNetworkPins = {};
windSpeedUnit = "kmh"; brightnessDevicePins = {};
workspaceAppIconSizeOffset = 0; bluetoothDevicePins = {};
workspaceColorMode = "default"; centeringMode = "index";
workspaceDragReorder = true; useSystemSoundTheme = false;
workspaceFocusedBorderColor = "primary"; vpnLastConnected = "";
workspaceFocusedBorderEnabled = false; syncModeWithPortal = true;
workspaceFocusedBorderThickness = 2; terminalsAlwaysDark = false;
workspaceFollowFocus = false; updaterCustomCommand = "";
workspaceNameIcons = {}; updaterTerminalAdditionalParams = "";
workspaceOccupiedColorMode = "none"; updaterUseCustomCommand = false;
workspaceScrolling = false; showOnLastDisplay = {};
workspaceUnfocusedColorMode = "default"; dwlShowAllTags = false;
workspaceUrgentColorMode = "default"; enableFprint = false;
enabledGpuPciIds = [];
customPowerActionHibernate = "";
customPowerActionLock = "";
customPowerActionLogout = "";
customPowerActionPowerOff = "";
customPowerActionReboot = "";
customPowerActionSuspend = "";
displayNameMode = "system";
matugenScheme = "scheme-tonal-spot";
matugenTargetMonitor = "";
matugenTemplateAlacritty = true;
matugenTemplateDgop = true;
matugenTemplateFirefox = true;
matugenTemplateFoot = true;
matugenTemplateGhostty = true;
matugenTemplateGtk = true;
matugenTemplateKcolorscheme = true;
matugenTemplateKitty = true;
matugenTemplateNiri = true;
matugenTemplatePywalfox = true;
matugenTemplateQt5ct = true;
matugenTemplateQt6ct = true;
matugenTemplateVesktop = true;
matugenTemplateVscode = true;
matugenTemplateWezterm = true;
notepadFontFamily = "";
notepadFontSize = 14;
notepadLastCustomTransparency = 0.7;
notepadShowLineNumbers = false;
notepadTransparencyOverride = -1;
notepadUseMonospace = true;
maxFprintTries = 15;
maxWorkspaceIcons = 3;
mediaSize = 1;
networkPreference = "auto";
selectedGpuIndex = 0;
popupTransparency = 1;
privacyShowCameraIcon = false;
privacyShowMicIcon = false;
privacyShowScreenShareIcon = false;
qtThemingEnabled = false;
runDmsMatugenTemplates = false;
runUserMatugenTemplates = false;
runningAppsCompactMode = true;
runningAppsCurrentWorkspace = false;
runningAppsGroupByApp = false;
screenPreferences = {};
configVersion = 2;
}; };
session = { session = {

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

@ -35,72 +35,168 @@ in {
sidebar-mode = false; 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 theme = let
mkLiteral = config.lib.formats.rasi.mkLiteral; inherit (config.lib.formats.rasi) mkLiteral;
in
import ./theme.nix {inherit color mkLiteral;}; trans = "rgba(0, 0, 0, 0)";
in {
"element-text,element-icon,mode-switcher" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
}; };
# homemodules.hyprland.keybindings = let "window" = {
# vpn-menu = height = mkLiteral "50%";
# pkgs.writeScriptBin width = mkLiteral "33%";
# "rofi-menu-vpn" border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
# (builtins.readFile ./menus/vpn.fish); border-radius = 6;
# border-color = mkLiteral color.hexS.accent;
# keybinds-menu =
# pkgs.writeScriptBin # This is not opacity but translucency
# "rofi-menu-keybinds" background-color = mkLiteral "rgba(${color.rgbS.base}, 0.25)";
# (builtins.readFile ./menus/keybinds.fish); };
#
# lectures-menu = "mainbox" = {
# pkgs.writeScriptBin background-color = mkLiteral trans;
# "rofi-menu-lectures" };
# (builtins.readFile ./menus/lectures.fish);
# # TOP INPUT BAR START
# power-menu =
# mylib.rofi.mkSimpleMenu "inputbar" = {
# "power" children = builtins.map mkLiteral ["prompt" "entry"];
# { background-color = mkLiteral trans;
# "󰤂 Poweroff" = "poweroff"; };
# "󰜉 Reboot" = "reboot";
# "󰌾 Lock" = "loginctl lock-session"; "prompt" = {
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service"; background-color = mkLiteral color.hexS.accentHl;
# " Reload Hyprland" = "hyprctl reload"; padding = 6;
# " Exit Hyprland" = "hyprctl dispatch exit"; text-color = mkLiteral color.hexS.accentText;
# }; border-radius = 3;
# margin = mkLiteral "10px 0px 0px 10px";
# wallpaper-menu = let };
# setWallpaperOnMonitor = name: monitor:
# "hyprctl hyprpaper wallpaper " "entry" = {
# + "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg"; padding = 6;
# margin = mkLiteral "10px 10px 0px 5px";
# setWallpaperOnMonitors = monitors: name: { text-color = mkLiteral color.hexS.text;
# ${name} = background-color = mkLiteral trans;
# monitors border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
# |> builtins.map (setWallpaperOnMonitor name) border-radius = 3;
# |> builtins.concatStringsSep " && "; border-color = mkLiteral color.hexS.accentHl;
# }; };
#
# monitors = builtins.attrNames config.homemodules.hyprland.monitors; # MESSAGEBOX (usually not visible)
# in
# mylib.rofi.mkSimpleMenu "message" = {
# "wall" background-color = mkLiteral trans;
# (color.wallpapers };
# |> builtins.map (setWallpaperOnMonitors monitors)
# |> lib.mergeAttrsList); "error-message" = {
# in background-color = mkLiteral trans;
# lib.mkIf (!config.homemodules.hyprland.caelestia.enable) { margin = mkLiteral "0px 0px 10px 0px";
# bindings = lib.mergeAttrsList [ };
# {
# "$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""]; "textbox" = {
# "$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""]; background-color = mkLiteral trans;
# "$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""]; padding = 6;
# # "$mainMod, o" = ["exec, \"${lectures-menu}\""]; margin = mkLiteral "10px 10px 0px 10px";
# } border-radius = 3;
# (lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) { };
# "$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
# }) # 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\""];
})
];
};
}; };
} }

View File

@ -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;
};
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -21,230 +21,126 @@ in {
spacing = 0; spacing = 0;
margin = "10px 10px 0px 10px"; margin = "10px 10px 0px 10px";
fixed-center = true; fixed-center = true;
output = waybar.monitors; output = ["${waybar.monitor}"];
modules-left = ["custom/launcher" "niri/workspaces" "niri/window"]; # "user" modules-left = ["custom/launcher" "user" "hyprland/window"];
modules-center = ["mpris"]; # "systemd-failed-units" modules-center = ["hyprland/workspaces"];
modules-right = ["privacy" "pulseaudio" "network" "disk" "cpu" "memory" "clock" "tray"]; modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "clock" "tray"];
"custom/launcher" = { "custom/launcher" = {
format = "<span></span>"; format = "<span></span>";
interval = "once"; interval = "once";
on-click = "walker -m desktopapplications"; on-click = "rofi -drun-show-actions -show drun";
}; };
systemd-failed-units = { "hyprland/workspaces" = {
hide-on-ok = true;
format = " {nr_failed}";
format-ok = "";
system = true;
user = true;
};
"niri/workspaces" = {
all-outputs = false; all-outputs = false;
format = "{icon}"; format = "{name}";
format-icons = { on-click = "activate";
default = ""; sort-by-coordinates = false;
focused = ""; sort-by-name = true;
active = ""; sort-by-number = false;
};
}; };
"niri/window" = { "pulseaudio" = {
format = "{title}"; format = "<span></span> {volume}%";
separate-outputs = false; format-muted = "<span></span> ";
icon = true; on-click = "kitty ncpamixer -t o";
icon-size = 22;
}; };
mpris = { "network" = {
format = "<span>󰎇</span> {dynamic}"; format = "<span></span> {ipaddr}";
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}";
format-disconnected = "<span></span> "; format-disconnected = "<span></span> ";
interface = "enp8s0"; interface = "enp8s0";
tooltip = false; tooltip-format = "{ifname} via {gwaddr}";
};
disk = {
interval = 5;
format = "<span>󰋊</span> {percentage_used}%";
on-click = "kitty --hold --title=Duf duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
}; };
cpu = { cpu = {
interval = 1; format = "<span></span> {load}%";
# 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;
}; };
memory = { memory = {
interval = 1; format = "<span></span> {percentage}%";
# states = { };
# "critical" = 85;
# }; temperature = {
format = "<span></span> {percentage}%"; format = "<span></span> {temperatureC}°C";
# format-critical = "<span color='#${color.hex.red}'><span></span> {percentage}%</span>"; thermal-zone = 3;
on-click = "kitty --title=Btop btop";
tooltip = true;
tooltip-format = "RAM: {used}GiB / {total}GiB\nSwap: {swapUsed}GiB / {swapTotal}GiB";
}; };
clock = { clock = {
format = "<span>󰥔</span> {:%H:%M}"; format = "<span></span> {:%H:%M}";
timezone = "Europe/Berlin"; timezone = "Europe/Berlin";
tooltip-format = "<tt><small>{calendar}</small></tt>"; 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 = { tray = {
icon-size = 22; icon-size = 20;
show-passive-items = true; show-passive-items = true;
spacing = 5; spacing = 5;
}; };
}; };
}; };
style = let style = ''
border-width = "2px";
border-radius = "10px";
in ''
/* Order is Top-Right-Bottom-Left for combined properties */ /* Order is Top-Right-Bottom-Left for combined properties */
* { * {
color: #${color.hex.dark.base};
font-family: ${color.font}; font-family: ${color.font};
font-weight: bold;
} }
window#waybar { window#waybar {
border-style: solid; border-style: solid;
border-width: ${border-width}; border-width: 2px;
border-radius: ${border-radius}; border-radius: 6px;
border-color: #${color.hex.accent}; border-color: #${color.hex.dark.lavender};
background-color: rgba(${color.rgbS.mantle}, 1.0); background-color: rgba(${color.rgbString.light.base}, 0.3);
} }
tooltip { tooltip {
color: #${color.hex.text};
font-weight: normal;
border-style: solid; border-style: solid;
border-width: ${border-width}; border-width: 2px;
border-radius: ${border-radius}; border-radius: 6px;
border-color: #${color.hex.accent}; border-color: #${color.hex.dark.lavender};
background-color: rgba(${color.rgbS.mantle}, 1.0); background-color: rgba(${color.rgbString.light.base}, 0.7);
font-weight: normal;
} }
/* Background colors */ /* Background colors */
#custom-launcher {background-color: #${color.hex.accent};} #custom-launcher {background-color: #${color.hex.dark.lavender};}
#workspaces button {background-color: #${color.hex.blue};} #user {background-color: #${color.hex.dark.pink};}
#workspaces button.empty {background-color: #${color.hex.lavender};} #window {background-color: #${color.hex.dark.mauve};}
#workspaces button.active {background-color: #${color.hex.green};} #workspaces button {background-color: #${color.hex.dark.lavender};}
#workspaces button.urgent {background-color: #${color.hex.red};} #workspaces button.active {background-color: #${color.hex.dark.pink};}
#window {background-color: #${color.hex.maroon};} #pulseaudio {background-color: #${color.hex.dark.maroon};}
#network {background-color: #${color.hex.dark.peach};}
#mpris {background-color: #${color.hex.accent};} #cpu {background-color: #${color.hex.dark.yellow};}
#memory {background-color: #${color.hex.dark.green};}
#privacy {background-color: #${color.hex.red};} #temperature {background-color: #${color.hex.dark.teal};}
#pulseaudio {background-color: #${color.hex.maroon};} #clock {background-color: #${color.hex.dark.sky};}
#network {background-color: #${color.hex.peach};} #tray {background-color: #${color.hex.dark.lavender};}
#disk {background-color: #${color.hex.yellow};}
#cpu {background-color: #${color.hex.green};}
#memory {background-color: #${color.hex.teal};}
#clock {background-color: #${color.hex.sky};}
#tray {background-color: #${color.hex.accent};}
/* Square Widgets */ /* Square Widgets */
#custom-launcher, #custom-launcher,
#mpris, #workspaces button,
#tray { #tray {
color: #${color.hex.mantle};
font-weight: bold;
padding: 0px 10px 0px 10px; padding: 0px 10px 0px 10px;
border-radius: ${border-radius}; border-radius: 6px;
}
/* Workspaces */
#workspaces button {
color: #${color.hex.mantle};
font-weight: bold;
padding: 0px 2px 0px 2px;
margin: 8px 2px 8px 2px;
border-radius: ${border-radius};
} }
/* Rectangle Widgets */ /* Rectangle Widgets */
#user, #user,
#window, #window,
#pulseaudio, #pulseaudio,
#privacy,
#network, #network,
#disk,
#cpu, #cpu,
#memory, #memory,
#temperature,
#clock { #clock {
color: #${color.hex.mantle};
font-weight: bold;
padding: 0px 10px 0px 10px; padding: 0px 10px 0px 10px;
margin: 8px 5px 8px 5px; margin: 8px 5px 8px 5px;
border-radius: ${border-radius}; border-radius: 6px;
} }
/* Make window module transparent when no windows present */ /* Make window module transparent when no windows present */
@ -257,10 +153,14 @@ in {
/* Tux Icon */ /* Tux Icon */
#custom-launcher { #custom-launcher {
font-size: 26px; font-size: 26px;
padding-right: 13px; padding-right: 10px;
margin: 0px 5px 0px 0px; margin: 0px 5px 0px 0px;
} }
#workspaces button {
margin: 0px 5px 0px 5px;
}
#tray { #tray {
margin: 0px 0px 0px 5px; margin: 0px 0px 0px 5px;
} }

View File

@ -7,9 +7,9 @@ with lib;
with mylib.modules; { with mylib.modules; {
enable = mkEnableOption "Waybar"; enable = mkEnableOption "Waybar";
monitors = mkOption { monitor = mkOption {
type = types.listOf types.str; type = types.str;
example = ''["HDMI-A-1", "DP-1"]''; example = "HDMI-A-1";
description = "What monitor to display the Waybar on"; description = "What monitor to display the Waybar on";
}; };
} }

View File

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

View File

@ -18,7 +18,6 @@ in [
(mkIcon "Public" "󰒗") (mkIcon "Public" "󰒗")
(mkIcon "Restic" "󰁯") (mkIcon "Restic" "󰁯")
(mkIcon "Shows" "󰿎") (mkIcon "Shows" "󰿎")
(mkIcon "SSD" "󰉉")
(mkIcon "Unity" "󰚯") (mkIcon "Unity" "󰚯")
(mkIcon "Videos" "") (mkIcon "Videos" "")
] ]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -3,164 +3,75 @@
pkgs, pkgs,
lib, lib,
... ...
}: { }: rec {
# Receives attrs like: # Receives attrs like:
# { # {
# "Poweroff" = "poweroff"; # "Poweroff" = "poweroff";
# "Reload Hyprland" = "hyprctl reload"; # "Reload Hyprland" = "hyprctl reload";
# } # }
# mkSimpleMenu = let mkSimpleMenu = let
# # Makes a string like ''"Poweroff" "Reload Hyprland"'' # Makes a string like ''"Poweroff" "Reload Hyprland"''
# unpack-options = attrs: "\"${lib.concatStringsSep "\" \"" (builtins.attrNames attrs)}\""; 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
# '';
# Rofi/Dmenu menu generator. mkCase = option: action: "else if test \"${option}\" = $OPTION\n set ACTION \"${action}\"";
#
# 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;
escStr = s: builtins.replaceStrings [''"'' "\\"] [''\"'' "\\\\"] s; cases = attrs:
attrs
layerPrompt = i: |> builtins.mapAttrs mkCase
if i < builtins.length prompts |> builtins.attrValues
then lib.elemAt prompts i |> builtins.concatStringsSep "\n";
else prompt;
# 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}
exit
end
if false
exit
${casesStr}
else
exit
end
'';
};
# 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
'';
};
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";
in in
prompt: attrs:
pkgs.writeScriptBin "rofi-menu-${prompt}" '' pkgs.writeScriptBin "rofi-menu-${prompt}" ''
#! ${pkgs.fish}/bin/fish #! ${pkgs.fish}/bin/fish
${lib.concatStringsSep "\n" layerScripts} # OPTIONS contains all possible values Rofi will display
eval "${finalCmd}" set OPTIONS ${unpack-options attrs}
# 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 # Easier to generate with this
${cases attrs}
else
exit
end
# Execute the command
eval $ACTION
''; '';
# 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
# 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
prompt: attrs: "";
} }

View File

@ -29,37 +29,6 @@
# Remove this after jetbrains.jdk builds again (nixpkgs issue 425328) # Remove this after jetbrains.jdk builds again (nixpkgs issue 425328)
# jetbrains.rider = pkgs-stable.jetbrains.rider; # 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 ""}
'';
});
};
# Now in Nixpkgs # Now in Nixpkgs
# neovide = prev.neovide.overrideAttrs (finalAttrs: prevAttrs: { # neovide = prev.neovide.overrideAttrs (finalAttrs: prevAttrs: {
# version = "0.15.1"; # version = "0.15.1";

16
system/cachix.nix Normal file
View File

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

View File

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

View File

@ -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;
}

View File

@ -8,7 +8,6 @@
system, system,
username, username,
headless, headless,
publicKeys,
... ...
}: }:
with mylib.networking; { with mylib.networking; {
@ -91,7 +90,6 @@ with mylib.networking; {
"ssh-private-key" "ssh-private-key"
"nix-github-token" "nix-github-token"
"docker-password" "docker-password"
"jellyfin-password"
]; ];
}; };
@ -105,7 +103,31 @@ with mylib.networking; {
}; };
# Enable flakes # 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 # Bootloader/Kernel stuff
boot = { boot = {
@ -144,9 +166,9 @@ with mylib.networking; {
documentation = { documentation = {
# NOTE: Disable this while configuring stuff, it's slow # NOTE: Disable this while configuring stuff, it's slow
enable = false; enable = true;
man.enable = config.documentation.enable; man.enable = config.documentation.enable;
man.cache.enable = true; # Slow but needed for neovim man picker man.generateCaches = true; # Slow but needed for neovim man picker
info.enable = config.documentation.enable; info.enable = config.documentation.enable;
dev.enable = config.documentation.enable; dev.enable = config.documentation.enable;
doc.enable = config.documentation.enable; doc.enable = config.documentation.enable;
@ -185,7 +207,6 @@ with mylib.networking; {
supportedLocales = ["${en}/UTF-8" "${de}/UTF-8"]; supportedLocales = ["${en}/UTF-8" "${de}/UTF-8"];
}; };
# console = lib.mkIf headless {
console = { console = {
earlySetup = true; earlySetup = true;
useXkbConfig = true; useXkbConfig = true;
@ -235,7 +256,6 @@ with mylib.networking; {
description = "Christoph"; description = "Christoph";
group = "users"; group = "users";
uid = 1000; uid = 1000;
home = "/home/${username}";
extraGroups = [ extraGroups = [
"networkmanager" "networkmanager"
"wheel" "wheel"
@ -253,10 +273,6 @@ with mylib.networking; {
]; ];
shell = pkgs.fish; shell = pkgs.fish;
openssh.authorizedKeys.keys = [
publicKeys.${username}.ssh
];
# We do this with HomeManager # We do this with HomeManager
# packages = with pkgs; []; # packages = with pkgs; [];
}; };
@ -280,7 +296,6 @@ with mylib.networking; {
wireguard-tools wireguard-tools
man-pages man-pages
man-pages-posix man-pages-posix
kmscon # needed in addition to services.kmscon for kmscon-launch-gui
# Android # Android
android-tools android-tools
@ -368,6 +383,21 @@ with mylib.networking; {
wacom.enable = true; wacom.enable = true;
}; };
# greetd = {
# enable = !headless;
# restart = false;
# useTextGreeter = true;
#
# settings = {
# terminal.vt = 1;
#
# default_session = {
# command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd $SHELL";
# user = "greeter";
# };
# };
# };
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
libinput.enable = !headless; libinput.enable = !headless;
@ -388,9 +418,7 @@ with mylib.networking; {
}; };
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
openssh = { openssh.enable = true;
enable = true;
};
# Trims the journal if too large # Trims the journal if too large
journald.extraConfig = '' journald.extraConfig = ''

View File

@ -116,23 +116,21 @@
}; };
allowedTCPPorts = [ allowedTCPPorts = [
1111 # FAIL* 7777 # AvaTalk
# 4242 # Lan-Mouse 12777 # AvaTalk
# 7777 # AvaTalk
# 12777 # AvaTalk
# 31431 # Parsec # 31431 # Parsec
5173 # SvelteKit 5173 # SvelteKit
8090 # PocketBase 8090 # PocketBase
4242 # Lan-Mouse
]; ];
allowedUDPPorts = [ allowedUDPPorts = [
1111 # FAIL* 7777 # AvaTalk
# 4242 # Lan-Mouse 12777 # AvaTalk
# 7777 # AvaTalk
# 12777 # AvaTalk
# 31431 # Parsec # 31431 # Parsec
5173 # SvelteKit 5173 # SvelteKit
8090 # PocketBase 8090 # PocketBase
4242 # Lan-Mouse
]; ];
}; };
@ -158,70 +156,17 @@
kernelPackages = pkgs.linuxPackages_zen; kernelPackages = pkgs.linuxPackages_zen;
# kernelPackages = pkgs.linuxPackages_latest; # kernelPackages = pkgs.linuxPackages_latest;
# Why do I need to know if something fails during boot??? # kernelParams = [ "quiet" ];
# consoleLogLevel = 3; # plymouth.enable = true;
# initrd.verbose = false;
# initrd.systemd.enable = true;
kernelParams = [
# Doesn't work, there is only a single framebuffer,
# so the smallest monitor determines the size
# "video=DP-1:3440x1440"
# "video=DP-2:1920x1080"
# "quiet"
# "splash"
# "intremap=on"
# "boot.shell_on_fail"
# "udev.log_priority=3"
# "rd.systemd.show_status=auto"
];
# plymouth = {
# enable = false;
# font = "${pkgs.monolisa}/share/fonts/truetype/MonoLisa-AltPars-Straight.ttf";
# logo = "${pkgs.nixos-icons}/share/icons/hicolor/128x128/apps/nix-snowflake.png";
#
# theme = "colorful_sliced";
# themePackages = with pkgs; [
# # By default we would install all themes
# (adi1090x-plymouth-themes.override {
# selected_themes = ["colorful_sliced"];
# })
# ];
# };
}; };
environment.systemPackages = with pkgs; [ # environment.systemPackages = with pkgs; [];
spice
spice-gtk
];
virtualisation = {
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
# ovmf.enable = true; # deprecated
swtpm.enable = true;
runAsRoot = true;
};
};
spiceUSBRedirection.enable = true;
};
networking.firewall.trustedInterfaces = ["virbr0"]; # libvirt
programs = { programs = {
ausweisapp = { ausweisapp = {
enable = true; enable = true;
openFirewall = true; # Directly set port in firewall openFirewall = true; # Directly set port in firewall
}; };
ghidra = {
enable = true;
gdb = true;
};
virt-manager.enable = true;
}; };
services = { services = {
@ -231,123 +176,63 @@
fileSystems = ["/"]; fileSystems = ["/"];
}; };
kmscon = {
enable = false;
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";
};
# NOTE: Do NOT use multline strings here!
# This will create a linebreak in the systemd service and break login!
extraOptions = "";
};
openssh = {
ports = [5432];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
AllowUsers = [username];
LogLevel = "VERBOSE"; # For fail2ban
};
};
# Keep this as a system service because we're backing up /persist as root # Keep this as a system service because we're backing up /persist as root
# TODO: The repository gets corrupted all the time, maybe because the service runs before the repository is mounted? # TODO: The repository gets corrupted all the time, maybe because the service runs before the repository is mounted?
# - Was this caused by the NFS "soft" option? # - Was this caused by the NFS "soft" option?
# - Might this be caused by the restic service being interrupted by shutdown/rebooting? # - Might this be caused by the restic service being interrupted by shutdown/rebooting?
# restic.backups."synology" = {
# restic.backups."synology" = { # user = "${username}"; # Keep default (root), so restic can read everything
# # user = "${username}"; # Keep default (root), so restic can read everything
# repository = "/home/${username}/Restic";
# repository = "/home/${username}/Restic"; initialize = true;
# initialize = true; passwordFile = config.sops.secrets.restic-repo-key.path;
# passwordFile = config.sops.secrets.restic-repo-key.path; createWrapper = true;
# createWrapper = true;
# timerConfig = {
# timerConfig = { OnCalendar = "daily";
# OnCalendar = "daily"; Persistent = true;
# Persistent = true; RandomizedDelaySec = "5h";
# RandomizedDelaySec = "5h"; };
# };
# runCheck = true;
# runCheck = true; checkOpts = [
# checkOpts = [ "--with-cache"
# "--with-cache" ];
# ];
# pruneOpts = [
# pruneOpts = [ "--keep-daily 3"
# "--keep-daily 3" "--keep-weekly 2"
# "--keep-weekly 2" # "--keep-monthly 0"
# # "--keep-monthly 0" # "--keep-yearly 0"
# # "--keep-yearly 0"
# "--prune" # Automatically remove dangling files not referenced by any snapshot
# "--prune" # Automatically remove dangling files not referenced by any snapshot "--repack-uncompressed"
# "--repack-uncompressed" ];
# ];
# paths = ["/persist"];
# paths = ["/persist"]; exclude = [
# exclude = [ # The backup is just supposed to allow a system restore
# # The backup is just supposed to allow a system restore "/persist/old_homes"
# "/persist/old_homes" "/persist/old_roots"
# "/persist/old_roots"
# # Those are synced by nextcloud, no need to backup them 50 times
# # Those are synced by nextcloud, no need to backup them 50 times "/persist/home/${username}/Documents"
# "/persist/home/${username}/Documents" "/persist/home/${username}/NixFlake"
# "/persist/home/${username}/NixFlake" "/persist/home/${username}/Notes"
# "/persist/home/${username}/Notes" "/persist/home/${username}/Projects"
# "/persist/home/${username}/Projects" "/persist/home/${username}/Public"
# "/persist/home/${username}/Public"
# # Some more caches
# # Some more caches ".cache"
# ".cache" "cache2" # firefox
# "cache2" # firefox "Cache"
# "Cache" ];
# ]; extraBackupArgs = [
# extraBackupArgs = [ "--exclude-caches" # Excludes marked cache directories
# "--exclude-caches" # Excludes marked cache directories "--one-file-system" # Only stay on /persist (in case symlinks lead elsewhere)
# "--one-file-system" # Only stay on /persist (in case symlinks lead elsewhere) "--cleanup-cache" # Auto remove old cache directories
# "--cleanup-cache" # Auto remove old cache directories ];
# ]; };
# };
xserver = { xserver = {
# Configure keymap in X11 # Configure keymap in X11

View File

@ -34,7 +34,7 @@
settings = { settings = {
allowDiscards = true; allowDiscards = true;
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10" "tries=5"]; crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10"];
# Disable for interactive password entry # Disable for interactive password entry
# keyFile = "/tmp/secret.key"; # keyFile = "/tmp/secret.key";
@ -82,104 +82,7 @@
}; };
"swap" = { "swap" = {
mountpoint = "/swap"; mountpoint = "/swap";
# Configured in hardware-configuration.nix swap.swapfile.size = "16G";
# swap.swapfile.size = "64G";
};
};
};
};
};
};
};
};
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"
];
}; };
}; };
}; };

View File

@ -76,9 +76,6 @@
# options = ["defaults" "rw" "noatime"]; # options = ["defaults" "rw" "noatime"];
# }; # };
# Can't set this in disko
"/home".neededForBoot = true;
# NOTE: By mounting NFS shares here, we risk the system becoming unusable when they disconnect (unless unmounted). # NOTE: By mounting NFS shares here, we risk the system becoming unusable when they disconnect (unless unmounted).
# If the bg option is specified, a timeout or failure causes the mount(8) command # If the bg option is specified, a timeout or failure causes the mount(8) command
@ -121,13 +118,18 @@
fsType = "nfs"; fsType = "nfs";
options = ["defaults" "rw" "noatime" "_netdev" "bg" "hard"]; 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 = [ swapDevices = [
{ {
device = "/swap/swapfile"; device = "/var/swap";
size = 1024 * 64; # Without hibernation 4.0 GB to 0.5 x RAM size = 1024 * 16; # 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.
} }
]; ];
@ -140,8 +142,8 @@
nvidia-container-toolkit.enable = true; nvidia-container-toolkit.enable = true;
nvidia = { nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable; # package = config.boot.kernelPackages.nvidiaPackages.stable;
# package = config.boot.kernelPackages.nvidiaPackages.beta; package = config.boot.kernelPackages.nvidiaPackages.beta;
open = true; open = true;
nvidiaSettings = false; # Those are for x-server nvidiaSettings = false; # Those are for x-server

View File

@ -12,7 +12,7 @@
}; };
}; };
# programs.light.enable = true; # Unmaintained programs.light.enable = true;
services.xserver = { services.xserver = {
# Configure keymap in X11 # Configure keymap in X11

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