Compare commits
39 Commits
master
...
9a9bffd637
| Author | SHA1 | Date | |
|---|---|---|---|
|
9a9bffd637
|
|||
|
f1b269e3ee
|
|||
|
f09dee5ad8
|
|||
|
f246eacdb3
|
|||
|
b7e2bba8f0
|
|||
|
25ae0f4b85
|
|||
|
d12b247368
|
|||
|
25e9128875
|
|||
|
eee28f57fc
|
|||
|
ea03e2266f
|
|||
|
5e422d05c9
|
|||
|
eaa36cfce2
|
|||
|
572d0bfe9e
|
|||
|
385ca27f8c
|
|||
|
4c18fd8c8e
|
|||
|
bf0c55669c
|
|||
|
86a5e79079
|
|||
|
7d429a4720
|
|||
|
2e9a4b13d1
|
|||
|
73eeff9a0e
|
|||
|
d216a8018d
|
|||
|
b09d854e50
|
|||
|
ff39dd1df2
|
|||
|
98c520e0bd
|
|||
|
7e3d3ca4a5
|
|||
|
c8a76751f3
|
|||
|
12a10bee82
|
|||
|
767309885a
|
|||
|
6d360ed782
|
|||
|
ddccd51b5a
|
|||
|
1fef42e5d4
|
|||
|
0d20883f4f
|
|||
|
cec5ec5493
|
|||
|
5833dff19e
|
|||
|
7b4c2df7af
|
|||
|
1643f30906
|
|||
|
79c617cc91
|
|||
|
474a8badf4
|
|||
|
17368396cf
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,4 +11,3 @@ config/neovim/store
|
||||
home/modules/ags/config/types
|
||||
home/modules/ags/config/tsconfig.json
|
||||
system/modules/agenix/secrets.nix
|
||||
config/neovim/nvim_bundle
|
||||
|
||||
BIN
Darwin.png
BIN
Darwin.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 MiB |
BIN
FastFetch.png
BIN
FastFetch.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 2.0 MiB |
BIN
NeoVim.png
BIN
NeoVim.png
Binary file not shown.
|
Before Width: | Height: | Size: 747 KiB After Width: | Height: | Size: 2.0 MiB |
175
README.md
175
README.md
@ -1,159 +1,50 @@
|
||||
# NixFlake
|
||||
# NixOS Configuration
|
||||
|
||||
NixOS flake with [Niri](https://github.com/niri-wm/niri), [Waybar](https://github.com/Alexays/Waybar) for a lightweight desktop and [home-manager](https://github.com/nix-community/home-manager) for declarative `~/` configuration.
|
||||
Modular NixOS configuration, using Hyprland (yikes) or Niri for a tiling/scrolling desktop.
|
||||
|
||||
## Screenshots
|
||||

|
||||
|
||||

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

|
||||

|
||||
|
||||

|
||||
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
|
||||
Alternatively, use `nh os switch` or `nh os boot`.
|
||||
|
||||
## Hosts
|
||||
## NixFlake/system
|
||||
|
||||
| Host | Type | GPU | Features |
|
||||
|-|-|-|-|
|
||||
| `nixinator` | Desktop (x86_64) | NVIDIA | [disko](https://github.com/nix-community/disko) partitioning, [lanzaboote](https://github.com/nix-community/lanzaboote) Secure Boot, [impermanence](https://github.com/nix-community/impermanence) opt-in state, [sops-nix](https://github.com/Mic92/sops-nix) secrets |
|
||||
| `nixtop` | Laptop (x86_64) | Intel | Obsolete trash computer |
|
||||
| `servenix` | Headless (x86_64) | NVIDIA | Jellyfin, Nextcloud, Gitea, ... |
|
||||
| `thinknix` | Headless (x86_64) | - | AdGuard DNS, Nginx, ... |
|
||||
| `darwinix` | macOS (aarch64) | - | nix-darwin with home-manager |
|
||||
Contains all the system configurations.
|
||||
|
||||
## Usage
|
||||
- There is a common configuration used for all systems: `NixFlake/system/default.nix`
|
||||
- Every system has its own special configuration: `NixFlake/system/<hostname>/default.nix`
|
||||
- System modules are located in `NixFlake/system/systemmodules`
|
||||
- Hosted services are located in `NixFlake/system/services`
|
||||
|
||||
```bash
|
||||
# Enter dev shell (provides helper utilities)
|
||||
nix develop
|
||||
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
|
||||
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||
|
||||
# Rebuild system + user config together
|
||||
nh os switch
|
||||
nh os boot
|
||||
## NixFlake/home
|
||||
|
||||
# Or with nixos-rebuild
|
||||
sudo nixos-rebuild switch --flake .#nixinator
|
||||
```
|
||||
Contains all the home-manager configurations.
|
||||
|
||||
## Info
|
||||
- There is a common configuration for each user: `NixFlake/home/<username>/default.nix`
|
||||
- There is a configuration for a single system of this user: `NixFlake/home/<username>/<hostname>/default.nix`
|
||||
- Home-Manager modules are located in `NixFlake/home/homemodules`
|
||||
|
||||
Home-manager runs as a NixOS module (not standalone). A single `nixos-rebuild switch` rebuilds both system and user configuration together.
|
||||
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
|
||||
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||
|
||||
### Components
|
||||
## NixFlake/derivations
|
||||
|
||||
Per-host config consists of three layers:
|
||||
Contains all the stuff I packaged.
|
||||
Each derivation is loaded into `NixFlake/derivations/default.nix`.
|
||||
|
||||
1. **Common Config**: `system/default.nix` (NixOS) / `home/christoph/default.nix` (home-manager)
|
||||
2. **Host Config**: `system/<hostname>/default.nix` (NixOS) / `home/christoph/<hostname>/default.nix` (home-manager)
|
||||
3. **Hardware**: `system/<hostname>/hardware-configuration.nix`
|
||||
## NixFlake/overlays
|
||||
|
||||
### Modules
|
||||
|
||||
There are two module hierarchies (NixOS and home-manager modules):
|
||||
|
||||
```
|
||||
system/systemmodules/<name>/ home/homemodules/<name>/
|
||||
- options.nix # declares options - options.nix # declares options
|
||||
- default.nix # implementation - default.nix # implementation
|
||||
```
|
||||
|
||||
## Files
|
||||
|
||||
```
|
||||
NixFlake/
|
||||
├── flake.nix # flake entrypoint: inputs, outputs, host definitions
|
||||
├── flake.lock # flake lockfile
|
||||
├── shell.nix # dev shell (nix develop)
|
||||
├── system/ # NixOS system configurations
|
||||
│ ├── default.nix # global system defaults (all hosts)
|
||||
│ ├── <hostname>/ # per-host overrides + hardware-config
|
||||
│ ├── systemmodules/ # reusable system modules
|
||||
│ └── services/ # OCI container services
|
||||
├── home/ # home-manager user configuration
|
||||
│ └── christoph/
|
||||
│ ├── default.nix # global user defaults
|
||||
│ ├── <hostname>/ # per-host user overrides
|
||||
│ └── homemodules/ # reusable home-manager modules
|
||||
├── lib/ # shared helpers
|
||||
├── derivations/ # custom packages
|
||||
├── overlays/ # package overrides
|
||||
├── config/ # linked dotfiles
|
||||
└── wallpapers/ # backgrounds
|
||||
```
|
||||
|
||||
## System Modules
|
||||
|
||||
| Module | Description |
|
||||
|--------|-------------|
|
||||
| `bootloader` | systemd-boot, lanzaboote Secure Boot signing |
|
||||
| `desktopportal` | xdg-desktop-portal backends (Niri, GTK) |
|
||||
| `docker` | Docker / podman daemon config |
|
||||
| `fonts` | System fonts and fontconfig |
|
||||
| `impermanence` | Opt-in state persistence (wipes `/` on boot) |
|
||||
| `mime` | MIME type associations |
|
||||
| `network` | systemd-networkd wired/wireless config |
|
||||
| `polkit` | Polkit rules for desktop users |
|
||||
| `sops-nix` | Secrets decryption at boot |
|
||||
|
||||
## Home-Manager Modules
|
||||
|
||||
### Shell & Terminal
|
||||
`fish` `terminal` `kitty` `tmux` `paths`
|
||||
|
||||
### Editors
|
||||
`neovim` `vscode` `zed`
|
||||
|
||||
### Desktop / WM
|
||||
`niri` `waybar` `rofi` `color` `fcitx`
|
||||
|
||||
### Media
|
||||
`mpd` `rmpc` `cava` `beets` `jellyfin-tui`
|
||||
|
||||
### Browsers
|
||||
`firefox` `qutebrowser`
|
||||
|
||||
### Tools
|
||||
`git` `ssh` `bat` `btop` `fastfetch` `lazygit` `yazi` `zathura`
|
||||
|
||||
## Services
|
||||
|
||||
All server services run as OCI containers (podman). Each service is defined in `system/services/<name>.nix`.
|
||||
|
||||
| Service | Purpose |
|
||||
|---------|---------|
|
||||
| `adguard` | DNS ad blocking |
|
||||
| `authelia` | SSO |
|
||||
| `fileflows` | Media processing |
|
||||
| `gitea` | Git server |
|
||||
| `immich` | Photo cloud |
|
||||
| `jellyfin` | Streaming server |
|
||||
| `kiwix` | Offline mirrors |
|
||||
| `kopia` | Docker volume backup |
|
||||
| `nextcloud` | File sync |
|
||||
| `nginx-proxy-manager` | Reverse proxy with Let's Encrypt |
|
||||
| `ntfy` | Push notification server |
|
||||
| `paperless` | Document management |
|
||||
| `portainer` | Container status monitor |
|
||||
| `teamspeak` | Voice chat server |
|
||||
| `tinymediamanager` | Media metadata management |
|
||||
|
||||
## Overlays
|
||||
|
||||
Package modifications live in `overlays/default.nix`.
|
||||
|
||||
## Secrets
|
||||
|
||||
Secrets are managed with sops-nix. Public age keys are stored in `flake.nix` under `publicKeys`. Encrypted `.yaml`/`.json` files are referenced via `sops.secrets.<name>`. Decryption happens at activation time.
|
||||
|
||||
## Shared Helpers (`lib/`)
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `nixos.nix` | Host config builders (NixOS + darwin) |
|
||||
| `modules.nix` | Option helpers |
|
||||
| `networking.nix` | systemd-networkd config generators |
|
||||
| `generators.nix` | Lua code generation |
|
||||
| `containers.nix` | OCI container helpers for services |
|
||||
| `color.nix` | Color utilities |
|
||||
| `rofi.nix` | Rofi menu helpers |
|
||||
|
||||
Available to all modules as `mylib` (injected via special args).
|
||||
Contains all overlays, e.g. package version overrides.
|
||||
The `NixFlake/overlays/default.nix` imports all overlays and all derivations.
|
||||
It is then imported by the top-level `NixFlake/flake.nix`, to make everything available to the system/home configurations.
|
||||
|
||||
368
config/flake.nix
368
config/flake.nix
@ -21,9 +21,6 @@ rec {
|
||||
}:
|
||||
# Create a shell (and possibly package) for each possible system, not only x86_64-linux
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
# =========================================================================================
|
||||
# Define pkgs/stdenvs
|
||||
# =========================================================================================
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
@ -31,140 +28,8 @@ rec {
|
||||
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;
|
||||
|
||||
# =========================================================================================
|
||||
# Define shell environment
|
||||
# =========================================================================================
|
||||
|
||||
# Setup the shell when entering the "nix develop" environment (bash script).
|
||||
shellHook = let
|
||||
mkCmakeScript = type: let
|
||||
typeLower = lib.toLower type;
|
||||
in
|
||||
pkgs.writers.writeFish "cmake-${typeLower}.fish" ''
|
||||
cd $FLAKE_PROJECT_ROOT
|
||||
|
||||
echo "Removing build directory ./cmake-build-${typeLower}/"
|
||||
rm -rf ./cmake-build-${typeLower}
|
||||
|
||||
echo "Creating build directory"
|
||||
mkdir cmake-build-${typeLower}
|
||||
cd cmake-build-${typeLower}
|
||||
|
||||
echo "Running cmake"
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="${type}" -DCMAKE_EXPORT_COMPILE_COMMANDS="On" ..
|
||||
|
||||
echo "Linking compile_commands.json"
|
||||
cd ..
|
||||
ln -sf ./cmake-build-${typeLower}/compile_commands.json ./compile_commands.json
|
||||
'';
|
||||
|
||||
cmakeDebug = mkCmakeScript "Debug";
|
||||
cmakeRelease = mkCmakeScript "Release";
|
||||
|
||||
mkBuildScript = type: let
|
||||
typeLower = lib.toLower type;
|
||||
in
|
||||
pkgs.writers.writeFish "cmake-build.fish" ''
|
||||
cd $FLAKE_PROJECT_ROOT/cmake-build-${typeLower}
|
||||
|
||||
echo "Running cmake"
|
||||
cmake --build .
|
||||
'';
|
||||
|
||||
buildDebug = mkBuildScript "Debug";
|
||||
buildRelease = mkBuildScript "Release";
|
||||
|
||||
# Add project-local fish abbrs here
|
||||
abbrs = {
|
||||
# Rust Bevy:
|
||||
# build-release-windows = "CARGO_FEATURE_PURE=1 cargo xwin build --release --target x86_64-pc-windows-msvc";
|
||||
|
||||
# C/C++:
|
||||
# cmake-debug = "${cmakeDebug}";
|
||||
# cmake-release = "${cmakeRelease}";
|
||||
# build-debug = "${buildDebug}";
|
||||
# build-release = "${buildRelease}";
|
||||
|
||||
# Clojure:
|
||||
# clojure-deps = "deps-lock --lein";
|
||||
|
||||
# Python:
|
||||
# run = "python ./app/main.py";
|
||||
# profile = "py-spy record -o profile.svg -- python ./app/main.py && firefox profile.svg";
|
||||
# ptop = "py-spy top -- python ./app/main.py";
|
||||
};
|
||||
|
||||
eraseAbbr = name: value: ''abbr --erase ${name} 2>/dev/null'';
|
||||
createAbbr = name: value: ''abbr -a ${name} "${value}"'';
|
||||
|
||||
# This will be sourced by the global fish config if INIT_PROJECT_SHELL gets unset
|
||||
unloadProjectShell = pkgs.writers.writeFish "unload-shell.fish" ''
|
||||
echo "Unloading \"${description}\" environment..."
|
||||
|
||||
${builtins.concatStringsSep "\n" (lib.mapAttrsToList eraseAbbr abbrs)}
|
||||
'';
|
||||
|
||||
# This will be sourced by the global fish config if INIT_PROJECT_SHELL gets set
|
||||
initProjectShell = pkgs.writers.writeFish "init-shell.fish" ''
|
||||
# Unload just in case, to not have redefinition errors
|
||||
source ${unloadProjectShell}
|
||||
|
||||
echo "Sourcing \"${description}\" environment..."
|
||||
|
||||
${builtins.concatStringsSep "\n" (lib.mapAttrsToList createAbbr abbrs)}
|
||||
'';
|
||||
in
|
||||
builtins.concatStringsSep "\n" [
|
||||
# Launch into pure fish shell
|
||||
''
|
||||
# Determine the project root, used e.g. in cmake scripts
|
||||
export FLAKE_PROJECT_ROOT="$(git rev-parse --show-toplevel)"
|
||||
|
||||
# Can't do the "exec" with nix-direnv
|
||||
# - The "exec fish" would call direnv again => Infinite loop
|
||||
# - The shellHook is Bash/POSIX, so fish syntax doesn't work
|
||||
|
||||
# Use this for "nix develop" without direnv
|
||||
# exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
|
||||
|
||||
# Use this for direnv without "nix develop"
|
||||
export INIT_PROJECT_SHELL="${initProjectShell}"
|
||||
export UNLOAD_PROJECT_SHELL="${unloadProjectShell}"
|
||||
''
|
||||
|
||||
# Qt: Launch into wrapped fish shell (direnv incompatible)
|
||||
# https://nixos.org/manual/nixpkgs/stable/#sec-language-qt
|
||||
# ''
|
||||
# fishdir=$(mktemp -d)
|
||||
# makeWrapper "$(type -p fish)" "$fishdir/fish" "''${qtWrapperArgs[@]}"
|
||||
# exec "$fishdir/fish" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
|
||||
# ''
|
||||
];
|
||||
|
||||
# ===========================================================================================
|
||||
# Define custom dependencies
|
||||
# ===========================================================================================
|
||||
@ -203,7 +68,7 @@ rec {
|
||||
# bintools = pkgs.bintools.bintools; # Unwrapped bintools
|
||||
# libc = pkgs.glibc;
|
||||
# };
|
||||
# gcc = lib.hiPrio (pkgs.wrapCCWith {
|
||||
# gcc = pkgs.hiPrio (pkgs.wrapCCWith {
|
||||
# cc = pkgs.gcc.cc; # Unwrapped gcc
|
||||
# libc = pkgs.glibc;
|
||||
# bintools = bintools;
|
||||
@ -219,7 +84,7 @@ rec {
|
||||
# bintools = pkgs.bintools.bintools; # Unwrapped bintools
|
||||
# libc = pkgs.glibc_multi;
|
||||
# };
|
||||
# gcc_multilib = lib.hiPrio (pkgs.wrapCCWith {
|
||||
# gcc_multilib = pkgs.hiPrio (pkgs.wrapCCWith {
|
||||
# cc = pkgs.gcc.cc; # Unwrapped gcc
|
||||
# libc = pkgs.glibc_multi;
|
||||
# bintools = bintools_multilib;
|
||||
@ -254,15 +119,11 @@ rec {
|
||||
# jdk
|
||||
|
||||
# C/C++:
|
||||
# pkg-config
|
||||
# cmake
|
||||
# gnumake
|
||||
# ninja
|
||||
# gdb
|
||||
# valgrind
|
||||
# kdePackages.kcachegrind
|
||||
# perf
|
||||
# hotspot
|
||||
# gnumake
|
||||
# cmake
|
||||
# pkg-config
|
||||
|
||||
# Clojure:
|
||||
# leiningen
|
||||
@ -286,8 +147,6 @@ rec {
|
||||
# C/C++:
|
||||
# boost
|
||||
# sfml
|
||||
# raylib
|
||||
# backward-cpp
|
||||
|
||||
# Qt:
|
||||
# qt6.qtbase
|
||||
@ -303,38 +162,8 @@ rec {
|
||||
# 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
|
||||
# mv ./BINARY $out/bin
|
||||
# '';
|
||||
# };
|
||||
# package = clj-nix.lib.mkCljApp {
|
||||
@ -356,76 +185,133 @@ rec {
|
||||
# };
|
||||
in rec {
|
||||
# Provide package for "nix build"
|
||||
# packages = {
|
||||
# default = package;
|
||||
# windows = windowsPackage;
|
||||
# };
|
||||
# apps = {
|
||||
# default = flake-utils.lib.mkApp {drv = package;};
|
||||
# defaultPackage = package;
|
||||
# defaultApp = flake-utils.lib.mkApp {
|
||||
# drv = defaultPackage;
|
||||
# };
|
||||
|
||||
devShells = {
|
||||
# Provide default environment for "nix develop".
|
||||
# Other environments can be added below.
|
||||
default = pkgs.mkShell {
|
||||
inherit nativeBuildInputs buildInputs shellHook;
|
||||
name = description;
|
||||
# Provide environment for "nix develop"
|
||||
devShell = pkgs.mkShell {
|
||||
inherit nativeBuildInputs buildInputs;
|
||||
name = description;
|
||||
|
||||
# =========================================================================================
|
||||
# Define environment variables
|
||||
# =========================================================================================
|
||||
# =========================================================================================
|
||||
# Define environment variables
|
||||
# =========================================================================================
|
||||
|
||||
# Rust stdlib source:
|
||||
# RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library";
|
||||
# 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;
|
||||
# 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"
|
||||
#
|
||||
# # 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;
|
||||
# };
|
||||
# # 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
|
||||
# =========================================================================================
|
||||
|
||||
# Setup the shell when entering the "nix develop" environment (bash script).
|
||||
shellHook = let
|
||||
mkCmakeScript = type: let
|
||||
typeLower = lib.toLower type;
|
||||
in
|
||||
pkgs.writers.writeFish "cmake-${typeLower}.fish" ''
|
||||
cd $FLAKE_PROJECT_ROOT
|
||||
|
||||
echo "Removing build directory ./cmake-build-${typeLower}/"
|
||||
rm -rf ./cmake-build-${typeLower}
|
||||
|
||||
echo "Creating build directory"
|
||||
mkdir cmake-build-${typeLower}
|
||||
cd cmake-build-${typeLower}
|
||||
|
||||
echo "Running cmake"
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="${type}" -DCMAKE_EXPORT_COMPILE_COMMANDS="On" ..
|
||||
|
||||
echo "Linking compile_commands.json"
|
||||
cd ..
|
||||
ln -sf ./cmake-build-${typeLower}/compile_commands.json ./compile_commands.json
|
||||
'';
|
||||
|
||||
cmakeDebug = mkCmakeScript "Debug";
|
||||
cmakeRelease = mkCmakeScript "Release";
|
||||
|
||||
mkBuildScript = type: let
|
||||
typeLower = lib.toLower type;
|
||||
in
|
||||
pkgs.writers.writeFish "cmake-build.fish" ''
|
||||
cd $FLAKE_PROJECT_ROOT/cmake-build-${typeLower}
|
||||
|
||||
echo "Running cmake"
|
||||
cmake --build .
|
||||
'';
|
||||
|
||||
buildDebug = mkBuildScript "Debug";
|
||||
buildRelease = mkBuildScript "Release";
|
||||
|
||||
# Use this to specify commands that should be ran after entering fish shell
|
||||
initProjectShell = pkgs.writers.writeFish "init-shell.fish" ''
|
||||
echo "Entering \"${description}\" environment..."
|
||||
|
||||
# Determine the project root, used e.g. in cmake scripts
|
||||
set -g -x FLAKE_PROJECT_ROOT (git rev-parse --show-toplevel)
|
||||
|
||||
# Rust Bevy:
|
||||
# abbr -a build-release-windows "CARGO_FEATURE_PURE=1 cargo xwin build --release --target x86_64-pc-windows-msvc"
|
||||
|
||||
# C/C++:
|
||||
# abbr -a cmake-debug "${cmakeDebug}"
|
||||
# abbr -a cmake-release "${cmakeRelease}"
|
||||
# abbr -a build-debug "${buildDebug}"
|
||||
# abbr -a build-release "${buildRelease}"
|
||||
|
||||
# Clojure:
|
||||
# abbr -a clojure-deps "deps-lock --lein"
|
||||
|
||||
# Python:
|
||||
# abbr -a run "python ./app/main.py"
|
||||
# abbr -a profile "py-spy record -o profile.svg -- python ./app/main.py && firefox profile.svg"
|
||||
# abbr -a ptop "py-spy top -- python ./app/main.py"
|
||||
'';
|
||||
in
|
||||
builtins.concatStringsSep "\n" [
|
||||
# Launch into pure fish shell
|
||||
''
|
||||
exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
|
||||
''
|
||||
|
||||
# Qt: Launch into wrapped fish shell
|
||||
# https://nixos.org/manual/nixpkgs/stable/#sec-language-qt
|
||||
# ''
|
||||
# fishdir=$(mktemp -d)
|
||||
# makeWrapper "$(type -p fish)" "$fishdir/fish" "''${qtWrapperArgs[@]}"
|
||||
# exec "$fishdir/fish" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
|
||||
# ''
|
||||
];
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@ -210,10 +210,6 @@ Convert line endings to dos format
|
||||
unix2dos <file>
|
||||
$ file: eza -1
|
||||
|
||||
% tiddl
|
||||
Download stuff from tidal
|
||||
tiddl download --track-quality max --path ~/Downloads/Beet/Albums --videos none url "<url>"
|
||||
|
||||
; ===========================
|
||||
; SECRETS
|
||||
; ===========================
|
||||
@ -238,11 +234,11 @@ $ mode: echo -e "--export \tExport public key\n--export-secret-keys\t
|
||||
|
||||
% sops
|
||||
# Edit secrets.yaml
|
||||
sops ~/NixFlake/system/systemmodules/sops-nix/secrets.yaml
|
||||
sops ~/NixFlake/system/modules/sops-nix/secrets.yaml
|
||||
|
||||
% sops
|
||||
# Rekey secrets.yaml
|
||||
sops updatekeys ~/NixFlake/system/systemmodules/sops-nix/secrets.yaml
|
||||
sops updatekeys ~/NixFlake/system/modules/sops-nix/secrets.yaml
|
||||
|
||||
% ssh
|
||||
# Generate a new SSH key
|
||||
@ -308,33 +304,27 @@ mkdir -p "<name>" && cd "<name>" && spotdl --client-id (cat /home/christoph/.sec
|
||||
|
||||
% ffmpeg
|
||||
# Create a slow motion version of a video with interpolated/blended frames
|
||||
ffmpeg -i <input> -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=<doublefps>',setpts=2*PTS" output.mp4
|
||||
ffmpeg -i "<input>" -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=<doublefps>',setpts=2*PTS" output.mp4
|
||||
$ input: eza -f -1
|
||||
|
||||
% ffmpeg
|
||||
# Detect black bar dimensions automatically by looking at the first 10 frames
|
||||
ffmpeg -i <input> -vframes 10 -vf cropdetect -f null -
|
||||
ffmpeg -i "<input>" -vframes 10 -vf cropdetect -f null -
|
||||
$ input: eza -f -1
|
||||
|
||||
% ffmpeg
|
||||
# Preview video with applied crop settings
|
||||
ffplay -vf crop=<width>:<height>:<x>:<y> <input>
|
||||
ffplay -vf crop=<width>:<height>:<x>:<y> "<input>"
|
||||
$ input: eza -f -1
|
||||
|
||||
% ffmpeg
|
||||
# Re-encode the video with applied crop settings
|
||||
ffmpeg -i <input> -vf crop=<width>:<height>:<x>:<y> -c:a copy output.mp4
|
||||
ffmpeg -i "<input>" -vf crop=<width>:<height>:<x>:<y> -c:a copy output.mp4
|
||||
$ input: eza -f -1
|
||||
|
||||
% ffmpeg
|
||||
# Reencode and compress the video using the h265 codec
|
||||
ffmpeg -i <input> -vcodec libx265 -crf <quality> out_<input>
|
||||
$ input: eza -f -1
|
||||
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"
|
||||
|
||||
% ffmpeg
|
||||
# Reencode, compress and scale the video using the h265 codec
|
||||
ffmpeg -i <input> -vcodec libx265 -crf <quality> -vf scale=<width>:-2,setsar=1:1 out_<input>
|
||||
ffmpeg -i "<input>" -vcodec libx265 -crf <quality> "out_<input>"
|
||||
$ input: eza -f -1
|
||||
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"
|
||||
|
||||
|
||||
@ -1,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()
|
||||
@ -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
|
||||
@ -1,10 +0,0 @@
|
||||
.bordered-images img {
|
||||
border-radius: var(--callout-radius);
|
||||
/* border-style: solid; */
|
||||
/* border-width: var(--callout-border-width); */
|
||||
/* border-color: var(--color-purple-rgb); */
|
||||
/* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); */
|
||||
|
||||
/* Background color so PNGs with transparent backgrounds don't look weird */
|
||||
/* background-color: var(--background-secondary); */
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
.center-images img {
|
||||
display: block !important;
|
||||
margin-left: auto !important;
|
||||
margin-right: auto !important;
|
||||
img[alt*="center"] {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
.fullwidth-images img {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
.justify-text.cm-s-obsidian,
|
||||
.justify-text.markdown-preview-view {
|
||||
text-align: justify;
|
||||
hyphens: auto;
|
||||
}
|
||||
@ -9,5 +9,4 @@
|
||||
msty = pkgs.callPackage ./msty {};
|
||||
unityhub = pkgs.callPackage ./unityhub {};
|
||||
tidal-dl-ng = pkgs.callPackage ./tidal-dl-ng {};
|
||||
tiddl = pkgs.callPackage ./tiddl {};
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
# sha256 = "sha256-Gq9klAMXk+SHb7C6z6apErVRz0PB5jyADfixqGZyDDc=";
|
||||
# };
|
||||
# });
|
||||
#
|
||||
|
||||
# rich_14_2_0 = pkgs.python313Packages.rich.overridePythonAttrs (old: {
|
||||
# version = "14.2.0";
|
||||
# src = pkgs.python313Packages.fetchPypi {
|
||||
@ -49,12 +49,22 @@
|
||||
# doCheck = false;
|
||||
# });
|
||||
|
||||
# rich_14_2_0 = pkgs.python313Packages.rich.overridePythonAttrs (old: {
|
||||
# version = "14.2.0";
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "Textualize";
|
||||
# repo = "rich";
|
||||
# tag = "v14.2.0";
|
||||
# hash = "sha256-oQbxRbZnVr/Ln+i/hpBw5FlpUp3gcp/7xsxi6onPkn8=";
|
||||
# };
|
||||
# });
|
||||
|
||||
tidalDlNg = pythonPkgs.buildPythonApplication rec {
|
||||
pname = "tidal_dl_ng_for_dj";
|
||||
version = "0.33.2";
|
||||
pname = "tidal-dl-ng";
|
||||
version = "0.31.3";
|
||||
format = "pyproject";
|
||||
|
||||
# The official repo was deleted
|
||||
# TODO: The official repo was deleted, find the new one once it pops up
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "exislow";
|
||||
# repo = "tidal-dl-ng";
|
||||
@ -62,20 +72,16 @@
|
||||
# sha256 = "sha256-PUT0anx1yivgXwW21jah7Rv1/BabOT+KPoW446NFNyg=";
|
||||
# };
|
||||
|
||||
# Package now also deleted from PyPi
|
||||
# src = pythonPkgs.fetchPypi {
|
||||
# inherit pname version;
|
||||
# sha256 = "sha256-rOMyxnT7uVnMbn678DFtqAu4+Uc5VFGcqGI0jxplnpc=";
|
||||
# };
|
||||
|
||||
# TODO: Borked
|
||||
# "For DJ"-Fork
|
||||
src = pythonPkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-605cgBqZV6L7sxWtEa4Ki+9hBqX4m3Rk+X5oY5bv/FQ=";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "rodvicj";
|
||||
repo = "tidal_dl_ng-Project";
|
||||
rev = "4573142c76ef045ebf8e80c34657dd2bec96f17d";
|
||||
sha256 = "sha256-3sO2qj8V4KXOWK7vQsFAOYeTZo2rsc/M36SwRnC0oVg=";
|
||||
};
|
||||
|
||||
dontCheckRuntimeDeps = true;
|
||||
doCheck = false;
|
||||
catchConflicts = false;
|
||||
strictDeps = false;
|
||||
|
||||
nativeBuildInputs = with pythonPkgs; [poetry-core setuptools];
|
||||
|
||||
@ -128,7 +134,7 @@
|
||||
|
||||
tidal-dl-ng-gui-desktopfile = pkgs.stdenv.mkDerivation {
|
||||
pname = "tdng";
|
||||
version = "0.33.2";
|
||||
version = "0.31.3";
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [pkgs.makeWrapper];
|
||||
|
||||
@ -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
|
||||
];
|
||||
}
|
||||
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||
with pkgs;
|
||||
[
|
||||
# Unity Hub binary dependencies
|
||||
libxrandr
|
||||
xorg.libXrandr
|
||||
xdg-utils
|
||||
|
||||
# GTK filepicker
|
||||
@ -72,14 +72,14 @@ stdenv.mkDerivation rec {
|
||||
dbus
|
||||
at-spi2-core
|
||||
pango
|
||||
libxcomposite
|
||||
libxext
|
||||
libxdamage
|
||||
libxfixes
|
||||
libxcb
|
||||
libxshmfence
|
||||
libxScrnSaver
|
||||
libxtst
|
||||
xorg.libXcomposite
|
||||
xorg.libXext
|
||||
xorg.libXdamage
|
||||
xorg.libXfixes
|
||||
xorg.libxcb
|
||||
xorg.libxshmfence
|
||||
xorg.libXScrnSaver
|
||||
xorg.libXtst
|
||||
|
||||
# Unity Hub additional dependencies
|
||||
libva
|
||||
@ -97,8 +97,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Unity Editor dependencies
|
||||
libglvnd # provides ligbl
|
||||
libx11
|
||||
libxcursor
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
glib
|
||||
gdk-pixbuf
|
||||
libxml2-legacy
|
||||
@ -111,8 +111,8 @@ stdenv.mkDerivation rec {
|
||||
vulkan-loader
|
||||
|
||||
# Unity Bug Reporter specific dependencies
|
||||
libICE
|
||||
libSM
|
||||
xorg.libICE
|
||||
xorg.libSM
|
||||
|
||||
# Fonts used by built-in and third party editor tools
|
||||
corefonts
|
||||
|
||||
1126
flake.lock
generated
1126
flake.lock
generated
File diff suppressed because it is too large
Load Diff
111
flake.nix
111
flake.nix
@ -12,12 +12,8 @@
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
hardware.url = "github:nixos/nixos-hardware";
|
||||
|
||||
# Darwin
|
||||
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
|
||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# NOTE: Update this after May and November
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
|
||||
# Home Manager
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
@ -57,14 +53,52 @@
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
niri.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Walker
|
||||
elephant.url = "github:abenz1267/elephant";
|
||||
walker.url = "github:abenz1267/walker";
|
||||
walker.inputs.elephant.follows = "elephant";
|
||||
# Quickshell
|
||||
quickshell.url = "github:quickshell-mirror/quickshell";
|
||||
quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# 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
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
# nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Emacs nightly
|
||||
# emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||
@ -78,19 +112,9 @@
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||
# nix-flatpak.inputs.nixpkgs.follows = "nixpkgs"; # nix-flatpak doesn't have this
|
||||
|
||||
# Instant Direnv (load environment in background)
|
||||
# direnv-instant.url = "github:Mic92/direnv-instant";
|
||||
# direnv-instant.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Realtime audio
|
||||
# musnix.url = "github:musnix/musnix";
|
||||
# musnix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# 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.
|
||||
@ -99,14 +123,12 @@
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nix-darwin,
|
||||
...
|
||||
} @ inputs: let
|
||||
# Our configuration is buildable on the following system/platform.
|
||||
# Configs can support more than a single system simultaneously,
|
||||
# e.g. NixOS (linux) and MacOS (darwin) or Arm.
|
||||
system = "x86_64-linux";
|
||||
darwinSystem = "aarch64-darwin";
|
||||
|
||||
# We configure our global packages here.
|
||||
# Usually, "nixpkgs.legacyPackages.${system}" is used (and more efficient),
|
||||
@ -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.
|
||||
# They are made available to the system and HM configs by inheriting mylib.
|
||||
mylib = import ./lib {
|
||||
@ -182,15 +184,8 @@
|
||||
inherit (nixpkgs) lib;
|
||||
};
|
||||
|
||||
darwinMylib = import ./lib {
|
||||
inherit inputs darwinPkgs;
|
||||
|
||||
inherit (nixpkgs) lib;
|
||||
|
||||
pkgs = darwinPkgs;
|
||||
};
|
||||
|
||||
# NOTE: Keep public keys here so they're easy to rotate
|
||||
|
||||
publicKeys.christoph = {
|
||||
# /home/christoph/.ssh/id_ed25519.pub
|
||||
ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJAoJac+GdGtzblCMA0lBfMdSR6aQ4YyovrNglCFGIny christoph.urlacher@protonmail.com";
|
||||
@ -214,22 +209,6 @@
|
||||
# Local shell for NixFlake directory
|
||||
devShells.${system}.default = import ./shell.nix {inherit pkgs;};
|
||||
|
||||
# Usage: sudo darwin-rebuild switch --flake .#darwinix
|
||||
darwinConfigurations = {
|
||||
darwinix = darwinMylib.nixos.mkDarwinConfigWithHomeManagerModule {
|
||||
inherit publicKeys;
|
||||
|
||||
system = darwinSystem;
|
||||
mylib = darwinMylib;
|
||||
hostname = "darwinix";
|
||||
username = "christoph";
|
||||
headless = false;
|
||||
extraModules = [
|
||||
inputs.sops-nix.darwinModules.sops
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# We give each configuration a (host)name to choose a configuration when rebuilding.
|
||||
# This makes it easy to add different configurations (e.g. for a laptop).
|
||||
# Usage: sudo nixos-rebuild switch --flake .#nixinator
|
||||
|
||||
@ -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 = {};
|
||||
};
|
||||
}
|
||||
@ -34,7 +34,8 @@ in
|
||||
|
||||
homemodules = {
|
||||
beets.enable = !headless;
|
||||
cava.enable = !headless;
|
||||
|
||||
btop.enable = true;
|
||||
|
||||
chromium = {
|
||||
enable = !headless;
|
||||
@ -46,8 +47,7 @@ in
|
||||
extraPackages = with pkgs; [
|
||||
papirus-icon-theme
|
||||
bibata-cursors
|
||||
# Lol
|
||||
# inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all
|
||||
inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all
|
||||
];
|
||||
|
||||
cursor = "Bibata-Modern-Classic";
|
||||
@ -77,15 +77,221 @@ in
|
||||
disableTabBar = true;
|
||||
};
|
||||
|
||||
fish.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
|
||||
userName = "Christoph Urlacher";
|
||||
userEmail = "christoph.urlacher@protonmail.com";
|
||||
signCommits = true;
|
||||
};
|
||||
|
||||
hyprland = {
|
||||
enable = nixosConfig.programs.hyprland.enable;
|
||||
dunst.enable = !config.homemodules.hyprpanel.enable; # Disable for hyprpanel
|
||||
bars.enable = false;
|
||||
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;
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
alias = true;
|
||||
neovide = !headless;
|
||||
};
|
||||
|
||||
niri.enable = nixosConfig.programs.niri.enable;
|
||||
nnn.enable = false; # Use yazi
|
||||
packages.enable = true;
|
||||
qutebrowser.enable = !headless;
|
||||
rmpc.enable = !headless;
|
||||
rofi.enable = false;
|
||||
terminal.enable = true;
|
||||
waybar.enable = !headless;
|
||||
|
||||
rofi = {
|
||||
enable = !headless;
|
||||
};
|
||||
|
||||
waybar.enable = false; # Use hyprpanel
|
||||
yazi.enable = true;
|
||||
zathura.enable = !headless;
|
||||
};
|
||||
|
||||
@ -224,15 +430,6 @@ in
|
||||
"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,362 @@ in
|
||||
};
|
||||
|
||||
# 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
|
||||
|
||||
# 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}";
|
||||
|
||||
# Packages with extra options managed by HomeManager natively
|
||||
programs = {
|
||||
# The home-manager management tool.
|
||||
# Will only be enabled if HM is installed standalone.
|
||||
home-manager.enable = true;
|
||||
|
||||
bat = {
|
||||
enable = true;
|
||||
|
||||
themes = {
|
||||
catppuccin-latte = {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "bat";
|
||||
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
|
||||
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
||||
};
|
||||
file = "Catppuccin-latte.tmTheme";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
theme = "catppuccin-latte";
|
||||
};
|
||||
};
|
||||
|
||||
cava = {
|
||||
enable = !headless;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
framerate = 60; # default 60
|
||||
autosens = 1; # default 1
|
||||
sensitivity = 100; # default 100
|
||||
lower_cutoff_freq = 50; # not passed to cava if not provided
|
||||
higher_cutoff_freq = 10000; # not passed to cava if not provided
|
||||
};
|
||||
|
||||
smoothing = {
|
||||
noise_reduction = 77; # default 77
|
||||
monstercat = false; # default false
|
||||
waves = false; # default false
|
||||
};
|
||||
|
||||
color = {
|
||||
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
|
||||
gradient = 1;
|
||||
|
||||
gradient_color_1 = "'${color.hexS.teal}'";
|
||||
gradient_color_2 = "'${color.hexS.sky}'";
|
||||
gradient_color_3 = "'${color.hexS.sapphire}'";
|
||||
gradient_color_4 = "'${color.hexS.blue}'";
|
||||
gradient_color_5 = "'${color.hexS.mauve}'";
|
||||
gradient_color_6 = "'${color.hexS.pink}'";
|
||||
gradient_color_7 = "'${color.hexS.maroon}'";
|
||||
gradient_color_8 = "'${color.hexS.red}'";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
};
|
||||
|
||||
# TODO: Module
|
||||
fastfetch = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
logo = {
|
||||
padding = {
|
||||
top = 3;
|
||||
left = 1;
|
||||
right = 2;
|
||||
};
|
||||
};
|
||||
|
||||
display = {
|
||||
separator = "";
|
||||
key.width = 17;
|
||||
};
|
||||
|
||||
# Box Drawing: ╭ ─ ╮ ╰ ╯ │
|
||||
modules = [
|
||||
# Title
|
||||
{
|
||||
type = "title";
|
||||
format = "{#1}╭─── {#}{user-name-colored}";
|
||||
}
|
||||
|
||||
# System Information
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│ {#}System Information";
|
||||
}
|
||||
{
|
||||
type = "os";
|
||||
key = "{#separator}│ {#keys} OS";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = "{#separator}│ {#keys} Kernel";
|
||||
}
|
||||
{
|
||||
type = "bootmgr";
|
||||
key = "{#separator}│ {#keys} BootMGR";
|
||||
}
|
||||
{
|
||||
type = "uptime";
|
||||
key = "{#separator}│ {#keys} Uptime";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
key = "{#separator}│ {#keys} Packages";
|
||||
# format = "{all}";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│";
|
||||
}
|
||||
|
||||
# Desktop Environment
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│ {#}Desktop Environment";
|
||||
}
|
||||
{
|
||||
type = "de";
|
||||
key = "{#separator}│ {#keys} DE";
|
||||
}
|
||||
{
|
||||
type = "wm";
|
||||
key = "{#separator}│ {#keys} WM";
|
||||
}
|
||||
{
|
||||
type = "wmtheme";
|
||||
key = "{#separator}│ {#keys} Theme";
|
||||
}
|
||||
{
|
||||
type = "display";
|
||||
key = "{#separator}│ {#keys} Resolution";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = "{#separator}│ {#keys} Shell";
|
||||
}
|
||||
{
|
||||
type = "terminalfont";
|
||||
key = "{#separator}│ {#keys} Font";
|
||||
}
|
||||
{
|
||||
type = "icons";
|
||||
key = "{#separator}│ {#keys} Icons";
|
||||
}
|
||||
{
|
||||
type = "cursor";
|
||||
key = "{#separator}│ {#keys} Cursor";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│";
|
||||
}
|
||||
|
||||
# Hardware Information
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│ {#}Hardware Information";
|
||||
}
|
||||
{
|
||||
type = "board";
|
||||
key = "{#separator}│ {#keys} Board";
|
||||
}
|
||||
{
|
||||
type = "cpu";
|
||||
key = "{#separator}│ {#keys} CPU";
|
||||
}
|
||||
{
|
||||
type = "gpu";
|
||||
key = "{#separator}│ {#keys} GPU";
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
key = "{#separator}│ {#keys} Memory";
|
||||
}
|
||||
# {
|
||||
# type = "disk";
|
||||
# key = "{#separator}│ {#keys} Disk (/)";
|
||||
# folders = "/";
|
||||
# }
|
||||
# {
|
||||
# type = "disk";
|
||||
# key = "{#separator}│ {#keys} Disk (~/Games)";
|
||||
# folders = "/home/christoph/Games";
|
||||
# }
|
||||
{
|
||||
type = "btrfs";
|
||||
key = "{#separator}│ {#keys} BTRFS";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│";
|
||||
}
|
||||
|
||||
# Colors Footer
|
||||
{
|
||||
type = "colors";
|
||||
key = "{#separator}╰─── {#1}";
|
||||
keyWidth = 6;
|
||||
symbol = "circle";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
fd.enable = true;
|
||||
|
||||
fzf = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
};
|
||||
|
||||
imv = {
|
||||
enable = !headless;
|
||||
settings = {
|
||||
@ -281,6 +827,11 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
navi = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
};
|
||||
|
||||
nix-index = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
@ -310,6 +861,73 @@ in
|
||||
# pointer
|
||||
# ];
|
||||
# };
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
compression = true;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
"nixinator" = {
|
||||
user = "christoph";
|
||||
hostname = "192.168.86.50";
|
||||
};
|
||||
"servenix" = {
|
||||
user = "christoph";
|
||||
hostname = "local.chriphost.de";
|
||||
};
|
||||
"thinknix" = {
|
||||
user = "christoph";
|
||||
hostname = "think.chriphost.de";
|
||||
};
|
||||
"vps" = {
|
||||
user = "root";
|
||||
hostname = "vps.chriphost.de";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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 = {
|
||||
@ -360,18 +978,14 @@ in
|
||||
# Force Wayland by default
|
||||
# Context.sockets = ["wayland" "!x11" "!fallback-x11"]; # NOTE: Makes discord + steam crash
|
||||
|
||||
Context.filesystems = [
|
||||
"/nix/store:ro"
|
||||
"${config.home.homeDirectory}/.themes:ro"
|
||||
"${config.home.homeDirectory}/.config/gtk-4.0:ro"
|
||||
];
|
||||
Context.filesystems = ["/nix/store:ro"];
|
||||
|
||||
Environment = {
|
||||
# Fix un-themed cursor in some Wayland apps
|
||||
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
|
||||
|
||||
# Force correct theme for some GTK apps
|
||||
GTK_THEME = config.gtk.theme.name;
|
||||
GTK_THEME = "Adwaita:light";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -3,11 +3,9 @@
|
||||
pkgs,
|
||||
nixosConfig,
|
||||
config,
|
||||
hostname,
|
||||
lib,
|
||||
mylib,
|
||||
username,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
@ -18,213 +16,52 @@
|
||||
# because it forces en-US keyboard layout.
|
||||
fcitx.enable = true;
|
||||
|
||||
waybar.monitors = ["DP-1" "DP-2"];
|
||||
vscode.enable = true;
|
||||
zed.enable = true;
|
||||
};
|
||||
hyprland = {
|
||||
keyboard = {
|
||||
layout = "us";
|
||||
variant = "altgr-intl";
|
||||
option = "nodeadkeys";
|
||||
};
|
||||
|
||||
programs = {
|
||||
claude-code = {
|
||||
enable = true;
|
||||
enableMcpIntegration = true;
|
||||
};
|
||||
monitors = {
|
||||
"DP-1" = {
|
||||
width = 3440;
|
||||
height = 1440;
|
||||
rate = 165;
|
||||
x = 1920;
|
||||
y = 0;
|
||||
scale = 1;
|
||||
};
|
||||
|
||||
mcp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
nixos = {
|
||||
command = "uvx";
|
||||
args = ["mcp-nixos"];
|
||||
};
|
||||
svelte = {
|
||||
# claude mcp add -t stdio -s [scope] svelte -- npx -y @sveltejs/mcp
|
||||
command = "npx";
|
||||
args = ["-y" "@sveltejs/mcp"];
|
||||
type = "stdio";
|
||||
};
|
||||
shadcn = {
|
||||
# npx shadcn@latest mcp init --client claude
|
||||
command = "npx";
|
||||
args = ["-y" "shadcn@latest" "mcp"];
|
||||
"DP-2" = {
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
rate = 60;
|
||||
x = 0;
|
||||
y = 0;
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
opencode = {
|
||||
enable = true;
|
||||
enableMcpIntegration = true;
|
||||
extraPackages = with pkgs; [
|
||||
# opencode-claude-auth # Installed using npm
|
||||
workspaces = {
|
||||
"DP-1" = [1 2 3 4 5 6 7 8 9];
|
||||
"DP-2" = [10];
|
||||
};
|
||||
|
||||
autostart = {
|
||||
delayed = [
|
||||
"fcitx5"
|
||||
];
|
||||
};
|
||||
|
||||
floating = [
|
||||
{
|
||||
class = "fcitx";
|
||||
}
|
||||
];
|
||||
|
||||
# Writes opencode.json
|
||||
settings = {
|
||||
attachment = {
|
||||
image = {
|
||||
auto_resize = true;
|
||||
max_width = 2000;
|
||||
max_height = 2000;
|
||||
max_base64_bytes = 5242880;
|
||||
};
|
||||
};
|
||||
autoupdate = false;
|
||||
compaction = {
|
||||
auto = true;
|
||||
prune = true;
|
||||
reserved = 10000;
|
||||
};
|
||||
default_agent = "plan";
|
||||
enabled_providers = [
|
||||
"opencode"
|
||||
"opencode-go"
|
||||
"anthropic"
|
||||
];
|
||||
formatter = {
|
||||
nixfmt = {
|
||||
disabled = true;
|
||||
};
|
||||
alejandra = {
|
||||
command = ["alejandra" "$FILE"];
|
||||
extensions = [".nix"];
|
||||
};
|
||||
perltidy = {
|
||||
command = ["perltidy" "$FILE"];
|
||||
extensions = [".pl"];
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
nixd = {
|
||||
command = ["nixd"];
|
||||
extensions = [".nix"];
|
||||
initialization = {
|
||||
preferences = {
|
||||
nixd = {
|
||||
nixpkgs = {expr = "import <nixpkgs> {}";};
|
||||
options = {
|
||||
nixos = {expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.${hostname}.options";};
|
||||
home-manager = {expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.\"${hostname}\".options.home-manager.users.type.getSubOptions []";};
|
||||
};
|
||||
diagnostic = {
|
||||
suppress = ["sema-escaping-with" "var-bind-to-this" "escaping-this-with"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
perlnavigator = {
|
||||
command = ["perlnavigator"];
|
||||
extensions = [".pl"];
|
||||
initialization = {
|
||||
preferences = {};
|
||||
};
|
||||
};
|
||||
# perlpls = {
|
||||
# command = ["pls"];
|
||||
# extensions = [".pl"];
|
||||
# initialization = {
|
||||
# preferences = {
|
||||
# perl = {
|
||||
# perlcritic = {enabled = false;};
|
||||
# syntax = {enabled = true;};
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
r-language-server = {
|
||||
command = ["R" "--no-echo" "-e" "languageserver::run()"];
|
||||
extensions = [".r" ".rmd" ".quarto"];
|
||||
};
|
||||
};
|
||||
permission = {
|
||||
"*" = "ask";
|
||||
"bash" = {
|
||||
"*" = "ask";
|
||||
"ls *" = "allow";
|
||||
"find *" = "ask"; # Don't want find -exec
|
||||
"file *" = "allow";
|
||||
"wc *" = "allow";
|
||||
"grep *" = "allow";
|
||||
"rg *" = "allow";
|
||||
"test *" = "allow";
|
||||
"echo *" = "allow";
|
||||
"which *" = "allow";
|
||||
"pwd *" = "allow";
|
||||
"dirname *" = "allow";
|
||||
"basename *" = "allow";
|
||||
"readlink *" = "allow";
|
||||
|
||||
"cat *.env" = "deny";
|
||||
"cat *.env.*" = "deny";
|
||||
"cat *.env.example" = "allow";
|
||||
"printenv *" = "deny";
|
||||
"env *" = "deny";
|
||||
|
||||
"nix eval *" = "allow";
|
||||
"nix flake metadata *" = "allow";
|
||||
"nix flake show *" = "allow";
|
||||
"nix path-info *" = "allow";
|
||||
"nix why-depends *" = "allow";
|
||||
"nix derivation show *" = "allow";
|
||||
"nix store ping *" = "allow";
|
||||
"nix stire diff-closures *" = "allow";
|
||||
|
||||
"git status *" = "allow";
|
||||
"git log *" = "allow";
|
||||
"git diff *" = "allow";
|
||||
};
|
||||
"external_directory" = {
|
||||
"/nix/store/**" = "allow";
|
||||
"/tmp" = "allow";
|
||||
"/tmp/*" = "allow";
|
||||
};
|
||||
"read" = {
|
||||
"*" = "allow";
|
||||
"*.env" = "deny";
|
||||
"*.env.*" = "deny";
|
||||
"*.env.example" = "allow";
|
||||
};
|
||||
"grep" = "allow";
|
||||
"glob" = "allow";
|
||||
"lsp" = "allow";
|
||||
"skill" = "allow";
|
||||
"task" = "ask";
|
||||
"todowrite" = "allow";
|
||||
"webfetch" = "allow";
|
||||
"websearch" = "allow";
|
||||
"question" = "allow";
|
||||
};
|
||||
plugin = [
|
||||
"opencode-claude-auth@latest" # https://github.com/griffinmartin/opencode-claude-auth
|
||||
"@tarquinen/opencode-dcp@latest" # better compacting
|
||||
# "@slkiser/opencode-quota"
|
||||
];
|
||||
share = "disabled";
|
||||
shell = "fish";
|
||||
snapshot = false;
|
||||
watcher = {
|
||||
ignore = ["node_modules/**" "dist/**" ".git/**"];
|
||||
};
|
||||
};
|
||||
|
||||
# Writes tui.json
|
||||
tui = {
|
||||
theme = "system";
|
||||
diff_style = "auto";
|
||||
mouse = true;
|
||||
attention = {
|
||||
enabled = true;
|
||||
notifications = true;
|
||||
sound = true;
|
||||
volume = "0.3";
|
||||
};
|
||||
};
|
||||
|
||||
agents = {};
|
||||
commands = {};
|
||||
context = '''';
|
||||
skills = {};
|
||||
tools = {};
|
||||
};
|
||||
|
||||
waybar.monitor = "DP-1";
|
||||
};
|
||||
|
||||
home = let
|
||||
@ -276,15 +113,14 @@
|
||||
# Intel FPGA design software
|
||||
# quartus-prime-lite
|
||||
|
||||
jetbrains.clion
|
||||
# jetbrains.clion
|
||||
# jetbrains.rust-rover
|
||||
# jetbrains.pycharm-professional
|
||||
# jetbrains.idea-ultimate
|
||||
# jetbrains.webstorm
|
||||
# jetbrains.rider
|
||||
# ghidra # launch with _JAVA_AWT_WM_NONREPARENTING=1 (use programs.ghidra)
|
||||
# zed-editor # Using module
|
||||
# vscode # Using module
|
||||
zed-editor
|
||||
vscode
|
||||
|
||||
# Unity Stuff
|
||||
# unityhub
|
||||
@ -293,12 +129,10 @@
|
||||
# mono
|
||||
# steam-run-free # nix-alien doesn't seem to run unity apps, this does...
|
||||
|
||||
inputs.hytale-launcher.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
(blender.override {cudaSupport = true;})
|
||||
godot_4
|
||||
(obs-studio.override {cudaSupport = true;})
|
||||
kdePackages.kdenlive
|
||||
# davinci-resolve
|
||||
krita
|
||||
makemkv
|
||||
lrcget
|
||||
@ -308,36 +142,30 @@
|
||||
jellyfin-mpv-shim
|
||||
# tidal-hifi
|
||||
# tidal-dl-ng # TODO: Borked
|
||||
# spotdl
|
||||
tiddl
|
||||
picard
|
||||
handbrake
|
||||
teamspeak6-client
|
||||
|
||||
# virt-manager # use system program option
|
||||
virt-viewer
|
||||
gnome-boxes # doesn't list VMs imported using virsh
|
||||
|
||||
steam-devices-udev-rules
|
||||
];
|
||||
|
||||
file = lib.mkMerge [
|
||||
{
|
||||
# ".local/share/applications/jetbrains-rider.desktop".source = let
|
||||
# desktopFile = pkgs.makeDesktopItem {
|
||||
# name = "jetbrains-rider";
|
||||
# desktopName = "Rider";
|
||||
# exec = "\"${rider-unity}/bin/rider\"";
|
||||
# icon = "rider";
|
||||
# type = "Application";
|
||||
# # Don't show desktop icon in search or run launcher
|
||||
# extraConfig.NoDisplay = "true";
|
||||
# };
|
||||
# in "${desktopFile}/share/applications/jetbrains-rider.desktop";
|
||||
|
||||
".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source =
|
||||
../../../config/mangohud/MangoHud.conf;
|
||||
}
|
||||
# {
|
||||
# ".local/share/applications/jetbrains-rider.desktop".source = let
|
||||
# desktopFile = pkgs.makeDesktopItem {
|
||||
# name = "jetbrains-rider";
|
||||
# desktopName = "Rider";
|
||||
# exec = "\"${rider-unity}/bin/rider\"";
|
||||
# icon = "rider";
|
||||
# type = "Application";
|
||||
# # Don't show desktop icon in search or run launcher
|
||||
# extraConfig.NoDisplay = "true";
|
||||
# };
|
||||
# in "${desktopFile}/share/applications/jetbrains-rider.desktop";
|
||||
#
|
||||
# ".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source =
|
||||
# ../../../config/mangohud/MangoHud.conf;
|
||||
# }
|
||||
(lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) {
|
||||
".MakeMKV/settings.conf".source =
|
||||
config.lib.file.mkOutOfStoreSymlink
|
||||
@ -351,21 +179,46 @@
|
||||
};
|
||||
|
||||
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 = {
|
||||
packages = [
|
||||
"com.valvesoftware.Steam"
|
||||
"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"
|
||||
# "com.valvesoftware.Steam"
|
||||
# "com.valvesoftware.Steam.Utility.steamtinkerlaunch"
|
||||
# "net.davidotek.pupgui2"
|
||||
# "org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
|
||||
# "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
|
||||
|
||||
"org.prismlauncher.PrismLauncher"
|
||||
"com.usebottles.bottles"
|
||||
"io.github.lawstorant.boxflat"
|
||||
|
||||
"org.onlyoffice.desktopeditors"
|
||||
# "io.github.lawstorant.boxflat"
|
||||
|
||||
# "com.unity.UnityHub"
|
||||
];
|
||||
@ -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 = {
|
||||
filesystems = [
|
||||
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
|
||||
|
||||
@ -1,39 +1,35 @@
|
||||
# Here goes the stuff that will only be enabled on the laptop
|
||||
{pkgs, ...}: {
|
||||
{...}: {
|
||||
config = {
|
||||
homemodules = {
|
||||
# TODO: Niri config (needs to modularize niri module)
|
||||
hyprland = {
|
||||
keyboard = {
|
||||
layout = "us";
|
||||
variant = "altgr-intl";
|
||||
option = "nodeadkeys";
|
||||
};
|
||||
|
||||
# hyprland = {
|
||||
# keyboard = {
|
||||
# layout = "us";
|
||||
# variant = "altgr-intl";
|
||||
# option = "nodeadkeys";
|
||||
# };
|
||||
#
|
||||
# monitors = {
|
||||
# "eDP-1" = {
|
||||
# width = 1920;
|
||||
# height = 1080;
|
||||
# rate = 60;
|
||||
# x = 0;
|
||||
# y = 0;
|
||||
# scale = 1;
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# workspaces = {
|
||||
# "eDP-1" = [1 2 3 4 5 6 7 8 9];
|
||||
# };
|
||||
# };
|
||||
monitors = {
|
||||
"eDP-1" = {
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
rate = 60;
|
||||
x = 0;
|
||||
y = 0;
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
|
||||
waybar.monitors = ["eDP-1"];
|
||||
workspaces = {
|
||||
"eDP-1" = [1 2 3 4 5 6 7 8 9];
|
||||
};
|
||||
};
|
||||
|
||||
waybar.monitor = "eDP-1";
|
||||
};
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
brightnessctl
|
||||
];
|
||||
# packages = with pkgs; [];
|
||||
|
||||
# Do not change.
|
||||
# This marks the version when NixOS was installed for backwards-compatibility.
|
||||
|
||||
@ -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";
|
||||
}
|
||||
];
|
||||
}
|
||||
@ -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"
|
||||
];
|
||||
}
|
||||
156
home/homemodules/1_deprecated/vscode/default.nix
Normal file
156
home/homemodules/1_deprecated/vscode/default.nix
Normal 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
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.homemodules) bat color;
|
||||
in {
|
||||
options.homemodules.bat = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf bat.enable {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
|
||||
themes = {
|
||||
catppuccin-latte = {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "bat";
|
||||
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
|
||||
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
||||
};
|
||||
file = "Catppuccin-latte.tmTheme";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
theme = "catppuccin-latte";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable bat";
|
||||
}
|
||||
@ -57,7 +57,7 @@ in {
|
||||
|
||||
fetchart = {
|
||||
auto = "yes";
|
||||
sources = "*"; # sources are queried in this order
|
||||
sources = "filesystem coverart itunes amazon albumart"; # sources are queried in this order
|
||||
};
|
||||
|
||||
# lyrics = {
|
||||
|
||||
@ -1,48 +0,0 @@
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.homemodules) cava color;
|
||||
in {
|
||||
options.homemodules.cava = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf cava.enable {
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
framerate = 60; # default 60
|
||||
autosens = 1; # default 1
|
||||
sensitivity = 100; # default 100
|
||||
lower_cutoff_freq = 50; # not passed to cava if not provided
|
||||
higher_cutoff_freq = 10000; # not passed to cava if not provided
|
||||
};
|
||||
|
||||
smoothing = {
|
||||
noise_reduction = 77; # default 77
|
||||
monstercat = false; # default false
|
||||
waves = false; # default false
|
||||
};
|
||||
|
||||
color = {
|
||||
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
|
||||
gradient = 1;
|
||||
|
||||
gradient_color_1 = "'${color.hexS.teal}'";
|
||||
gradient_color_2 = "'${color.hexS.sky}'";
|
||||
gradient_color_3 = "'${color.hexS.sapphire}'";
|
||||
gradient_color_4 = "'${color.hexS.blue}'";
|
||||
gradient_color_5 = "'${color.hexS.mauve}'";
|
||||
gradient_color_6 = "'${color.hexS.pink}'";
|
||||
gradient_color_7 = "'${color.hexS.maroon}'";
|
||||
gradient_color_8 = "'${color.hexS.red}'";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable cava";
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
# My own HM modules
|
||||
./bat
|
||||
./btop
|
||||
./color
|
||||
./fastfetch
|
||||
./fish
|
||||
./git
|
||||
./jellyfin-tui
|
||||
./kitty
|
||||
./lazygit
|
||||
./neovim
|
||||
./packages
|
||||
./paths
|
||||
./ssh
|
||||
./terminal
|
||||
./tmux
|
||||
./yazi
|
||||
|
||||
# HM modules imported from the flake inputs
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
inputs.textfox.homeManagerModules.default
|
||||
];
|
||||
}
|
||||
@ -3,51 +3,40 @@
|
||||
# Obsolete modules are kept in "1_deprecated" for reference.
|
||||
|
||||
# My own HM modules
|
||||
./bat
|
||||
./beets
|
||||
./btop
|
||||
./cava
|
||||
./chromium
|
||||
./color
|
||||
./docs
|
||||
./fastfetch
|
||||
./fcitx
|
||||
./firefox
|
||||
./fish
|
||||
./git
|
||||
./jellyfin-tui
|
||||
./hyprland
|
||||
./hyprpanel
|
||||
./kitty
|
||||
./lazygit
|
||||
./mpd
|
||||
./neovim
|
||||
./niri
|
||||
./nnn
|
||||
./packages
|
||||
./paths
|
||||
./qutebrowser
|
||||
./rmpc
|
||||
./rofi
|
||||
./waybar
|
||||
./ssh
|
||||
./terminal
|
||||
./tmux
|
||||
./vscode
|
||||
./yazi
|
||||
./zathura
|
||||
./zed
|
||||
|
||||
# HM modules imported from the flake inputs
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
inputs.textfox.homeManagerModules.default
|
||||
inputs.walker.homeManagerModules.default
|
||||
# inputs.direnv-instant.homeModules.direnv-instant
|
||||
# inputs.niri.homeModules.niri # Imported by system module
|
||||
# inputs.noctalia.homeModules.default
|
||||
# inputs.caelestia.homeManagerModules.default
|
||||
# inputs.dank-material-shell.homeModules.dank-material-shell
|
||||
# inputs.dank-material-shell.homeModules.niri
|
||||
# inputs.danksearch.homeModules.default
|
||||
inputs.noctalia.homeModules.default
|
||||
inputs.caelestia.homeManagerModules.default
|
||||
inputs.dank-material-shell.homeModules.dank-material-shell
|
||||
inputs.dank-material-shell.homeModules.niri
|
||||
|
||||
# NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse)
|
||||
# inputs.impermanence.homeManagerModules.impermanence
|
||||
|
||||
@ -32,9 +32,6 @@ in {
|
||||
"Notes/Obsidian/Chriphost/latex_snippets.json".source = ../../../config/obsidian/latex_snippets.json; # TODO: Symlink
|
||||
"Notes/Obsidian/Chriphost/.obsidian/snippets/latex_preview.css".source = ../../../config/obsidian/css_snippets/latex_preview.css;
|
||||
"Notes/Obsidian/Chriphost/.obsidian/snippets/center_image.css".source = ../../../config/obsidian/css_snippets/center_image.css;
|
||||
"Notes/Obsidian/Chriphost/.obsidian/snippets/fullwidth_image.css".source = ../../../config/obsidian/css_snippets/fullwidth_image.css;
|
||||
"Notes/Obsidian/Chriphost/.obsidian/snippets/justify_text.css".source = ../../../config/obsidian/css_snippets/justify_text.css;
|
||||
"Notes/Obsidian/Chriphost/.obsidian/snippets/bordered_image.css".source = ../../../config/obsidian/css_snippets/bordered_image.css;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,163 +0,0 @@
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.homemodules) fastfetch color;
|
||||
in {
|
||||
options.homemodules.fastfetch = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf fastfetch.enable {
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
logo = {
|
||||
padding = {
|
||||
top = 4;
|
||||
left = 1;
|
||||
right = 2;
|
||||
};
|
||||
};
|
||||
|
||||
display = {
|
||||
separator = "";
|
||||
key.width = 17;
|
||||
};
|
||||
|
||||
# Box Drawing: ╭ ─ ╮ ╰ ╯ │
|
||||
modules = [
|
||||
# Title
|
||||
{
|
||||
type = "title";
|
||||
format = "{#1}╭─── {#}{user-name-colored}";
|
||||
}
|
||||
|
||||
# System Information
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│ {#}System Information";
|
||||
}
|
||||
{
|
||||
type = "os";
|
||||
key = "{#separator}│ {#keys} OS";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = "{#separator}│ {#keys} Kernel";
|
||||
}
|
||||
{
|
||||
type = "bootmgr";
|
||||
key = "{#separator}│ {#keys} BootMGR";
|
||||
}
|
||||
{
|
||||
type = "uptime";
|
||||
key = "{#separator}│ {#keys} Uptime";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
key = "{#separator}│ {#keys} Packages";
|
||||
# format = "{all}";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│";
|
||||
}
|
||||
|
||||
# Desktop Environment
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│ {#}Desktop Environment";
|
||||
}
|
||||
{
|
||||
type = "de";
|
||||
key = "{#separator}│ {#keys} DE";
|
||||
}
|
||||
{
|
||||
type = "wm";
|
||||
key = "{#separator}│ {#keys} WM";
|
||||
}
|
||||
{
|
||||
type = "wmtheme";
|
||||
key = "{#separator}│ {#keys} Theme";
|
||||
}
|
||||
{
|
||||
type = "display";
|
||||
key = "{#separator}│ {#keys} Resolution";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = "{#separator}│ {#keys} Shell";
|
||||
}
|
||||
{
|
||||
type = "terminalfont";
|
||||
key = "{#separator}│ {#keys} Font";
|
||||
}
|
||||
{
|
||||
type = "icons";
|
||||
key = "{#separator}│ {#keys} Icons";
|
||||
}
|
||||
{
|
||||
type = "cursor";
|
||||
key = "{#separator}│ {#keys} Cursor";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│";
|
||||
}
|
||||
|
||||
# Hardware Information
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│ {#}Hardware Information";
|
||||
}
|
||||
{
|
||||
type = "board";
|
||||
key = "{#separator}│ {#keys} Board";
|
||||
}
|
||||
{
|
||||
type = "cpu";
|
||||
key = "{#separator}│ {#keys} CPU";
|
||||
}
|
||||
{
|
||||
type = "gpu";
|
||||
key = "{#separator}│ {#keys} GPU";
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
key = "{#separator}│ {#keys} Memory";
|
||||
}
|
||||
# {
|
||||
# type = "disk";
|
||||
# key = "{#separator}│ {#keys} Disk (/)";
|
||||
# folders = "/";
|
||||
# }
|
||||
# {
|
||||
# type = "disk";
|
||||
# key = "{#separator}│ {#keys} Disk (~/Games)";
|
||||
# folders = "/home/christoph/Games";
|
||||
# }
|
||||
{
|
||||
type = "btrfs";
|
||||
key = "{#separator}│ {#keys} BTRFS";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
format = "{#1}│";
|
||||
}
|
||||
|
||||
# Colors Footer
|
||||
{
|
||||
type = "colors";
|
||||
key = "{#separator}╰─── {#1}";
|
||||
keyWidth = 6;
|
||||
symbol = "circle";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable fastfetch";
|
||||
}
|
||||
@ -15,7 +15,7 @@ in [
|
||||
(mkBm "Package Search" "https://search.nixos.org/packages")
|
||||
(mkBm "Option Search" "https://search.nixos.org/options?")
|
||||
(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 "Nixpkgs Version Search" "https://lazamar.co.uk/nix-versions/")
|
||||
(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 "RustOS" "https://os.phil-opp.com/")
|
||||
(mkBm "Interpreters" "https://craftinginterpreters.com/contents.html")
|
||||
(mkBm "Godbolt" "https://godbolt.org")
|
||||
];
|
||||
}
|
||||
{
|
||||
@ -103,9 +102,9 @@ in [
|
||||
(mkBm "Heise" "https://www.heise.de/")
|
||||
(mkBm "HN" "https://news.ycombinator.com/news")
|
||||
(mkBm "Reddit" "https://www.reddit.com/user/FightingMushroom/saved/")
|
||||
# (mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
|
||||
(mkBm "F12" "https://f12.local.chriphost.gay/racepicks")
|
||||
(mkBm "F12PB" "https://f12pb.local.chriphost.de/_/")
|
||||
(mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
|
||||
(mkBm "F11" "https://f11.local.chriphost.de/racepicks")
|
||||
(mkBm "F11PB" "https://f11pb.local.chriphost.de/_/#/collections?collection=pbc_1736455494&filter=&sort=-%40rowid")
|
||||
(mkBm "ISBNDB" "https://isbndb.com/")
|
||||
(mkBm "Music" "https://bandcamp.com/chriphost")
|
||||
(mkBm "Albums" "https://www.albumoftheyear.org/user/chriphost/list/307966/2025/")
|
||||
|
||||
@ -13,7 +13,7 @@ in {
|
||||
config = lib.mkIf firefox.enable {
|
||||
textfox = {
|
||||
enable = firefox.textfox;
|
||||
# useLegacyExtensions = false;
|
||||
useLegacyExtensions = false;
|
||||
profiles = ["default"];
|
||||
|
||||
config = {
|
||||
@ -54,9 +54,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# vdhcoapp # No longer required since VDH >= 10
|
||||
];
|
||||
home.packages = with pkgs; [vdhcoapp];
|
||||
|
||||
home.sessionVariables = lib.mkMerge [
|
||||
{
|
||||
@ -86,9 +84,6 @@ in {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
# configPath = "${config.xdg.configHome}/mozilla/firefox";
|
||||
configPath = "${config.home.homeDirectory}/.mozilla/firefox";
|
||||
|
||||
# firefox-unwrapped is the pure firefox browser, wrapFirefox adds configuration ontop
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
# About policies: https://github.com/mozilla/policy-templates#enterprisepoliciesenabled
|
||||
@ -166,19 +161,12 @@ in {
|
||||
"google"
|
||||
];
|
||||
|
||||
engines = let
|
||||
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 {
|
||||
engines = {
|
||||
kagi = {
|
||||
name = "Kagi";
|
||||
urls = [{template = "https://kagi.com/search?q={searchTerms}";}];
|
||||
iconMapObj."16" = "https://kagi.com/favicon.ico";
|
||||
definedAliases = ["@kg"];
|
||||
definedAliases = ["@k"];
|
||||
};
|
||||
|
||||
wiki = {
|
||||
@ -188,34 +176,13 @@ in {
|
||||
definedAliases = ["@w"];
|
||||
};
|
||||
|
||||
searchix = {
|
||||
name = "Searchix";
|
||||
nixos-packages = {
|
||||
name = "NixOS Packages";
|
||||
urls = [{template = "https://searchix.ovh/?query={searchTerms}";}];
|
||||
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"];
|
||||
};
|
||||
|
||||
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 = {
|
||||
name = "NixOS Functions";
|
||||
urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
|
||||
@ -223,13 +190,6 @@ in {
|
||||
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 = {
|
||||
name = "NixOS Wiki";
|
||||
urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}];
|
||||
@ -244,6 +204,13 @@ in {
|
||||
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 = {
|
||||
name = "GitHub";
|
||||
urls = [{template = "https://github.com/search?q={searchTerms}&type=repositories";}];
|
||||
@ -251,32 +218,6 @@ in {
|
||||
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";
|
||||
|
||||
# Hide bullshit
|
||||
@ -302,7 +243,7 @@ in {
|
||||
# catppuccin-web-file-icons
|
||||
clearurls
|
||||
# cookie-autodelete
|
||||
# dark-background-light-text
|
||||
dark-background-light-text
|
||||
display-_anchors # Easier linking to specific website parts
|
||||
don-t-fuck-with-paste
|
||||
# enhancer-for-youtube # Discontinued, use tweaks-for-youtube
|
||||
|
||||
@ -42,239 +42,159 @@ in {
|
||||
fish_pager_color_description ${color.hex.overlay0}
|
||||
'';
|
||||
|
||||
programs.fish = let
|
||||
# Only add " | bat" if bat is installed
|
||||
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
||||
|
||||
# Same as above but with args for bat
|
||||
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
|
||||
functions = lib.mergeAttrsList [
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {
|
||||
nnncd = {
|
||||
wraps = "nnn";
|
||||
description = "support nnn quit and change directory";
|
||||
body = ''
|
||||
# Block nesting of nnn in subshells
|
||||
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
|
||||
echo "nnn is already running"
|
||||
return
|
||||
end
|
||||
|
||||
# These can be used for my config.homemodules and for HM config.programs,
|
||||
# as both of these add the package to home.packages
|
||||
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
|
||||
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
|
||||
# see. To cd on quit only on ^G, remove the "-x" from both lines below,
|
||||
# without changing the paths.
|
||||
if test -n "$XDG_CONFIG_HOME"
|
||||
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
|
||||
else
|
||||
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
|
||||
end
|
||||
|
||||
# Only add fish abbr if package is installed
|
||||
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
|
||||
in
|
||||
lib.mkMerge [
|
||||
# Darwin exclusive config
|
||||
(lib.mkIf pkgs.stdenv.isDarwin {
|
||||
shellInit = ''
|
||||
set fish_greeting
|
||||
yes | fish_config theme save "system-theme"
|
||||
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||||
# stty start undef
|
||||
# stty stop undef
|
||||
# stty lwrap undef
|
||||
# stty lnext undef
|
||||
|
||||
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
|
||||
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
|
||||
set --global --export HOMEBREW_REPOSITORY "/opt/homebrew"
|
||||
fish_add_path --global --move --path "/opt/homebrew/bin" "/opt/homebrew/sbin"
|
||||
if test -n "$MANPATH[1]"; set --global --export MANPATH ''' $MANPATH; end;
|
||||
if not contains "/opt/homebrew/share/info" $INFOPATH; set --global --export INFOPATH "/opt/homebrew/share/info" $INFOPATH; end;
|
||||
'';
|
||||
# The command function allows one to alias this function to `nnn` without
|
||||
# making an infinitely recursive alias
|
||||
command nnn $argv
|
||||
|
||||
shellAbbrs = lib.mkMerge [
|
||||
{
|
||||
rebuild = "sudo darwin-rebuild switch --flake .#darwinix";
|
||||
}
|
||||
|
||||
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'darwin,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
||||
];
|
||||
if test -e $NNN_TMPFILE
|
||||
source $NNN_TMPFILE
|
||||
rm $NNN_TMPFILE
|
||||
end
|
||||
'';
|
||||
};
|
||||
})
|
||||
|
||||
# Linux exclusive config
|
||||
(lib.mkIf pkgs.stdenv.isLinux {
|
||||
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
||||
|
||||
# TODO: There's a bug with the direnv mechanism:
|
||||
# - When leaving an env, it unloads (good)
|
||||
# - When entering another env, it loads (good)
|
||||
# - When leaving this one, it doesn't unload (bad)
|
||||
# - When entering leaving it again, it works...
|
||||
# This only happens sometimes, is there a race condition?
|
||||
shellInit = ''
|
||||
set fish_greeting
|
||||
yes | fish_config theme save "system-theme"
|
||||
fish_vi_key_bindings
|
||||
|
||||
# Because we can't source that in a project flake's shellHook (is POSIX), source it here
|
||||
function __project_shell_reload --on-variable INIT_PROJECT_SHELL
|
||||
# Leaving the environment
|
||||
if not set -q INIT_PROJECT_SHELL; or test -z "$INIT_PROJECT_SHELL"
|
||||
if test -n "$__last_unload_project_shell"; and test -f "$__last_unload_project_shell"
|
||||
source "$__last_unload_project_shell"
|
||||
end
|
||||
set -e __last_init_project_shell
|
||||
set -e __last_unload_project_shell
|
||||
return
|
||||
end
|
||||
|
||||
# Entering or switching environments
|
||||
if test "$INIT_PROJECT_SHELL" != "$__last_init_project_shell"
|
||||
# Cleanup the previous environment
|
||||
if test -n "$__last_unload_project_shell"; and test -f "$__last_unload_project_shell"
|
||||
source "$__last_unload_project_shell"
|
||||
end
|
||||
|
||||
# Store into variables to persist until next environment switch in the same shell
|
||||
set -g __last_init_project_shell "$INIT_PROJECT_SHELL"
|
||||
if set -q UNLOAD_PROJECT_SHELL; and test -f "$UNLOAD_PROJECT_SHELL"
|
||||
set -g __last_unload_project_shell "$UNLOAD_PROJECT_SHELL"
|
||||
else
|
||||
set -e __last_unload_project_shell
|
||||
end
|
||||
|
||||
# Source the new environment
|
||||
if test -f "$INIT_PROJECT_SHELL"
|
||||
source "$INIT_PROJECT_SHELL"
|
||||
end
|
||||
end
|
||||
end
|
||||
'';
|
||||
|
||||
functions = lib.mergeAttrsList [
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {
|
||||
nnncd = {
|
||||
wraps = "nnn";
|
||||
description = "support nnn quit and change directory";
|
||||
body = ''
|
||||
# Block nesting of nnn in subshells
|
||||
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
|
||||
echo "nnn is already running"
|
||||
return
|
||||
end
|
||||
|
||||
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
|
||||
# see. To cd on quit only on ^G, remove the "-x" from both lines below,
|
||||
# without changing the paths.
|
||||
if test -n "$XDG_CONFIG_HOME"
|
||||
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
|
||||
else
|
||||
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
|
||||
end
|
||||
|
||||
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||||
# stty start undef
|
||||
# stty stop undef
|
||||
# stty lwrap undef
|
||||
# stty lnext undef
|
||||
|
||||
# The command function allows one to alias this function to `nnn` without
|
||||
# making an infinitely recursive alias
|
||||
command nnn $argv
|
||||
|
||||
if test -e $NNN_TMPFILE
|
||||
source $NNN_TMPFILE
|
||||
rm $NNN_TMPFILE
|
||||
end
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
shellAbbrs = lib.mkMerge [
|
||||
# Abbrs that are always available are defined here.
|
||||
{
|
||||
# Tools
|
||||
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
||||
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
||||
|
||||
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra"; # env var for wayland
|
||||
}
|
||||
|
||||
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
||||
|
||||
# Doesn't work with abbrify because I have nnn.override...
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";})
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";})
|
||||
|
||||
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
||||
|
||||
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
|
||||
|
||||
# (abbrify pkgs.sd {sed = "sd";})
|
||||
];
|
||||
})
|
||||
|
||||
# Common config
|
||||
{
|
||||
enable = true;
|
||||
|
||||
shellAbbrs = lib.mkMerge [
|
||||
{
|
||||
# Shell
|
||||
c = "clear";
|
||||
q = "exit";
|
||||
mkdir = "mkdir -p"; # also create parents (-p)
|
||||
watch = "watch -d -c -n 0.5";
|
||||
sy = "sudo yazi";
|
||||
cd = "z"; # zoxide for quickjump to previously visited locations
|
||||
cdd = "zi";
|
||||
b = "z -"; # jump to previous dir
|
||||
|
||||
# Fish
|
||||
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
|
||||
abbrs = batifyWithArgs "abbr" "-l fish";
|
||||
|
||||
# Nix
|
||||
nd = "nix develop";
|
||||
nb = "nix build -L";
|
||||
ns = "nix shell nixpkgs#";
|
||||
nr = "nix run";
|
||||
nps = "nps -e";
|
||||
}
|
||||
|
||||
# Abbrs only available if package is installed
|
||||
(abbrify pkgs.rsync rec {
|
||||
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
||||
copy = rsync;
|
||||
})
|
||||
|
||||
(abbrify pkgs.duf {
|
||||
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
||||
alldisks = "duf";
|
||||
})
|
||||
|
||||
(abbrify pkgs.ripgrep {
|
||||
rg = "rg --trim --pretty";
|
||||
# grep = rg;
|
||||
})
|
||||
|
||||
(abbrify pkgs.eza {
|
||||
ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions";
|
||||
lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l";
|
||||
lsa = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l -a";
|
||||
tre = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -T -L 2";
|
||||
})
|
||||
|
||||
(abbrify pkgs.fd {find = "fd";})
|
||||
|
||||
(abbrify pkgs.fzf {fuzzy = "fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'";})
|
||||
|
||||
(abbrify pkgs.gdu {
|
||||
# du = "gdu";
|
||||
storage = "gdu";
|
||||
})
|
||||
|
||||
(abbrify pkgs.git {
|
||||
gs = "git status";
|
||||
gd = "git diff --output-indicator-new=' ' --output-indicator-old=' '";
|
||||
gl = "git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
|
||||
ga = "git add";
|
||||
gap = "git add --patch";
|
||||
gc = "git commit --verbose";
|
||||
gcm = "git commit -m";
|
||||
gcl = "git clone";
|
||||
})
|
||||
|
||||
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
|
||||
|
||||
(abbrify pkgs.lazygit {lg = "lazygit";})
|
||||
];
|
||||
|
||||
plugins = [];
|
||||
}
|
||||
];
|
||||
|
||||
plugins = [];
|
||||
|
||||
shellInit = ''
|
||||
set fish_greeting
|
||||
yes | fish_config theme save "system-theme"
|
||||
'';
|
||||
|
||||
shellAbbrs = let
|
||||
# Only add " | bat" if bat is installed
|
||||
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
|
||||
|
||||
# Same as above but with args for bat
|
||||
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
|
||||
|
||||
# These can be used for my config.homemodules and for HM config.programs,
|
||||
# as both of these add the package to home.packages
|
||||
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
|
||||
|
||||
# Only add fish abbr if package is installed
|
||||
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
|
||||
in
|
||||
lib.mkMerge [
|
||||
# Abbrs that are always available are defined here.
|
||||
{
|
||||
# Shell basics
|
||||
c = "clear";
|
||||
q = "exit";
|
||||
|
||||
# Fish
|
||||
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
|
||||
abbrs = batifyWithArgs "abbr" "-l fish";
|
||||
|
||||
# Tools
|
||||
cd = "z"; # zoxide for quickjump to previously visited locations
|
||||
cdd = "zi";
|
||||
b = "z -"; # jump to previous dir
|
||||
mkdir = "mkdir -p"; # also create parents (-p)
|
||||
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
||||
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
||||
watch = "watch -d -c -n 0.5";
|
||||
nps = "nps -e";
|
||||
nd = "nix develop";
|
||||
nb = "nix build -L";
|
||||
ns = "nix shell nixpkgs#";
|
||||
}
|
||||
|
||||
# Abbrs only available if package is installed
|
||||
|
||||
(abbrify pkgs.duf {
|
||||
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*'";
|
||||
alldisks = "duf";
|
||||
})
|
||||
|
||||
(abbrify pkgs.eza {
|
||||
ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions";
|
||||
lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l";
|
||||
lsa = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l -a";
|
||||
tre = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -T -L 2";
|
||||
})
|
||||
|
||||
(abbrify pkgs.fd {find = "fd";})
|
||||
|
||||
(abbrify pkgs.fzf {fuzzy = "fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'";})
|
||||
|
||||
(abbrify pkgs.gdu {
|
||||
# du = "gdu";
|
||||
storage = "gdu";
|
||||
})
|
||||
|
||||
(abbrify pkgs.git {
|
||||
gs = "git status";
|
||||
gd = "git diff --output-indicator-new=' ' --output-indicator-old=' '";
|
||||
gl = "git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
|
||||
ga = "git add";
|
||||
gap = "git add --patch";
|
||||
gc = "git commit --verbose";
|
||||
gcm = "git commit -m";
|
||||
gcl = "git clone";
|
||||
})
|
||||
|
||||
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
|
||||
|
||||
(abbrify pkgs.lazygit {lg = "lazygit";})
|
||||
|
||||
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
||||
|
||||
# Doesn't work with abbrify because I have nnn.override...
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";})
|
||||
(lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";})
|
||||
|
||||
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
||||
|
||||
(abbrify pkgs.ripgrep rec {
|
||||
rg = "rg --trim --pretty";
|
||||
# grep = rg;
|
||||
})
|
||||
|
||||
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
|
||||
|
||||
(abbrify pkgs.rsync rec {
|
||||
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
||||
copy = rsync;
|
||||
})
|
||||
|
||||
# (abbrify pkgs.sd {sed = "sd";})
|
||||
];
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = config.homemodules.fish.enable;
|
||||
|
||||
@ -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;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable jellyfin-tui";
|
||||
}
|
||||
@ -3,7 +3,6 @@
|
||||
config,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.homemodules) kitty color;
|
||||
@ -28,103 +27,96 @@ in {
|
||||
"kitty_mod+l" = "next_layout";
|
||||
};
|
||||
|
||||
settings = lib.mkMerge [
|
||||
# Linux config
|
||||
(lib.mkIf pkgs.stdenv.isLinux {
|
||||
allow_remote_control = true; # For nnn file preview or nvim scrollback
|
||||
listen_on = lib.mkDefault "unix:@mykitty"; # This conflicts with direnv-instant
|
||||
})
|
||||
settings = {
|
||||
editor = config.home.sessionVariables.EDITOR;
|
||||
scrollback_lines = 10000;
|
||||
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
|
||||
# hide_window_decorations = "yes";
|
||||
enabled_layouts = "grid,vertical,horizontal";
|
||||
|
||||
# Common config
|
||||
{
|
||||
editor = config.home.sessionVariables.EDITOR;
|
||||
scrollback_lines = 10000;
|
||||
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
|
||||
# hide_window_decorations = "yes";
|
||||
enabled_layouts = "grid,vertical,horizontal";
|
||||
cursor_trail = 3;
|
||||
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
|
||||
listen_on = "unix:@mykitty";
|
||||
|
||||
tab_bar_min_tabs = 2; # Don't show a single tab
|
||||
tab_bar_edge = "bottom";
|
||||
tab_bar_style = "powerline";
|
||||
tab_powerline_style = "round";
|
||||
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
|
||||
tab_bar_min_tabs = 2; # Don't show a single tab
|
||||
tab_bar_edge = "bottom";
|
||||
tab_bar_style = "powerline";
|
||||
tab_powerline_style = "round";
|
||||
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
|
||||
|
||||
#
|
||||
# Color Theme
|
||||
#
|
||||
#
|
||||
# Color Theme
|
||||
#
|
||||
|
||||
# The basic colors
|
||||
background = color.hexS.base;
|
||||
foreground = color.hexS.text;
|
||||
selection_foreground = color.hexS.base;
|
||||
selection_background = color.hexS.rosewater;
|
||||
# The basic colors
|
||||
background = color.hexS.base;
|
||||
foreground = color.hexS.text;
|
||||
selection_foreground = color.hexS.base;
|
||||
selection_background = color.hexS.rosewater;
|
||||
|
||||
# Cursor colors
|
||||
cursor = color.hexS.rosewater;
|
||||
cursor_text_color = color.hexS.base;
|
||||
# Cursor colors
|
||||
cursor = color.hexS.rosewater;
|
||||
cursor_text_color = color.hexS.base;
|
||||
|
||||
# URL underline color when hovering with mouse
|
||||
url_color = color.hexS.rosewater;
|
||||
# URL underline color when hovering with mouse
|
||||
url_color = color.hexS.rosewater;
|
||||
|
||||
# Kitty window border colors
|
||||
active_border_color = color.hexS.lavender;
|
||||
inactive_border_color = color.hexS.overlay0;
|
||||
bell_border_color = color.hexS.yellow;
|
||||
# Kitty window border colors
|
||||
active_border_color = color.hexS.lavender;
|
||||
inactive_border_color = color.hexS.overlay0;
|
||||
bell_border_color = color.hexS.yellow;
|
||||
|
||||
# OS Window titlebar colors
|
||||
wayland_titlebar_color = "system";
|
||||
macos_titlebar_color = "system";
|
||||
# OS Window titlebar colors
|
||||
wayland_titlebar_color = "system";
|
||||
macos_titlebar_color = "system";
|
||||
|
||||
# Tab bar colors
|
||||
active_tab_foreground = color.hexS.base;
|
||||
active_tab_background = color.hexS.lavender;
|
||||
inactive_tab_foreground = color.hexS.text;
|
||||
inactive_tab_background = color.hexS.crust;
|
||||
tab_bar_background = color.hexS.base;
|
||||
# Tab bar colors
|
||||
active_tab_foreground = color.hexS.base;
|
||||
active_tab_background = color.hexS.lavender;
|
||||
inactive_tab_foreground = color.hexS.text;
|
||||
inactive_tab_background = color.hexS.crust;
|
||||
tab_bar_background = color.hexS.base;
|
||||
|
||||
# Color for marks (marked text in the terminal)
|
||||
mark1_foreground = color.hexS.base;
|
||||
mark1_background = color.hexS.lavender;
|
||||
mark2_foreground = color.hexS.base;
|
||||
mark2_background = color.hexS.mauve;
|
||||
mark3_foreground = color.hexS.base;
|
||||
mark3_background = color.hexS.sapphire;
|
||||
# Color for marks (marked text in the terminal)
|
||||
mark1_foreground = color.hexS.base;
|
||||
mark1_background = color.hexS.lavender;
|
||||
mark2_foreground = color.hexS.base;
|
||||
mark2_background = color.hexS.mauve;
|
||||
mark3_foreground = color.hexS.base;
|
||||
mark3_background = color.hexS.sapphire;
|
||||
|
||||
# The 16 terminal colors
|
||||
# black
|
||||
color0 = color.hexS.subtext1;
|
||||
color8 = color.hexS.subtext0;
|
||||
# The 16 terminal colors
|
||||
# black
|
||||
color0 = color.hexS.subtext1;
|
||||
color8 = color.hexS.subtext0;
|
||||
|
||||
# red
|
||||
color1 = color.hexS.red;
|
||||
color9 = color.hexS.red;
|
||||
# red
|
||||
color1 = color.hexS.red;
|
||||
color9 = color.hexS.red;
|
||||
|
||||
# green
|
||||
color2 = color.hexS.green;
|
||||
color10 = color.hexS.green;
|
||||
# green
|
||||
color2 = color.hexS.green;
|
||||
color10 = color.hexS.green;
|
||||
|
||||
# yellow
|
||||
color3 = color.hexS.yellow;
|
||||
color11 = color.hexS.yellow;
|
||||
# yellow
|
||||
color3 = color.hexS.yellow;
|
||||
color11 = color.hexS.yellow;
|
||||
|
||||
# blue
|
||||
color4 = color.hexS.blue;
|
||||
color12 = color.hexS.blue;
|
||||
# blue
|
||||
color4 = color.hexS.blue;
|
||||
color12 = color.hexS.blue;
|
||||
|
||||
# magenta
|
||||
color5 = color.hexS.pink;
|
||||
color13 = color.hexS.pink;
|
||||
# magenta
|
||||
color5 = color.hexS.pink;
|
||||
color13 = color.hexS.pink;
|
||||
|
||||
# cyan
|
||||
color6 = color.hexS.teal;
|
||||
color14 = color.hexS.teal;
|
||||
# cyan
|
||||
color6 = color.hexS.teal;
|
||||
color14 = color.hexS.teal;
|
||||
|
||||
# white
|
||||
color7 = color.hexS.surface2;
|
||||
color15 = color.hexS.surface1;
|
||||
}
|
||||
];
|
||||
# white
|
||||
color7 = color.hexS.surface2;
|
||||
color15 = color.hexS.surface1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@ -30,28 +30,24 @@ in {
|
||||
|
||||
(lib.optionals (!headless) [
|
||||
# Language servers
|
||||
autotools-language-server
|
||||
basedpyright
|
||||
clang-tools
|
||||
clojure-lsp
|
||||
cmake-language-server
|
||||
haskell-language-server
|
||||
jdt-language-server
|
||||
just-lsp
|
||||
ltex-ls # TODO: Only enable on-demand
|
||||
lua-language-server
|
||||
nil
|
||||
# perl5Packages.PLS
|
||||
perlnavigator
|
||||
# nil
|
||||
nixd
|
||||
basedpyright
|
||||
pyrefly
|
||||
# rPackages.languageserver
|
||||
ty
|
||||
rust-analyzer
|
||||
svelte-language-server
|
||||
tailwindcss-language-server
|
||||
tex-fmt
|
||||
texlab
|
||||
tinymist
|
||||
ty
|
||||
typescript
|
||||
vscode-langservers-extracted # includes nodejs
|
||||
|
||||
@ -60,32 +56,25 @@ in {
|
||||
clippy # rust
|
||||
clj-kondo # clojure
|
||||
eslint_d # javascript
|
||||
# python313Packages.ruff
|
||||
# python313Packages.flake8
|
||||
# python313Packages.pylint
|
||||
python313Packages.ruff
|
||||
python313Packages.flake8
|
||||
python313Packages.pylint
|
||||
lua54Packages.luacheck
|
||||
vale # text
|
||||
# statix # nix (doesn't recognize pipe operator)
|
||||
|
||||
# Formatters
|
||||
air-formatter
|
||||
alejandra # nix
|
||||
cljfmt
|
||||
python313Packages.black
|
||||
google-java-format
|
||||
html-tidy
|
||||
jq # json
|
||||
just-formatter
|
||||
mbake
|
||||
# nodePackages_latest.prettier # Use local install as plugins change per project
|
||||
# perl5Packages.PerlTidy
|
||||
# prettierd # Use prettier instead because of plugins
|
||||
# python313Packages.black
|
||||
# nodePackages_latest.prettier # Use local install as plugins change per project
|
||||
rustfmt
|
||||
stylua
|
||||
tombi
|
||||
typstyle
|
||||
|
||||
nodejs_latest
|
||||
uv
|
||||
])
|
||||
|
||||
[
|
||||
@ -94,62 +83,11 @@ in {
|
||||
# Dependencies
|
||||
lua54Packages.jsregexp # For tree-sitter
|
||||
# nodejs_latest
|
||||
|
||||
# TODO: Create a perl module where I can add packages to, so I don't end up with multiple perl installations
|
||||
# TODO: The same is required for python and R (below)
|
||||
(perl.withPackages (p:
|
||||
with p; [
|
||||
PLS
|
||||
PerlCritic
|
||||
PerlTidy
|
||||
NetOpenSSH
|
||||
DateTime
|
||||
DBI
|
||||
DBDMariaDB
|
||||
CursesUI
|
||||
TextCSV_XS
|
||||
]))
|
||||
|
||||
(python314.withPackages (p:
|
||||
with p; [
|
||||
# Linters
|
||||
ruff
|
||||
flake8
|
||||
pylint
|
||||
|
||||
# Formatters
|
||||
black
|
||||
|
||||
numpy
|
||||
matplotlib
|
||||
requests
|
||||
]))
|
||||
|
||||
(rWrapper.override {
|
||||
packages = with rPackages; [
|
||||
languageserver
|
||||
ggplot2
|
||||
ggalluvial
|
||||
plotly
|
||||
shiny
|
||||
readr
|
||||
tibble
|
||||
svglite
|
||||
dplyr
|
||||
tidyr
|
||||
scales
|
||||
];
|
||||
})
|
||||
|
||||
nixd
|
||||
alejandra # nix
|
||||
]
|
||||
];
|
||||
};
|
||||
|
||||
programs.nixvim = {
|
||||
# nixpkgs.pkgs = pkgs;
|
||||
|
||||
defaultEditor = true;
|
||||
enable = true;
|
||||
enableMan = false; # Nixvim man pages
|
||||
@ -172,7 +110,7 @@ in {
|
||||
performance.byteCompileLua = {
|
||||
enable = true;
|
||||
configs = true;
|
||||
initLua = true; # When debugging init.lua turn this off
|
||||
initLua = false; # When debugging init.lua turn this off
|
||||
nvimRuntime = true;
|
||||
plugins = true;
|
||||
};
|
||||
@ -182,7 +120,7 @@ in {
|
||||
maplocalleader = ",";
|
||||
};
|
||||
|
||||
opts = import ./vim_opts.nix {inherit config lib mylib;};
|
||||
opts = import ./vim_opts.nix {inherit lib mylib;};
|
||||
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
|
||||
extraConfigLua = builtins.readFile ./extraConfigLua.lua;
|
||||
|
||||
@ -308,15 +246,6 @@ in {
|
||||
require("${name}").setup(opts)
|
||||
end
|
||||
'';
|
||||
|
||||
# Like mkDefaultConfig but takes the Lua module name explicitly.
|
||||
# Use when the Lua module name (e.g. "noice") differs from what
|
||||
# lazy.nvim expects as the plugin name (e.g. "noice.nvim").
|
||||
mkDefaultConfigFor = moduleName: ''
|
||||
function(_, opts)
|
||||
require("${moduleName}").setup(opts)
|
||||
end
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
@ -420,7 +349,7 @@ in {
|
||||
clangd-extensions = rec {
|
||||
name = "clangd_extensions";
|
||||
pkg = pkgs.vimPlugins.clangd_extensions-nvim;
|
||||
lazy = false;
|
||||
lazy = true;
|
||||
config = mkDefaultConfig name;
|
||||
opts = {
|
||||
inlay_hints = {
|
||||
@ -582,19 +511,14 @@ in {
|
||||
html = ["prettierd" "prettier"];
|
||||
java = ["google-java-format"];
|
||||
javascript = ["prettierd" "prettier"];
|
||||
just = ["just"];
|
||||
latex = ["tex-fmt"];
|
||||
lua = ["stylua"];
|
||||
make = ["bake"];
|
||||
markdown = ["prettierd" "prettier"];
|
||||
nix = ["alejandra"];
|
||||
perl = ["perltidy"];
|
||||
python = ["black"];
|
||||
qml = ["qmlformat"];
|
||||
r = ["air"];
|
||||
rust = ["rustfmt"];
|
||||
svelte = ["prettierd" "prettier"];
|
||||
toml = ["tombi"];
|
||||
typescript = ["prettierd" "prettier"];
|
||||
typst = ["typstyle"];
|
||||
};
|
||||
@ -619,21 +543,6 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
devdocs = rec {
|
||||
name = "devdocs";
|
||||
pkg = pkgs.vimPlugins.devdocs-nvim;
|
||||
lazy = true;
|
||||
cmd = ["DevDocs"];
|
||||
dependencies = [snacks];
|
||||
config = mkDefaultConfig name;
|
||||
# opts = {
|
||||
# ensure_installed = [
|
||||
# "c"
|
||||
# "cpp"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
direnv = {
|
||||
name = "direnv";
|
||||
pkg = pkgs.vimPlugins.direnv-vim;
|
||||
@ -927,8 +836,9 @@ in {
|
||||
dependencies = [_lazydev];
|
||||
config = let
|
||||
servers = mylib.generators.toLuaObject [
|
||||
{name = "autotools-language-server";}
|
||||
{name = "basedpyright";}
|
||||
# {name = "pyrefly";} # TODO: Config
|
||||
# {name = "ty";} # TODO: Config
|
||||
{
|
||||
name = "clangd";
|
||||
extraOptions = {
|
||||
@ -943,15 +853,12 @@ in {
|
||||
|
||||
cmd = [
|
||||
"clangd"
|
||||
"--all-scopes-completion"
|
||||
"--background-index"
|
||||
"--clang-tidy"
|
||||
"--completion-style=detailed"
|
||||
"--fallback-style=llvm"
|
||||
"--function-arg-placeholders=0"
|
||||
"--header-insertion=iwyu"
|
||||
"--header-insertion-decorators"
|
||||
"--pch-storage=memory"
|
||||
"--completion-style=detailed"
|
||||
"--function-arg-placeholders"
|
||||
"--fallback-style=llvm"
|
||||
];
|
||||
|
||||
capabilities = {
|
||||
@ -969,7 +876,6 @@ in {
|
||||
{name = "cmake";}
|
||||
{name = "cssls";}
|
||||
{name = "html";} # vscode-langservers-extracted
|
||||
{name = "just";}
|
||||
{name = "lua_ls";}
|
||||
{
|
||||
name = "ltex";
|
||||
@ -1021,8 +927,6 @@ in {
|
||||
};
|
||||
};
|
||||
}
|
||||
{name = "perlpls";}
|
||||
{name = "perlnavigator";}
|
||||
{
|
||||
name = "qmlls";
|
||||
extraOptions.cmd = [
|
||||
@ -1030,8 +934,6 @@ in {
|
||||
"-E" # Use QML_IMPORT_PATH env variable
|
||||
];
|
||||
}
|
||||
# {name = "pyrefly";} # TODO: Config
|
||||
{name = "r_language_server";}
|
||||
{name = "svelte";}
|
||||
{name = "tailwindcss";}
|
||||
{name = "texlab";}
|
||||
@ -1043,7 +945,6 @@ in {
|
||||
semanticTokens = "disable";
|
||||
};
|
||||
}
|
||||
# {name = "ty";} # TODO: Config
|
||||
|
||||
# {name = "jdtls";} # Don't set up when using nvim-jdtls
|
||||
# {name = "rust_analyzer";} # Don't set up when using rustaceanvim
|
||||
@ -1121,7 +1022,6 @@ in {
|
||||
pkg = pkgs.vimPlugins.lualine-nvim;
|
||||
lazy = true;
|
||||
event = ["BufReadPost" "BufNewFile"];
|
||||
# dependencies = [opencode];
|
||||
config = ''
|
||||
function(_, opts)
|
||||
local lualine = require("lualine")
|
||||
@ -1221,7 +1121,6 @@ in {
|
||||
lualine_c.__raw = ''{}''; # Use __raw: Nixvim does nothing with "[]", so the default config would be used
|
||||
|
||||
lualine_x.__raw = ''{}'';
|
||||
# lualine_x.__raw = ''{ { require("opencode").statusline, }, }'';
|
||||
lualine_y = ["filetype" "encoding" "fileformat"];
|
||||
lualine_z.__raw = ''{ { "location", separator = {}, } }'';
|
||||
};
|
||||
@ -1387,19 +1286,19 @@ in {
|
||||
};
|
||||
|
||||
_nui = {
|
||||
name = "nui.nvim";
|
||||
name = "nui"; # For noice
|
||||
pkg = pkgs.vimPlugins.nui-nvim;
|
||||
lazy = true;
|
||||
};
|
||||
|
||||
noice = rec {
|
||||
name = "noice.nvim";
|
||||
name = "noice";
|
||||
pkg = pkgs.vimPlugins.noice-nvim;
|
||||
lazy = false;
|
||||
dependencies = [
|
||||
_nui
|
||||
];
|
||||
config = mkDefaultConfigFor "noice";
|
||||
config = mkDefaultConfig name;
|
||||
opts = {
|
||||
presets = {
|
||||
bottom_search = false;
|
||||
@ -1461,32 +1360,6 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
opencode = {
|
||||
name = "opencode";
|
||||
pkg = pkgs.vimPlugins.opencode-nvim;
|
||||
lazy = false;
|
||||
config = ''
|
||||
function()
|
||||
vim.g.opencode_opts = {
|
||||
server = {
|
||||
url = "http://localhost:12345",
|
||||
start = false,
|
||||
},
|
||||
events = {
|
||||
permissions = {
|
||||
edits = {
|
||||
-- Disable neovim diff popup tab
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
vim.o.autoread = true -- Required for `vim.g.opencode_opts.events.reload`
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
# obsidian = rec {
|
||||
# name = "obsidian";
|
||||
# pkg = pkgs.vimPlugins.obsidian-nvim;
|
||||
@ -1670,7 +1543,7 @@ in {
|
||||
icon = " ";
|
||||
key = "s";
|
||||
desc = "Restore Session";
|
||||
action = "<cmd>Persisted select<cr>";
|
||||
action = "<cmd>lua require('persisted').select()<cr>";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
@ -1711,7 +1584,7 @@ in {
|
||||
gitbrowse.enabled = false;
|
||||
image.enabled = false;
|
||||
indent.enabled = false;
|
||||
input.enabled = true;
|
||||
input.enabled = false;
|
||||
keymap.enabled = false;
|
||||
layout.enabled = false;
|
||||
lazygit.enabled = true;
|
||||
@ -1747,20 +1620,6 @@ in {
|
||||
truncate = 80;
|
||||
};
|
||||
};
|
||||
|
||||
actions = {
|
||||
opencode_send.__raw = ''
|
||||
function(picker)
|
||||
local items = vim.tbl_map(function(item)
|
||||
return item.file
|
||||
and require("opencode").format({ path = item.file, from = item.pos, to = item.end_pos })
|
||||
or item.text
|
||||
end, picker:selected({ fallback = true }))
|
||||
|
||||
require("opencode").prompt(table.concat(items, ", ") .. " ")
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
profiler.enabled = false;
|
||||
@ -1831,7 +1690,7 @@ in {
|
||||
};
|
||||
|
||||
_plenary = {
|
||||
name = "plenary.nvim";
|
||||
name = "plenary";
|
||||
pkg = pkgs.vimPlugins.plenary-nvim;
|
||||
lazy = true;
|
||||
};
|
||||
@ -2125,39 +1984,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 = {
|
||||
# name = "wakatime";
|
||||
# pkg = pkgs.vimPlugins.vim-wakatime;
|
||||
@ -2250,12 +2076,12 @@ in {
|
||||
};
|
||||
|
||||
yazi = rec {
|
||||
name = "yazi.nvim";
|
||||
name = "yazi";
|
||||
pkg = pkgs.vimPlugins.yazi-nvim;
|
||||
lazy = true;
|
||||
event = ["VeryLazy"];
|
||||
dependencies = [_plenary];
|
||||
config = mkDefaultConfigFor "yazi";
|
||||
config = mkDefaultConfig name;
|
||||
opts = {
|
||||
open_for_directories = true;
|
||||
highlight_hovered_buffers_in_same_directory = false;
|
||||
@ -2287,7 +2113,6 @@ in {
|
||||
|
||||
# dap # Debug adapter protocol # TODO:
|
||||
# dap-ui # Debugger UI # TODO:
|
||||
devdocs
|
||||
diffview # Git diff # TODO: Check the keybindings
|
||||
|
||||
direnv # Automatically load local environments
|
||||
@ -2317,7 +2142,6 @@ in {
|
||||
noice # Modern UI overhaul, e.g. floating cmdline
|
||||
# obsidian # Integration with Obsidian.md
|
||||
|
||||
opencode # TODO: Doesn't work, can't find "opencode --port" process
|
||||
# overseer # Run tasks from within neovim (e.g. cargo) # TODO:
|
||||
|
||||
persisted # Session management
|
||||
@ -2341,7 +2165,6 @@ in {
|
||||
typst-preview # Typst support
|
||||
ufo # Code folding
|
||||
vimtex # LaTeX support
|
||||
visual-whitespace
|
||||
# wakatime # Time tracking
|
||||
web-devicons # Icons for many plugins
|
||||
which-key # Live keybinding help
|
||||
|
||||
@ -66,16 +66,3 @@ local rmpc =
|
||||
vim.g.toggle_rmpc = function()
|
||||
rmpc:toggle()
|
||||
end
|
||||
|
||||
-- Toggle FailNix UI
|
||||
local failnix = Terminal:new({
|
||||
cmd = "cd /home/christoph/Notes/TU/MastersThesis/FailNix && nix develop --command bash -c 'perl ./scripts/menu.pl'",
|
||||
hidden = true,
|
||||
close_on_exit = true,
|
||||
auto_scroll = false,
|
||||
direction = "float",
|
||||
})
|
||||
|
||||
vim.g.toggle_failnix = function()
|
||||
failnix:toggle()
|
||||
end
|
||||
|
||||
@ -20,7 +20,7 @@ if g.neovide then
|
||||
|
||||
-- Neovide Fonts
|
||||
-- o.guifont = "JetBrainsMono Nerd Font Mono:h12:Medium"
|
||||
o.guifont = "MonoLisa Alt:h12:Medium"
|
||||
o.guifont = "MonoLisa Alt Script:h12:Medium"
|
||||
else
|
||||
-- require("notify").notify("Not running in NeoVide")
|
||||
end
|
||||
|
||||
@ -340,13 +340,6 @@ _: let
|
||||
action = "<cmd>lua vim.g.toggle_rmpc()<cr>"; # Defined in extraConfigLua.lua
|
||||
options.desc = "Show Rmpc";
|
||||
}
|
||||
# TODO: Something with the environment activation doesn't work
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<leader>.";
|
||||
# action = "<cmd>lua vim.g.toggle_failnix()<cr>"; # Defined in extraConfigLua.lua
|
||||
# options.desc = "Show FailNix";
|
||||
# }
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>i";
|
||||
@ -415,58 +408,6 @@ _: let
|
||||
}
|
||||
];
|
||||
|
||||
leader-opencode = [
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>o";
|
||||
action = "+opencode";
|
||||
}
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>oo";
|
||||
action.__raw = ''function() require("opencode").ask("@this: ") end'';
|
||||
options.desc = "Ask about @this";
|
||||
}
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>od";
|
||||
action.__raw = ''function() require("opencode").prompt("Explain @diagnostics") end'';
|
||||
options.desc = "Explain @diagnostics";
|
||||
}
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>oe";
|
||||
action.__raw = ''function() require("opencode").prompt("Explain @this and its context") end'';
|
||||
options.desc = "Explain @this";
|
||||
}
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>or";
|
||||
action.__raw = ''function() require("opencode").prompt("Review @this for correctness and readability") end'';
|
||||
options.desc = "Review @this";
|
||||
}
|
||||
{
|
||||
mode = ["n" "v"];
|
||||
key = "<leader>os";
|
||||
action.__raw = ''function() require("opencode").select() end'';
|
||||
options.desc = "Select Action";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>oa";
|
||||
action.__raw = ''function() return require("opencode").operator("@this ") .. "_" end'';
|
||||
options.desc = "Append Line to Prompt";
|
||||
options.expr = true;
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "<leader>oa";
|
||||
action.__raw = ''function() return require("opencode").operator("@this ") end'';
|
||||
options.desc = "Append Range to Prompt";
|
||||
options.expr = true;
|
||||
}
|
||||
];
|
||||
|
||||
leader-file = [
|
||||
{
|
||||
mode = "n";
|
||||
@ -564,48 +505,6 @@ _: let
|
||||
action = "<cmd>lua Snacks.picker.help()<cr>";
|
||||
options.desc = "Helptags Picker";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>hd";
|
||||
action = "+devdocs";
|
||||
}
|
||||
# {
|
||||
# mode = "n";
|
||||
# key = "<leader>hdd";
|
||||
# action.__raw = ''
|
||||
# function()
|
||||
# local devdocs = require("devdocs")
|
||||
# local installedDocs = devdocs.GetInstalledDocs()
|
||||
# vim.ui.select(installedDocs, {}, function(selected)
|
||||
# if not selected then
|
||||
# return
|
||||
# end
|
||||
# local docDir = devdocs.GetDocDir(selected)
|
||||
# -- prettify the filename as you wish
|
||||
# Snacks.picker.files({ cwd = docDir })
|
||||
# end)
|
||||
# end
|
||||
# '';
|
||||
# options.desc = "Open Devdocs";
|
||||
# }
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>hdd";
|
||||
action = "<cmd>DevDocs get<cr>";
|
||||
options.desc = "Open Devdocs in Split";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>hdi";
|
||||
action = "<cmd>DevDocs install<cr>";
|
||||
options.desc = "Install Devdocs";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>hdD";
|
||||
action = "<cmd>DevDocs delete<cr>";
|
||||
options.desc = "Delete Devdocs";
|
||||
}
|
||||
];
|
||||
|
||||
leader-quit = [
|
||||
@ -637,19 +536,19 @@ _: let
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>sl";
|
||||
action = "<cmd>Persisted select<cr>";
|
||||
action = "<cmd>lua require('persisted').select()<cr>";
|
||||
options.desc = "Restore Session";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ss";
|
||||
action = "<cmd>Persisted save<cr>";
|
||||
action = "<cmd>SessionSave<cr>";
|
||||
options.desc = "Save Session";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>sd";
|
||||
action = "<cmd>Persisted delete<cr>";
|
||||
action = "<cmd>SessionDelete<cr>";
|
||||
options.desc = "Delete Session";
|
||||
}
|
||||
];
|
||||
@ -935,19 +834,19 @@ _: let
|
||||
{
|
||||
mode = "n";
|
||||
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";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
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";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
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";
|
||||
}
|
||||
{
|
||||
@ -1057,7 +956,6 @@ in
|
||||
no-leader
|
||||
|
||||
leader
|
||||
leader-opencode
|
||||
leader-file
|
||||
leader-help
|
||||
leader-quit
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fork = true # Start neovide detached
|
||||
frame = "full" # full, buttonless, none
|
||||
frame = "none" # full, buttonless, none
|
||||
idle = true # Don't render frames without changes
|
||||
title-hidden = true
|
||||
tabs = false
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
{config, ...}: {
|
||||
_: {
|
||||
showmode = false; # Status line already shows this
|
||||
backspace = ["indent" "eol" "start"];
|
||||
termguicolors = true; # Required by multiple plugins
|
||||
@ -37,7 +37,7 @@
|
||||
# swapfile = true;
|
||||
# backup = false;
|
||||
undofile = true;
|
||||
undodir = "${config.home.homeDirectory}/.vim/undo";
|
||||
undodir = "/home/christoph/.vim/undo";
|
||||
undolevels = 10000;
|
||||
# autochdir = true;
|
||||
confirm = true;
|
||||
|
||||
@ -29,78 +29,10 @@
|
||||
# This is generated from the DMS settings dialog.
|
||||
# Run: nix eval --impure --expr 'builtins.fromJSON (builtins.readFile ~/.config/DankMaterialShell/settings.json)'
|
||||
settings = {
|
||||
acLockTimeout = 0;
|
||||
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;
|
||||
# Bar
|
||||
barConfigs = [
|
||||
{
|
||||
autoHide = false;
|
||||
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;
|
||||
# Widgets
|
||||
leftWidgets = [
|
||||
{
|
||||
enabled = true;
|
||||
@ -116,18 +48,14 @@
|
||||
id = "focusedWindow";
|
||||
}
|
||||
];
|
||||
maximizeDetection = true;
|
||||
name = "Main Bar";
|
||||
noBackground = false;
|
||||
openOnOverview = true;
|
||||
popupGapsAuto = true;
|
||||
popupGapsManual = 4;
|
||||
position = 0;
|
||||
rightWidgets = [
|
||||
centerWidgets = [
|
||||
{
|
||||
enabled = true;
|
||||
id = "privacyIndicator";
|
||||
id = "music";
|
||||
mediaSize = 1;
|
||||
}
|
||||
];
|
||||
rightWidgets = [
|
||||
{
|
||||
enabled = true;
|
||||
id = "cpuUsage";
|
||||
@ -142,18 +70,10 @@
|
||||
enabled = true;
|
||||
id = "diskUsage";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "colorPicker";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "clipboard";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "vpn";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "controlCenterButton";
|
||||
@ -172,54 +92,95 @@
|
||||
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;
|
||||
squareCorners = true;
|
||||
transparency = 1;
|
||||
visible = true;
|
||||
widgetOutlineColor = "primary";
|
||||
widgetOutlineEnabled = false;
|
||||
widgetOutlineOpacity = 1;
|
||||
widgetOutlineThickness = 2;
|
||||
widgetTransparency = 1;
|
||||
squareCorners = true;
|
||||
screenPreferences = ["all"];
|
||||
showOnLastDisplay = true;
|
||||
visible = true;
|
||||
}
|
||||
];
|
||||
barMaxVisibleApps = 0;
|
||||
barMaxVisibleRunningApps = 0;
|
||||
barShowOverflowBadge = true;
|
||||
batteryChargeLimit = 100;
|
||||
|
||||
# Power saving
|
||||
acLockTimeout = 0;
|
||||
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;
|
||||
batteryMonitorTimeout = 0;
|
||||
batteryProfileName = "";
|
||||
batterySuspendBehavior = 0;
|
||||
batterySuspendTimeout = 0;
|
||||
bluetoothDevicePins = {};
|
||||
|
||||
# Wallpaper
|
||||
blurWallpaperOnOverview = true;
|
||||
blurredWallpaperLayer = true;
|
||||
brightnessDevicePins = {};
|
||||
browserPickerViewMode = "grid";
|
||||
browserUsageHistory = {};
|
||||
builtInPluginSettings = {dms_settings_search = {trigger = "?";};};
|
||||
buttonColorMode = "primary";
|
||||
centeringMode = "index";
|
||||
clipboardEnterToPaste = false;
|
||||
clockCompactMode = false;
|
||||
clockDateFormat = "yyyy-MM-dd";
|
||||
configVersion = 5;
|
||||
blurredWallpaperLayer = false;
|
||||
wallpaperFillMode = "Fill";
|
||||
|
||||
# Control center
|
||||
controlCenterShowAudioIcon = true;
|
||||
controlCenterShowAudioPercent = false;
|
||||
controlCenterShowBatteryIcon = false;
|
||||
controlCenterShowBluetoothIcon = true;
|
||||
controlCenterShowBrightnessIcon = false;
|
||||
controlCenterShowBrightnessPercent = false;
|
||||
controlCenterShowMicIcon = true;
|
||||
controlCenterShowMicPercent = false;
|
||||
controlCenterShowNetworkIcon = true;
|
||||
controlCenterShowPrinterIcon = false;
|
||||
controlCenterShowScreenSharingIcon = true;
|
||||
controlCenterShowVpnIcon = true;
|
||||
controlCenterTileColorMode = "primary";
|
||||
controlCenterWidgets = [
|
||||
{
|
||||
enabled = true;
|
||||
@ -262,242 +223,70 @@
|
||||
width = 50;
|
||||
}
|
||||
];
|
||||
cornerRadius = 10;
|
||||
currentThemeCategory = "registry";
|
||||
|
||||
# Theme
|
||||
currentThemeName = "custom";
|
||||
cursorSettings = {
|
||||
dwl = {cursorHideTimeout = 0;};
|
||||
hyprland = {
|
||||
hideOnKeyPress = false;
|
||||
hideOnTouch = false;
|
||||
inactiveTimeout = 0;
|
||||
};
|
||||
niri = {
|
||||
hideAfterInactiveMs = 0;
|
||||
hideWhenTyping = false;
|
||||
};
|
||||
size = 24;
|
||||
theme = "System Default";
|
||||
};
|
||||
currentThemeCategory = "registry";
|
||||
customThemeFile = "${config.paths.dotfiles}/dankmaterialshell/catppuccin-mauve.json";
|
||||
|
||||
# Styling
|
||||
cornerRadius = 10;
|
||||
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";
|
||||
monoFontFamily = "MonoLisa Normal";
|
||||
fontScale = 1;
|
||||
fontWeight = 500;
|
||||
groupWorkspaceApps = true;
|
||||
gtkThemingEnabled = false;
|
||||
hideBrightnessSlider = false;
|
||||
hyprlandLayoutBorderSize = -1;
|
||||
hyprlandLayoutGapsOverride = -1;
|
||||
hyprlandLayoutRadiusOverride = -1;
|
||||
hyprlandOutputSettings = {};
|
||||
iconTheme = "System Default";
|
||||
keyboardLayoutNameCompactMode = false;
|
||||
launchPrefix = "";
|
||||
launcherLogoBrightness = 0.5;
|
||||
launcherLogoColorInvertOnMode = false;
|
||||
launcherLogoColorOverride = "";
|
||||
launcherLogoContrast = 1;
|
||||
launcherLogoCustomPath = "";
|
||||
launcherLogoMode = "os";
|
||||
launcherLogoSizeOffset = 0;
|
||||
launcherPluginOrder = [];
|
||||
launcherPluginVisibility = {};
|
||||
lockAtStartup = false;
|
||||
|
||||
# Lock
|
||||
fadeToLockEnabled = true;
|
||||
fadeToLockGracePeriod = 5;
|
||||
lockBeforeSuspend = false;
|
||||
lockDateFormat = "yyyy-MM-dd";
|
||||
lockScreenActiveMonitor = "all";
|
||||
lockScreenInactiveColor = "#000000";
|
||||
lockScreenNotificationMode = 0;
|
||||
lockScreenPowerOffMonitorsOnLock = false;
|
||||
lockScreenShowDate = true;
|
||||
lockScreenShowMediaPlayer = true;
|
||||
lockScreenShowPasswordField = true;
|
||||
lockScreenShowPowerActions = true;
|
||||
lockScreenShowProfileImage = true;
|
||||
lockScreenShowSystemIcons = true;
|
||||
lockScreenShowTime = true;
|
||||
loginctlLockIntegration = true;
|
||||
mangoLayoutBorderSize = -1;
|
||||
mangoLayoutGapsOverride = -1;
|
||||
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;
|
||||
|
||||
# Notifications
|
||||
notificationOverlayEnabled = false;
|
||||
notificationPopupPosition = 0;
|
||||
notificationPopupPrivacyMode = false;
|
||||
notificationPopupShadowEnabled = true;
|
||||
notificationRules = [];
|
||||
notificationTimeoutCritical = 0;
|
||||
notificationTimeoutLow = 5000;
|
||||
notificationTimeoutNormal = 5000;
|
||||
|
||||
# OSD
|
||||
osdAlwaysShowValue = true;
|
||||
osdAudioOutputEnabled = true;
|
||||
osdBrightnessEnabled = true;
|
||||
osdCapsLockEnabled = true;
|
||||
osdIdleInhibitorEnabled = true;
|
||||
osdMediaPlaybackEnabled = true;
|
||||
osdMediaVolumeEnabled = true;
|
||||
osdMicMuteEnabled = true;
|
||||
osdPosition = 7;
|
||||
osdPowerProfileEnabled = false;
|
||||
osdVolumeEnabled = true;
|
||||
padHours12Hour = false;
|
||||
popoutAnimationSpeed = 1;
|
||||
popoutCustomAnimationDuration = 150;
|
||||
popupTransparency = 1;
|
||||
|
||||
# Power menu
|
||||
powerActionConfirm = true;
|
||||
powerActionHoldDuration = 0.5;
|
||||
powerMenuActions = ["reboot" "logout" "poweroff" "lock" "restart"];
|
||||
powerMenuDefaultAction = "poweroff";
|
||||
powerMenuGridLayout = false;
|
||||
privacyShowCameraIcon = false;
|
||||
privacyShowMicIcon = false;
|
||||
privacyShowScreenShareIcon = false;
|
||||
qtThemingEnabled = false;
|
||||
registryThemeVariants = {};
|
||||
reverseScrolling = false;
|
||||
runDmsMatugenTemplates = false;
|
||||
runUserMatugenTemplates = false;
|
||||
runningAppsCompactMode = true;
|
||||
runningAppsCurrentMonitor = false;
|
||||
runningAppsCurrentWorkspace = false;
|
||||
runningAppsGroupByApp = false;
|
||||
screenPreferences = {};
|
||||
scrollTitleEnabled = true;
|
||||
selectedGpuIndex = 0;
|
||||
|
||||
# Settings
|
||||
focusedWindowCompactMode = false;
|
||||
hideBrightnessSlider = false;
|
||||
keyboardLayoutNameCompactMode = false;
|
||||
modalDarkenBackground = true;
|
||||
nightModeEnabled = false;
|
||||
niriOverviewOverlayEnabled = true;
|
||||
showBattery = false;
|
||||
showCapsLockIndicator = false;
|
||||
showClipboard = true;
|
||||
@ -513,92 +302,127 @@
|
||||
showMusic = true;
|
||||
showNotificationButton = true;
|
||||
showOccupiedWorkspacesOnly = false;
|
||||
showOnLastDisplay = {};
|
||||
showPrivacyButton = false;
|
||||
showSeconds = true;
|
||||
showSystemTray = true;
|
||||
showWeather = true;
|
||||
showWorkspaceApps = false;
|
||||
showWorkspaceIndex = false;
|
||||
showWorkspaceName = false;
|
||||
showWorkspacePadding = false;
|
||||
showWorkspaceSwitcher = true;
|
||||
sortAppsAlphabetically = false;
|
||||
soundNewNotification = true;
|
||||
soundPluggedIn = true;
|
||||
soundVolumeChanged = true;
|
||||
soundsEnabled = false;
|
||||
|
||||
# Launcher
|
||||
sortAppsAlphabetically = false;
|
||||
spotlightCloseNiriOverview = true;
|
||||
spotlightModalViewMode = "list";
|
||||
spotlightSectionViewModes = {};
|
||||
syncComponentAnimationSpeeds = true;
|
||||
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;
|
||||
|
||||
# Clock
|
||||
use24HourClock = true;
|
||||
useAutoLocation = false;
|
||||
useFahrenheit = false;
|
||||
useSystemSoundTheme = false;
|
||||
wallpaperFillMode = "Fill";
|
||||
showSeconds = true;
|
||||
clockCompactMode = false;
|
||||
clockDateFormat = "yyyy-MM-dd";
|
||||
|
||||
# Media
|
||||
waveProgressEnabled = true;
|
||||
scrollTitleEnabled = true;
|
||||
|
||||
# Weather
|
||||
showWeather = true;
|
||||
useFahrenheit = false;
|
||||
useAutoLocation = false;
|
||||
weatherCoordinates = "51.5142273,7.4652789";
|
||||
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";
|
||||
widgetColorMode = "default";
|
||||
wifiNetworkPins = {};
|
||||
windSpeedUnit = "kmh";
|
||||
workspaceAppIconSizeOffset = 0;
|
||||
workspaceColorMode = "default";
|
||||
workspaceDragReorder = true;
|
||||
workspaceFocusedBorderColor = "primary";
|
||||
workspaceFocusedBorderEnabled = false;
|
||||
workspaceFocusedBorderThickness = 2;
|
||||
workspaceFollowFocus = false;
|
||||
workspaceNameIcons = {};
|
||||
workspaceOccupiedColorMode = "none";
|
||||
workspaceScrolling = false;
|
||||
workspaceUnfocusedColorMode = "default";
|
||||
workspaceUrgentColorMode = "default";
|
||||
brightnessDevicePins = {};
|
||||
bluetoothDevicePins = {};
|
||||
centeringMode = "index";
|
||||
useSystemSoundTheme = false;
|
||||
vpnLastConnected = "";
|
||||
syncModeWithPortal = true;
|
||||
terminalsAlwaysDark = false;
|
||||
updaterCustomCommand = "";
|
||||
updaterTerminalAdditionalParams = "";
|
||||
updaterUseCustomCommand = false;
|
||||
showOnLastDisplay = {};
|
||||
dwlShowAllTags = false;
|
||||
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 = {
|
||||
File diff suppressed because it is too large
Load Diff
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable common packages";
|
||||
}
|
||||
@ -47,8 +47,6 @@ in {
|
||||
wrap_navigation: false,
|
||||
enable_mouse: true,
|
||||
enable_config_hot_reload: true,
|
||||
enable_lyrics_hot_reload: true,
|
||||
enable_lyrics_index: true,
|
||||
status_update_interval_ms: 1000,
|
||||
rewind_to_start_sec: 30,
|
||||
lyrics_dir: "${config.home.homeDirectory}/Music",
|
||||
@ -90,37 +88,24 @@ in {
|
||||
(
|
||||
name: "Queue (1)",
|
||||
pane: Split(
|
||||
borders: "NONE",
|
||||
direction: Horizontal,
|
||||
panes: [
|
||||
// Left Column (Queue + Cava)
|
||||
(
|
||||
size: "70%",
|
||||
borders: "NONE",
|
||||
pane: Split(
|
||||
direction: Vertical,
|
||||
panes: [
|
||||
(
|
||||
size: "75%",
|
||||
borders: "ALL",
|
||||
border_symbols: Rounded,
|
||||
pane: Split(
|
||||
direction: Vertical,
|
||||
panes: [
|
||||
(
|
||||
size: "2",
|
||||
pane: Pane(QueueHeader()),
|
||||
),
|
||||
(
|
||||
size: "100%",
|
||||
pane: Pane(Queue),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
pane: Pane(Queue),
|
||||
),
|
||||
(
|
||||
size: "25%",
|
||||
borders: "ALL",
|
||||
border_symbols: Rounded,
|
||||
pane: Pane(Cava),
|
||||
)
|
||||
]
|
||||
@ -130,19 +115,18 @@ in {
|
||||
// Right Column (AlbumArt + Lyrics)
|
||||
(
|
||||
size: "30%",
|
||||
borders: "NONE",
|
||||
pane: Split(
|
||||
direction: Vertical,
|
||||
panes: [
|
||||
(
|
||||
size: "75%",
|
||||
borders: "ALL",
|
||||
border_symbols: Rounded,
|
||||
pane: Pane(AlbumArt),
|
||||
),
|
||||
(
|
||||
size: "25%",
|
||||
borders: "ALL",
|
||||
border_symbols: Rounded,
|
||||
pane: Pane(Lyrics),
|
||||
),
|
||||
]
|
||||
@ -153,59 +137,31 @@ in {
|
||||
),
|
||||
(
|
||||
name: "Albums (2)",
|
||||
pane: Split(
|
||||
size: "100%",
|
||||
direction: Vertical,
|
||||
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Albums))],
|
||||
)
|
||||
pane: Pane(Albums),
|
||||
),
|
||||
(
|
||||
name: "Album Artists (3)",
|
||||
pane: Split(
|
||||
size: "100%",
|
||||
direction: Vertical,
|
||||
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(AlbumArtists))],
|
||||
)
|
||||
pane: Pane(AlbumArtists),
|
||||
),
|
||||
(
|
||||
name: "Artists (4)",
|
||||
pane: Split(
|
||||
size: "100%",
|
||||
direction: Vertical,
|
||||
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Artists))],
|
||||
)
|
||||
pane: Pane(Artists),
|
||||
),
|
||||
(
|
||||
name: "Playlists (5)",
|
||||
pane: Split(
|
||||
size: "100%",
|
||||
direction: Vertical,
|
||||
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Playlists))],
|
||||
)
|
||||
pane: Pane(Playlists),
|
||||
),
|
||||
// (
|
||||
// name: "Directories (6)",
|
||||
// pane: Split(
|
||||
// size: "100%",
|
||||
// direction: Vertical,
|
||||
// panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Directories))],
|
||||
// )
|
||||
// pane: Pane(Directories),
|
||||
// ),
|
||||
(
|
||||
name: "Search (6)",
|
||||
pane: Split(
|
||||
size: "100%",
|
||||
direction: Vertical,
|
||||
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Search))],
|
||||
)
|
||||
pane: Pane(Search),
|
||||
),
|
||||
// (
|
||||
// name: "Visualizer (8)",
|
||||
// pane: Split(
|
||||
// size: "100%",
|
||||
// direction: Vertical,
|
||||
// panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Cava))],
|
||||
// )
|
||||
// pane: Pane(Cava),
|
||||
// ),
|
||||
],
|
||||
|
||||
@ -331,6 +287,8 @@ in {
|
||||
#![enable(unwrap_variant_newtypes)]
|
||||
(
|
||||
default_album_art_path: None,
|
||||
show_song_table_header: true,
|
||||
draw_borders: true,
|
||||
format_tag_separator: " | ",
|
||||
browser_column_widths: [20, 38, 42],
|
||||
modal_backdrop: false,
|
||||
@ -437,8 +395,6 @@ in {
|
||||
),
|
||||
(
|
||||
pane: Pane(Tabs),
|
||||
borders: "ALL",
|
||||
border_symbols: Rounded,
|
||||
size: "3",
|
||||
),
|
||||
(
|
||||
|
||||
@ -35,72 +35,168 @@ in {
|
||||
sidebar-mode = false;
|
||||
};
|
||||
|
||||
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#basic-layout-structure
|
||||
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#base-widgets
|
||||
theme = let
|
||||
mkLiteral = config.lib.formats.rasi.mkLiteral;
|
||||
in
|
||||
import ./theme.nix {inherit color mkLiteral;};
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
|
||||
trans = "rgba(0, 0, 0, 0)";
|
||||
in {
|
||||
"element-text,element-icon,mode-switcher" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
|
||||
"window" = {
|
||||
height = mkLiteral "50%";
|
||||
width = mkLiteral "33%";
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 6;
|
||||
border-color = mkLiteral color.hexS.accent;
|
||||
|
||||
# This is not opacity but translucency
|
||||
background-color = mkLiteral "rgba(${color.rgbS.base}, 0.25)";
|
||||
};
|
||||
|
||||
"mainbox" = {
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
# TOP INPUT BAR START
|
||||
|
||||
"inputbar" = {
|
||||
children = builtins.map mkLiteral ["prompt" "entry"];
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
"prompt" = {
|
||||
background-color = mkLiteral color.hexS.accentHl;
|
||||
padding = 6;
|
||||
text-color = mkLiteral color.hexS.accentText;
|
||||
border-radius = 3;
|
||||
margin = mkLiteral "10px 0px 0px 10px";
|
||||
};
|
||||
|
||||
"entry" = {
|
||||
padding = 6;
|
||||
margin = mkLiteral "10px 10px 0px 5px";
|
||||
text-color = mkLiteral color.hexS.text;
|
||||
background-color = mkLiteral trans;
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 3;
|
||||
border-color = mkLiteral color.hexS.accentHl;
|
||||
};
|
||||
|
||||
# MESSAGEBOX (usually not visible)
|
||||
|
||||
"message" = {
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
"error-message" = {
|
||||
background-color = mkLiteral trans;
|
||||
margin = mkLiteral "0px 0px 10px 0px";
|
||||
};
|
||||
|
||||
"textbox" = {
|
||||
background-color = mkLiteral trans;
|
||||
padding = 6;
|
||||
margin = mkLiteral "10px 10px 0px 10px";
|
||||
border-radius = 3;
|
||||
};
|
||||
|
||||
# LISTVIEW
|
||||
|
||||
"listview" = {
|
||||
# border = mkLiteral "0px 0px 0px";
|
||||
padding = 0;
|
||||
margin = mkLiteral "5px 10px 10px 10px";
|
||||
columns = 1;
|
||||
background-color = mkLiteral trans;
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 3;
|
||||
border-color = mkLiteral color.hexS.accentDim;
|
||||
};
|
||||
|
||||
"element" = {
|
||||
padding = 5;
|
||||
margin = 0;
|
||||
background-color = mkLiteral trans;
|
||||
text-color = mkLiteral color.hexS.text;
|
||||
# border-radius = 3;
|
||||
};
|
||||
|
||||
"element-icon" = {
|
||||
size = 25;
|
||||
};
|
||||
|
||||
"element selected" = {
|
||||
background-color = mkLiteral color.hexS.accentDim;
|
||||
text-color = mkLiteral color.hexS.accentText;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# homemodules.hyprland.keybindings = let
|
||||
# vpn-menu =
|
||||
# pkgs.writeScriptBin
|
||||
# "rofi-menu-vpn"
|
||||
# (builtins.readFile ./menus/vpn.fish);
|
||||
#
|
||||
# keybinds-menu =
|
||||
# pkgs.writeScriptBin
|
||||
# "rofi-menu-keybinds"
|
||||
# (builtins.readFile ./menus/keybinds.fish);
|
||||
#
|
||||
# lectures-menu =
|
||||
# pkgs.writeScriptBin
|
||||
# "rofi-menu-lectures"
|
||||
# (builtins.readFile ./menus/lectures.fish);
|
||||
#
|
||||
# power-menu =
|
||||
# mylib.rofi.mkSimpleMenu
|
||||
# "power"
|
||||
# {
|
||||
# " Poweroff" = "poweroff";
|
||||
# " Reboot" = "reboot";
|
||||
# " Lock" = "loginctl lock-session";
|
||||
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
||||
# " Reload Hyprland" = "hyprctl reload";
|
||||
# " Exit Hyprland" = "hyprctl dispatch exit";
|
||||
# };
|
||||
#
|
||||
# wallpaper-menu = let
|
||||
# setWallpaperOnMonitor = name: monitor:
|
||||
# "hyprctl hyprpaper wallpaper "
|
||||
# + "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg";
|
||||
#
|
||||
# setWallpaperOnMonitors = monitors: name: {
|
||||
# ${name} =
|
||||
# monitors
|
||||
# |> builtins.map (setWallpaperOnMonitor name)
|
||||
# |> builtins.concatStringsSep " && ";
|
||||
# };
|
||||
#
|
||||
# monitors = builtins.attrNames config.homemodules.hyprland.monitors;
|
||||
# in
|
||||
# mylib.rofi.mkSimpleMenu
|
||||
# "wall"
|
||||
# (color.wallpapers
|
||||
# |> builtins.map (setWallpaperOnMonitors monitors)
|
||||
# |> lib.mergeAttrsList);
|
||||
# in
|
||||
# lib.mkIf (!config.homemodules.hyprland.caelestia.enable) {
|
||||
# bindings = lib.mergeAttrsList [
|
||||
# {
|
||||
# "$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
|
||||
# "$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""];
|
||||
# "$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""];
|
||||
# # "$mainMod, o" = ["exec, \"${lectures-menu}\""];
|
||||
# }
|
||||
# (lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) {
|
||||
# "$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
homemodules.hyprland.keybindings = let
|
||||
vpn-menu =
|
||||
pkgs.writeScriptBin
|
||||
"rofi-menu-vpn"
|
||||
(builtins.readFile ./menus/vpn.fish);
|
||||
|
||||
keybinds-menu =
|
||||
pkgs.writeScriptBin
|
||||
"rofi-menu-keybinds"
|
||||
(builtins.readFile ./menus/keybinds.fish);
|
||||
|
||||
lectures-menu =
|
||||
pkgs.writeScriptBin
|
||||
"rofi-menu-lectures"
|
||||
(builtins.readFile ./menus/lectures.fish);
|
||||
|
||||
power-menu =
|
||||
mylib.rofi.mkSimpleMenu
|
||||
"power"
|
||||
{
|
||||
" Poweroff" = "poweroff";
|
||||
" Reboot" = "reboot";
|
||||
" Lock" = "loginctl lock-session";
|
||||
" Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
||||
" Reload Hyprland" = "hyprctl reload";
|
||||
" Exit Hyprland" = "hyprctl dispatch exit";
|
||||
};
|
||||
|
||||
wallpaper-menu = let
|
||||
setWallpaperOnMonitor = name: monitor:
|
||||
"hyprctl hyprpaper wallpaper "
|
||||
+ "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg";
|
||||
|
||||
setWallpaperOnMonitors = monitors: name: {
|
||||
${name} =
|
||||
monitors
|
||||
|> builtins.map (setWallpaperOnMonitor name)
|
||||
|> builtins.concatStringsSep " && ";
|
||||
};
|
||||
|
||||
monitors = builtins.attrNames config.homemodules.hyprland.monitors;
|
||||
in
|
||||
mylib.rofi.mkSimpleMenu
|
||||
"wall"
|
||||
(color.wallpapers
|
||||
|> builtins.map (setWallpaperOnMonitors monitors)
|
||||
|> lib.mergeAttrsList);
|
||||
in
|
||||
lib.mkIf (!config.homemodules.hyprland.caelestia.enable) {
|
||||
bindings = lib.mergeAttrsList [
|
||||
{
|
||||
"$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
|
||||
"$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""];
|
||||
"$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""];
|
||||
# "$mainMod, o" = ["exec, \"${lectures-menu}\""];
|
||||
}
|
||||
(lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) {
|
||||
"$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,101 +0,0 @@
|
||||
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#basic-layout-structure
|
||||
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#base-widgets
|
||||
{
|
||||
color,
|
||||
mkLiteral,
|
||||
}: let
|
||||
trans = "rgba(0, 0, 0, 0)";
|
||||
in {
|
||||
"element-text,element-icon,mode-switcher" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
|
||||
"window" = {
|
||||
height = mkLiteral "50%";
|
||||
width = mkLiteral "33%";
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 6;
|
||||
border-color = mkLiteral color.hexS.accent;
|
||||
|
||||
# This is not opacity but translucency
|
||||
background-color = mkLiteral "rgba(${color.rgbS.base}, 0.25)";
|
||||
};
|
||||
|
||||
"mainbox" = {
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
# TOP INPUT BAR START
|
||||
|
||||
"inputbar" = {
|
||||
children = builtins.map mkLiteral ["prompt" "entry"];
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
"prompt" = {
|
||||
background-color = mkLiteral color.hexS.accentHl;
|
||||
padding = 6;
|
||||
text-color = mkLiteral color.hexS.accentText;
|
||||
border-radius = 3;
|
||||
margin = mkLiteral "10px 0px 0px 10px";
|
||||
};
|
||||
|
||||
"entry" = {
|
||||
padding = 6;
|
||||
margin = mkLiteral "10px 10px 0px 5px";
|
||||
text-color = mkLiteral color.hexS.text;
|
||||
background-color = mkLiteral trans;
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 3;
|
||||
border-color = mkLiteral color.hexS.accentHl;
|
||||
};
|
||||
|
||||
# MESSAGEBOX (usually not visible)
|
||||
|
||||
"message" = {
|
||||
background-color = mkLiteral trans;
|
||||
};
|
||||
|
||||
"error-message" = {
|
||||
background-color = mkLiteral trans;
|
||||
margin = mkLiteral "0px 0px 10px 0px";
|
||||
};
|
||||
|
||||
"textbox" = {
|
||||
background-color = mkLiteral trans;
|
||||
padding = 6;
|
||||
margin = mkLiteral "10px 10px 0px 10px";
|
||||
border-radius = 3;
|
||||
};
|
||||
|
||||
# LISTVIEW
|
||||
|
||||
"listview" = {
|
||||
# border = mkLiteral "0px 0px 0px";
|
||||
padding = 0;
|
||||
margin = mkLiteral "5px 10px 10px 10px";
|
||||
columns = 1;
|
||||
background-color = mkLiteral trans;
|
||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||
border-radius = 3;
|
||||
border-color = mkLiteral color.hexS.accentDim;
|
||||
};
|
||||
|
||||
"element" = {
|
||||
padding = 5;
|
||||
margin = 0;
|
||||
background-color = mkLiteral trans;
|
||||
text-color = mkLiteral color.hexS.text;
|
||||
# border-radius = 3;
|
||||
};
|
||||
|
||||
"element-icon" = {
|
||||
size = 25;
|
||||
};
|
||||
|
||||
"element selected" = {
|
||||
background-color = mkLiteral color.hexS.accentDim;
|
||||
text-color = mkLiteral color.hexS.accentText;
|
||||
};
|
||||
}
|
||||
@ -1,73 +0,0 @@
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.homemodules) ssh color;
|
||||
in {
|
||||
options.homemodules.ssh = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf ssh.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
|
||||
settings = {
|
||||
"*" = {
|
||||
ForwardAgent = false;
|
||||
AddKeysToAgent =
|
||||
if pkgs.stdenv.isLinux
|
||||
then "no"
|
||||
else "yes"; # Don't have keychain on darwin
|
||||
Compression = true;
|
||||
ServerAliveInterval = 0;
|
||||
ServerAliveCountMax = 3;
|
||||
HashKnownHosts = false;
|
||||
UserKnownHostsFile = "~/.ssh/known_hosts";
|
||||
ControlMaster = "no";
|
||||
ControlPath = "~/.ssh/master-%r@%n:%p";
|
||||
ControlPersist = "no";
|
||||
};
|
||||
"nixinator" = {
|
||||
Port = 5432;
|
||||
User = "christoph";
|
||||
HostName = "vps.chriphost.de";
|
||||
};
|
||||
"servenix" = {
|
||||
User = "christoph";
|
||||
HostName = "local.chriphost.de";
|
||||
};
|
||||
"thinknix" = {
|
||||
User = "christoph";
|
||||
HostName = "think.chriphost.de";
|
||||
};
|
||||
"vps" = {
|
||||
User = "root";
|
||||
HostName = "vps.chriphost.de";
|
||||
};
|
||||
"mars" = {
|
||||
User = "smchurla";
|
||||
HostName = "mars.cs.tu-dortmund.de";
|
||||
ServerAliveInterval = 60;
|
||||
LocalForward = [
|
||||
{
|
||||
# Resultbrowser
|
||||
bind.port = 22941;
|
||||
host.address = "127.0.0.1";
|
||||
host.port = 22941;
|
||||
}
|
||||
{
|
||||
# Mysql
|
||||
bind.port = 3306;
|
||||
host.address = "127.0.0.1";
|
||||
host.port = 3306;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable ssh";
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
headless,
|
||||
...
|
||||
}: let
|
||||
inherit (config.homemodules) terminal color;
|
||||
in {
|
||||
options.homemodules.terminal = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf terminal.enable {
|
||||
homemodules = {
|
||||
bat.enable = true;
|
||||
btop.enable = true;
|
||||
fastfetch.enable = true;
|
||||
fish.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
|
||||
userName = "Christoph Urlacher";
|
||||
userEmail = "christoph.urlacher@protonmail.com";
|
||||
signCommits = true;
|
||||
};
|
||||
|
||||
jellyfin-tui.enable = true;
|
||||
kitty.enable = true;
|
||||
lazygit.enable = true;
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
alias = true;
|
||||
neovide = !headless;
|
||||
};
|
||||
|
||||
ssh.enable = true;
|
||||
tmux.enable = true;
|
||||
yazi.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable terminal tools";
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.homemodules) tmux color;
|
||||
in {
|
||||
options.homemodules.tmux = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf tmux.enable {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
||||
clock24 = true;
|
||||
escapeTime = 0; # Delay after pressing escape
|
||||
# keyMode = "vi";
|
||||
terminal = "xterm-256color";
|
||||
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
plugin = tmuxPlugins.catppuccin;
|
||||
extraConfig = ''
|
||||
set -g @plugin 'catppuccin/tmux'
|
||||
set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
set -g default-terminal "xterm-256color"
|
||||
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable tmux";
|
||||
}
|
||||
@ -1,89 +0,0 @@
|
||||
# TODO: Expose some settings
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with mylib.modules; let
|
||||
cfg = config.homemodules.vscode;
|
||||
in {
|
||||
options.homemodules.vscode = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode;
|
||||
mutableExtensionsDir = false;
|
||||
|
||||
profiles.default = {
|
||||
enableUpdateCheck = false;
|
||||
enableExtensionUpdateCheck = false;
|
||||
enableMcpIntegration = true;
|
||||
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
# Theme
|
||||
catppuccin.catppuccin-vsc
|
||||
catppuccin.catppuccin-vsc-icons
|
||||
vscode-icons-team.vscode-icons
|
||||
|
||||
# General
|
||||
vscodevim.vim
|
||||
christian-kohler.path-intellisense
|
||||
ryu1kn.partial-diff
|
||||
redhat.vscode-yaml
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode-remote.remote-ssh-edit
|
||||
ms-vscode.remote-explorer
|
||||
anthropic.claude-code
|
||||
|
||||
# Python
|
||||
ms-python.python
|
||||
ms-python.vscode-pylance
|
||||
ms-python.black-formatter
|
||||
|
||||
# C/C++
|
||||
ms-vscode.cpptools
|
||||
# llvm-vs-code-extensions.vscode-clangd
|
||||
ms-vscode.cmake-tools
|
||||
ms-vscode.makefile-tools
|
||||
# llvm-org.lldb-vscode
|
||||
vadimcn.vscode-lldb
|
||||
# "13xforever".language-x86-64-assembly
|
||||
|
||||
# Latex
|
||||
# james-yu.latex-workshop
|
||||
# valentjn.vscode-ltex
|
||||
];
|
||||
|
||||
keybindings = [];
|
||||
globalSnippets = {};
|
||||
languageSnippets = {};
|
||||
userMcp = {};
|
||||
|
||||
userSettings = {
|
||||
"editor.fontFamily" = config.homemodules.color.font;
|
||||
"editor.fontSize" = 14;
|
||||
"editor.smoothScrolling" = true;
|
||||
"editor.cursorSmoothCaretAnimation" = "on";
|
||||
"workbench.enableExperiments" = false;
|
||||
"workbench.list.smoothScrolling" = true;
|
||||
"workbench.colorTheme" = "Catppuccin Mocha";
|
||||
"workbench.iconTheme" = "catppuccin-mocha";
|
||||
"remote.SSH.configFile" = "~/.ssh/custom-config";
|
||||
"workbench.welcomePage.walkthroughs.openOnInstall" = false;
|
||||
"security.workspace.trust.enabled" = false;
|
||||
"chat.disableAIFeatures" = false;
|
||||
|
||||
# C++
|
||||
# "C_Cpp.intelliSenseEngine" = "disabled"; # IntelliSense conflics with Clangd
|
||||
};
|
||||
|
||||
userTasks = {};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -21,230 +21,126 @@ in {
|
||||
spacing = 0;
|
||||
margin = "10px 10px 0px 10px";
|
||||
fixed-center = true;
|
||||
output = waybar.monitors;
|
||||
output = ["${waybar.monitor}"];
|
||||
|
||||
modules-left = ["custom/launcher" "niri/workspaces" "niri/window"]; # "user"
|
||||
modules-center = ["mpris"]; # "systemd-failed-units"
|
||||
modules-right = ["privacy" "pulseaudio" "network" "disk" "cpu" "memory" "clock" "tray"];
|
||||
modules-left = ["custom/launcher" "user" "hyprland/window"];
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "clock" "tray"];
|
||||
|
||||
"custom/launcher" = {
|
||||
format = "<span></span>";
|
||||
format = "<span></span>";
|
||||
interval = "once";
|
||||
on-click = "walker -m desktopapplications";
|
||||
on-click = "rofi -drun-show-actions -show drun";
|
||||
};
|
||||
|
||||
systemd-failed-units = {
|
||||
hide-on-ok = true;
|
||||
format = " {nr_failed}";
|
||||
format-ok = "✔️";
|
||||
system = true;
|
||||
user = true;
|
||||
};
|
||||
|
||||
"niri/workspaces" = {
|
||||
"hyprland/workspaces" = {
|
||||
all-outputs = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
default = "";
|
||||
focused = "";
|
||||
active = "";
|
||||
};
|
||||
format = "{name}";
|
||||
on-click = "activate";
|
||||
sort-by-coordinates = false;
|
||||
sort-by-name = true;
|
||||
sort-by-number = false;
|
||||
};
|
||||
|
||||
"niri/window" = {
|
||||
format = "{title}";
|
||||
separate-outputs = false;
|
||||
icon = true;
|
||||
icon-size = 22;
|
||||
"pulseaudio" = {
|
||||
format = "<span></span> {volume}%";
|
||||
format-muted = "<span></span> ";
|
||||
on-click = "kitty ncpamixer -t o";
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format = "<span></span> {dynamic}";
|
||||
format-paused = "<span>{status_icon}</span> <i>{dynamic}</i>";
|
||||
dynamic-order = ["artist" "title"];
|
||||
status-icons = {
|
||||
paused = "";
|
||||
};
|
||||
};
|
||||
|
||||
privacy = {
|
||||
icon-spacing = 4;
|
||||
icon-size = 16;
|
||||
transition-duration = 250;
|
||||
modules = [
|
||||
{
|
||||
type = "screenshare";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 24;
|
||||
}
|
||||
# {
|
||||
# type = "audio-out";
|
||||
# tooltip = true;
|
||||
# tooltip-icon-size = 24;
|
||||
# }
|
||||
{
|
||||
type = "audio-in";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 24;
|
||||
}
|
||||
];
|
||||
ignore-monitor = true;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "<span></span> {volume}%";
|
||||
format-muted = "<span></span> ";
|
||||
on-click = "kitty --title=WireMix wiremix";
|
||||
};
|
||||
|
||||
network = {
|
||||
format = "<span></span> {ipaddr}";
|
||||
"network" = {
|
||||
format = "<span></span> {ipaddr}";
|
||||
format-disconnected = "<span></span> ";
|
||||
interface = "enp8s0";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
disk = {
|
||||
interval = 5;
|
||||
format = "<span></span> {percentage_used}%";
|
||||
on-click = "kitty --hold --title=Duf duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
||||
tooltip-format = "{ifname} via {gwaddr}";
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 1;
|
||||
# states = {
|
||||
# "critical" = 85;
|
||||
# };
|
||||
format = "<span></span> {load}%";
|
||||
# format-critical = "<span color='#${color.hex.red}'><span></span> {load}%</span>";
|
||||
on-click = "kitty --title=Btop btop";
|
||||
tooltip = false;
|
||||
format = "<span></span> {load}%";
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 1;
|
||||
# states = {
|
||||
# "critical" = 85;
|
||||
# };
|
||||
format = "<span></span> {percentage}%";
|
||||
# format-critical = "<span color='#${color.hex.red}'><span></span> {percentage}%</span>";
|
||||
on-click = "kitty --title=Btop btop";
|
||||
tooltip = true;
|
||||
tooltip-format = "RAM: {used}GiB / {total}GiB\nSwap: {swapUsed}GiB / {swapTotal}GiB";
|
||||
format = "<span></span> {percentage}%";
|
||||
};
|
||||
|
||||
temperature = {
|
||||
format = "<span></span> {temperatureC}°C";
|
||||
thermal-zone = 3;
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "<span></span> {:%H:%M}";
|
||||
format = "<span></span> {:%H:%M}";
|
||||
timezone = "Europe/Berlin";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
weeks-pos = "right";
|
||||
mode-mon-col = 3;
|
||||
on-scroll = -1;
|
||||
format = {
|
||||
months = "<span color='#${color.hex.peach}'><b>{}</b></span>";
|
||||
days = "<span color='#${color.hex.flamingo}'><b>{}</b></span>";
|
||||
weeks = "<span color='#${color.hex.teal}'><b>W{}</b></span>";
|
||||
weekdays = "<span color='#${color.hex.lavender}'><b>{}</b></span>";
|
||||
today = "<span color='#${color.hex.accent}'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 22;
|
||||
icon-size = 20;
|
||||
show-passive-items = true;
|
||||
spacing = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = let
|
||||
border-width = "2px";
|
||||
border-radius = "10px";
|
||||
in ''
|
||||
style = ''
|
||||
/* Order is Top-Right-Bottom-Left for combined properties */
|
||||
* {
|
||||
color: #${color.hex.dark.base};
|
||||
font-family: ${color.font};
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
border-style: solid;
|
||||
border-width: ${border-width};
|
||||
border-radius: ${border-radius};
|
||||
border-color: #${color.hex.accent};
|
||||
background-color: rgba(${color.rgbS.mantle}, 1.0);
|
||||
border-width: 2px;
|
||||
border-radius: 6px;
|
||||
border-color: #${color.hex.dark.lavender};
|
||||
background-color: rgba(${color.rgbString.light.base}, 0.3);
|
||||
}
|
||||
|
||||
tooltip {
|
||||
color: #${color.hex.text};
|
||||
font-weight: normal;
|
||||
border-style: solid;
|
||||
border-width: ${border-width};
|
||||
border-radius: ${border-radius};
|
||||
border-color: #${color.hex.accent};
|
||||
background-color: rgba(${color.rgbS.mantle}, 1.0);
|
||||
border-width: 2px;
|
||||
border-radius: 6px;
|
||||
border-color: #${color.hex.dark.lavender};
|
||||
background-color: rgba(${color.rgbString.light.base}, 0.7);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* Background colors */
|
||||
#custom-launcher {background-color: #${color.hex.accent};}
|
||||
#workspaces button {background-color: #${color.hex.blue};}
|
||||
#workspaces button.empty {background-color: #${color.hex.lavender};}
|
||||
#workspaces button.active {background-color: #${color.hex.green};}
|
||||
#workspaces button.urgent {background-color: #${color.hex.red};}
|
||||
#window {background-color: #${color.hex.maroon};}
|
||||
|
||||
#mpris {background-color: #${color.hex.accent};}
|
||||
|
||||
#privacy {background-color: #${color.hex.red};}
|
||||
#pulseaudio {background-color: #${color.hex.maroon};}
|
||||
#network {background-color: #${color.hex.peach};}
|
||||
#disk {background-color: #${color.hex.yellow};}
|
||||
#cpu {background-color: #${color.hex.green};}
|
||||
#memory {background-color: #${color.hex.teal};}
|
||||
#clock {background-color: #${color.hex.sky};}
|
||||
#tray {background-color: #${color.hex.accent};}
|
||||
#custom-launcher {background-color: #${color.hex.dark.lavender};}
|
||||
#user {background-color: #${color.hex.dark.pink};}
|
||||
#window {background-color: #${color.hex.dark.mauve};}
|
||||
#workspaces button {background-color: #${color.hex.dark.lavender};}
|
||||
#workspaces button.active {background-color: #${color.hex.dark.pink};}
|
||||
#pulseaudio {background-color: #${color.hex.dark.maroon};}
|
||||
#network {background-color: #${color.hex.dark.peach};}
|
||||
#cpu {background-color: #${color.hex.dark.yellow};}
|
||||
#memory {background-color: #${color.hex.dark.green};}
|
||||
#temperature {background-color: #${color.hex.dark.teal};}
|
||||
#clock {background-color: #${color.hex.dark.sky};}
|
||||
#tray {background-color: #${color.hex.dark.lavender};}
|
||||
|
||||
/* Square Widgets */
|
||||
#custom-launcher,
|
||||
#mpris,
|
||||
#workspaces button,
|
||||
#tray {
|
||||
color: #${color.hex.mantle};
|
||||
font-weight: bold;
|
||||
padding: 0px 10px 0px 10px;
|
||||
border-radius: ${border-radius};
|
||||
}
|
||||
|
||||
/* Workspaces */
|
||||
#workspaces button {
|
||||
color: #${color.hex.mantle};
|
||||
font-weight: bold;
|
||||
padding: 0px 2px 0px 2px;
|
||||
margin: 8px 2px 8px 2px;
|
||||
border-radius: ${border-radius};
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* Rectangle Widgets */
|
||||
#user,
|
||||
#window,
|
||||
#pulseaudio,
|
||||
#privacy,
|
||||
#network,
|
||||
#disk,
|
||||
#cpu,
|
||||
#memory,
|
||||
#temperature,
|
||||
#clock {
|
||||
color: #${color.hex.mantle};
|
||||
font-weight: bold;
|
||||
padding: 0px 10px 0px 10px;
|
||||
margin: 8px 5px 8px 5px;
|
||||
border-radius: ${border-radius};
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* Make window module transparent when no windows present */
|
||||
@ -257,10 +153,14 @@ in {
|
||||
/* Tux Icon */
|
||||
#custom-launcher {
|
||||
font-size: 26px;
|
||||
padding-right: 13px;
|
||||
padding-right: 10px;
|
||||
margin: 0px 5px 0px 0px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
margin: 0px 5px 0px 5px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
margin: 0px 0px 0px 5px;
|
||||
}
|
||||
|
||||
@ -7,9 +7,9 @@ with lib;
|
||||
with mylib.modules; {
|
||||
enable = mkEnableOption "Waybar";
|
||||
|
||||
monitors = mkOption {
|
||||
type = types.listOf types.str;
|
||||
example = ''["HDMI-A-1", "DP-1"]'';
|
||||
monitor = mkOption {
|
||||
type = types.str;
|
||||
example = "HDMI-A-1";
|
||||
description = "What monitor to display the Waybar on";
|
||||
};
|
||||
}
|
||||
|
||||
@ -17,19 +17,7 @@ in {
|
||||
shellWrapperName = "y";
|
||||
|
||||
plugins = {
|
||||
inherit
|
||||
(pkgs.yaziPlugins)
|
||||
chmod
|
||||
diff
|
||||
full-border
|
||||
git
|
||||
lazygit
|
||||
mount
|
||||
ouch
|
||||
rsync
|
||||
starship
|
||||
sudo
|
||||
; # smart-paste
|
||||
inherit (pkgs.yaziPlugins) chmod diff full-border git lazygit mount ouch rsync starship sudo; # smart-paste
|
||||
};
|
||||
|
||||
initLua = ''
|
||||
@ -82,12 +70,7 @@ in {
|
||||
{
|
||||
run = ''mpv "$@"'';
|
||||
orphan = true;
|
||||
desc = "Play selection with mpv";
|
||||
}
|
||||
{
|
||||
run = ''vlc "$@"'';
|
||||
orphan = true;
|
||||
desc = "Play selection with vlc";
|
||||
desc = "Play selection";
|
||||
}
|
||||
];
|
||||
edit = [
|
||||
@ -100,16 +83,7 @@ in {
|
||||
open = [
|
||||
{
|
||||
run = ''xdg-open "$@"'';
|
||||
desc = "Open selection with xdg-open";
|
||||
}
|
||||
{
|
||||
run = ''imv "$@"'';
|
||||
desc = "Open selection with imv";
|
||||
}
|
||||
{
|
||||
# TODO: For some reason, junction does not exit after choosing an application...
|
||||
run = ''junction "$@"'';
|
||||
desc = "Open selection with junction";
|
||||
desc = "Open selection";
|
||||
}
|
||||
];
|
||||
extract = [
|
||||
@ -127,13 +101,13 @@ in {
|
||||
|
||||
plugin.prepend_fetchers = [
|
||||
{
|
||||
group = "git";
|
||||
url = "*";
|
||||
id = "git";
|
||||
name = "*";
|
||||
run = "git";
|
||||
}
|
||||
{
|
||||
group = "git";
|
||||
url = "*/";
|
||||
id = "git";
|
||||
name = "*/";
|
||||
run = "git";
|
||||
}
|
||||
];
|
||||
@ -183,66 +157,42 @@ in {
|
||||
|
||||
mgr.prepend_keymap = [
|
||||
{
|
||||
on = [
|
||||
"<C-p>"
|
||||
"m"
|
||||
];
|
||||
on = ["<C-p>" "m"];
|
||||
run = "plugin mount";
|
||||
desc = "Manage device mounts";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"<C-p>"
|
||||
"c"
|
||||
];
|
||||
on = ["<C-p>" "c"];
|
||||
run = "plugin chmod";
|
||||
desc = "Chmod selection";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"<C-p>"
|
||||
"g"
|
||||
];
|
||||
on = ["<C-p>" "g"];
|
||||
run = "plugin lazygit";
|
||||
desc = "Run LazyGit";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"<C-p>"
|
||||
"a"
|
||||
];
|
||||
on = ["<C-p>" "a"];
|
||||
run = "plugin ouch";
|
||||
desc = "Add selection to archive";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"<C-p>"
|
||||
"d"
|
||||
];
|
||||
on = ["<C-p>" "d"];
|
||||
run = ''shell -- ripdrag -a -n "$@"'';
|
||||
desc = "Drag & drop selection";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"<C-p>"
|
||||
"D"
|
||||
];
|
||||
on = ["<C-p>" "D"];
|
||||
run = "plugin diff";
|
||||
desc = "Diff the selected with the hovered file";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"<C-p>"
|
||||
"r"
|
||||
];
|
||||
on = ["<C-p>" "r"];
|
||||
run = "plugin rsync";
|
||||
desc = "Copy files using rsync";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"<C-p>"
|
||||
"w"
|
||||
];
|
||||
on = ["<C-p>" "w"];
|
||||
run = ''wl-copy < "$0"'';
|
||||
desc = "Copy hovered file contents using wl-copy";
|
||||
}
|
||||
@ -254,10 +204,7 @@ in {
|
||||
}
|
||||
{
|
||||
on = "y";
|
||||
run = [
|
||||
''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list''
|
||||
"yank"
|
||||
];
|
||||
run = [''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list'' "yank"];
|
||||
desc = "Copy files to system clipboard on yank";
|
||||
}
|
||||
# {
|
||||
@ -276,9 +223,7 @@ in {
|
||||
# https://github.com/catppuccin/yazi/blob/main/themes/mocha/catppuccin-mocha-lavender.toml
|
||||
theme = {
|
||||
mgr = {
|
||||
cwd = {
|
||||
fg = color.hexS.teal;
|
||||
};
|
||||
cwd = {fg = color.hexS.teal;};
|
||||
|
||||
hovered = {
|
||||
fg = color.hexS.accentText;
|
||||
@ -335,9 +280,7 @@ in {
|
||||
};
|
||||
|
||||
border_symbol = "│";
|
||||
border_style = {
|
||||
fg = color.hexS.overlay0;
|
||||
};
|
||||
border_style = {fg = color.hexS.overlay0;};
|
||||
};
|
||||
|
||||
tabs = {
|
||||
@ -406,104 +349,58 @@ in {
|
||||
bg = color.hexS.surface0;
|
||||
};
|
||||
|
||||
perm_type = {
|
||||
fg = color.hexS.blue;
|
||||
};
|
||||
perm_read = {
|
||||
fg = color.hexS.yellow;
|
||||
};
|
||||
perm_write = {
|
||||
fg = color.hexS.red;
|
||||
};
|
||||
perm_exec = {
|
||||
fg = color.hexS.green;
|
||||
};
|
||||
perm_sep = {
|
||||
fg = color.hexS.overlay0;
|
||||
};
|
||||
perm_type = {fg = color.hexS.blue;};
|
||||
perm_read = {fg = color.hexS.yellow;};
|
||||
perm_write = {fg = color.hexS.red;};
|
||||
perm_exec = {fg = color.hexS.green;};
|
||||
perm_sep = {fg = color.hexS.overlay0;};
|
||||
};
|
||||
|
||||
input = {
|
||||
border = {
|
||||
fg = color.hexS.accentDim;
|
||||
};
|
||||
border = {fg = color.hexS.accentDim;};
|
||||
title = {};
|
||||
value = {};
|
||||
selected = {
|
||||
reversed = true;
|
||||
};
|
||||
selected = {reversed = true;};
|
||||
};
|
||||
|
||||
pick = {
|
||||
border = {
|
||||
fg = color.hexS.accentDim;
|
||||
};
|
||||
active = {
|
||||
fg = color.hexS.accentHl;
|
||||
};
|
||||
border = {fg = color.hexS.accentDim;};
|
||||
active = {fg = color.hexS.accentHl;};
|
||||
inactive = {};
|
||||
};
|
||||
|
||||
confirm = {
|
||||
border = {
|
||||
fg = color.hexS.accentDim;
|
||||
};
|
||||
title = {
|
||||
fg = color.hexS.accentDim;
|
||||
};
|
||||
border = {fg = color.hexS.accentDim;};
|
||||
title = {fg = color.hexS.accentDim;};
|
||||
content = {};
|
||||
list = {};
|
||||
btn_yes = {
|
||||
reversed = true;
|
||||
};
|
||||
btn_yes = {reversed = true;};
|
||||
btn_no = {};
|
||||
};
|
||||
|
||||
cmp = {
|
||||
border = {
|
||||
fg = color.hexS.accentDim;
|
||||
};
|
||||
border = {fg = color.hexS.accentDim;};
|
||||
};
|
||||
|
||||
tasks = {
|
||||
border = {
|
||||
fg = color.hexS.accentDim;
|
||||
};
|
||||
border = {fg = color.hexS.accentDim;};
|
||||
title = {};
|
||||
hovered = {
|
||||
underline = true;
|
||||
};
|
||||
hovered = {underline = true;};
|
||||
};
|
||||
|
||||
which = {
|
||||
cand = {
|
||||
fg = color.hexS.accent;
|
||||
};
|
||||
desc = {
|
||||
fg = color.hexS.accentHl;
|
||||
};
|
||||
mask = {
|
||||
bg = color.hexS.surface0;
|
||||
};
|
||||
rest = {
|
||||
fg = color.hexS.surface0;
|
||||
};
|
||||
cand = {fg = color.hexS.accent;};
|
||||
desc = {fg = color.hexS.accentHl;};
|
||||
mask = {bg = color.hexS.surface0;};
|
||||
rest = {fg = color.hexS.surface0;};
|
||||
separator = " ";
|
||||
separator_style = {
|
||||
fg = color.hexS.text;
|
||||
};
|
||||
separator_style = {fg = color.hexS.text;};
|
||||
};
|
||||
|
||||
help = {
|
||||
on = {
|
||||
fg = color.hexS.accent;
|
||||
};
|
||||
run = {
|
||||
fg = color.hexS.accentHl;
|
||||
};
|
||||
desc = {
|
||||
fg = color.hexS.text;
|
||||
};
|
||||
on = {fg = color.hexS.accent;};
|
||||
run = {fg = color.hexS.accentHl;};
|
||||
desc = {fg = color.hexS.text;};
|
||||
hovered = {
|
||||
fg = color.hexS.accentText; # TODO: This is not applied
|
||||
|
||||
@ -518,31 +415,19 @@ in {
|
||||
};
|
||||
|
||||
notify = {
|
||||
title_info = {
|
||||
fg = color.hexS.teal;
|
||||
};
|
||||
title_warn = {
|
||||
fg = color.hexS.yellow;
|
||||
};
|
||||
title_error = {
|
||||
fg = color.hexS.red;
|
||||
};
|
||||
title_info = {fg = color.hexS.teal;};
|
||||
title_warn = {fg = color.hexS.yellow;};
|
||||
title_error = {fg = color.hexS.red;};
|
||||
};
|
||||
|
||||
spot = {
|
||||
border = {
|
||||
fg = color.hexS.lavender;
|
||||
};
|
||||
title = {
|
||||
fg = color.hexS.lavender;
|
||||
};
|
||||
border = {fg = color.hexS.lavender;};
|
||||
title = {fg = color.hexS.lavender;};
|
||||
tbl_cell = {
|
||||
fg = color.hexS.lavender;
|
||||
reversed = true;
|
||||
};
|
||||
tbl_col = {
|
||||
bold = true;
|
||||
};
|
||||
tbl_col = {bold = true;};
|
||||
};
|
||||
|
||||
# Default rules good enough
|
||||
|
||||
@ -18,7 +18,6 @@ in [
|
||||
(mkIcon "Public" "")
|
||||
(mkIcon "Restic" "")
|
||||
(mkIcon "Shows" "")
|
||||
(mkIcon "SSD" "")
|
||||
(mkIcon "Unity" "")
|
||||
(mkIcon "Videos" "")
|
||||
]
|
||||
|
||||
@ -1,199 +0,0 @@
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.homemodules) zed color;
|
||||
in {
|
||||
options.homemodules.zed = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf zed.enable {
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
package = pkgs.zed-editor;
|
||||
enableMcpIntegration = true;
|
||||
mutableUserKeymaps = false;
|
||||
mutableUserSettings = false;
|
||||
mutableUserTasks = false;
|
||||
mutableUserDebug = false;
|
||||
|
||||
extensions = [
|
||||
"catppuccin"
|
||||
"catppuccin-icons"
|
||||
"comment"
|
||||
"git-firefly"
|
||||
|
||||
"nix"
|
||||
"perl"
|
||||
"fish"
|
||||
"lua"
|
||||
"toml"
|
||||
"csharp"
|
||||
"java"
|
||||
"latex"
|
||||
"typst"
|
||||
"haskell"
|
||||
"glsl"
|
||||
"mermaid"
|
||||
"clojure"
|
||||
"verilog"
|
||||
"qml"
|
||||
"plantuml"
|
||||
"graphviz"
|
||||
|
||||
"dockerfile"
|
||||
"docker-compose"
|
||||
|
||||
"html"
|
||||
"xml"
|
||||
"scss"
|
||||
"rainbow-csv"
|
||||
"sql"
|
||||
"svelte"
|
||||
"svelte-mcp"
|
||||
"jinja2"
|
||||
|
||||
"just"
|
||||
"make"
|
||||
"neocmake"
|
||||
"assembly"
|
||||
"wat"
|
||||
"linkerscript"
|
||||
"r"
|
||||
];
|
||||
|
||||
themes = {};
|
||||
userDebug = [];
|
||||
|
||||
# TODO: Add neovim keymaps
|
||||
userKeymaps = [
|
||||
{
|
||||
context = "Workspace";
|
||||
bindings = {
|
||||
"ctrl-/" = "terminal_panel::Toggle";
|
||||
};
|
||||
}
|
||||
{
|
||||
context = "Editor";
|
||||
unbind = {
|
||||
"ctrl-/" = [
|
||||
"editor::ToggleComments"
|
||||
{
|
||||
advance_downwards = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
context = "(vim_mode == normal || vim_mode == visual) && !menu";
|
||||
bindings = {
|
||||
"ctrl-c" = "editor::ToggleComments";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
buffer_font_family = config.homemodules.color.font;
|
||||
terminal.font_family = config.homemodules.color.font;
|
||||
theme = "Catppuccin Mocha";
|
||||
icon_theme = "Catppuccin Mocha";
|
||||
ui_font_size = 16;
|
||||
buffer_font_size = 14;
|
||||
|
||||
project_panel.dock = "left";
|
||||
outline_panel.dock = "left";
|
||||
collaboration_panel.dock = "left";
|
||||
git_panel = {
|
||||
dock = "left";
|
||||
tree_view = true;
|
||||
};
|
||||
|
||||
# TODO: Doesn't work, although perlnavigator advertises Perl::Tidy autoformatting...
|
||||
languages = {
|
||||
Perl = {
|
||||
formatter = "language_server";
|
||||
};
|
||||
};
|
||||
|
||||
auto_signature_help = true;
|
||||
lsp = {
|
||||
nil = {
|
||||
initialization_options = {
|
||||
formatting = {
|
||||
# command = null;
|
||||
command = ["${pkgs.alejandra}/bin/alejandra"];
|
||||
};
|
||||
};
|
||||
};
|
||||
nixd = {
|
||||
initialization_options = {
|
||||
formatting = {
|
||||
command = ["${pkgs.alejandra}/bin/alejandra"];
|
||||
};
|
||||
};
|
||||
};
|
||||
# No idea how to configure the formatter
|
||||
# perlnavigator-server = let
|
||||
# # TODO: Duplicated in neovim/default.nix. Need Perl module.
|
||||
# perl = pkgs.perl.withPackages (p:
|
||||
# with p; [
|
||||
# PLS
|
||||
# PerlCritic
|
||||
# PerlTidy
|
||||
# NetOpenSSH
|
||||
# DateTime
|
||||
# DBI
|
||||
# DBDMariaDB
|
||||
# CursesUI
|
||||
# TextCSV_XS
|
||||
# ]);
|
||||
# in {
|
||||
# initialization_options = {
|
||||
# "perlnavigator.perlPath" = "${perl}/bin";
|
||||
# "perlnavigator.includePaths" = ["${perl}/lib/perl5"];
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
disable_ai = false;
|
||||
agent = {
|
||||
dock = "right";
|
||||
sidebar_side = "right";
|
||||
};
|
||||
agent_servers = {
|
||||
claude-acp = {
|
||||
type = "registry";
|
||||
};
|
||||
codex-acp = {
|
||||
type = "registry";
|
||||
};
|
||||
gemini = {
|
||||
type = "registry";
|
||||
};
|
||||
mistral-vibe = {
|
||||
type = "registry";
|
||||
};
|
||||
opencode = {
|
||||
type = "registry";
|
||||
};
|
||||
};
|
||||
|
||||
telemetry = {
|
||||
diagnostics = false;
|
||||
metrics = false;
|
||||
};
|
||||
|
||||
vim_mode = true;
|
||||
which_key = {
|
||||
enabled = true;
|
||||
delay_ms = 10;
|
||||
};
|
||||
};
|
||||
|
||||
userTasks = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "Enable zed editor";
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# Standard DockerHub login used by all oci-container services.
|
||||
# Usage: login = mylib.containers.mkDockerLogin config;
|
||||
mkDockerLogin = config: {
|
||||
username = "christoph.urlacher@protonmail.com";
|
||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||
};
|
||||
}
|
||||
@ -13,5 +13,4 @@
|
||||
rofi = import ./rofi.nix {inherit inputs pkgs lib;};
|
||||
generators = import ./generators.nix {inherit inputs pkgs lib;};
|
||||
color = import ./color.nix {inherit inputs pkgs lib;};
|
||||
containers = import ./containers.nix {inherit inputs pkgs lib;};
|
||||
}
|
||||
|
||||
@ -43,8 +43,6 @@
|
||||
routers,
|
||||
nameservers,
|
||||
routable,
|
||||
# Extra addresses declared without creating routes (e.g. IPv6 ULA).
|
||||
extraAddresses ? [],
|
||||
}: {
|
||||
enable = true;
|
||||
|
||||
@ -59,14 +57,13 @@
|
||||
gateway = routers;
|
||||
dns = nameservers;
|
||||
routes = builtins.map (r: {Gateway = r;}) routers;
|
||||
addresses = builtins.map (a: {Address = a;}) extraAddresses;
|
||||
|
||||
# See man systemd.network
|
||||
networkConfig = {
|
||||
# This corresponds to the [NETWORK] section
|
||||
DHCP = "no";
|
||||
|
||||
IPv6AcceptRA = "yes"; # Accept Router Advertisements
|
||||
# IPv6AcceptRA = "no";
|
||||
# MulticastDNS = "no";
|
||||
# LLMNR = "no";
|
||||
# LinkLocalAddressing = "ipv6";
|
||||
@ -88,9 +85,6 @@
|
||||
ip,
|
||||
router,
|
||||
nameserver ? "8.8.8.8;8.8.4.4;",
|
||||
ip6,
|
||||
router6,
|
||||
nameserver6 ? "2001:4860:4860::8888;2001:4860:4860::8844;",
|
||||
autoconnect ? true,
|
||||
priority ? 0,
|
||||
}: {
|
||||
@ -109,12 +103,7 @@
|
||||
};
|
||||
|
||||
ipv6 = {
|
||||
method = "auto";
|
||||
addr-gen-mode = "stable-privacy";
|
||||
ignore-auto-dns = "true";
|
||||
address1 = ip6;
|
||||
gateway = router6;
|
||||
dns = nameserver6;
|
||||
method = "disabled";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
111
lib/nixos.nix
111
lib/nixos.nix
@ -4,50 +4,6 @@
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# Common nix daemon settings shared between NixOS and nix-darwin.
|
||||
# Darwin additionally needs nix.enable = true.
|
||||
mkCommonNixSettings = username: {
|
||||
enable = true;
|
||||
package = pkgs.nixVersions.stable;
|
||||
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes pipe-operators
|
||||
'';
|
||||
|
||||
settings = {
|
||||
trusted-users = ["root" username];
|
||||
auto-optimise-store = true;
|
||||
|
||||
download-buffer-size = 524288000; # 500MB
|
||||
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://nix-community.cachix.org"
|
||||
# "https://app.cachix.org/cache/nixos-rocm"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
# "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
|
||||
];
|
||||
};
|
||||
|
||||
gc = {
|
||||
automatic = false;
|
||||
options = "--delete-older-than 5d";
|
||||
};
|
||||
|
||||
optimise = {
|
||||
automatic = true;
|
||||
};
|
||||
|
||||
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
|
||||
nixPath = [
|
||||
"nixpkgs=${inputs.nixpkgs.outPath}"
|
||||
"home-manager=${inputs.home-manager.outPath}"
|
||||
];
|
||||
};
|
||||
|
||||
mkNixosConfigWithHomeManagerModule = {
|
||||
system,
|
||||
mylib,
|
||||
@ -73,6 +29,7 @@
|
||||
|
||||
# Import the toplevel system configuration module.
|
||||
../system
|
||||
../system/cachix.nix
|
||||
|
||||
# Host specific configuration
|
||||
../system/${hostname}
|
||||
@ -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 = {
|
||||
system,
|
||||
mylib,
|
||||
|
||||
193
lib/rofi.nix
193
lib/rofi.nix
@ -3,164 +3,75 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: rec {
|
||||
# Receives attrs like:
|
||||
# {
|
||||
# "Poweroff" = "poweroff";
|
||||
# "Reload Hyprland" = "hyprctl reload";
|
||||
# }
|
||||
# mkSimpleMenu = let
|
||||
# # Makes a string like ''"Poweroff" "Reload Hyprland"''
|
||||
# unpack-options = attrs: "\"${lib.concatStringsSep "\" \"" (builtins.attrNames attrs)}\"";
|
||||
#
|
||||
# mkCase = option: action: "else if test \"${option}\" = $OPTION\n set ACTION \"${action}\"";
|
||||
#
|
||||
# cases = attrs:
|
||||
# attrs
|
||||
# |> builtins.mapAttrs mkCase
|
||||
# |> builtins.attrValues
|
||||
# |> builtins.concatStringsSep "\n";
|
||||
# in
|
||||
# {
|
||||
# prompt,
|
||||
# attrs,
|
||||
# command ? ''rofi -dmenu -i'',
|
||||
# }:
|
||||
# pkgs.writeScriptBin "rofi-menu-${prompt}" ''
|
||||
# #! ${pkgs.fish}/bin/fish
|
||||
#
|
||||
# # OPTIONS contains all possible values Rofi will display
|
||||
# set OPTIONS ${unpack-options attrs}
|
||||
#
|
||||
# # We choose a single OPTION using Rofi
|
||||
# set OPTION (echo -e (string join "\n" $OPTIONS) | ${command} -p "${prompt}")
|
||||
#
|
||||
# # Check if the chosen OPTION is a valid choice from OPTIONS
|
||||
# if not contains $OPTION $OPTIONS
|
||||
# exit
|
||||
# end
|
||||
#
|
||||
# # Set a command to execute based on the chosen OPTION
|
||||
# if false
|
||||
# exit # Easier to generate with this
|
||||
# ${cases attrs}
|
||||
# else
|
||||
# exit
|
||||
# end
|
||||
#
|
||||
# # Execute the command
|
||||
# eval $ACTION
|
||||
# '';
|
||||
mkSimpleMenu = let
|
||||
# Makes a string like ''"Poweroff" "Reload Hyprland"''
|
||||
unpack-options = attrs: "\"${lib.concatStringsSep "\" \"" (builtins.attrNames attrs)}\"";
|
||||
|
||||
# Rofi/Dmenu menu generator.
|
||||
#
|
||||
# Each element in `layers` is one of:
|
||||
# - attrset { "Label" = "value"; } # static options: selected value → $OPTIONn
|
||||
# - string "shell-cmd" # dynamic options from command: selected text → $OPTIONn
|
||||
# # may reference $OPTION0, $OPTION1, ... from earlier layers
|
||||
#
|
||||
# The "command" is the last action, it can reference $OPTION0, $OPTION1, ...
|
||||
# If no "command" is given and the last layer is a static attrset, its selected value is evaluated directly.
|
||||
#
|
||||
# The "prompts" list are optional per-layer prompt strings (falls back to "prompt" if not provided).
|
||||
#
|
||||
# vpn.fish equivalent:
|
||||
# mkMenu {
|
||||
# prompt = "vpn";
|
||||
# layers = [
|
||||
# "cat /etc/rofi-vpns"
|
||||
# { "start" = "start"; "stop" = "stop"; "status" = "status"; }
|
||||
# ];
|
||||
# command = "systemctl $OPTION1 $OPTION0.service";
|
||||
# }
|
||||
#
|
||||
# lectures.fish equivalent:
|
||||
# mkMenu {
|
||||
# prompt = "lecture";
|
||||
# layers = [
|
||||
# "eza -1 -D ~/Notes/TU"
|
||||
# "eza -1 ~/Notes/TU/$OPTION0/Lecture | grep '.pdf'"
|
||||
# ];
|
||||
# command = "xdg-open ~/Notes/TU/$OPTION0/Lecture/$OPTION1";
|
||||
# }
|
||||
mkMenu = {
|
||||
prompt,
|
||||
layers,
|
||||
prompts ? [],
|
||||
command ? null,
|
||||
rofiCmd ? "rofi -dmenu -i",
|
||||
}: let
|
||||
isStaticLayer = layer: builtins.isAttrs layer && !(layer ? options);
|
||||
isDynamicLayer = layer: builtins.isString layer;
|
||||
mkCase = option: action: "else if test \"${option}\" = $OPTION\n set ACTION \"${action}\"";
|
||||
|
||||
escStr = s: builtins.replaceStrings [''"'' "\\"] [''\"'' "\\\\"] s;
|
||||
cases = attrs:
|
||||
attrs
|
||||
|> builtins.mapAttrs mkCase
|
||||
|> builtins.attrValues
|
||||
|> builtins.concatStringsSep "\n";
|
||||
in
|
||||
prompt: attrs:
|
||||
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
|
||||
#! ${pkgs.fish}/bin/fish
|
||||
|
||||
layerPrompt = i:
|
||||
if i < builtins.length prompts
|
||||
then lib.elemAt prompts i
|
||||
else prompt;
|
||||
# OPTIONS contains all possible values Rofi will display
|
||||
set OPTIONS ${unpack-options attrs}
|
||||
|
||||
# Static layer: attrset of label -> value
|
||||
# Displays labels in rofi; maps selected label to its value -> $OPTIONi
|
||||
mkStaticLayer = i: attrs: let
|
||||
lp = layerPrompt i;
|
||||
labels = builtins.attrNames attrs;
|
||||
optsStr = "\"${lib.concatStringsSep "\" \"" (map escStr labels)}\"";
|
||||
mkCase = label: value: "else if test \"${escStr label}\" = $_LABEL${toString i}\n set OPTION${toString i} \"${escStr value}\"";
|
||||
casesStr =
|
||||
builtins.concatStringsSep "\n"
|
||||
(builtins.attrValues (builtins.mapAttrs mkCase attrs));
|
||||
in {
|
||||
script = ''
|
||||
set _OPTS${toString i} ${optsStr}
|
||||
set _LABEL${toString i} (echo -e (string join "\n" $_OPTS${toString i}) | ${rofiCmd} -p "${lp}")
|
||||
if not contains $_LABEL${toString i} $_OPTS${toString i}
|
||||
# We choose a single OPTION using Rofi
|
||||
set OPTION (echo -e (string join "\n" $OPTIONS) | rofi -dmenu -p " ${prompt} " -i)
|
||||
|
||||
# Check if the chosen OPTION is a valid choice from OPTIONS
|
||||
if not contains $OPTION $OPTIONS
|
||||
exit
|
||||
end
|
||||
|
||||
# Set a command to execute based on the chosen OPTION
|
||||
if false
|
||||
exit
|
||||
${casesStr}
|
||||
exit # Easier to generate with this
|
||||
${cases attrs}
|
||||
else
|
||||
exit
|
||||
end
|
||||
|
||||
# Execute the command
|
||||
eval $ACTION
|
||||
'';
|
||||
};
|
||||
|
||||
# Dynamic layer: shell command string whose output is piped to rofi
|
||||
# Selected text -> $OPTIONi; may reference earlier $OPTIONn variables
|
||||
mkDynamicLayer = i: cmd: let
|
||||
lp = layerPrompt i;
|
||||
in {
|
||||
script = ''
|
||||
set OPTION${toString i} (${cmd} | ${rofiCmd} -p "${lp}")
|
||||
if test -z $OPTION${toString i}
|
||||
exit
|
||||
end
|
||||
'';
|
||||
};
|
||||
# TODO: I want to generate the containers menu using the actionsA and actionsB attrs:
|
||||
# - actionsA will be generated from the stuff in oci-containers.containers
|
||||
# - actionsB will be set statically for start, stop, status
|
||||
|
||||
mkLayer = i: layer:
|
||||
if isStaticLayer layer
|
||||
then mkStaticLayer i layer
|
||||
else if isDynamicLayer layer
|
||||
then mkDynamicLayer i layer
|
||||
else throw "mkMenu: layer ${toString i} has invalid type";
|
||||
|
||||
layerResults = lib.imap0 mkLayer layers; # Map with 0-based index
|
||||
layerScripts = map (r: r.script) layerResults;
|
||||
lastLayer = lib.last layers;
|
||||
|
||||
finalCmd =
|
||||
if command != null
|
||||
then command
|
||||
else if isStaticLayer lastLayer
|
||||
then "$OPTION${toString (builtins.length layers - 1)}"
|
||||
else throw "mkMenu: 'command' must be set when the last layer is not a static attrset";
|
||||
# Receives attrs like:
|
||||
# {
|
||||
# optionA = "exa -1 -D ~/Notes/TU";
|
||||
# optionB = "exa -1 -D ~/Notes/TU/$OPTIONA/Lecture | grep \".pdf\"";
|
||||
# commandB = "xdg-open ~/Notes/TU/$OPTIONA/Lecture/$OPTIONB";
|
||||
# }
|
||||
#
|
||||
# Keys:
|
||||
# - optionA, optionB # Command that generates Rofi options:
|
||||
# exa -1 -D ~/Notes/TU
|
||||
# cat /etc/rofi-vpns
|
||||
# - commandA, commandB # Action to execute after sth. was chosen (mutually excl. with command)
|
||||
# - actionsA, actionsB # Configure actions by lookup (mutually excl. with command):
|
||||
# actionsB = {"status" = "systemctl status..."}
|
||||
# - colorA, colorB # Configure highlighting conditions:
|
||||
# colorA = {"red" = "systemctl ... | grep ..."};
|
||||
#
|
||||
# Use $OPTIONA and $OPTIONB to use the options chosen by option<A/B>-command and rofi
|
||||
# Use $EVALA and $EVALB to use the outputs generated by command<A/B>
|
||||
mkMenu = let
|
||||
in
|
||||
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
|
||||
#! ${pkgs.fish}/bin/fish
|
||||
|
||||
${lib.concatStringsSep "\n" layerScripts}
|
||||
eval "${finalCmd}"
|
||||
'';
|
||||
prompt: attrs: "";
|
||||
}
|
||||
|
||||
@ -29,37 +29,6 @@
|
||||
# Remove this after jetbrains.jdk builds again (nixpkgs issue 425328)
|
||||
# jetbrains.rider = pkgs-stable.jetbrains.rider;
|
||||
|
||||
jetbrains =
|
||||
prev.jetbrains
|
||||
// {
|
||||
clion = prev.jetbrains.clion.overrideAttrs (oldAttrs: rec {
|
||||
version = "261.22158.47"; # March 6, 2026
|
||||
|
||||
src = prev.fetchurl {
|
||||
url = "https://download-cdn.jetbrains.com/cpp/CLion-${version}.tar.gz";
|
||||
|
||||
# hash = "sha256-h6tnemVnV1YEsvIndwrq2sMsRZYuvTWMU5oqj/hkjdY="; # 261.21849.6
|
||||
hash = "sha256-FUHNRioJvjwOWN+FkXEr3+NWR+QVxaZUOkJ0egQkcCQ="; # 261.22158.47
|
||||
};
|
||||
|
||||
# autoPatchelfIgnoreMissingDeps = [
|
||||
# "libcrypto.so.1.1"
|
||||
# "libssl.so.1.1"
|
||||
# ];
|
||||
|
||||
postFixup = ''
|
||||
# Patch python3.12 shared libs that the upstream glob (python3.8) misses
|
||||
find $out -path '*/python3.*/lib-dynload/*.so' -exec patchelf \
|
||||
--replace-needed libssl.so.1.1 libssl.so \
|
||||
--replace-needed libcrypto.so.1.1 libcrypto.so \
|
||||
--replace-needed libcrypt.so.1 libcrypt.so \
|
||||
{} +
|
||||
|
||||
${oldAttrs.postFixup or ""}
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
# Now in Nixpkgs
|
||||
# neovide = prev.neovide.overrideAttrs (finalAttrs: prevAttrs: {
|
||||
# version = "0.15.1";
|
||||
|
||||
16
system/cachix.nix
Normal file
16
system/cachix.nix
Normal 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/"];
|
||||
}
|
||||
12
system/cachix/nix-community.nix
Normal file
12
system/cachix/nix-community.nix
Normal 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="
|
||||
];
|
||||
};
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -8,7 +8,6 @@
|
||||
system,
|
||||
username,
|
||||
headless,
|
||||
publicKeys,
|
||||
...
|
||||
}:
|
||||
with mylib.networking; {
|
||||
@ -91,7 +90,6 @@ with mylib.networking; {
|
||||
"ssh-private-key"
|
||||
"nix-github-token"
|
||||
"docker-password"
|
||||
"jellyfin-password"
|
||||
];
|
||||
};
|
||||
|
||||
@ -105,7 +103,31 @@ with mylib.networking; {
|
||||
};
|
||||
|
||||
# Enable flakes
|
||||
nix = mylib.nixos.mkCommonNixSettings username;
|
||||
nix = {
|
||||
package = pkgs.nixVersions.stable;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes pipe-operators
|
||||
'';
|
||||
|
||||
settings.trusted-users = ["root" "${username}"];
|
||||
|
||||
# Auto garbage-collect and optimize store
|
||||
gc.automatic = false; # Done by nh.clean.enable;
|
||||
gc.options = "--delete-older-than 5d";
|
||||
settings.auto-optimise-store = true;
|
||||
optimise.automatic = true;
|
||||
|
||||
# This will add your inputs as registries, making operations with them (such
|
||||
# as nix shell nixpkgs#name) consistent with your flake inputs.
|
||||
# (Registry contains flakes)
|
||||
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
|
||||
|
||||
# Set NIX_PATH to find nixpgks
|
||||
nixPath = [
|
||||
"nixpkgs=${inputs.nixpkgs.outPath}"
|
||||
"home-manager=${inputs.home-manager.outPath}"
|
||||
];
|
||||
};
|
||||
|
||||
# Bootloader/Kernel stuff
|
||||
boot = {
|
||||
@ -144,9 +166,9 @@ with mylib.networking; {
|
||||
|
||||
documentation = {
|
||||
# NOTE: Disable this while configuring stuff, it's slow
|
||||
enable = false;
|
||||
enable = true;
|
||||
man.enable = config.documentation.enable;
|
||||
man.cache.enable = true; # Slow but needed for neovim man picker
|
||||
man.generateCaches = true; # Slow but needed for neovim man picker
|
||||
info.enable = config.documentation.enable;
|
||||
dev.enable = config.documentation.enable;
|
||||
doc.enable = config.documentation.enable;
|
||||
@ -185,7 +207,6 @@ with mylib.networking; {
|
||||
supportedLocales = ["${en}/UTF-8" "${de}/UTF-8"];
|
||||
};
|
||||
|
||||
# console = lib.mkIf headless {
|
||||
console = {
|
||||
earlySetup = true;
|
||||
useXkbConfig = true;
|
||||
@ -235,7 +256,6 @@ with mylib.networking; {
|
||||
description = "Christoph";
|
||||
group = "users";
|
||||
uid = 1000;
|
||||
home = "/home/${username}";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
@ -253,10 +273,6 @@ with mylib.networking; {
|
||||
];
|
||||
shell = pkgs.fish;
|
||||
|
||||
openssh.authorizedKeys.keys = [
|
||||
publicKeys.${username}.ssh
|
||||
];
|
||||
|
||||
# We do this with HomeManager
|
||||
# packages = with pkgs; [];
|
||||
};
|
||||
@ -280,7 +296,6 @@ with mylib.networking; {
|
||||
wireguard-tools
|
||||
man-pages
|
||||
man-pages-posix
|
||||
kmscon # needed in addition to services.kmscon for kmscon-launch-gui
|
||||
|
||||
# Android
|
||||
android-tools
|
||||
@ -368,6 +383,21 @@ with mylib.networking; {
|
||||
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).
|
||||
libinput.enable = !headless;
|
||||
|
||||
@ -388,9 +418,7 @@ with mylib.networking; {
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
openssh = {
|
||||
enable = true;
|
||||
};
|
||||
openssh.enable = true;
|
||||
|
||||
# Trims the journal if too large
|
||||
journald.extraConfig = ''
|
||||
|
||||
@ -27,65 +27,23 @@
|
||||
useNetworkManager = true;
|
||||
|
||||
# Systemd-networkd configs
|
||||
networks = let
|
||||
# TODO: mylib.networking.mkStaticSystemdNetwork needs improvement to accomodate for this
|
||||
mkConfig = name: routable: rec {
|
||||
enable = true;
|
||||
|
||||
# See man systemd.link, man systemd.netdev, man systemd.network
|
||||
matchConfig = {
|
||||
# This corresponds to the [MATCH] section
|
||||
Name = name; # Match ethernet interface
|
||||
};
|
||||
|
||||
# Static IP + DNS + Gateway
|
||||
address = ["192.168.86.50/24"];
|
||||
gateway = ["192.168.86.5"]; # Don't add "fd00::5", rely on router advertisement instead
|
||||
dns = ["129.168.86.26" "fd00::1a" "8.8.8.8" "8.8.4.4" "2001:4860:4860::8888" "2001:4860:4860::8844"];
|
||||
routes = builtins.map (r: {Gateway = r;}) gateway;
|
||||
|
||||
# See man systemd.network
|
||||
networkConfig = {
|
||||
# This corresponds to the [NETWORK] section
|
||||
DHCP = "no";
|
||||
|
||||
IPv6AcceptRA = "yes"; # Accept Router Advertisements
|
||||
# MulticastDNS = "no";
|
||||
# LLMNR = "no";
|
||||
# LinkLocalAddressing = "ipv6";
|
||||
};
|
||||
|
||||
addresses = [
|
||||
{
|
||||
# Don't add this to address, we don't want to create any routes with this
|
||||
Address = "fd00::32/64"; # IPv6 Unique-Local Address (ULA)
|
||||
}
|
||||
];
|
||||
|
||||
linkConfig = {
|
||||
# This corresponds to the [LINK] section
|
||||
RequiredForOnline = routable;
|
||||
};
|
||||
};
|
||||
in {
|
||||
# "10-ether-2_5G" = mylib.networking.mkStaticSystemdNetwork {
|
||||
# interface = "enp8s0";
|
||||
# ips = ["192.168.86.50/24"];
|
||||
# routers = ["192.168.86.5"];
|
||||
# nameservers = ["192.168.86.26" "8.8.8.8"];
|
||||
# routable = true;
|
||||
# };
|
||||
# "10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {
|
||||
# interface = "enp5s0";
|
||||
# ips = ["192.168.86.50/24"];
|
||||
# routers = ["192.168.86.5"];
|
||||
# nameservers = ["192.168.86.26" "8.8.8.8"];
|
||||
# routable = false;
|
||||
# };
|
||||
|
||||
networks = {
|
||||
# This should override the default network 50-ether
|
||||
"10-ether-1G" = mkConfig "enp5s0" "no";
|
||||
"10-ether-2_5G" = mkConfig "enp8s0" "routable";
|
||||
"10-ether-2_5G" = mylib.networking.mkStaticSystemdNetwork {
|
||||
interface = "enp8s0";
|
||||
ips = ["192.168.86.50/24"];
|
||||
routers = ["192.168.86.5"];
|
||||
nameservers = ["192.168.86.26" "8.8.8.8"];
|
||||
routable = true;
|
||||
};
|
||||
"10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {
|
||||
interface = "enp5s0";
|
||||
ips = ["192.168.86.50/24"];
|
||||
routers = ["192.168.86.5"];
|
||||
nameservers = ["192.168.86.26" "8.8.8.8"];
|
||||
routable = false;
|
||||
};
|
||||
# "10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {...};
|
||||
};
|
||||
|
||||
# NetworkManager profiles
|
||||
@ -98,9 +56,6 @@
|
||||
ip = "192.168.86.50/24";
|
||||
router = "192.168.86.5";
|
||||
nameserver = "192.168.86.26;8.8.8.8;";
|
||||
ip6 = "fd00::32/64";
|
||||
router6 = "fd00::5";
|
||||
nameserver6 = "2001:4860:4860::8888;2001:4860:4860::8844;";
|
||||
priority = 10; # Rather connect to 2.5G than to 1G
|
||||
};
|
||||
"10-ether-1G" = mylib.networking.mkStaticNetworkManagerProfile {
|
||||
@ -109,30 +64,25 @@
|
||||
ip = "192.168.86.50/24";
|
||||
router = "192.168.86.5";
|
||||
nameserver = "192.168.86.26;8.8.8.8;";
|
||||
ip6 = "fd00::32/64";
|
||||
router6 = "fd00::5";
|
||||
nameserver6 = "2001:4860:4860::8888;2001:4860:4860::8844;";
|
||||
};
|
||||
};
|
||||
|
||||
allowedTCPPorts = [
|
||||
1111 # FAIL*
|
||||
# 4242 # Lan-Mouse
|
||||
# 7777 # AvaTalk
|
||||
# 12777 # AvaTalk
|
||||
7777 # AvaTalk
|
||||
12777 # AvaTalk
|
||||
# 31431 # Parsec
|
||||
5173 # SvelteKit
|
||||
8090 # PocketBase
|
||||
4242 # Lan-Mouse
|
||||
];
|
||||
|
||||
allowedUDPPorts = [
|
||||
1111 # FAIL*
|
||||
# 4242 # Lan-Mouse
|
||||
# 7777 # AvaTalk
|
||||
# 12777 # AvaTalk
|
||||
7777 # AvaTalk
|
||||
12777 # AvaTalk
|
||||
# 31431 # Parsec
|
||||
5173 # SvelteKit
|
||||
8090 # PocketBase
|
||||
4242 # Lan-Mouse
|
||||
];
|
||||
};
|
||||
|
||||
@ -158,70 +108,17 @@
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
# kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# Why do I need to know if something fails during boot???
|
||||
# consoleLogLevel = 3;
|
||||
# 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"];
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
# kernelParams = [ "quiet" ];
|
||||
# plymouth.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
spice
|
||||
spice-gtk
|
||||
];
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
# ovmf.enable = true; # deprecated
|
||||
swtpm.enable = true;
|
||||
runAsRoot = true;
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.trustedInterfaces = ["virbr0"]; # libvirt
|
||||
# environment.systemPackages = with pkgs; [];
|
||||
|
||||
programs = {
|
||||
ausweisapp = {
|
||||
enable = true;
|
||||
openFirewall = true; # Directly set port in firewall
|
||||
};
|
||||
|
||||
ghidra = {
|
||||
enable = true;
|
||||
gdb = true;
|
||||
};
|
||||
|
||||
virt-manager.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
@ -231,123 +128,63 @@
|
||||
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
|
||||
# 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?
|
||||
# - Might this be caused by the restic service being interrupted by shutdown/rebooting?
|
||||
#
|
||||
# restic.backups."synology" = {
|
||||
# # user = "${username}"; # Keep default (root), so restic can read everything
|
||||
#
|
||||
# repository = "/home/${username}/Restic";
|
||||
# initialize = true;
|
||||
# passwordFile = config.sops.secrets.restic-repo-key.path;
|
||||
# createWrapper = true;
|
||||
#
|
||||
# timerConfig = {
|
||||
# OnCalendar = "daily";
|
||||
# Persistent = true;
|
||||
# RandomizedDelaySec = "5h";
|
||||
# };
|
||||
#
|
||||
# runCheck = true;
|
||||
# checkOpts = [
|
||||
# "--with-cache"
|
||||
# ];
|
||||
#
|
||||
# pruneOpts = [
|
||||
# "--keep-daily 3"
|
||||
# "--keep-weekly 2"
|
||||
# # "--keep-monthly 0"
|
||||
# # "--keep-yearly 0"
|
||||
#
|
||||
# "--prune" # Automatically remove dangling files not referenced by any snapshot
|
||||
# "--repack-uncompressed"
|
||||
# ];
|
||||
#
|
||||
# paths = ["/persist"];
|
||||
# exclude = [
|
||||
# # The backup is just supposed to allow a system restore
|
||||
# "/persist/old_homes"
|
||||
# "/persist/old_roots"
|
||||
#
|
||||
# # Those are synced by nextcloud, no need to backup them 50 times
|
||||
# "/persist/home/${username}/Documents"
|
||||
# "/persist/home/${username}/NixFlake"
|
||||
# "/persist/home/${username}/Notes"
|
||||
# "/persist/home/${username}/Projects"
|
||||
# "/persist/home/${username}/Public"
|
||||
#
|
||||
# # Some more caches
|
||||
# ".cache"
|
||||
# "cache2" # firefox
|
||||
# "Cache"
|
||||
# ];
|
||||
# extraBackupArgs = [
|
||||
# "--exclude-caches" # Excludes marked cache directories
|
||||
# "--one-file-system" # Only stay on /persist (in case symlinks lead elsewhere)
|
||||
# "--cleanup-cache" # Auto remove old cache directories
|
||||
# ];
|
||||
# };
|
||||
restic.backups."synology" = {
|
||||
# user = "${username}"; # Keep default (root), so restic can read everything
|
||||
|
||||
repository = "/home/${username}/Restic";
|
||||
initialize = true;
|
||||
passwordFile = config.sops.secrets.restic-repo-key.path;
|
||||
createWrapper = true;
|
||||
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
RandomizedDelaySec = "5h";
|
||||
};
|
||||
|
||||
runCheck = true;
|
||||
checkOpts = [
|
||||
"--with-cache"
|
||||
];
|
||||
|
||||
pruneOpts = [
|
||||
"--keep-daily 3"
|
||||
"--keep-weekly 2"
|
||||
# "--keep-monthly 0"
|
||||
# "--keep-yearly 0"
|
||||
|
||||
"--prune" # Automatically remove dangling files not referenced by any snapshot
|
||||
"--repack-uncompressed"
|
||||
];
|
||||
|
||||
paths = ["/persist"];
|
||||
exclude = [
|
||||
# The backup is just supposed to allow a system restore
|
||||
"/persist/old_homes"
|
||||
"/persist/old_roots"
|
||||
|
||||
# Those are synced by nextcloud, no need to backup them 50 times
|
||||
"/persist/home/${username}/Documents"
|
||||
"/persist/home/${username}/NixFlake"
|
||||
"/persist/home/${username}/Notes"
|
||||
"/persist/home/${username}/Projects"
|
||||
"/persist/home/${username}/Public"
|
||||
|
||||
# Some more caches
|
||||
".cache"
|
||||
"cache2" # firefox
|
||||
"Cache"
|
||||
];
|
||||
extraBackupArgs = [
|
||||
"--exclude-caches" # Excludes marked cache directories
|
||||
"--one-file-system" # Only stay on /persist (in case symlinks lead elsewhere)
|
||||
"--cleanup-cache" # Auto remove old cache directories
|
||||
];
|
||||
};
|
||||
|
||||
xserver = {
|
||||
# Configure keymap in X11
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10" "tries=5"];
|
||||
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10"];
|
||||
|
||||
# Disable for interactive password entry
|
||||
# keyFile = "/tmp/secret.key";
|
||||
@ -82,104 +82,7 @@
|
||||
};
|
||||
"swap" = {
|
||||
mountpoint = "/swap";
|
||||
# Configured in hardware-configuration.nix
|
||||
# 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"
|
||||
];
|
||||
swap.swapfile.size = "16G";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -76,9 +76,6 @@
|
||||
# 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).
|
||||
|
||||
# If the bg option is specified, a timeout or failure causes the mount(8) command
|
||||
@ -121,13 +118,18 @@
|
||||
fsType = "nfs";
|
||||
options = ["defaults" "rw" "noatime" "_netdev" "bg" "hard"];
|
||||
};
|
||||
|
||||
"/media/Box" = {
|
||||
device = "192.168.86.20:/mnt/Seagate4TB/Box";
|
||||
fsType = "nfs";
|
||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swap/swapfile";
|
||||
size = 1024 * 64; # Without hibernation 4.0 GB to 0.5 x RAM
|
||||
randomEncryption.enable = false; # The disk is already encrypted. Useless and might lead to system freeze.
|
||||
device = "/var/swap";
|
||||
size = 1024 * 16; # Without hibernation 4.0 GB to 0.5 x RAM
|
||||
}
|
||||
];
|
||||
|
||||
@ -140,8 +142,8 @@
|
||||
nvidia-container-toolkit.enable = true;
|
||||
|
||||
nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
|
||||
open = true;
|
||||
nvidiaSettings = false; # Those are for x-server
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
# programs.light.enable = true; # Unmaintained
|
||||
programs.light.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
# Configure keymap in X11
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user