Compare commits
84 Commits
master
...
06cf86fa20
| Author | SHA1 | Date | |
|---|---|---|---|
|
06cf86fa20
|
|||
|
a4272ea92c
|
|||
|
89739e3af0
|
|||
|
52a99db8e0
|
|||
|
7848fb7274
|
|||
|
397d1b014c
|
|||
|
7f1ce57994
|
|||
|
a1f495f138
|
|||
|
4e9003e0c5
|
|||
|
380e11edb2
|
|||
|
a2153c4418
|
|||
|
abdcbe2ce9
|
|||
|
fa286dce16
|
|||
|
c4454daab6
|
|||
|
a03c9d8227
|
|||
|
9db5d91da6
|
|||
|
72716230ea
|
|||
|
2919e797ed
|
|||
|
86d669c2ab
|
|||
|
77ac5b70b8
|
|||
|
54839be395
|
|||
|
714e3e0683
|
|||
|
a8d7d1e666
|
|||
|
40bcc14304
|
|||
|
fa5bd0eefd
|
|||
|
6182ada581
|
|||
|
4acddcec09
|
|||
|
5c14817464
|
|||
|
38920bd3d7
|
|||
|
b89934d13f
|
|||
|
734dfcadfc
|
|||
|
2c959fdc0c
|
|||
|
e00c4f49f5
|
|||
|
61131ca598
|
|||
|
9c1a39d699
|
|||
|
32de6e24b7
|
|||
|
78e554cc30
|
|||
|
f65617deed
|
|||
|
aa3a881d58
|
|||
|
7f99b73635
|
|||
|
c1360e5c2c
|
|||
|
ca9e66bc35
|
|||
|
eac705bdfb
|
|||
|
69beab4812
|
|||
|
515110ff7d
|
|||
|
9a9bffd637
|
|||
|
f1b269e3ee
|
|||
|
f09dee5ad8
|
|||
|
f246eacdb3
|
|||
|
b7e2bba8f0
|
|||
|
25ae0f4b85
|
|||
|
d12b247368
|
|||
|
25e9128875
|
|||
|
eee28f57fc
|
|||
|
ea03e2266f
|
|||
|
5e422d05c9
|
|||
|
eaa36cfce2
|
|||
|
572d0bfe9e
|
|||
|
385ca27f8c
|
|||
|
4c18fd8c8e
|
|||
|
bf0c55669c
|
|||
|
86a5e79079
|
|||
|
7d429a4720
|
|||
|
2e9a4b13d1
|
|||
|
73eeff9a0e
|
|||
|
d216a8018d
|
|||
|
b09d854e50
|
|||
|
ff39dd1df2
|
|||
|
98c520e0bd
|
|||
|
7e3d3ca4a5
|
|||
|
c8a76751f3
|
|||
|
12a10bee82
|
|||
|
767309885a
|
|||
|
6d360ed782
|
|||
|
ddccd51b5a
|
|||
|
1fef42e5d4
|
|||
|
0d20883f4f
|
|||
|
cec5ec5493
|
|||
|
5833dff19e
|
|||
|
7b4c2df7af
|
|||
|
1643f30906
|
|||
|
79c617cc91
|
|||
|
474a8badf4
|
|||
|
17368396cf
|
BIN
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 |
|
Contains all the system configurations.
|
||||||
|-|-|-|-|
|
|
||||||
| `nixinator` | Desktop (x86_64) | NVIDIA | [disko](https://github.com/nix-community/disko) partitioning, [lanzaboote](https://github.com/nix-community/lanzaboote) Secure Boot, [impermanence](https://github.com/nix-community/impermanence) opt-in state, [sops-nix](https://github.com/Mic92/sops-nix) secrets |
|
|
||||||
| `nixtop` | Laptop (x86_64) | Intel | Obsolete trash computer |
|
|
||||||
| `servenix` | Headless (x86_64) | NVIDIA | Jellyfin, Nextcloud, Gitea, ... |
|
|
||||||
| `thinknix` | Headless (x86_64) | - | AdGuard DNS, Nginx, ... |
|
|
||||||
| `darwinix` | macOS (aarch64) | - | nix-darwin with home-manager |
|
|
||||||
|
|
||||||
## Usage
|
- There is a common configuration used for all systems: `NixFlake/system/default.nix`
|
||||||
|
- Every system has its own special configuration: `NixFlake/system/<hostname>/default.nix`
|
||||||
|
- System modules are located in `NixFlake/system/systemmodules`
|
||||||
|
- Hosted services are located in `NixFlake/system/services`
|
||||||
|
|
||||||
```bash
|
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
|
||||||
# Enter dev shell (provides helper utilities)
|
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||||
nix develop
|
|
||||||
|
|
||||||
# Rebuild system + user config together
|
## NixFlake/home
|
||||||
nh os switch
|
|
||||||
nh os boot
|
|
||||||
|
|
||||||
# Or with nixos-rebuild
|
Contains all the home-manager configurations.
|
||||||
sudo nixos-rebuild switch --flake .#nixinator
|
|
||||||
```
|
|
||||||
|
|
||||||
## Info
|
- There is a common configuration for each user: `NixFlake/home/<username>/default.nix`
|
||||||
|
- There is a configuration for a single system of this user: `NixFlake/home/<username>/<hostname>/default.nix`
|
||||||
|
- Home-Manager modules are located in `NixFlake/home/homemodules`
|
||||||
|
|
||||||
Home-manager runs as a NixOS module (not standalone). A single `nixos-rebuild switch` rebuilds both system and user configuration together.
|
When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported.
|
||||||
|
Because the hostname is propagated to the common configuration, it can import the host-specific config by itself.
|
||||||
|
|
||||||
### Components
|
## NixFlake/derivations
|
||||||
|
|
||||||
Per-host config consists of three layers:
|
Contains all the stuff I packaged.
|
||||||
|
Each derivation is loaded into `NixFlake/derivations/default.nix`.
|
||||||
|
|
||||||
1. **Common Config**: `system/default.nix` (NixOS) / `home/christoph/default.nix` (home-manager)
|
## NixFlake/overlays
|
||||||
2. **Host Config**: `system/<hostname>/default.nix` (NixOS) / `home/christoph/<hostname>/default.nix` (home-manager)
|
|
||||||
3. **Hardware**: `system/<hostname>/hardware-configuration.nix`
|
|
||||||
|
|
||||||
### Modules
|
Contains all overlays, e.g. package version overrides.
|
||||||
|
The `NixFlake/overlays/default.nix` imports all overlays and all derivations.
|
||||||
There are two module hierarchies (NixOS and home-manager modules):
|
It is then imported by the top-level `NixFlake/flake.nix`, to make everything available to the system/home configurations.
|
||||||
|
|
||||||
```
|
|
||||||
system/systemmodules/<name>/ home/homemodules/<name>/
|
|
||||||
- options.nix # declares options - options.nix # declares options
|
|
||||||
- default.nix # implementation - default.nix # implementation
|
|
||||||
```
|
|
||||||
|
|
||||||
## Files
|
|
||||||
|
|
||||||
```
|
|
||||||
NixFlake/
|
|
||||||
├── flake.nix # flake entrypoint: inputs, outputs, host definitions
|
|
||||||
├── flake.lock # flake lockfile
|
|
||||||
├── shell.nix # dev shell (nix develop)
|
|
||||||
├── system/ # NixOS system configurations
|
|
||||||
│ ├── default.nix # global system defaults (all hosts)
|
|
||||||
│ ├── <hostname>/ # per-host overrides + hardware-config
|
|
||||||
│ ├── systemmodules/ # reusable system modules
|
|
||||||
│ └── services/ # OCI container services
|
|
||||||
├── home/ # home-manager user configuration
|
|
||||||
│ └── christoph/
|
|
||||||
│ ├── default.nix # global user defaults
|
|
||||||
│ ├── <hostname>/ # per-host user overrides
|
|
||||||
│ └── homemodules/ # reusable home-manager modules
|
|
||||||
├── lib/ # shared helpers
|
|
||||||
├── derivations/ # custom packages
|
|
||||||
├── overlays/ # package overrides
|
|
||||||
├── config/ # linked dotfiles
|
|
||||||
└── wallpapers/ # backgrounds
|
|
||||||
```
|
|
||||||
|
|
||||||
## System Modules
|
|
||||||
|
|
||||||
| Module | Description |
|
|
||||||
|--------|-------------|
|
|
||||||
| `bootloader` | systemd-boot, lanzaboote Secure Boot signing |
|
|
||||||
| `desktopportal` | xdg-desktop-portal backends (Niri, GTK) |
|
|
||||||
| `docker` | Docker / podman daemon config |
|
|
||||||
| `fonts` | System fonts and fontconfig |
|
|
||||||
| `impermanence` | Opt-in state persistence (wipes `/` on boot) |
|
|
||||||
| `mime` | MIME type associations |
|
|
||||||
| `network` | systemd-networkd wired/wireless config |
|
|
||||||
| `polkit` | Polkit rules for desktop users |
|
|
||||||
| `sops-nix` | Secrets decryption at boot |
|
|
||||||
|
|
||||||
## Home-Manager Modules
|
|
||||||
|
|
||||||
### Shell & Terminal
|
|
||||||
`fish` `terminal` `kitty` `tmux` `paths`
|
|
||||||
|
|
||||||
### Editors
|
|
||||||
`neovim` `vscode` `zed`
|
|
||||||
|
|
||||||
### Desktop / WM
|
|
||||||
`niri` `waybar` `rofi` `color` `fcitx`
|
|
||||||
|
|
||||||
### Media
|
|
||||||
`mpd` `rmpc` `cava` `beets` `jellyfin-tui`
|
|
||||||
|
|
||||||
### Browsers
|
|
||||||
`firefox` `qutebrowser`
|
|
||||||
|
|
||||||
### Tools
|
|
||||||
`git` `ssh` `bat` `btop` `fastfetch` `lazygit` `yazi` `zathura`
|
|
||||||
|
|
||||||
## Services
|
|
||||||
|
|
||||||
All server services run as OCI containers (podman). Each service is defined in `system/services/<name>.nix`.
|
|
||||||
|
|
||||||
| Service | Purpose |
|
|
||||||
|---------|---------|
|
|
||||||
| `adguard` | DNS ad blocking |
|
|
||||||
| `authelia` | SSO |
|
|
||||||
| `fileflows` | Media processing |
|
|
||||||
| `gitea` | Git server |
|
|
||||||
| `immich` | Photo cloud |
|
|
||||||
| `jellyfin` | Streaming server |
|
|
||||||
| `kiwix` | Offline mirrors |
|
|
||||||
| `kopia` | Docker volume backup |
|
|
||||||
| `nextcloud` | File sync |
|
|
||||||
| `nginx-proxy-manager` | Reverse proxy with Let's Encrypt |
|
|
||||||
| `ntfy` | Push notification server |
|
|
||||||
| `paperless` | Document management |
|
|
||||||
| `portainer` | Container status monitor |
|
|
||||||
| `teamspeak` | Voice chat server |
|
|
||||||
| `tinymediamanager` | Media metadata management |
|
|
||||||
|
|
||||||
## Overlays
|
|
||||||
|
|
||||||
Package modifications live in `overlays/default.nix`.
|
|
||||||
|
|
||||||
## Secrets
|
|
||||||
|
|
||||||
Secrets are managed with sops-nix. Public age keys are stored in `flake.nix` under `publicKeys`. Encrypted `.yaml`/`.json` files are referenced via `sops.secrets.<name>`. Decryption happens at activation time.
|
|
||||||
|
|
||||||
## Shared Helpers (`lib/`)
|
|
||||||
|
|
||||||
| File | Purpose |
|
|
||||||
|------|---------|
|
|
||||||
| `nixos.nix` | Host config builders (NixOS + darwin) |
|
|
||||||
| `modules.nix` | Option helpers |
|
|
||||||
| `networking.nix` | systemd-networkd config generators |
|
|
||||||
| `generators.nix` | Lua code generation |
|
|
||||||
| `containers.nix` | OCI container helpers for services |
|
|
||||||
| `color.nix` | Color utilities |
|
|
||||||
| `rofi.nix` | Rofi menu helpers |
|
|
||||||
|
|
||||||
Available to all modules as `mylib` (injected via special args).
|
|
||||||
|
|||||||
293
config/flake.nix
293
config/flake.nix
@ -21,9 +21,6 @@ rec {
|
|||||||
}:
|
}:
|
||||||
# Create a shell (and possibly package) for each possible system, not only x86_64-linux
|
# Create a shell (and possibly package) for each possible system, not only x86_64-linux
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
# =========================================================================================
|
|
||||||
# Define pkgs/stdenvs
|
|
||||||
# =========================================================================================
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
@ -31,140 +28,8 @@ rec {
|
|||||||
rust-overlay.overlays.default
|
rust-overlay.overlays.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# clangPkgs = import nixpkgs {
|
|
||||||
# inherit system;
|
|
||||||
# config.allowUnfree = true;
|
|
||||||
# overlays = [];
|
|
||||||
#
|
|
||||||
# # Use this to change the compiler:
|
|
||||||
# # - GCC: pkgs.stdenv
|
|
||||||
# # - Clang: pkgs.clangStdenv
|
|
||||||
# # NixOS packages are built using GCC by default. Using clang requires a full rebuild/redownload.
|
|
||||||
# config.replaceStdenv = {pkgs}: pkgs.clangStdenv;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Package set for cross-compilation
|
|
||||||
# windowsPkgs = import nixpkgs {
|
|
||||||
# inherit system;
|
|
||||||
# crossSystem = {
|
|
||||||
# config = "x86_64-w64-mingw32";
|
|
||||||
# };
|
|
||||||
# config.allowUnfree = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
inherit (pkgs) lib stdenv;
|
inherit (pkgs) lib stdenv;
|
||||||
|
|
||||||
# =========================================================================================
|
|
||||||
# Define 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
|
# Define custom dependencies
|
||||||
# ===========================================================================================
|
# ===========================================================================================
|
||||||
@ -254,15 +119,11 @@ rec {
|
|||||||
# jdk
|
# jdk
|
||||||
|
|
||||||
# C/C++:
|
# C/C++:
|
||||||
# pkg-config
|
|
||||||
# cmake
|
|
||||||
# gnumake
|
|
||||||
# ninja
|
|
||||||
# gdb
|
# gdb
|
||||||
# valgrind
|
# valgrind
|
||||||
# kdePackages.kcachegrind
|
# gnumake
|
||||||
# perf
|
# cmake
|
||||||
# hotspot
|
# pkg-config
|
||||||
|
|
||||||
# Clojure:
|
# Clojure:
|
||||||
# leiningen
|
# leiningen
|
||||||
@ -286,8 +147,6 @@ rec {
|
|||||||
# C/C++:
|
# C/C++:
|
||||||
# boost
|
# boost
|
||||||
# sfml
|
# sfml
|
||||||
# raylib
|
|
||||||
# backward-cpp
|
|
||||||
|
|
||||||
# Qt:
|
# Qt:
|
||||||
# qt6.qtbase
|
# qt6.qtbase
|
||||||
@ -303,38 +162,8 @@ rec {
|
|||||||
# src = ./.;
|
# src = ./.;
|
||||||
#
|
#
|
||||||
# installPhase = ''
|
# installPhase = ''
|
||||||
# runHook preInstall
|
|
||||||
#
|
|
||||||
# mkdir -p $out/bin
|
# mkdir -p $out/bin
|
||||||
# cp -rv ./${pname} $out/bin/
|
# mv ./BINARY $out/bin
|
||||||
#
|
|
||||||
# runHook postInstall
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
# windowsPackage = windowsPkgs.stdenv.mkDerivation rec {
|
|
||||||
# pname = "";
|
|
||||||
# version = "1.0.0";
|
|
||||||
# src = ./.;
|
|
||||||
#
|
|
||||||
# # nativeBuildInputs must be from the build-platform (not cross)
|
|
||||||
# # so we use "pkgs" here, not "windowsPkgs"
|
|
||||||
# nativeBuildInputs = with pkgs; [
|
|
||||||
# cmake
|
|
||||||
# ];
|
|
||||||
#
|
|
||||||
# buildInputs = with windowsPkgs; [];
|
|
||||||
#
|
|
||||||
# cmakeFlags = [
|
|
||||||
# "-DCMAKE_SYSTEM_NAME=Windows"
|
|
||||||
# ];
|
|
||||||
#
|
|
||||||
# installPhase = ''
|
|
||||||
# runHook preInstall
|
|
||||||
#
|
|
||||||
# mkdir -p $out/bin
|
|
||||||
# cp ./${pname}.exe $out/bin/
|
|
||||||
#
|
|
||||||
# runHook postInstall
|
|
||||||
# '';
|
# '';
|
||||||
# };
|
# };
|
||||||
# package = clj-nix.lib.mkCljApp {
|
# package = clj-nix.lib.mkCljApp {
|
||||||
@ -356,19 +185,16 @@ rec {
|
|||||||
# };
|
# };
|
||||||
in rec {
|
in rec {
|
||||||
# Provide package for "nix build"
|
# Provide package for "nix build"
|
||||||
# packages = {
|
# defaultPackage = package;
|
||||||
# default = package;
|
# defaultApp = flake-utils.lib.mkApp {
|
||||||
# windows = windowsPackage;
|
# drv = defaultPackage;
|
||||||
# };
|
|
||||||
# apps = {
|
|
||||||
# default = flake-utils.lib.mkApp {drv = package;};
|
|
||||||
# };
|
# };
|
||||||
|
|
||||||
devShells = {
|
devShells = {
|
||||||
# Provide default environment for "nix develop".
|
# Provide default environment for "nix develop".
|
||||||
# Other environments can be added below.
|
# Other environments can be added below.
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
inherit nativeBuildInputs buildInputs shellHook;
|
inherit nativeBuildInputs buildInputs;
|
||||||
name = description;
|
name = description;
|
||||||
|
|
||||||
# =========================================================================================
|
# =========================================================================================
|
||||||
@ -405,27 +231,90 @@ rec {
|
|||||||
|
|
||||||
# Set matplotlib backend
|
# Set matplotlib backend
|
||||||
# MPLBACKEND = "TkAgg";
|
# MPLBACKEND = "TkAgg";
|
||||||
};
|
|
||||||
|
|
||||||
# Provide environment with clang stdenv for "nix develop .#clang"
|
# =========================================================================================
|
||||||
# clang =
|
# Define shell environment
|
||||||
# pkgs.mkShell.override {
|
# =========================================================================================
|
||||||
# stdenv = pkgs.clangStdenv;
|
|
||||||
# } {
|
# Setup the shell when entering the "nix develop" environment (bash script).
|
||||||
# inherit shellHook;
|
shellHook = let
|
||||||
# name = description;
|
mkCmakeScript = type: let
|
||||||
#
|
typeLower = lib.toLower type;
|
||||||
# # If not required, use pkgs instead of clangPkgs for a lighter build
|
in
|
||||||
# nativeBuildInputs = with pkgs; [];
|
pkgs.writers.writeFish "cmake-${typeLower}.fish" ''
|
||||||
# buildInputs = with pkgs; [];
|
cd $FLAKE_PROJECT_ROOT
|
||||||
#
|
|
||||||
# # =========================================================================================
|
echo "Removing build directory ./cmake-build-${typeLower}/"
|
||||||
# # Define environment variables
|
rm -rf ./cmake-build-${typeLower}
|
||||||
# # =========================================================================================
|
|
||||||
#
|
echo "Creating build directory"
|
||||||
# # Dynamic libraries from buildinputs:
|
mkdir cmake-build-${typeLower}
|
||||||
# LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath buildInputs;
|
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}"'"
|
||||||
|
# ''
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -238,11 +238,11 @@ $ mode: echo -e "--export \tExport public key\n--export-secret-keys\t
|
|||||||
|
|
||||||
% sops
|
% sops
|
||||||
# Edit secrets.yaml
|
# Edit secrets.yaml
|
||||||
sops ~/NixFlake/system/systemmodules/sops-nix/secrets.yaml
|
sops ~/NixFlake/system/modules/sops-nix/secrets.yaml
|
||||||
|
|
||||||
% sops
|
% sops
|
||||||
# Rekey secrets.yaml
|
# Rekey secrets.yaml
|
||||||
sops updatekeys ~/NixFlake/system/systemmodules/sops-nix/secrets.yaml
|
sops updatekeys ~/NixFlake/system/modules/sops-nix/secrets.yaml
|
||||||
|
|
||||||
% ssh
|
% ssh
|
||||||
# Generate a new SSH key
|
# Generate a new SSH key
|
||||||
@ -308,33 +308,27 @@ mkdir -p "<name>" && cd "<name>" && spotdl --client-id (cat /home/christoph/.sec
|
|||||||
|
|
||||||
% ffmpeg
|
% ffmpeg
|
||||||
# Create a slow motion version of a video with interpolated/blended frames
|
# Create a slow motion version of a video with interpolated/blended frames
|
||||||
ffmpeg -i <input> -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=<doublefps>',setpts=2*PTS" output.mp4
|
ffmpeg -i "<input>" -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=<doublefps>',setpts=2*PTS" output.mp4
|
||||||
$ input: eza -f -1
|
$ input: eza -f -1
|
||||||
|
|
||||||
% ffmpeg
|
% ffmpeg
|
||||||
# Detect black bar dimensions automatically by looking at the first 10 frames
|
# Detect black bar dimensions automatically by looking at the first 10 frames
|
||||||
ffmpeg -i <input> -vframes 10 -vf cropdetect -f null -
|
ffmpeg -i "<input>" -vframes 10 -vf cropdetect -f null -
|
||||||
$ input: eza -f -1
|
$ input: eza -f -1
|
||||||
|
|
||||||
% ffmpeg
|
% ffmpeg
|
||||||
# Preview video with applied crop settings
|
# Preview video with applied crop settings
|
||||||
ffplay -vf crop=<width>:<height>:<x>:<y> <input>
|
ffplay -vf crop=<width>:<height>:<x>:<y> "<input>"
|
||||||
$ input: eza -f -1
|
$ input: eza -f -1
|
||||||
|
|
||||||
% ffmpeg
|
% ffmpeg
|
||||||
# Re-encode the video with applied crop settings
|
# Re-encode the video with applied crop settings
|
||||||
ffmpeg -i <input> -vf crop=<width>:<height>:<x>:<y> -c:a copy output.mp4
|
ffmpeg -i "<input>" -vf crop=<width>:<height>:<x>:<y> -c:a copy output.mp4
|
||||||
$ input: eza -f -1
|
$ input: eza -f -1
|
||||||
|
|
||||||
% ffmpeg
|
% ffmpeg
|
||||||
# Reencode and compress the video using the h265 codec
|
# Reencode and compress the video using the h265 codec
|
||||||
ffmpeg -i <input> -vcodec libx265 -crf <quality> out_<input>
|
ffmpeg -i "<input>" -vcodec libx265 -crf <quality> "out_<input>"
|
||||||
$ input: eza -f -1
|
|
||||||
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"
|
|
||||||
|
|
||||||
% ffmpeg
|
|
||||||
# Reencode, compress and scale the video using the h265 codec
|
|
||||||
ffmpeg -i <input> -vcodec libx265 -crf <quality> -vf scale=<width>:-2,setsar=1:1 out_<input>
|
|
||||||
$ input: eza -f -1
|
$ input: eza -f -1
|
||||||
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"
|
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"
|
||||||
|
|
||||||
|
|||||||
@ -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 {
|
img[alt*="center"] {
|
||||||
display: block !important;
|
display: block;
|
||||||
margin-left: auto !important;
|
margin-left: auto;
|
||||||
margin-right: auto !important;
|
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;
|
|
||||||
}
|
|
||||||
@ -11,9 +11,6 @@
|
|||||||
version = "0.20.0";
|
version = "0.20.0";
|
||||||
sha256 = "sha256-Gq9klAMXk+SHb7C6z6apErVRz0PB5jyADfixqGZyDDc=";
|
sha256 = "sha256-Gq9klAMXk+SHb7C6z6apErVRz0PB5jyADfixqGZyDDc=";
|
||||||
};
|
};
|
||||||
propagatedBuildInputs = with pythonPkgs; [
|
|
||||||
typing-extensions
|
|
||||||
];
|
|
||||||
});
|
});
|
||||||
|
|
||||||
aiofiles = super.aiofiles.overridePythonAttrs (old: {
|
aiofiles = super.aiofiles.overridePythonAttrs (old: {
|
||||||
@ -34,12 +31,12 @@
|
|||||||
in
|
in
|
||||||
pythonPkgs.buildPythonApplication rec {
|
pythonPkgs.buildPythonApplication rec {
|
||||||
pname = "tiddl";
|
pname = "tiddl";
|
||||||
version = "3.4.3";
|
version = "3.2.0";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
src = pythonPkgs.fetchPypi {
|
src = pythonPkgs.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-45KHNS1IP59DsH8i2uQ7sua6T21vW/Yw1PQg55jzLGs=";
|
sha256 = "sha256-uLkGyIScYPqFgQdPAOYJDJG0jp+nDAwIl2kFkaJZFco=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontCheckRuntimeDeps = true;
|
dontCheckRuntimeDeps = true;
|
||||||
|
|||||||
1091
flake.lock
generated
1091
flake.lock
generated
File diff suppressed because it is too large
Load Diff
113
flake.nix
113
flake.nix
@ -12,12 +12,8 @@
|
|||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
hardware.url = "github:nixos/nixos-hardware";
|
hardware.url = "github:nixos/nixos-hardware";
|
||||||
|
|
||||||
# Darwin
|
|
||||||
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
|
|
||||||
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
# NOTE: Update this after May and November
|
# NOTE: Update this after May and November
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
|
|
||||||
# Home Manager
|
# Home Manager
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
@ -57,14 +53,54 @@
|
|||||||
niri.url = "github:sodiboo/niri-flake";
|
niri.url = "github:sodiboo/niri-flake";
|
||||||
niri.inputs.nixpkgs.follows = "nixpkgs";
|
niri.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Walker
|
# Quickshell
|
||||||
elephant.url = "github:abenz1267/elephant";
|
quickshell.url = "github:quickshell-mirror/quickshell";
|
||||||
walker.url = "github:abenz1267/walker";
|
quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
walker.inputs.elephant.follows = "elephant";
|
|
||||||
|
# Noctalia shell
|
||||||
|
noctalia.url = "github:noctalia-dev/noctalia-shell";
|
||||||
|
noctalia.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# noctalia.inputs.quickshell.follows = "quickshell";
|
||||||
|
|
||||||
|
# Lol
|
||||||
|
waifu-cursors.url = "github:kagurazakei/waifu-cursors";
|
||||||
|
|
||||||
|
# Caelestia shell
|
||||||
|
caelestia.url = "github:caelestia-dots/shell";
|
||||||
|
caelestia.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
caelestia.inputs.quickshell.follows = "quickshell";
|
||||||
|
# caelestia-cli.url = "github:caelestia-dots/cli";
|
||||||
|
# caelestia-cli.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# DankMaterialShell
|
||||||
|
# dgop.url = "github:AvengeMedia/dgop";
|
||||||
|
# dgop.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# dms-cli.url = "github:AvengeMedia/danklinux";
|
||||||
|
# dms-cli.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
dank-material-shell.url = "github:AvengeMedia/DankMaterialShell";
|
||||||
|
dank-material-shell.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# dank-material-shell.inputs.dgop.follows = "dgop";
|
||||||
|
danksearch.url = "github:AvengeMedia/danksearch";
|
||||||
|
danksearch.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Hyprland (use flake so plugins are not built from source)
|
||||||
|
hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# HyprPlugins
|
||||||
|
hyprland-plugins.url = "github:hyprwm/hyprland-plugins";
|
||||||
|
hyprland-plugins.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
hyprland-plugins.inputs.hyprland.follows = "hyprland";
|
||||||
|
hypr-dynamic-cursors.url = "github:VirtCode/hypr-dynamic-cursors";
|
||||||
|
hypr-dynamic-cursors.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
hypr-dynamic-cursors.inputs.hyprland.follows = "hyprland";
|
||||||
|
hyprspace.url = "github:KZDKM/Hyprspace";
|
||||||
|
# hyprspace.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
hyprspace.inputs.hyprland.follows = "hyprland";
|
||||||
|
|
||||||
# NeoVim <3
|
# NeoVim <3
|
||||||
nixvim.url = "github:nix-community/nixvim";
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
# nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Emacs nightly
|
# Emacs nightly
|
||||||
# emacs-overlay.url = "github:nix-community/emacs-overlay";
|
# emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||||
@ -78,19 +114,9 @@
|
|||||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
||||||
# nix-flatpak.inputs.nixpkgs.follows = "nixpkgs"; # nix-flatpak doesn't have this
|
# nix-flatpak.inputs.nixpkgs.follows = "nixpkgs"; # nix-flatpak doesn't have this
|
||||||
|
|
||||||
# Instant Direnv (load environment in background)
|
|
||||||
# direnv-instant.url = "github:Mic92/direnv-instant";
|
|
||||||
# direnv-instant.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
# Realtime audio
|
# Realtime audio
|
||||||
# musnix.url = "github:musnix/musnix";
|
# musnix.url = "github:musnix/musnix";
|
||||||
# musnix.inputs.nixpkgs.follows = "nixpkgs";
|
# musnix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# HyTale
|
|
||||||
hytale-launcher.url = "github:JPyke3/hytale-launcher-nix";
|
|
||||||
|
|
||||||
masssprings.url = "git+https://gitea.local.chriphost.de/christoph/cpp-masssprings";
|
|
||||||
masssprings.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Outputs is a function that takes the inputs as arguments.
|
# Outputs is a function that takes the inputs as arguments.
|
||||||
@ -99,14 +125,12 @@
|
|||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nix-darwin,
|
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
# Our configuration is buildable on the following system/platform.
|
# Our configuration is buildable on the following system/platform.
|
||||||
# Configs can support more than a single system simultaneously,
|
# Configs can support more than a single system simultaneously,
|
||||||
# e.g. NixOS (linux) and MacOS (darwin) or Arm.
|
# e.g. NixOS (linux) and MacOS (darwin) or Arm.
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
darwinSystem = "aarch64-darwin";
|
|
||||||
|
|
||||||
# We configure our global packages here.
|
# We configure our global packages here.
|
||||||
# Usually, "nixpkgs.legacyPackages.${system}" is used (and more efficient),
|
# Usually, "nixpkgs.legacyPackages.${system}" is used (and more efficient),
|
||||||
@ -148,26 +172,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
darwinPkgs = import nixpkgs {
|
|
||||||
system = darwinSystem;
|
|
||||||
|
|
||||||
hostPlatform = darwinSystem;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
config.allowUnfreePredicate = pkg: true;
|
|
||||||
|
|
||||||
overlays = let
|
|
||||||
pkgs-stable = import inputs.nixpkgs-stable {
|
|
||||||
system = darwinSystem;
|
|
||||||
|
|
||||||
config.allowUnfree = true;
|
|
||||||
config.allowUnfreePredicate = pkg: true;
|
|
||||||
};
|
|
||||||
in [
|
|
||||||
# All my own overlays (derivations + modifications)
|
|
||||||
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# My own library functions are imported here.
|
# My own library functions are imported here.
|
||||||
# They are made available to the system and HM configs by inheriting mylib.
|
# They are made available to the system and HM configs by inheriting mylib.
|
||||||
mylib = import ./lib {
|
mylib = import ./lib {
|
||||||
@ -182,15 +186,8 @@
|
|||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
darwinMylib = import ./lib {
|
|
||||||
inherit inputs darwinPkgs;
|
|
||||||
|
|
||||||
inherit (nixpkgs) lib;
|
|
||||||
|
|
||||||
pkgs = darwinPkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
# NOTE: Keep public keys here so they're easy to rotate
|
# NOTE: Keep public keys here so they're easy to rotate
|
||||||
|
|
||||||
publicKeys.christoph = {
|
publicKeys.christoph = {
|
||||||
# /home/christoph/.ssh/id_ed25519.pub
|
# /home/christoph/.ssh/id_ed25519.pub
|
||||||
ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJAoJac+GdGtzblCMA0lBfMdSR6aQ4YyovrNglCFGIny christoph.urlacher@protonmail.com";
|
ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJAoJac+GdGtzblCMA0lBfMdSR6aQ4YyovrNglCFGIny christoph.urlacher@protonmail.com";
|
||||||
@ -214,22 +211,6 @@
|
|||||||
# Local shell for NixFlake directory
|
# Local shell for NixFlake directory
|
||||||
devShells.${system}.default = import ./shell.nix {inherit pkgs;};
|
devShells.${system}.default = import ./shell.nix {inherit pkgs;};
|
||||||
|
|
||||||
# Usage: sudo darwin-rebuild switch --flake .#darwinix
|
|
||||||
darwinConfigurations = {
|
|
||||||
darwinix = darwinMylib.nixos.mkDarwinConfigWithHomeManagerModule {
|
|
||||||
inherit publicKeys;
|
|
||||||
|
|
||||||
system = darwinSystem;
|
|
||||||
mylib = darwinMylib;
|
|
||||||
hostname = "darwinix";
|
|
||||||
username = "christoph";
|
|
||||||
headless = false;
|
|
||||||
extraModules = [
|
|
||||||
inputs.sops-nix.darwinModules.sops
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# We give each configuration a (host)name to choose a configuration when rebuilding.
|
# We give each configuration a (host)name to choose a configuration when rebuilding.
|
||||||
# This makes it easy to add different configurations (e.g. for a laptop).
|
# This makes it easy to add different configurations (e.g. for a laptop).
|
||||||
# Usage: sudo nixos-rebuild switch --flake .#nixinator
|
# Usage: sudo nixos-rebuild switch --flake .#nixinator
|
||||||
|
|||||||
@ -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 = {
|
homemodules = {
|
||||||
beets.enable = !headless;
|
beets.enable = !headless;
|
||||||
cava.enable = !headless;
|
|
||||||
|
btop.enable = true;
|
||||||
|
|
||||||
chromium = {
|
chromium = {
|
||||||
enable = !headless;
|
enable = !headless;
|
||||||
@ -46,8 +47,7 @@ in
|
|||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
bibata-cursors
|
bibata-cursors
|
||||||
# Lol
|
inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all
|
||||||
# inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all
|
|
||||||
];
|
];
|
||||||
|
|
||||||
cursor = "Bibata-Modern-Classic";
|
cursor = "Bibata-Modern-Classic";
|
||||||
@ -77,15 +77,221 @@ in
|
|||||||
disableTabBar = true;
|
disableTabBar = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fish.enable = true;
|
||||||
|
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
userName = "Christoph Urlacher";
|
||||||
|
userEmail = "christoph.urlacher@protonmail.com";
|
||||||
|
signCommits = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hyprland = {
|
||||||
|
enable = nixosConfig.programs.hyprland.enable;
|
||||||
|
dunst.enable = !config.homemodules.hyprpanel.enable; # Disable for hyprpanel
|
||||||
|
bars.enable = false;
|
||||||
|
dynamicCursor.enable = false;
|
||||||
|
trails.enable = true;
|
||||||
|
hyprspace.enable = false; # Always broken
|
||||||
|
hyprpanel.enable = true;
|
||||||
|
caelestia.enable = false;
|
||||||
|
|
||||||
|
keybindings = {
|
||||||
|
main-mod = "SUPER";
|
||||||
|
|
||||||
|
bindings = lib.mergeAttrsList [
|
||||||
|
# Use Rofi if we don't have caelestia
|
||||||
|
(lib.optionalAttrs (!config.homemodules.hyprland.caelestia.enable) {
|
||||||
|
"$mainMod, a" = ["exec, rofi -drun-show-actions -show drun"];
|
||||||
|
"$mainMod, c" = ["exec, clipman pick --tool=rofi"];
|
||||||
|
"$mainMod SHIFT, l" = ["exec, loginctl lock-session"];
|
||||||
|
})
|
||||||
|
|
||||||
|
# Caelestia
|
||||||
|
(lib.optionalAttrs (config.homemodules.hyprland.caelestia.enable) {
|
||||||
|
"$mainMod, a" = ["exec, caelestia shell drawers toggle launcher"];
|
||||||
|
# "$mainMod, c" = ["exec, caelestia clipboard"];
|
||||||
|
"$mainMod SHIFT, l" = ["exec, caelestia shell lock lock"];
|
||||||
|
|
||||||
|
"$mainMod, escape" = ["exec, caelestia shell drawers toggle session"];
|
||||||
|
})
|
||||||
|
|
||||||
|
{
|
||||||
|
# Applications
|
||||||
|
"$mainMod, t" = ["exec, kitty"];
|
||||||
|
"$mainMod, e" = ["exec, kitty --title=Yazi yazi"];
|
||||||
|
"$mainMod, n" = ["exec, neovide"];
|
||||||
|
# "$mainMod, r" = ["exec, kitty --title=Rmpc rmpc"];
|
||||||
|
"$mainMod CTRL, n" = ["exec, kitty --title=Navi navi"];
|
||||||
|
"$mainMod SHIFT, n" = ["exec, neovide ${config.paths.dotfiles}/navi/christoph.cheat"];
|
||||||
|
"$mainMod SHIFT, f" = ["exec, neovide ${config.paths.dotfiles}/flake.nix"];
|
||||||
|
# "ALT, tab" = ["exec, rofi -show window"];
|
||||||
|
|
||||||
|
# Screenshots
|
||||||
|
"$mainMod, p" = ["exec, hyprpicker --autocopy --format=hex"];
|
||||||
|
"$mainMod, s" = ["exec, grim -g \"$(slurp)\""];
|
||||||
|
"$mainMod SHIFT, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
|
||||||
|
|
||||||
|
# Audio
|
||||||
|
", XF86AudioRaiseVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"];
|
||||||
|
", XF86AudioLowerVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"];
|
||||||
|
", XF86AudioPlay" = ["exec, playerctl play-pause"];
|
||||||
|
", XF86AudioPrev" = ["exec, playerctl previous"];
|
||||||
|
", XF86AudioNext" = ["exec, playerctl next"];
|
||||||
|
|
||||||
|
# Brightness
|
||||||
|
", XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset gamma -10"];
|
||||||
|
", XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset gamma +10"];
|
||||||
|
"$mainMod, XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset temperature 5750"];
|
||||||
|
"$mainMod, XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset identity"];
|
||||||
|
|
||||||
|
"CTRL ALT, f" = let
|
||||||
|
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
|
||||||
|
grep = "${pkgs.gnugrep}/bin/grep";
|
||||||
|
awk = "${pkgs.gawk}/bin/gawk";
|
||||||
|
notify = "${pkgs.libnotify}/bin/notify-send";
|
||||||
|
|
||||||
|
toggleMouseFocus = pkgs.writeScriptBin "hypr-toggle-mouse-focus" ''
|
||||||
|
CURRENT=$(${hyprctl} getoption input:follow_mouse | ${grep} int | ${awk} -F' ' '{print $2}')
|
||||||
|
|
||||||
|
if [[ "$CURRENT" == "1" ]]; then
|
||||||
|
${hyprctl} keyword input:follow_mouse 0
|
||||||
|
${notify} "Disabled Mouse Focus!"
|
||||||
|
else
|
||||||
|
${hyprctl} keyword input:follow_mouse 1
|
||||||
|
${notify} "Enabled Mouse Focus!"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in ["exec, ${toggleMouseFocus}/bin/hypr-toggle-mouse-focus"];
|
||||||
|
|
||||||
|
# "CTRL ALT, t" = ["exec, bash -c 'systemctl --user restart hyprpanel.service'"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
ws-bindings = {
|
||||||
|
# "<Workspace>" = "<Key>";
|
||||||
|
"1" = "1";
|
||||||
|
"2" = "2";
|
||||||
|
"3" = "3";
|
||||||
|
"4" = "4";
|
||||||
|
"5" = "5";
|
||||||
|
"6" = "6";
|
||||||
|
"7" = "7";
|
||||||
|
"8" = "8";
|
||||||
|
"9" = "9";
|
||||||
|
"10" = "0";
|
||||||
|
};
|
||||||
|
|
||||||
|
special-ws-bindings = {
|
||||||
|
"ferdium" = "x";
|
||||||
|
"msty" = "z";
|
||||||
|
"btop" = "b";
|
||||||
|
"rmpc" = "r";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
autostart = {
|
||||||
|
immediate = [
|
||||||
|
"kitty --hold fastfetch"
|
||||||
|
"zeal"
|
||||||
|
"nextcloud --background"
|
||||||
|
"protonvpn-app"
|
||||||
|
|
||||||
|
# "kdeconnect-indicator" # started by services.kdeconnect.indicator
|
||||||
|
];
|
||||||
|
|
||||||
|
delayed = [
|
||||||
|
"keepassxc" # The tray doesn't work when started too early
|
||||||
|
];
|
||||||
|
|
||||||
|
special-silent = {
|
||||||
|
"ferdium" = ["ferdium"];
|
||||||
|
"msty" = ["msty"];
|
||||||
|
"btop" = ["kitty --title=Btop btop"];
|
||||||
|
"rmpc" = ["kitty --title=Rmpc rmpc"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
windowrules = [
|
||||||
|
# Fix jetbrains tooltip flicker
|
||||||
|
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, float 1"
|
||||||
|
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, no_initial_focus 1"
|
||||||
|
];
|
||||||
|
|
||||||
|
workspacerules = {
|
||||||
|
"1" = [];
|
||||||
|
"2" = ["Zotero" "neovide" "code-url-handler"];
|
||||||
|
"3" = ["obsidian"];
|
||||||
|
"4" = ["firefox" "Google-chrome" "chromium-browser" "org.qutebrowser.qutebrowser"];
|
||||||
|
"5" = ["steam"];
|
||||||
|
"6" = ["steam_app_(.+)"];
|
||||||
|
"7" = ["signal"];
|
||||||
|
"8" = ["tidal-hifi"];
|
||||||
|
"9" = ["discord"];
|
||||||
|
"10" = ["python3"];
|
||||||
|
};
|
||||||
|
|
||||||
|
floating = [
|
||||||
|
{class = "org.kde.polkit-kde-authentication-agent-1";}
|
||||||
|
{
|
||||||
|
class = "thunar";
|
||||||
|
title = "File Operation Progress";
|
||||||
|
}
|
||||||
|
{class = "ffplay";}
|
||||||
|
{class = "Unity";}
|
||||||
|
];
|
||||||
|
|
||||||
|
transparent-opacity = "0.75";
|
||||||
|
|
||||||
|
transparent = [
|
||||||
|
"kitty"
|
||||||
|
"Alacritty"
|
||||||
|
"discord"
|
||||||
|
"signal"
|
||||||
|
"vesktop"
|
||||||
|
"Spotify"
|
||||||
|
"tidal-hifi"
|
||||||
|
"obsidian"
|
||||||
|
"firefox"
|
||||||
|
"org.qutebrowser.qutebrowser"
|
||||||
|
"jetbrains-clion"
|
||||||
|
"jetbrains-idea"
|
||||||
|
"jetbrains-pycharm"
|
||||||
|
"jetbrains-rustrover"
|
||||||
|
"jetbrains-rider"
|
||||||
|
"jetbrains-webstorm"
|
||||||
|
"code-url-handler"
|
||||||
|
"neovide"
|
||||||
|
"steam"
|
||||||
|
"ferdium"
|
||||||
|
"Msty"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# hyprpanel.enable = !headless; # Enabled by hyprland module
|
||||||
|
|
||||||
|
kitty.enable = !headless;
|
||||||
|
lazygit.enable = true;
|
||||||
mpd.enable = !headless;
|
mpd.enable = !headless;
|
||||||
|
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
alias = true;
|
||||||
|
neovide = !headless;
|
||||||
|
};
|
||||||
|
|
||||||
niri.enable = nixosConfig.programs.niri.enable;
|
niri.enable = nixosConfig.programs.niri.enable;
|
||||||
nnn.enable = false; # Use yazi
|
nnn.enable = false; # Use yazi
|
||||||
packages.enable = true;
|
|
||||||
qutebrowser.enable = !headless;
|
qutebrowser.enable = !headless;
|
||||||
rmpc.enable = !headless;
|
rmpc.enable = !headless;
|
||||||
rofi.enable = false;
|
|
||||||
terminal.enable = true;
|
rofi = {
|
||||||
waybar.enable = !headless;
|
enable = !headless;
|
||||||
|
};
|
||||||
|
|
||||||
|
waybar.enable = false; # Use hyprpanel
|
||||||
|
yazi.enable = true;
|
||||||
zathura.enable = !headless;
|
zathura.enable = !headless;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -224,15 +430,6 @@ in
|
|||||||
"start_app_minimized": true
|
"start_app_minimized": true
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# KeePassXC
|
|
||||||
".config/QtProject.conf".text = ''
|
|
||||||
[FileDialog]
|
|
||||||
history=@Invalid()
|
|
||||||
lastVisited=file:///home/christoph/Documents/KeePass
|
|
||||||
qtVersion=5.15.18
|
|
||||||
viewMode=Detail
|
|
||||||
'';
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -247,13 +444,365 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Add stuff for your user as you see fit:
|
# Add stuff for your user as you see fit:
|
||||||
# packages = with pkgs; []; # Configured in homemodules/packages
|
# TODO: Make the headless installations smaller
|
||||||
|
packages = with pkgs;
|
||||||
|
lib.mkMerge [
|
||||||
|
[
|
||||||
|
# Shell utils
|
||||||
|
(ripgrep.override {withPCRE2 = true;}) # fast as fuck
|
||||||
|
gdu # Alternative to du-dust (I like it better)
|
||||||
|
duf # Disk usage analyzer (for all disk overview)
|
||||||
|
sd # Sed alternative
|
||||||
|
fclones # Duplicate file finder
|
||||||
|
tealdeer # Very fast tldr (so readable man)
|
||||||
|
killall
|
||||||
|
atool # Archive preview
|
||||||
|
ouch # Unified compression/decompression
|
||||||
|
ffmpegthumbnailer # Video thumbnails
|
||||||
|
mediainfo # Media meta information
|
||||||
|
file # File meta information
|
||||||
|
unrar # Cooler WinRar
|
||||||
|
p7zip # Zip stuff
|
||||||
|
unzip # Unzip stuff
|
||||||
|
progress # Find coreutils processes and show their progress
|
||||||
|
tokei # Text file statistics in a project
|
||||||
|
playerctl # Media player control
|
||||||
|
pastel # Color tools
|
||||||
|
nvd # Nix rebuild diff
|
||||||
|
nix-search-tv # Search nixpkgs, nur, nixos options and homemanager options
|
||||||
|
nix-tree # Browse the nix store sorted by size (gdu for closures)
|
||||||
|
nurl # Generate nix fetcher sections based on URLs
|
||||||
|
python313 # Nicer scripting than bash
|
||||||
|
binsider # Analyze binaries
|
||||||
|
lazyjournal # Journalctl viewer
|
||||||
|
systemctl-tui
|
||||||
|
restic # Backups
|
||||||
|
gnumake
|
||||||
|
just
|
||||||
|
|
||||||
|
# Hardware/Software info
|
||||||
|
pciutils # lspci
|
||||||
|
mesa-demos # OpenGL info
|
||||||
|
wayland-utils # wayland-info
|
||||||
|
clinfo # OpenCL info
|
||||||
|
vulkan-tools # vulkaninfo
|
||||||
|
libva-utils # vainfo
|
||||||
|
vdpauinfo # Video-Decode and Presentation API for Unix info
|
||||||
|
hwloc # Generate CPU topology diagram
|
||||||
|
lm_sensors # Readout hardware sensors
|
||||||
|
acpica-tools # Dump ACPI tables etc.
|
||||||
|
smartmontools # Disk health
|
||||||
|
nvme-cli # NVME disk health
|
||||||
|
|
||||||
|
# Video/Image/Audio utils
|
||||||
|
ffmpeg-full # I love ffmpeg (including ffplay)
|
||||||
|
ffmpeg-normalize # Normalize audio
|
||||||
|
imagemagick # Convert image (magic)
|
||||||
|
mp3val # Validate mp3 files
|
||||||
|
flac # Validate flac files
|
||||||
|
# spotdl
|
||||||
|
|
||||||
|
# Document utils
|
||||||
|
poppler-utils # pdfunite
|
||||||
|
graphviz # generate graphs from code
|
||||||
|
d2 # generate diagrams from code
|
||||||
|
plantuml # generate diagrams
|
||||||
|
gnuplot # generate function plots
|
||||||
|
pdf2svg # extract vector graphics from pdf
|
||||||
|
pandoc # document converting madness
|
||||||
|
|
||||||
|
# Networking
|
||||||
|
dig # Make DNS requests
|
||||||
|
tcpdump # Listen in on TCP traffic
|
||||||
|
traceroute # "Follow" a packet
|
||||||
|
gping # ping with graph
|
||||||
|
curlie # curl a'la httpie
|
||||||
|
wget # download that shit
|
||||||
|
doggo # dns client
|
||||||
|
rsync # cp on steroids
|
||||||
|
rclone # Rsync for cloud
|
||||||
|
httpie # Cool http client
|
||||||
|
cifs-utils # Mount samba shares
|
||||||
|
nfs-utils # Mount NFS shares
|
||||||
|
sshfs # Mount remote directories via SSH
|
||||||
|
|
||||||
|
# Run unpatched binaries on NixOS
|
||||||
|
# Sets NIX_LD_LIBRARY_PATH and NIX_LD variables for nix-ld.
|
||||||
|
# Usage: "nix-alien-ld -- <Executable>".
|
||||||
|
inputs.nix-alien.packages.${pkgs.stdenv.hostPlatform.system}.nix-alien
|
||||||
|
|
||||||
|
# Search nixpkgs
|
||||||
|
inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
|
|
||||||
|
# Use NixCommunity binary cache
|
||||||
|
cachix
|
||||||
|
]
|
||||||
|
(lib.mkIf (!headless) [
|
||||||
|
ripdrag # drag & drop from terminal
|
||||||
|
veracrypt
|
||||||
|
|
||||||
|
# Proton
|
||||||
|
protonvpn-gui
|
||||||
|
protonmail-bridge-gui
|
||||||
|
|
||||||
|
# GUI stuff
|
||||||
|
nautilus # Just in case
|
||||||
|
signal-desktop
|
||||||
|
anki
|
||||||
|
font-manager # Previews fonts, but doesn't set them
|
||||||
|
nextcloud-client
|
||||||
|
keepassxc
|
||||||
|
thunderbird # TODO: Email module
|
||||||
|
obsidian
|
||||||
|
zotero
|
||||||
|
zeal # docs browser
|
||||||
|
helvum
|
||||||
|
vlc
|
||||||
|
audacity
|
||||||
|
ferdium
|
||||||
|
gparted
|
||||||
|
# feishin # electron :(
|
||||||
|
jellyfin-tui
|
||||||
|
|
||||||
|
# Office
|
||||||
|
kdePackages.wacomtablet # For xournalpp/krita
|
||||||
|
xournalpp # Write with a pen, like old people
|
||||||
|
hunspell # I cna't type
|
||||||
|
hunspellDicts.en_US
|
||||||
|
hunspellDicts.de_DE
|
||||||
|
])
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# home.file.".options-doc".source = "${pkgs.modules-options-doc}";
|
# home.file.".options-doc".source = "${pkgs.modules-options-doc}";
|
||||||
|
|
||||||
# Packages with extra options managed by HomeManager natively
|
# Packages with extra options managed by HomeManager natively
|
||||||
programs = {
|
programs = {
|
||||||
|
# The home-manager management tool.
|
||||||
|
# Will only be enabled if HM is installed standalone.
|
||||||
|
home-manager.enable = true;
|
||||||
|
|
||||||
|
bat = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
themes = {
|
||||||
|
catppuccin-latte = {
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "catppuccin";
|
||||||
|
repo = "bat";
|
||||||
|
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
|
||||||
|
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
|
||||||
|
};
|
||||||
|
file = "Catppuccin-latte.tmTheme";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
theme = "catppuccin-latte";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cava = {
|
||||||
|
enable = !headless;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
framerate = 60; # default 60
|
||||||
|
autosens = 1; # default 1
|
||||||
|
sensitivity = 100; # default 100
|
||||||
|
lower_cutoff_freq = 50; # not passed to cava if not provided
|
||||||
|
higher_cutoff_freq = 10000; # not passed to cava if not provided
|
||||||
|
};
|
||||||
|
|
||||||
|
smoothing = {
|
||||||
|
noise_reduction = 77; # default 77
|
||||||
|
monstercat = false; # default false
|
||||||
|
waves = false; # default false
|
||||||
|
};
|
||||||
|
|
||||||
|
color = {
|
||||||
|
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
|
||||||
|
gradient = 1;
|
||||||
|
|
||||||
|
gradient_color_1 = "'${color.hexS.teal}'";
|
||||||
|
gradient_color_2 = "'${color.hexS.sky}'";
|
||||||
|
gradient_color_3 = "'${color.hexS.sapphire}'";
|
||||||
|
gradient_color_4 = "'${color.hexS.blue}'";
|
||||||
|
gradient_color_5 = "'${color.hexS.mauve}'";
|
||||||
|
gradient_color_6 = "'${color.hexS.pink}'";
|
||||||
|
gradient_color_7 = "'${color.hexS.maroon}'";
|
||||||
|
gradient_color_8 = "'${color.hexS.red}'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
eza = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = config.homemodules.fish.enable;
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO: Module
|
||||||
|
fastfetch = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
logo = {
|
||||||
|
padding = {
|
||||||
|
top = 3;
|
||||||
|
left = 1;
|
||||||
|
right = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
display = {
|
||||||
|
separator = "";
|
||||||
|
key.width = 17;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Box Drawing: ╭ ─ ╮ ╰ ╯ │
|
||||||
|
modules = [
|
||||||
|
# Title
|
||||||
|
{
|
||||||
|
type = "title";
|
||||||
|
format = "{#1}╭─── {#}{user-name-colored}";
|
||||||
|
}
|
||||||
|
|
||||||
|
# System Information
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│ {#}System Information";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "os";
|
||||||
|
key = "{#separator}│ {#keys} OS";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "kernel";
|
||||||
|
key = "{#separator}│ {#keys} Kernel";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "bootmgr";
|
||||||
|
key = "{#separator}│ {#keys} BootMGR";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "uptime";
|
||||||
|
key = "{#separator}│ {#keys} Uptime";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "packages";
|
||||||
|
key = "{#separator}│ {#keys} Packages";
|
||||||
|
# format = "{all}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Desktop Environment
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│ {#}Desktop Environment";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "de";
|
||||||
|
key = "{#separator}│ {#keys} DE";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "wm";
|
||||||
|
key = "{#separator}│ {#keys} WM";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "wmtheme";
|
||||||
|
key = "{#separator}│ {#keys} Theme";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "display";
|
||||||
|
key = "{#separator}│ {#keys} Resolution";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "shell";
|
||||||
|
key = "{#separator}│ {#keys} Shell";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "terminalfont";
|
||||||
|
key = "{#separator}│ {#keys} Font";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "icons";
|
||||||
|
key = "{#separator}│ {#keys} Icons";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "cursor";
|
||||||
|
key = "{#separator}│ {#keys} Cursor";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Hardware Information
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│ {#}Hardware Information";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "board";
|
||||||
|
key = "{#separator}│ {#keys} Board";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "cpu";
|
||||||
|
key = "{#separator}│ {#keys} CPU";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "gpu";
|
||||||
|
key = "{#separator}│ {#keys} GPU";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "memory";
|
||||||
|
key = "{#separator}│ {#keys} Memory";
|
||||||
|
}
|
||||||
|
# {
|
||||||
|
# type = "disk";
|
||||||
|
# key = "{#separator}│ {#keys} Disk (/)";
|
||||||
|
# folders = "/";
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# type = "disk";
|
||||||
|
# key = "{#separator}│ {#keys} Disk (~/Games)";
|
||||||
|
# folders = "/home/christoph/Games";
|
||||||
|
# }
|
||||||
|
{
|
||||||
|
type = "btrfs";
|
||||||
|
key = "{#separator}│ {#keys} BTRFS";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "custom";
|
||||||
|
format = "{#1}│";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Colors Footer
|
||||||
|
{
|
||||||
|
type = "colors";
|
||||||
|
key = "{#separator}╰─── {#1}";
|
||||||
|
keyWidth = 6;
|
||||||
|
symbol = "circle";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fd.enable = true;
|
||||||
|
|
||||||
|
fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = config.homemodules.fish.enable;
|
||||||
|
};
|
||||||
|
|
||||||
imv = {
|
imv = {
|
||||||
enable = !headless;
|
enable = !headless;
|
||||||
settings = {
|
settings = {
|
||||||
@ -281,6 +830,11 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
navi = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = config.homemodules.fish.enable;
|
||||||
|
};
|
||||||
|
|
||||||
nix-index = {
|
nix-index = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = config.homemodules.fish.enable;
|
enableFishIntegration = config.homemodules.fish.enable;
|
||||||
@ -310,6 +864,73 @@ in
|
|||||||
# pointer
|
# pointer
|
||||||
# ];
|
# ];
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
ssh = {
|
||||||
|
enable = true;
|
||||||
|
enableDefaultConfig = false;
|
||||||
|
|
||||||
|
matchBlocks = {
|
||||||
|
"*" = {
|
||||||
|
forwardAgent = false;
|
||||||
|
addKeysToAgent = "no";
|
||||||
|
compression = true;
|
||||||
|
serverAliveInterval = 0;
|
||||||
|
serverAliveCountMax = 3;
|
||||||
|
hashKnownHosts = false;
|
||||||
|
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||||
|
controlMaster = "no";
|
||||||
|
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||||
|
controlPersist = "no";
|
||||||
|
};
|
||||||
|
"nixinator" = {
|
||||||
|
user = "christoph";
|
||||||
|
hostname = "192.168.86.50";
|
||||||
|
};
|
||||||
|
"servenix" = {
|
||||||
|
user = "christoph";
|
||||||
|
hostname = "local.chriphost.de";
|
||||||
|
};
|
||||||
|
"thinknix" = {
|
||||||
|
user = "christoph";
|
||||||
|
hostname = "think.chriphost.de";
|
||||||
|
};
|
||||||
|
"vps" = {
|
||||||
|
user = "root";
|
||||||
|
hostname = "vps.chriphost.de";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
tmux = {
|
||||||
|
enable = false;
|
||||||
|
|
||||||
|
clock24 = true;
|
||||||
|
escapeTime = 0; # Delay after pressing escape
|
||||||
|
# keyMode = "vi";
|
||||||
|
terminal = "xterm-256color";
|
||||||
|
|
||||||
|
plugins = with pkgs; [
|
||||||
|
{
|
||||||
|
plugin = tmuxPlugins.catppuccin;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @plugin 'catppuccin/tmux'
|
||||||
|
set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
set -g default-terminal "xterm-256color"
|
||||||
|
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
yt-dlp.enable = true;
|
||||||
|
|
||||||
|
zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = config.homemodules.fish.enable;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
@ -360,18 +981,14 @@ in
|
|||||||
# Force Wayland by default
|
# Force Wayland by default
|
||||||
# Context.sockets = ["wayland" "!x11" "!fallback-x11"]; # NOTE: Makes discord + steam crash
|
# Context.sockets = ["wayland" "!x11" "!fallback-x11"]; # NOTE: Makes discord + steam crash
|
||||||
|
|
||||||
Context.filesystems = [
|
Context.filesystems = ["/nix/store:ro"];
|
||||||
"/nix/store:ro"
|
|
||||||
"${config.home.homeDirectory}/.themes:ro"
|
|
||||||
"${config.home.homeDirectory}/.config/gtk-4.0:ro"
|
|
||||||
];
|
|
||||||
|
|
||||||
Environment = {
|
Environment = {
|
||||||
# Fix un-themed cursor in some Wayland apps
|
# Fix un-themed cursor in some Wayland apps
|
||||||
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
|
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
|
||||||
|
|
||||||
# Force correct theme for some GTK apps
|
# Force correct theme for some GTK apps
|
||||||
GTK_THEME = config.gtk.theme.name;
|
GTK_THEME = "Adwaita:light";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -3,11 +3,9 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
nixosConfig,
|
nixosConfig,
|
||||||
config,
|
config,
|
||||||
hostname,
|
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
username,
|
username,
|
||||||
inputs,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = {
|
config = {
|
||||||
@ -18,213 +16,52 @@
|
|||||||
# because it forces en-US keyboard layout.
|
# because it forces en-US keyboard layout.
|
||||||
fcitx.enable = true;
|
fcitx.enable = true;
|
||||||
|
|
||||||
waybar.monitors = ["DP-1" "DP-2"];
|
hyprland = {
|
||||||
vscode.enable = true;
|
keyboard = {
|
||||||
zed.enable = true;
|
layout = "us";
|
||||||
|
variant = "altgr-intl";
|
||||||
|
option = "nodeadkeys";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
monitors = {
|
||||||
claude-code = {
|
"DP-1" = {
|
||||||
enable = true;
|
width = 3440;
|
||||||
enableMcpIntegration = true;
|
height = 1440;
|
||||||
|
rate = 165;
|
||||||
|
x = 1920;
|
||||||
|
y = 0;
|
||||||
|
scale = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
mcp = {
|
"DP-2" = {
|
||||||
enable = true;
|
width = 1920;
|
||||||
servers = {
|
height = 1080;
|
||||||
nixos = {
|
rate = 60;
|
||||||
command = "uvx";
|
x = 0;
|
||||||
args = ["mcp-nixos"];
|
y = 0;
|
||||||
};
|
scale = 1;
|
||||||
svelte = {
|
|
||||||
# claude mcp add -t stdio -s [scope] svelte -- npx -y @sveltejs/mcp
|
|
||||||
command = "npx";
|
|
||||||
args = ["-y" "@sveltejs/mcp"];
|
|
||||||
type = "stdio";
|
|
||||||
};
|
|
||||||
shadcn = {
|
|
||||||
# npx shadcn@latest mcp init --client claude
|
|
||||||
command = "npx";
|
|
||||||
args = ["-y" "shadcn@latest" "mcp"];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
opencode = {
|
workspaces = {
|
||||||
enable = true;
|
"DP-1" = [1 2 3 4 5 6 7 8 9];
|
||||||
enableMcpIntegration = true;
|
"DP-2" = [10];
|
||||||
extraPackages = with pkgs; [
|
};
|
||||||
# opencode-claude-auth # Installed using npm
|
|
||||||
|
autostart = {
|
||||||
|
delayed = [
|
||||||
|
"fcitx5"
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Writes opencode.json
|
floating = [
|
||||||
settings = {
|
{
|
||||||
attachment = {
|
class = "fcitx";
|
||||||
image = {
|
}
|
||||||
auto_resize = true;
|
|
||||||
max_width = 2000;
|
|
||||||
max_height = 2000;
|
|
||||||
max_base64_bytes = 5242880;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
autoupdate = false;
|
|
||||||
compaction = {
|
|
||||||
auto = true;
|
|
||||||
prune = true;
|
|
||||||
reserved = 10000;
|
|
||||||
};
|
|
||||||
default_agent = "plan";
|
|
||||||
enabled_providers = [
|
|
||||||
"opencode"
|
|
||||||
"opencode-go"
|
|
||||||
"anthropic"
|
|
||||||
];
|
];
|
||||||
formatter = {
|
|
||||||
nixfmt = {
|
|
||||||
disabled = true;
|
|
||||||
};
|
|
||||||
alejandra = {
|
|
||||||
command = ["alejandra" "$FILE"];
|
|
||||||
extensions = [".nix"];
|
|
||||||
};
|
|
||||||
perltidy = {
|
|
||||||
command = ["perltidy" "$FILE"];
|
|
||||||
extensions = [".pl"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
lsp = {
|
|
||||||
nixd = {
|
|
||||||
command = ["nixd"];
|
|
||||||
extensions = [".nix"];
|
|
||||||
initialization = {
|
|
||||||
preferences = {
|
|
||||||
nixd = {
|
|
||||||
nixpkgs = {expr = "import <nixpkgs> {}";};
|
|
||||||
options = {
|
|
||||||
nixos = {expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.${hostname}.options";};
|
|
||||||
home-manager = {expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.\"${hostname}\".options.home-manager.users.type.getSubOptions []";};
|
|
||||||
};
|
|
||||||
diagnostic = {
|
|
||||||
suppress = ["sema-escaping-with" "var-bind-to-this" "escaping-this-with"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
perlnavigator = {
|
|
||||||
command = ["perlnavigator"];
|
|
||||||
extensions = [".pl"];
|
|
||||||
initialization = {
|
|
||||||
preferences = {};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# perlpls = {
|
|
||||||
# command = ["pls"];
|
|
||||||
# extensions = [".pl"];
|
|
||||||
# initialization = {
|
|
||||||
# preferences = {
|
|
||||||
# perl = {
|
|
||||||
# perlcritic = {enabled = false;};
|
|
||||||
# syntax = {enabled = true;};
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
r-language-server = {
|
|
||||||
command = ["R" "--no-echo" "-e" "languageserver::run()"];
|
|
||||||
extensions = [".r" ".rmd" ".quarto"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
permission = {
|
|
||||||
"*" = "ask";
|
|
||||||
"bash" = {
|
|
||||||
"*" = "ask";
|
|
||||||
"ls *" = "allow";
|
|
||||||
"find *" = "ask"; # Don't want find -exec
|
|
||||||
"file *" = "allow";
|
|
||||||
"wc *" = "allow";
|
|
||||||
"grep *" = "allow";
|
|
||||||
"rg *" = "allow";
|
|
||||||
"test *" = "allow";
|
|
||||||
"echo *" = "allow";
|
|
||||||
"which *" = "allow";
|
|
||||||
"pwd *" = "allow";
|
|
||||||
"dirname *" = "allow";
|
|
||||||
"basename *" = "allow";
|
|
||||||
"readlink *" = "allow";
|
|
||||||
|
|
||||||
"cat *.env" = "deny";
|
|
||||||
"cat *.env.*" = "deny";
|
|
||||||
"cat *.env.example" = "allow";
|
|
||||||
"printenv *" = "deny";
|
|
||||||
"env *" = "deny";
|
|
||||||
|
|
||||||
"nix eval *" = "allow";
|
|
||||||
"nix flake metadata *" = "allow";
|
|
||||||
"nix flake show *" = "allow";
|
|
||||||
"nix path-info *" = "allow";
|
|
||||||
"nix why-depends *" = "allow";
|
|
||||||
"nix derivation show *" = "allow";
|
|
||||||
"nix store ping *" = "allow";
|
|
||||||
"nix stire diff-closures *" = "allow";
|
|
||||||
|
|
||||||
"git status *" = "allow";
|
|
||||||
"git log *" = "allow";
|
|
||||||
"git diff *" = "allow";
|
|
||||||
};
|
|
||||||
"external_directory" = {
|
|
||||||
"/nix/store/**" = "allow";
|
|
||||||
"/tmp" = "allow";
|
|
||||||
"/tmp/*" = "allow";
|
|
||||||
};
|
|
||||||
"read" = {
|
|
||||||
"*" = "allow";
|
|
||||||
"*.env" = "deny";
|
|
||||||
"*.env.*" = "deny";
|
|
||||||
"*.env.example" = "allow";
|
|
||||||
};
|
|
||||||
"grep" = "allow";
|
|
||||||
"glob" = "allow";
|
|
||||||
"lsp" = "allow";
|
|
||||||
"skill" = "allow";
|
|
||||||
"task" = "ask";
|
|
||||||
"todowrite" = "allow";
|
|
||||||
"webfetch" = "allow";
|
|
||||||
"websearch" = "allow";
|
|
||||||
"question" = "allow";
|
|
||||||
};
|
|
||||||
plugin = [
|
|
||||||
"opencode-claude-auth@latest" # https://github.com/griffinmartin/opencode-claude-auth
|
|
||||||
"@tarquinen/opencode-dcp@latest" # better compacting
|
|
||||||
# "@slkiser/opencode-quota"
|
|
||||||
];
|
|
||||||
share = "disabled";
|
|
||||||
shell = "fish";
|
|
||||||
snapshot = false;
|
|
||||||
watcher = {
|
|
||||||
ignore = ["node_modules/**" "dist/**" ".git/**"];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Writes tui.json
|
waybar.monitor = "DP-1";
|
||||||
tui = {
|
|
||||||
theme = "system";
|
|
||||||
diff_style = "auto";
|
|
||||||
mouse = true;
|
|
||||||
attention = {
|
|
||||||
enabled = true;
|
|
||||||
notifications = true;
|
|
||||||
sound = true;
|
|
||||||
volume = "0.3";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
agents = {};
|
|
||||||
commands = {};
|
|
||||||
context = '''';
|
|
||||||
skills = {};
|
|
||||||
tools = {};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home = let
|
home = let
|
||||||
@ -276,15 +113,14 @@
|
|||||||
# Intel FPGA design software
|
# Intel FPGA design software
|
||||||
# quartus-prime-lite
|
# quartus-prime-lite
|
||||||
|
|
||||||
jetbrains.clion
|
# jetbrains.clion
|
||||||
# jetbrains.rust-rover
|
# jetbrains.rust-rover
|
||||||
# jetbrains.pycharm-professional
|
# jetbrains.pycharm-professional
|
||||||
# jetbrains.idea-ultimate
|
# jetbrains.idea-ultimate
|
||||||
# jetbrains.webstorm
|
# jetbrains.webstorm
|
||||||
# jetbrains.rider
|
# jetbrains.rider
|
||||||
# ghidra # launch with _JAVA_AWT_WM_NONREPARENTING=1 (use programs.ghidra)
|
zed-editor
|
||||||
# zed-editor # Using module
|
vscode
|
||||||
# vscode # Using module
|
|
||||||
|
|
||||||
# Unity Stuff
|
# Unity Stuff
|
||||||
# unityhub
|
# unityhub
|
||||||
@ -293,7 +129,6 @@
|
|||||||
# mono
|
# mono
|
||||||
# steam-run-free # nix-alien doesn't seem to run unity apps, this does...
|
# steam-run-free # nix-alien doesn't seem to run unity apps, this does...
|
||||||
|
|
||||||
inputs.hytale-launcher.packages.${pkgs.stdenv.hostPlatform.system}.default
|
|
||||||
(blender.override {cudaSupport = true;})
|
(blender.override {cudaSupport = true;})
|
||||||
godot_4
|
godot_4
|
||||||
(obs-studio.override {cudaSupport = true;})
|
(obs-studio.override {cudaSupport = true;})
|
||||||
@ -308,21 +143,16 @@
|
|||||||
jellyfin-mpv-shim
|
jellyfin-mpv-shim
|
||||||
# tidal-hifi
|
# tidal-hifi
|
||||||
# tidal-dl-ng # TODO: Borked
|
# tidal-dl-ng # TODO: Borked
|
||||||
# spotdl
|
|
||||||
tiddl
|
tiddl
|
||||||
picard
|
picard
|
||||||
handbrake
|
handbrake
|
||||||
teamspeak6-client
|
teamspeak6-client
|
||||||
|
|
||||||
# virt-manager # use system program option
|
|
||||||
virt-viewer
|
|
||||||
gnome-boxes # doesn't list VMs imported using virsh
|
|
||||||
|
|
||||||
steam-devices-udev-rules
|
steam-devices-udev-rules
|
||||||
];
|
];
|
||||||
|
|
||||||
file = lib.mkMerge [
|
file = lib.mkMerge [
|
||||||
{
|
# {
|
||||||
# ".local/share/applications/jetbrains-rider.desktop".source = let
|
# ".local/share/applications/jetbrains-rider.desktop".source = let
|
||||||
# desktopFile = pkgs.makeDesktopItem {
|
# desktopFile = pkgs.makeDesktopItem {
|
||||||
# name = "jetbrains-rider";
|
# name = "jetbrains-rider";
|
||||||
@ -334,10 +164,10 @@
|
|||||||
# extraConfig.NoDisplay = "true";
|
# extraConfig.NoDisplay = "true";
|
||||||
# };
|
# };
|
||||||
# in "${desktopFile}/share/applications/jetbrains-rider.desktop";
|
# in "${desktopFile}/share/applications/jetbrains-rider.desktop";
|
||||||
|
#
|
||||||
".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source =
|
# ".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source =
|
||||||
../../../config/mangohud/MangoHud.conf;
|
# ../../../config/mangohud/MangoHud.conf;
|
||||||
}
|
# }
|
||||||
(lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) {
|
(lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) {
|
||||||
".MakeMKV/settings.conf".source =
|
".MakeMKV/settings.conf".source =
|
||||||
config.lib.file.mkOutOfStoreSymlink
|
config.lib.file.mkOutOfStoreSymlink
|
||||||
@ -351,21 +181,46 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
ollama = {
|
||||||
|
enable = false;
|
||||||
|
acceleration = "cuda";
|
||||||
|
# home = "/var/lib/ollama";
|
||||||
|
|
||||||
|
# loadModels = [
|
||||||
|
# "deepseek-r1:8b" # Default
|
||||||
|
# "deepseek-r1:14b"
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server
|
||||||
|
environmentVariables = {
|
||||||
|
# Flash Attention is a feature of most modern models
|
||||||
|
# that can significantly reduce memory usage as the context size grows.
|
||||||
|
OLLAMA_FLASH_ATTENTION = "1";
|
||||||
|
|
||||||
|
# The K/V context cache can be quantized to significantly
|
||||||
|
# reduce memory usage when Flash Attention is enabled.
|
||||||
|
OLLAMA_KV_CACHE_TYPE = "q8_0"; # f16, q8_0 q4_0
|
||||||
|
|
||||||
|
# To improve Retrieval-Augmented Generation (RAG) performance, you should increase
|
||||||
|
# the context length to 8192+ tokens in your Ollama model settings.
|
||||||
|
OLLAMA_CONTEXT_LENGTH = "8192";
|
||||||
|
};
|
||||||
|
|
||||||
|
host = "127.0.0.1";
|
||||||
|
port = 11434;
|
||||||
|
};
|
||||||
|
|
||||||
flatpak = {
|
flatpak = {
|
||||||
packages = [
|
packages = [
|
||||||
"com.valvesoftware.Steam"
|
# "com.valvesoftware.Steam"
|
||||||
"com.valvesoftware.Steam.Utility.steamtinkerlaunch"
|
# "com.valvesoftware.Steam.Utility.steamtinkerlaunch"
|
||||||
"org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
|
|
||||||
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
|
|
||||||
"io.github.Foldex.AdwSteamGtk"
|
|
||||||
"com.vysp3r.ProtonPlus"
|
|
||||||
# "net.davidotek.pupgui2"
|
# "net.davidotek.pupgui2"
|
||||||
|
# "org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
|
||||||
|
# "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
|
||||||
|
|
||||||
"org.prismlauncher.PrismLauncher"
|
"org.prismlauncher.PrismLauncher"
|
||||||
"com.usebottles.bottles"
|
"com.usebottles.bottles"
|
||||||
"io.github.lawstorant.boxflat"
|
# "io.github.lawstorant.boxflat"
|
||||||
|
|
||||||
"org.onlyoffice.desktopeditors"
|
|
||||||
|
|
||||||
# "com.unity.UnityHub"
|
# "com.unity.UnityHub"
|
||||||
];
|
];
|
||||||
@ -395,13 +250,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
"com.vysp3r.ProtonPlus".Context = {
|
|
||||||
filesystems = [
|
|
||||||
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
|
|
||||||
"${config.home.homeDirectory}/Games"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"com.usebottles.bottles".Context = {
|
"com.usebottles.bottles".Context = {
|
||||||
filesystems = [
|
filesystems = [
|
||||||
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
|
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
|
||||||
|
|||||||
@ -1,39 +1,35 @@
|
|||||||
# Here goes the stuff that will only be enabled on the laptop
|
# Here goes the stuff that will only be enabled on the laptop
|
||||||
{pkgs, ...}: {
|
{...}: {
|
||||||
config = {
|
config = {
|
||||||
homemodules = {
|
homemodules = {
|
||||||
# TODO: Niri config (needs to modularize niri module)
|
hyprland = {
|
||||||
|
keyboard = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "altgr-intl";
|
||||||
|
option = "nodeadkeys";
|
||||||
|
};
|
||||||
|
|
||||||
# hyprland = {
|
monitors = {
|
||||||
# keyboard = {
|
"eDP-1" = {
|
||||||
# layout = "us";
|
width = 1920;
|
||||||
# variant = "altgr-intl";
|
height = 1080;
|
||||||
# option = "nodeadkeys";
|
rate = 60;
|
||||||
# };
|
x = 0;
|
||||||
#
|
y = 0;
|
||||||
# monitors = {
|
scale = 1;
|
||||||
# "eDP-1" = {
|
};
|
||||||
# width = 1920;
|
};
|
||||||
# height = 1080;
|
|
||||||
# rate = 60;
|
|
||||||
# x = 0;
|
|
||||||
# y = 0;
|
|
||||||
# scale = 1;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
#
|
|
||||||
# workspaces = {
|
|
||||||
# "eDP-1" = [1 2 3 4 5 6 7 8 9];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
waybar.monitors = ["eDP-1"];
|
workspaces = {
|
||||||
|
"eDP-1" = [1 2 3 4 5 6 7 8 9];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
waybar.monitor = "eDP-1";
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
# packages = with pkgs; [];
|
||||||
brightnessctl
|
|
||||||
];
|
|
||||||
|
|
||||||
# Do not change.
|
# Do not change.
|
||||||
# This marks the version when NixOS was installed for backwards-compatibility.
|
# This marks the version when NixOS was installed for backwards-compatibility.
|
||||||
|
|||||||
@ -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 = {
|
fetchart = {
|
||||||
auto = "yes";
|
auto = "yes";
|
||||||
sources = "*"; # sources are queried in this order
|
sources = "filesystem coverart itunes amazon albumart"; # sources are queried in this order
|
||||||
};
|
};
|
||||||
|
|
||||||
# lyrics = {
|
# lyrics = {
|
||||||
|
|||||||
@ -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,41 @@
|
|||||||
# Obsolete modules are kept in "1_deprecated" for reference.
|
# Obsolete modules are kept in "1_deprecated" for reference.
|
||||||
|
|
||||||
# My own HM modules
|
# My own HM modules
|
||||||
./bat
|
|
||||||
./beets
|
./beets
|
||||||
./btop
|
./btop
|
||||||
./cava
|
|
||||||
./chromium
|
./chromium
|
||||||
./color
|
./color
|
||||||
./docs
|
./docs
|
||||||
./fastfetch
|
|
||||||
./fcitx
|
./fcitx
|
||||||
./firefox
|
./firefox
|
||||||
./fish
|
./fish
|
||||||
./git
|
./git
|
||||||
./jellyfin-tui
|
./hyprland
|
||||||
|
./hyprpanel
|
||||||
./kitty
|
./kitty
|
||||||
./lazygit
|
./lazygit
|
||||||
./mpd
|
./mpd
|
||||||
./neovim
|
./neovim
|
||||||
./niri
|
./niri
|
||||||
./nnn
|
./nnn
|
||||||
./packages
|
|
||||||
./paths
|
./paths
|
||||||
./qutebrowser
|
./qutebrowser
|
||||||
./rmpc
|
./rmpc
|
||||||
./rofi
|
./rofi
|
||||||
./waybar
|
./waybar
|
||||||
./ssh
|
|
||||||
./terminal
|
|
||||||
./tmux
|
|
||||||
./vscode
|
|
||||||
./yazi
|
./yazi
|
||||||
./zathura
|
./zathura
|
||||||
./zed
|
|
||||||
|
|
||||||
# HM modules imported from the flake inputs
|
# HM modules imported from the flake inputs
|
||||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
inputs.nixvim.homeModules.nixvim
|
inputs.nixvim.homeModules.nixvim
|
||||||
inputs.textfox.homeManagerModules.default
|
inputs.textfox.homeManagerModules.default
|
||||||
inputs.walker.homeManagerModules.default
|
|
||||||
# inputs.direnv-instant.homeModules.direnv-instant
|
|
||||||
# inputs.niri.homeModules.niri # Imported by system module
|
# inputs.niri.homeModules.niri # Imported by system module
|
||||||
# inputs.noctalia.homeModules.default
|
inputs.noctalia.homeModules.default
|
||||||
# inputs.caelestia.homeManagerModules.default
|
inputs.caelestia.homeManagerModules.default
|
||||||
# inputs.dank-material-shell.homeModules.dank-material-shell
|
inputs.dank-material-shell.homeModules.dank-material-shell
|
||||||
# inputs.dank-material-shell.homeModules.niri
|
inputs.dank-material-shell.homeModules.niri
|
||||||
# inputs.danksearch.homeModules.default
|
inputs.danksearch.homeModules.default
|
||||||
|
|
||||||
# NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse)
|
# NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse)
|
||||||
# inputs.impermanence.homeManagerModules.impermanence
|
# inputs.impermanence.homeManagerModules.impermanence
|
||||||
|
|||||||
@ -32,9 +32,6 @@ in {
|
|||||||
"Notes/Obsidian/Chriphost/latex_snippets.json".source = ../../../config/obsidian/latex_snippets.json; # TODO: Symlink
|
"Notes/Obsidian/Chriphost/latex_snippets.json".source = ../../../config/obsidian/latex_snippets.json; # TODO: Symlink
|
||||||
"Notes/Obsidian/Chriphost/.obsidian/snippets/latex_preview.css".source = ../../../config/obsidian/css_snippets/latex_preview.css;
|
"Notes/Obsidian/Chriphost/.obsidian/snippets/latex_preview.css".source = ../../../config/obsidian/css_snippets/latex_preview.css;
|
||||||
"Notes/Obsidian/Chriphost/.obsidian/snippets/center_image.css".source = ../../../config/obsidian/css_snippets/center_image.css;
|
"Notes/Obsidian/Chriphost/.obsidian/snippets/center_image.css".source = ../../../config/obsidian/css_snippets/center_image.css;
|
||||||
"Notes/Obsidian/Chriphost/.obsidian/snippets/fullwidth_image.css".source = ../../../config/obsidian/css_snippets/fullwidth_image.css;
|
|
||||||
"Notes/Obsidian/Chriphost/.obsidian/snippets/justify_text.css".source = ../../../config/obsidian/css_snippets/justify_text.css;
|
|
||||||
"Notes/Obsidian/Chriphost/.obsidian/snippets/bordered_image.css".source = ../../../config/obsidian/css_snippets/bordered_image.css;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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 "Package Search" "https://search.nixos.org/packages")
|
||||||
(mkBm "Option Search" "https://search.nixos.org/options?")
|
(mkBm "Option Search" "https://search.nixos.org/options?")
|
||||||
(mkBm "Function Search" "https://noogle.dev/")
|
(mkBm "Function Search" "https://noogle.dev/")
|
||||||
(mkBm "HM Search" "https://home-manager-options.extranix.com/")
|
(mkBm "HM Search" "https://mipmip.github.io/home-manager-option-search/")
|
||||||
(mkBm "NUR Search" "https://nur.nix-community.org/")
|
(mkBm "NUR Search" "https://nur.nix-community.org/")
|
||||||
(mkBm "Nixpkgs Version Search" "https://lazamar.co.uk/nix-versions/")
|
(mkBm "Nixpkgs Version Search" "https://lazamar.co.uk/nix-versions/")
|
||||||
(mkBm "Nixpkgs PR Tracker" "https://nixpk.gs/pr-tracker.html")
|
(mkBm "Nixpkgs PR Tracker" "https://nixpk.gs/pr-tracker.html")
|
||||||
@ -103,9 +103,9 @@ in [
|
|||||||
(mkBm "Heise" "https://www.heise.de/")
|
(mkBm "Heise" "https://www.heise.de/")
|
||||||
(mkBm "HN" "https://news.ycombinator.com/news")
|
(mkBm "HN" "https://news.ycombinator.com/news")
|
||||||
(mkBm "Reddit" "https://www.reddit.com/user/FightingMushroom/saved/")
|
(mkBm "Reddit" "https://www.reddit.com/user/FightingMushroom/saved/")
|
||||||
# (mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
|
(mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
|
||||||
(mkBm "F12" "https://f12.local.chriphost.gay/racepicks")
|
(mkBm "F11" "https://f11.local.chriphost.de/racepicks")
|
||||||
(mkBm "F12PB" "https://f12pb.local.chriphost.de/_/")
|
(mkBm "F11PB" "https://f11pb.local.chriphost.de/_/#/collections?collection=pbc_1736455494&filter=&sort=-%40rowid")
|
||||||
(mkBm "ISBNDB" "https://isbndb.com/")
|
(mkBm "ISBNDB" "https://isbndb.com/")
|
||||||
(mkBm "Music" "https://bandcamp.com/chriphost")
|
(mkBm "Music" "https://bandcamp.com/chriphost")
|
||||||
(mkBm "Albums" "https://www.albumoftheyear.org/user/chriphost/list/307966/2025/")
|
(mkBm "Albums" "https://www.albumoftheyear.org/user/chriphost/list/307966/2025/")
|
||||||
|
|||||||
@ -86,9 +86,6 @@ in {
|
|||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# configPath = "${config.xdg.configHome}/mozilla/firefox";
|
|
||||||
configPath = "${config.home.homeDirectory}/.mozilla/firefox";
|
|
||||||
|
|
||||||
# firefox-unwrapped is the pure firefox browser, wrapFirefox adds configuration ontop
|
# firefox-unwrapped is the pure firefox browser, wrapFirefox adds configuration ontop
|
||||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||||
# About policies: https://github.com/mozilla/policy-templates#enterprisepoliciesenabled
|
# About policies: https://github.com/mozilla/policy-templates#enterprisepoliciesenabled
|
||||||
@ -166,19 +163,12 @@ in {
|
|||||||
"google"
|
"google"
|
||||||
];
|
];
|
||||||
|
|
||||||
engines = let
|
engines = {
|
||||||
mkMan = section: page: p: {
|
|
||||||
name = "Man Pages - ${section}";
|
|
||||||
urls = [{template = "https://man7.org/linux/man-pages/man${page}/{searchTerms}.${page}${p}.html";}];
|
|
||||||
iconMapObj."16" = "https://man7.org/favicon.ico";
|
|
||||||
definedAliases = ["@man${page}"];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
kagi = {
|
kagi = {
|
||||||
name = "Kagi";
|
name = "Kagi";
|
||||||
urls = [{template = "https://kagi.com/search?q={searchTerms}";}];
|
urls = [{template = "https://kagi.com/search?q={searchTerms}";}];
|
||||||
iconMapObj."16" = "https://kagi.com/favicon.ico";
|
iconMapObj."16" = "https://kagi.com/favicon.ico";
|
||||||
definedAliases = ["@kg"];
|
definedAliases = ["@k"];
|
||||||
};
|
};
|
||||||
|
|
||||||
wiki = {
|
wiki = {
|
||||||
@ -188,34 +178,13 @@ in {
|
|||||||
definedAliases = ["@w"];
|
definedAliases = ["@w"];
|
||||||
};
|
};
|
||||||
|
|
||||||
searchix = {
|
nixos-packages = {
|
||||||
name = "Searchix";
|
name = "NixOS Packages";
|
||||||
urls = [{template = "https://searchix.ovh/?query={searchTerms}";}];
|
urls = [{template = "https://searchix.ovh/?query={searchTerms}";}];
|
||||||
iconMapObj."16" = "https://nixos.org/favicon.ico";
|
iconMapObj."16" = "https://nixos.org/favicon.ico";
|
||||||
definedAliases = ["@ns"];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixos-packages = {
|
|
||||||
name = "Nix Packages";
|
|
||||||
urls = [{template = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";}];
|
|
||||||
iconMapObj."16" = "https://nixos.org/favicon.ico";
|
|
||||||
definedAliases = ["@np"];
|
definedAliases = ["@np"];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixos-options = {
|
|
||||||
name = "NixOS Options";
|
|
||||||
urls = [{template = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";}];
|
|
||||||
iconMapObj."16" = "https://nixos.org/favicon.ico";
|
|
||||||
definedAliases = ["@no"];
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager-options = {
|
|
||||||
name = "Home Manager Options";
|
|
||||||
urls = [{template = "https://home-manager-options.extranix.com/?query={searchTerms}";}];
|
|
||||||
iconMapObj."16" = "https://nixos.org/favicon.ico";
|
|
||||||
definedAliases = ["@hm"];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixos-functions = {
|
nixos-functions = {
|
||||||
name = "NixOS Functions";
|
name = "NixOS Functions";
|
||||||
urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
|
urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
|
||||||
@ -223,13 +192,6 @@ in {
|
|||||||
definedAliases = ["@nf"];
|
definedAliases = ["@nf"];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs-issues = {
|
|
||||||
name = "Nixpkgs Issues";
|
|
||||||
urls = [{template = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue%20{searchTerms}";}];
|
|
||||||
iconMapObj."16" = "https://github.com/favicon.ico";
|
|
||||||
definedAliases = ["@ni"];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixos-wiki = {
|
nixos-wiki = {
|
||||||
name = "NixOS Wiki";
|
name = "NixOS Wiki";
|
||||||
urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}];
|
urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}];
|
||||||
@ -244,6 +206,13 @@ in {
|
|||||||
definedAliases = ["@aw"];
|
definedAliases = ["@aw"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixpkgs-issues = {
|
||||||
|
name = "Nixpkgs Issues";
|
||||||
|
urls = [{template = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue%20{searchTerms}";}];
|
||||||
|
iconMapObj."16" = "https://github.com/favicon.ico";
|
||||||
|
definedAliases = ["@i"];
|
||||||
|
};
|
||||||
|
|
||||||
github = {
|
github = {
|
||||||
name = "GitHub";
|
name = "GitHub";
|
||||||
urls = [{template = "https://github.com/search?q={searchTerms}&type=repositories";}];
|
urls = [{template = "https://github.com/search?q={searchTerms}&type=repositories";}];
|
||||||
@ -251,32 +220,6 @@ in {
|
|||||||
definedAliases = ["@gh"];
|
definedAliases = ["@gh"];
|
||||||
};
|
};
|
||||||
|
|
||||||
man0 = mkMan "POSIX" "0" "p";
|
|
||||||
man1 = mkMan "Commands" "1" "";
|
|
||||||
man2 = mkMan "Syscalls" "2" "";
|
|
||||||
man3 = mkMan "C Functions" "3" "";
|
|
||||||
|
|
||||||
stackoverflow = {
|
|
||||||
name = "Stack Overflow";
|
|
||||||
urls = [{template = "https://stackoverflow.com/search?q={searchTerms}";}];
|
|
||||||
iconMapObj."16" = "https://stackoverflow.com/favicon.ico";
|
|
||||||
definedAliases = ["@so"];
|
|
||||||
};
|
|
||||||
|
|
||||||
x86 = {
|
|
||||||
name = "x86 Ref";
|
|
||||||
urls = [{template = "https://www.felixcloutier.com/x86/{searchTerms}";}];
|
|
||||||
iconMapObj."16" = "https://www.felixcloutier.com/favicon.ico";
|
|
||||||
definedAliases = ["@x86"];
|
|
||||||
};
|
|
||||||
|
|
||||||
youtube = {
|
|
||||||
name = "YouTube";
|
|
||||||
urls = [{template = "https://www.youtube.com/results?search_query={searchTerms}";}];
|
|
||||||
iconMapObj."16" = "https://www.youtube.com/favicon.ico";
|
|
||||||
definedAliases = ["@yt"];
|
|
||||||
};
|
|
||||||
|
|
||||||
google.metaData.alias = "@g";
|
google.metaData.alias = "@g";
|
||||||
|
|
||||||
# Hide bullshit
|
# Hide bullshit
|
||||||
|
|||||||
@ -42,94 +42,10 @@ in {
|
|||||||
fish_pager_color_description ${color.hex.overlay0}
|
fish_pager_color_description ${color.hex.overlay0}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.fish = let
|
programs.fish = {
|
||||||
# Only add " | bat" if bat is installed
|
enable = true;
|
||||||
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
|
|
||||||
|
|
||||||
# Same as above but with args for bat
|
|
||||||
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
|
|
||||||
|
|
||||||
# These can be used for my config.homemodules and for HM config.programs,
|
|
||||||
# as both of these add the package to home.packages
|
|
||||||
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
|
|
||||||
|
|
||||||
# Only add fish abbr if package is installed
|
|
||||||
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
|
|
||||||
in
|
|
||||||
lib.mkMerge [
|
|
||||||
# Darwin exclusive config
|
|
||||||
(lib.mkIf pkgs.stdenv.isDarwin {
|
|
||||||
shellInit = ''
|
|
||||||
set fish_greeting
|
|
||||||
yes | fish_config theme save "system-theme"
|
|
||||||
|
|
||||||
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
|
|
||||||
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
|
|
||||||
set --global --export HOMEBREW_REPOSITORY "/opt/homebrew"
|
|
||||||
fish_add_path --global --move --path "/opt/homebrew/bin" "/opt/homebrew/sbin"
|
|
||||||
if test -n "$MANPATH[1]"; set --global --export MANPATH ''' $MANPATH; end;
|
|
||||||
if not contains "/opt/homebrew/share/info" $INFOPATH; set --global --export INFOPATH "/opt/homebrew/share/info" $INFOPATH; end;
|
|
||||||
'';
|
|
||||||
|
|
||||||
shellAbbrs = lib.mkMerge [
|
|
||||||
{
|
|
||||||
rebuild = "sudo darwin-rebuild switch --flake .#darwinix";
|
|
||||||
}
|
|
||||||
|
|
||||||
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'darwin,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
|
||||||
];
|
|
||||||
})
|
|
||||||
|
|
||||||
# Linux exclusive config
|
|
||||||
(lib.mkIf pkgs.stdenv.isLinux {
|
|
||||||
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
||||||
|
|
||||||
# TODO: There's a bug with the direnv mechanism:
|
|
||||||
# - When leaving an env, it unloads (good)
|
|
||||||
# - When entering another env, it loads (good)
|
|
||||||
# - When leaving this one, it doesn't unload (bad)
|
|
||||||
# - When entering leaving it again, it works...
|
|
||||||
# This only happens sometimes, is there a race condition?
|
|
||||||
shellInit = ''
|
|
||||||
set fish_greeting
|
|
||||||
yes | fish_config theme save "system-theme"
|
|
||||||
fish_vi_key_bindings
|
|
||||||
|
|
||||||
# Because we can't source that in a project flake's shellHook (is POSIX), source it here
|
|
||||||
function __project_shell_reload --on-variable INIT_PROJECT_SHELL
|
|
||||||
# Leaving the environment
|
|
||||||
if not set -q INIT_PROJECT_SHELL; or test -z "$INIT_PROJECT_SHELL"
|
|
||||||
if test -n "$__last_unload_project_shell"; and test -f "$__last_unload_project_shell"
|
|
||||||
source "$__last_unload_project_shell"
|
|
||||||
end
|
|
||||||
set -e __last_init_project_shell
|
|
||||||
set -e __last_unload_project_shell
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
# Entering or switching environments
|
|
||||||
if test "$INIT_PROJECT_SHELL" != "$__last_init_project_shell"
|
|
||||||
# Cleanup the previous environment
|
|
||||||
if test -n "$__last_unload_project_shell"; and test -f "$__last_unload_project_shell"
|
|
||||||
source "$__last_unload_project_shell"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Store into variables to persist until next environment switch in the same shell
|
|
||||||
set -g __last_init_project_shell "$INIT_PROJECT_SHELL"
|
|
||||||
if set -q UNLOAD_PROJECT_SHELL; and test -f "$UNLOAD_PROJECT_SHELL"
|
|
||||||
set -g __last_unload_project_shell "$UNLOAD_PROJECT_SHELL"
|
|
||||||
else
|
|
||||||
set -e __last_unload_project_shell
|
|
||||||
end
|
|
||||||
|
|
||||||
# Source the new environment
|
|
||||||
if test -f "$INIT_PROJECT_SHELL"
|
|
||||||
source "$INIT_PROJECT_SHELL"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
|
|
||||||
functions = lib.mergeAttrsList [
|
functions = lib.mergeAttrsList [
|
||||||
(lib.optionalAttrs config.homemodules.nnn.enable {
|
(lib.optionalAttrs config.homemodules.nnn.enable {
|
||||||
nnncd = {
|
nnncd = {
|
||||||
@ -171,74 +87,59 @@ in {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
shellAbbrs = lib.mkMerge [
|
plugins = [];
|
||||||
|
|
||||||
|
shellInit = ''
|
||||||
|
set fish_greeting
|
||||||
|
yes | fish_config theme save "system-theme"
|
||||||
|
'';
|
||||||
|
|
||||||
|
shellAbbrs = let
|
||||||
|
# Only add " | bat" if bat is installed
|
||||||
|
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
|
||||||
|
|
||||||
|
# Same as above but with args for bat
|
||||||
|
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
|
||||||
|
|
||||||
|
# These can be used for my config.homemodules and for HM config.programs,
|
||||||
|
# as both of these add the package to home.packages
|
||||||
|
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
|
||||||
|
|
||||||
|
# Only add fish abbr if package is installed
|
||||||
|
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
|
||||||
|
in
|
||||||
|
lib.mkMerge [
|
||||||
# Abbrs that are always available are defined here.
|
# Abbrs that are always available are defined here.
|
||||||
{
|
{
|
||||||
# Tools
|
# Shell basics
|
||||||
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
|
||||||
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
|
||||||
|
|
||||||
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra"; # env var for wayland
|
|
||||||
}
|
|
||||||
|
|
||||||
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
|
||||||
|
|
||||||
# Doesn't work with abbrify because I have nnn.override...
|
|
||||||
(lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";})
|
|
||||||
(lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";})
|
|
||||||
|
|
||||||
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
|
||||||
|
|
||||||
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
|
|
||||||
|
|
||||||
# (abbrify pkgs.sd {sed = "sd";})
|
|
||||||
];
|
|
||||||
})
|
|
||||||
|
|
||||||
# Common config
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
shellAbbrs = lib.mkMerge [
|
|
||||||
{
|
|
||||||
# Shell
|
|
||||||
c = "clear";
|
c = "clear";
|
||||||
q = "exit";
|
q = "exit";
|
||||||
mkdir = "mkdir -p"; # also create parents (-p)
|
|
||||||
watch = "watch -d -c -n 0.5";
|
|
||||||
sy = "sudo yazi";
|
|
||||||
cd = "z"; # zoxide for quickjump to previously visited locations
|
|
||||||
cdd = "zi";
|
|
||||||
b = "z -"; # jump to previous dir
|
|
||||||
|
|
||||||
# Fish
|
# Fish
|
||||||
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
|
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
|
||||||
abbrs = batifyWithArgs "abbr" "-l fish";
|
abbrs = batifyWithArgs "abbr" "-l fish";
|
||||||
|
|
||||||
# Nix
|
# Tools
|
||||||
|
cd = "z"; # zoxide for quickjump to previously visited locations
|
||||||
|
cdd = "zi";
|
||||||
|
b = "z -"; # jump to previous dir
|
||||||
|
mkdir = "mkdir -p"; # also create parents (-p)
|
||||||
|
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
||||||
|
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
||||||
|
watch = "watch -d -c -n 0.5";
|
||||||
|
nps = "nps -e";
|
||||||
nd = "nix develop";
|
nd = "nix develop";
|
||||||
nb = "nix build -L";
|
nb = "nix build -L";
|
||||||
ns = "nix shell nixpkgs#";
|
ns = "nix shell nixpkgs#";
|
||||||
nr = "nix run";
|
|
||||||
nps = "nps -e";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Abbrs only available if package is installed
|
# Abbrs only available if package is installed
|
||||||
(abbrify pkgs.rsync rec {
|
|
||||||
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
|
||||||
copy = rsync;
|
|
||||||
})
|
|
||||||
|
|
||||||
(abbrify pkgs.duf {
|
(abbrify pkgs.duf {
|
||||||
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*'";
|
||||||
alldisks = "duf";
|
alldisks = "duf";
|
||||||
})
|
})
|
||||||
|
|
||||||
(abbrify pkgs.ripgrep {
|
|
||||||
rg = "rg --trim --pretty";
|
|
||||||
# grep = rg;
|
|
||||||
})
|
|
||||||
|
|
||||||
(abbrify pkgs.eza {
|
(abbrify pkgs.eza {
|
||||||
ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions";
|
ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions";
|
||||||
lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l";
|
lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l";
|
||||||
@ -269,11 +170,30 @@ in {
|
|||||||
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
|
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
|
||||||
|
|
||||||
(abbrify pkgs.lazygit {lg = "lazygit";})
|
(abbrify pkgs.lazygit {lg = "lazygit";})
|
||||||
];
|
|
||||||
|
|
||||||
plugins = [];
|
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
||||||
}
|
|
||||||
|
# Doesn't work with abbrify because I have nnn.override...
|
||||||
|
(lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";})
|
||||||
|
(lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";})
|
||||||
|
|
||||||
|
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
||||||
|
|
||||||
|
(abbrify pkgs.ripgrep rec {
|
||||||
|
rg = "rg --trim --pretty";
|
||||||
|
# grep = rg;
|
||||||
|
})
|
||||||
|
|
||||||
|
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
|
||||||
|
|
||||||
|
(abbrify pkgs.rsync rec {
|
||||||
|
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
||||||
|
copy = rsync;
|
||||||
|
})
|
||||||
|
|
||||||
|
# (abbrify pkgs.sd {sed = "sd";})
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@ -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,
|
config,
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (config.homemodules) kitty color;
|
inherit (config.homemodules) kitty color;
|
||||||
@ -28,21 +27,15 @@ in {
|
|||||||
"kitty_mod+l" = "next_layout";
|
"kitty_mod+l" = "next_layout";
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = lib.mkMerge [
|
settings = {
|
||||||
# Linux config
|
|
||||||
(lib.mkIf pkgs.stdenv.isLinux {
|
|
||||||
allow_remote_control = true; # For nnn file preview or nvim scrollback
|
|
||||||
listen_on = lib.mkDefault "unix:@mykitty"; # This conflicts with direnv-instant
|
|
||||||
})
|
|
||||||
|
|
||||||
# Common config
|
|
||||||
{
|
|
||||||
editor = config.home.sessionVariables.EDITOR;
|
editor = config.home.sessionVariables.EDITOR;
|
||||||
scrollback_lines = 10000;
|
scrollback_lines = 10000;
|
||||||
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
|
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
|
||||||
# hide_window_decorations = "yes";
|
# hide_window_decorations = "yes";
|
||||||
enabled_layouts = "grid,vertical,horizontal";
|
enabled_layouts = "grid,vertical,horizontal";
|
||||||
cursor_trail = 3;
|
|
||||||
|
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
|
||||||
|
listen_on = "unix:@mykitty";
|
||||||
|
|
||||||
tab_bar_min_tabs = 2; # Don't show a single tab
|
tab_bar_min_tabs = 2; # Don't show a single tab
|
||||||
tab_bar_edge = "bottom";
|
tab_bar_edge = "bottom";
|
||||||
@ -123,8 +116,7 @@ in {
|
|||||||
# white
|
# white
|
||||||
color7 = color.hexS.surface2;
|
color7 = color.hexS.surface2;
|
||||||
color15 = color.hexS.surface1;
|
color15 = color.hexS.surface1;
|
||||||
}
|
};
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,62 +30,53 @@ in {
|
|||||||
|
|
||||||
(lib.optionals (!headless) [
|
(lib.optionals (!headless) [
|
||||||
# Language servers
|
# Language servers
|
||||||
autotools-language-server
|
|
||||||
basedpyright
|
|
||||||
clang-tools
|
clang-tools
|
||||||
clojure-lsp
|
clojure-lsp
|
||||||
cmake-language-server
|
cmake-language-server
|
||||||
haskell-language-server
|
haskell-language-server
|
||||||
jdt-language-server
|
jdt-language-server
|
||||||
just-lsp
|
|
||||||
ltex-ls # TODO: Only enable on-demand
|
ltex-ls # TODO: Only enable on-demand
|
||||||
lua-language-server
|
lua-language-server
|
||||||
nil
|
# nil
|
||||||
# perl5Packages.PLS
|
basedpyright
|
||||||
perlnavigator
|
|
||||||
pyrefly
|
pyrefly
|
||||||
# rPackages.languageserver
|
ty
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
svelte-language-server
|
svelte-language-server
|
||||||
tailwindcss-language-server
|
tailwindcss-language-server
|
||||||
tex-fmt
|
tex-fmt
|
||||||
texlab
|
texlab
|
||||||
tinymist
|
tinymist
|
||||||
ty
|
|
||||||
typescript
|
typescript
|
||||||
vscode-langservers-extracted # includes nodejs
|
vscode-langservers-extracted # includes nodejs
|
||||||
|
autotools-language-server
|
||||||
|
just-lsp
|
||||||
|
|
||||||
# Linters
|
# Linters
|
||||||
checkstyle # java
|
checkstyle # java
|
||||||
clippy # rust
|
clippy # rust
|
||||||
clj-kondo # clojure
|
clj-kondo # clojure
|
||||||
eslint_d # javascript
|
eslint_d # javascript
|
||||||
# python313Packages.ruff
|
python313Packages.ruff
|
||||||
# python313Packages.flake8
|
python313Packages.flake8
|
||||||
# python313Packages.pylint
|
python313Packages.pylint
|
||||||
lua54Packages.luacheck
|
lua54Packages.luacheck
|
||||||
vale # text
|
vale # text
|
||||||
# statix # nix (doesn't recognize pipe operator)
|
# statix # nix (doesn't recognize pipe operator)
|
||||||
|
|
||||||
# Formatters
|
# Formatters
|
||||||
air-formatter
|
|
||||||
cljfmt
|
cljfmt
|
||||||
|
python313Packages.black
|
||||||
google-java-format
|
google-java-format
|
||||||
html-tidy
|
html-tidy
|
||||||
jq # json
|
jq # json
|
||||||
just-formatter
|
|
||||||
mbake
|
|
||||||
# nodePackages_latest.prettier # Use local install as plugins change per project
|
|
||||||
# perl5Packages.PerlTidy
|
|
||||||
# prettierd # Use prettier instead because of plugins
|
# prettierd # Use prettier instead because of plugins
|
||||||
# python313Packages.black
|
# nodePackages_latest.prettier # Use local install as plugins change per project
|
||||||
rustfmt
|
rustfmt
|
||||||
stylua
|
stylua
|
||||||
tombi
|
|
||||||
typstyle
|
typstyle
|
||||||
|
mbake
|
||||||
nodejs_latest
|
just-formatter
|
||||||
uv
|
|
||||||
])
|
])
|
||||||
|
|
||||||
[
|
[
|
||||||
@ -95,52 +86,6 @@ in {
|
|||||||
lua54Packages.jsregexp # For tree-sitter
|
lua54Packages.jsregexp # For tree-sitter
|
||||||
# nodejs_latest
|
# nodejs_latest
|
||||||
|
|
||||||
# TODO: Create a perl module where I can add packages to, so I don't end up with multiple perl installations
|
|
||||||
# TODO: The same is required for python and R (below)
|
|
||||||
(perl.withPackages (p:
|
|
||||||
with p; [
|
|
||||||
PLS
|
|
||||||
PerlCritic
|
|
||||||
PerlTidy
|
|
||||||
NetOpenSSH
|
|
||||||
DateTime
|
|
||||||
DBI
|
|
||||||
DBDMariaDB
|
|
||||||
CursesUI
|
|
||||||
TextCSV_XS
|
|
||||||
]))
|
|
||||||
|
|
||||||
(python314.withPackages (p:
|
|
||||||
with p; [
|
|
||||||
# Linters
|
|
||||||
ruff
|
|
||||||
flake8
|
|
||||||
pylint
|
|
||||||
|
|
||||||
# Formatters
|
|
||||||
black
|
|
||||||
|
|
||||||
numpy
|
|
||||||
matplotlib
|
|
||||||
requests
|
|
||||||
]))
|
|
||||||
|
|
||||||
(rWrapper.override {
|
|
||||||
packages = with rPackages; [
|
|
||||||
languageserver
|
|
||||||
ggplot2
|
|
||||||
ggalluvial
|
|
||||||
plotly
|
|
||||||
shiny
|
|
||||||
readr
|
|
||||||
tibble
|
|
||||||
svglite
|
|
||||||
dplyr
|
|
||||||
tidyr
|
|
||||||
scales
|
|
||||||
];
|
|
||||||
})
|
|
||||||
|
|
||||||
nixd
|
nixd
|
||||||
alejandra # nix
|
alejandra # nix
|
||||||
]
|
]
|
||||||
@ -148,8 +93,6 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
# nixpkgs.pkgs = pkgs;
|
|
||||||
|
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
enable = true;
|
enable = true;
|
||||||
enableMan = false; # Nixvim man pages
|
enableMan = false; # Nixvim man pages
|
||||||
@ -172,7 +115,7 @@ in {
|
|||||||
performance.byteCompileLua = {
|
performance.byteCompileLua = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configs = true;
|
configs = true;
|
||||||
initLua = true; # When debugging init.lua turn this off
|
initLua = false; # When debugging init.lua turn this off
|
||||||
nvimRuntime = true;
|
nvimRuntime = true;
|
||||||
plugins = true;
|
plugins = true;
|
||||||
};
|
};
|
||||||
@ -182,7 +125,7 @@ in {
|
|||||||
maplocalleader = ",";
|
maplocalleader = ",";
|
||||||
};
|
};
|
||||||
|
|
||||||
opts = import ./vim_opts.nix {inherit config lib mylib;};
|
opts = import ./vim_opts.nix {inherit lib mylib;};
|
||||||
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
|
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
|
||||||
extraConfigLua = builtins.readFile ./extraConfigLua.lua;
|
extraConfigLua = builtins.readFile ./extraConfigLua.lua;
|
||||||
|
|
||||||
@ -308,15 +251,6 @@ in {
|
|||||||
require("${name}").setup(opts)
|
require("${name}").setup(opts)
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Like mkDefaultConfig but takes the Lua module name explicitly.
|
|
||||||
# Use when the Lua module name (e.g. "noice") differs from what
|
|
||||||
# lazy.nvim expects as the plugin name (e.g. "noice.nvim").
|
|
||||||
mkDefaultConfigFor = moduleName: ''
|
|
||||||
function(_, opts)
|
|
||||||
require("${moduleName}").setup(opts)
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -588,13 +522,10 @@ in {
|
|||||||
make = ["bake"];
|
make = ["bake"];
|
||||||
markdown = ["prettierd" "prettier"];
|
markdown = ["prettierd" "prettier"];
|
||||||
nix = ["alejandra"];
|
nix = ["alejandra"];
|
||||||
perl = ["perltidy"];
|
|
||||||
python = ["black"];
|
python = ["black"];
|
||||||
qml = ["qmlformat"];
|
qml = ["qmlformat"];
|
||||||
r = ["air"];
|
|
||||||
rust = ["rustfmt"];
|
rust = ["rustfmt"];
|
||||||
svelte = ["prettierd" "prettier"];
|
svelte = ["prettierd" "prettier"];
|
||||||
toml = ["tombi"];
|
|
||||||
typescript = ["prettierd" "prettier"];
|
typescript = ["prettierd" "prettier"];
|
||||||
typst = ["typstyle"];
|
typst = ["typstyle"];
|
||||||
};
|
};
|
||||||
@ -619,21 +550,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
devdocs = rec {
|
|
||||||
name = "devdocs";
|
|
||||||
pkg = pkgs.vimPlugins.devdocs-nvim;
|
|
||||||
lazy = true;
|
|
||||||
cmd = ["DevDocs"];
|
|
||||||
dependencies = [snacks];
|
|
||||||
config = mkDefaultConfig name;
|
|
||||||
# opts = {
|
|
||||||
# ensure_installed = [
|
|
||||||
# "c"
|
|
||||||
# "cpp"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
|
|
||||||
direnv = {
|
direnv = {
|
||||||
name = "direnv";
|
name = "direnv";
|
||||||
pkg = pkgs.vimPlugins.direnv-vim;
|
pkg = pkgs.vimPlugins.direnv-vim;
|
||||||
@ -927,8 +843,9 @@ in {
|
|||||||
dependencies = [_lazydev];
|
dependencies = [_lazydev];
|
||||||
config = let
|
config = let
|
||||||
servers = mylib.generators.toLuaObject [
|
servers = mylib.generators.toLuaObject [
|
||||||
{name = "autotools-language-server";}
|
|
||||||
{name = "basedpyright";}
|
{name = "basedpyright";}
|
||||||
|
# {name = "pyrefly";} # TODO: Config
|
||||||
|
# {name = "ty";} # TODO: Config
|
||||||
{
|
{
|
||||||
name = "clangd";
|
name = "clangd";
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
@ -943,15 +860,12 @@ in {
|
|||||||
|
|
||||||
cmd = [
|
cmd = [
|
||||||
"clangd"
|
"clangd"
|
||||||
"--all-scopes-completion"
|
|
||||||
"--background-index"
|
"--background-index"
|
||||||
"--clang-tidy"
|
"--clang-tidy"
|
||||||
"--completion-style=detailed"
|
|
||||||
"--fallback-style=llvm"
|
|
||||||
"--function-arg-placeholders=0"
|
|
||||||
"--header-insertion=iwyu"
|
"--header-insertion=iwyu"
|
||||||
"--header-insertion-decorators"
|
"--completion-style=detailed"
|
||||||
"--pch-storage=memory"
|
"--function-arg-placeholders"
|
||||||
|
"--fallback-style=llvm"
|
||||||
];
|
];
|
||||||
|
|
||||||
capabilities = {
|
capabilities = {
|
||||||
@ -969,7 +883,7 @@ in {
|
|||||||
{name = "cmake";}
|
{name = "cmake";}
|
||||||
{name = "cssls";}
|
{name = "cssls";}
|
||||||
{name = "html";} # vscode-langservers-extracted
|
{name = "html";} # vscode-langservers-extracted
|
||||||
{name = "just";}
|
{name = "just-lsp";} # TODO: Doesn't autostart?
|
||||||
{name = "lua_ls";}
|
{name = "lua_ls";}
|
||||||
{
|
{
|
||||||
name = "ltex";
|
name = "ltex";
|
||||||
@ -980,6 +894,7 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{name = "autotools-language-server";}
|
||||||
# {name = "nil_ls";}
|
# {name = "nil_ls";}
|
||||||
{
|
{
|
||||||
name = "nixd";
|
name = "nixd";
|
||||||
@ -1021,8 +936,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{name = "perlpls";}
|
|
||||||
{name = "perlnavigator";}
|
|
||||||
{
|
{
|
||||||
name = "qmlls";
|
name = "qmlls";
|
||||||
extraOptions.cmd = [
|
extraOptions.cmd = [
|
||||||
@ -1030,8 +943,6 @@ in {
|
|||||||
"-E" # Use QML_IMPORT_PATH env variable
|
"-E" # Use QML_IMPORT_PATH env variable
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
# {name = "pyrefly";} # TODO: Config
|
|
||||||
{name = "r_language_server";}
|
|
||||||
{name = "svelte";}
|
{name = "svelte";}
|
||||||
{name = "tailwindcss";}
|
{name = "tailwindcss";}
|
||||||
{name = "texlab";}
|
{name = "texlab";}
|
||||||
@ -1043,7 +954,6 @@ in {
|
|||||||
semanticTokens = "disable";
|
semanticTokens = "disable";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# {name = "ty";} # TODO: Config
|
|
||||||
|
|
||||||
# {name = "jdtls";} # Don't set up when using nvim-jdtls
|
# {name = "jdtls";} # Don't set up when using nvim-jdtls
|
||||||
# {name = "rust_analyzer";} # Don't set up when using rustaceanvim
|
# {name = "rust_analyzer";} # Don't set up when using rustaceanvim
|
||||||
@ -1121,7 +1031,6 @@ in {
|
|||||||
pkg = pkgs.vimPlugins.lualine-nvim;
|
pkg = pkgs.vimPlugins.lualine-nvim;
|
||||||
lazy = true;
|
lazy = true;
|
||||||
event = ["BufReadPost" "BufNewFile"];
|
event = ["BufReadPost" "BufNewFile"];
|
||||||
# dependencies = [opencode];
|
|
||||||
config = ''
|
config = ''
|
||||||
function(_, opts)
|
function(_, opts)
|
||||||
local lualine = require("lualine")
|
local lualine = require("lualine")
|
||||||
@ -1221,7 +1130,6 @@ in {
|
|||||||
lualine_c.__raw = ''{}''; # Use __raw: Nixvim does nothing with "[]", so the default config would be used
|
lualine_c.__raw = ''{}''; # Use __raw: Nixvim does nothing with "[]", so the default config would be used
|
||||||
|
|
||||||
lualine_x.__raw = ''{}'';
|
lualine_x.__raw = ''{}'';
|
||||||
# lualine_x.__raw = ''{ { require("opencode").statusline, }, }'';
|
|
||||||
lualine_y = ["filetype" "encoding" "fileformat"];
|
lualine_y = ["filetype" "encoding" "fileformat"];
|
||||||
lualine_z.__raw = ''{ { "location", separator = {}, } }'';
|
lualine_z.__raw = ''{ { "location", separator = {}, } }'';
|
||||||
};
|
};
|
||||||
@ -1387,19 +1295,19 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_nui = {
|
_nui = {
|
||||||
name = "nui.nvim";
|
name = "nui"; # For noice
|
||||||
pkg = pkgs.vimPlugins.nui-nvim;
|
pkg = pkgs.vimPlugins.nui-nvim;
|
||||||
lazy = true;
|
lazy = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
noice = rec {
|
noice = rec {
|
||||||
name = "noice.nvim";
|
name = "noice";
|
||||||
pkg = pkgs.vimPlugins.noice-nvim;
|
pkg = pkgs.vimPlugins.noice-nvim;
|
||||||
lazy = false;
|
lazy = false;
|
||||||
dependencies = [
|
dependencies = [
|
||||||
_nui
|
_nui
|
||||||
];
|
];
|
||||||
config = mkDefaultConfigFor "noice";
|
config = mkDefaultConfig name;
|
||||||
opts = {
|
opts = {
|
||||||
presets = {
|
presets = {
|
||||||
bottom_search = false;
|
bottom_search = false;
|
||||||
@ -1461,32 +1369,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
opencode = {
|
|
||||||
name = "opencode";
|
|
||||||
pkg = pkgs.vimPlugins.opencode-nvim;
|
|
||||||
lazy = false;
|
|
||||||
config = ''
|
|
||||||
function()
|
|
||||||
vim.g.opencode_opts = {
|
|
||||||
server = {
|
|
||||||
url = "http://localhost:12345",
|
|
||||||
start = false,
|
|
||||||
},
|
|
||||||
events = {
|
|
||||||
permissions = {
|
|
||||||
edits = {
|
|
||||||
-- Disable neovim diff popup tab
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.o.autoread = true -- Required for `vim.g.opencode_opts.events.reload`
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# obsidian = rec {
|
# obsidian = rec {
|
||||||
# name = "obsidian";
|
# name = "obsidian";
|
||||||
# pkg = pkgs.vimPlugins.obsidian-nvim;
|
# pkg = pkgs.vimPlugins.obsidian-nvim;
|
||||||
@ -1670,7 +1552,7 @@ in {
|
|||||||
icon = " ";
|
icon = " ";
|
||||||
key = "s";
|
key = "s";
|
||||||
desc = "Restore Session";
|
desc = "Restore Session";
|
||||||
action = "<cmd>Persisted select<cr>";
|
action = "<cmd>lua require('persisted').select()<cr>";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
icon = " ";
|
icon = " ";
|
||||||
@ -1711,7 +1593,7 @@ in {
|
|||||||
gitbrowse.enabled = false;
|
gitbrowse.enabled = false;
|
||||||
image.enabled = false;
|
image.enabled = false;
|
||||||
indent.enabled = false;
|
indent.enabled = false;
|
||||||
input.enabled = true;
|
input.enabled = false;
|
||||||
keymap.enabled = false;
|
keymap.enabled = false;
|
||||||
layout.enabled = false;
|
layout.enabled = false;
|
||||||
lazygit.enabled = true;
|
lazygit.enabled = true;
|
||||||
@ -1747,20 +1629,6 @@ in {
|
|||||||
truncate = 80;
|
truncate = 80;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
actions = {
|
|
||||||
opencode_send.__raw = ''
|
|
||||||
function(picker)
|
|
||||||
local items = vim.tbl_map(function(item)
|
|
||||||
return item.file
|
|
||||||
and require("opencode").format({ path = item.file, from = item.pos, to = item.end_pos })
|
|
||||||
or item.text
|
|
||||||
end, picker:selected({ fallback = true }))
|
|
||||||
|
|
||||||
require("opencode").prompt(table.concat(items, ", ") .. " ")
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
profiler.enabled = false;
|
profiler.enabled = false;
|
||||||
@ -1831,7 +1699,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_plenary = {
|
_plenary = {
|
||||||
name = "plenary.nvim";
|
name = "plenary";
|
||||||
pkg = pkgs.vimPlugins.plenary-nvim;
|
pkg = pkgs.vimPlugins.plenary-nvim;
|
||||||
lazy = true;
|
lazy = true;
|
||||||
};
|
};
|
||||||
@ -2250,12 +2118,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
yazi = rec {
|
yazi = rec {
|
||||||
name = "yazi.nvim";
|
name = "yazi";
|
||||||
pkg = pkgs.vimPlugins.yazi-nvim;
|
pkg = pkgs.vimPlugins.yazi-nvim;
|
||||||
lazy = true;
|
lazy = true;
|
||||||
event = ["VeryLazy"];
|
event = ["VeryLazy"];
|
||||||
dependencies = [_plenary];
|
dependencies = [_plenary];
|
||||||
config = mkDefaultConfigFor "yazi";
|
config = mkDefaultConfig name;
|
||||||
opts = {
|
opts = {
|
||||||
open_for_directories = true;
|
open_for_directories = true;
|
||||||
highlight_hovered_buffers_in_same_directory = false;
|
highlight_hovered_buffers_in_same_directory = false;
|
||||||
@ -2287,7 +2155,6 @@ in {
|
|||||||
|
|
||||||
# dap # Debug adapter protocol # TODO:
|
# dap # Debug adapter protocol # TODO:
|
||||||
# dap-ui # Debugger UI # TODO:
|
# dap-ui # Debugger UI # TODO:
|
||||||
devdocs
|
|
||||||
diffview # Git diff # TODO: Check the keybindings
|
diffview # Git diff # TODO: Check the keybindings
|
||||||
|
|
||||||
direnv # Automatically load local environments
|
direnv # Automatically load local environments
|
||||||
@ -2317,7 +2184,6 @@ in {
|
|||||||
noice # Modern UI overhaul, e.g. floating cmdline
|
noice # Modern UI overhaul, e.g. floating cmdline
|
||||||
# obsidian # Integration with Obsidian.md
|
# obsidian # Integration with Obsidian.md
|
||||||
|
|
||||||
opencode # TODO: Doesn't work, can't find "opencode --port" process
|
|
||||||
# overseer # Run tasks from within neovim (e.g. cargo) # TODO:
|
# overseer # Run tasks from within neovim (e.g. cargo) # TODO:
|
||||||
|
|
||||||
persisted # Session management
|
persisted # Session management
|
||||||
|
|||||||
@ -66,16 +66,3 @@ local rmpc =
|
|||||||
vim.g.toggle_rmpc = function()
|
vim.g.toggle_rmpc = function()
|
||||||
rmpc:toggle()
|
rmpc:toggle()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Toggle FailNix UI
|
|
||||||
local failnix = Terminal:new({
|
|
||||||
cmd = "cd /home/christoph/Notes/TU/MastersThesis/FailNix && nix develop --command bash -c 'perl ./scripts/menu.pl'",
|
|
||||||
hidden = true,
|
|
||||||
close_on_exit = true,
|
|
||||||
auto_scroll = false,
|
|
||||||
direction = "float",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.g.toggle_failnix = function()
|
|
||||||
failnix:toggle()
|
|
||||||
end
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ if g.neovide then
|
|||||||
|
|
||||||
-- Neovide Fonts
|
-- Neovide Fonts
|
||||||
-- o.guifont = "JetBrainsMono Nerd Font Mono:h12:Medium"
|
-- o.guifont = "JetBrainsMono Nerd Font Mono:h12:Medium"
|
||||||
o.guifont = "MonoLisa Alt:h12:Medium"
|
o.guifont = "MonoLisa Alt Script:h12:Medium"
|
||||||
else
|
else
|
||||||
-- require("notify").notify("Not running in NeoVide")
|
-- require("notify").notify("Not running in NeoVide")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -340,13 +340,6 @@ _: let
|
|||||||
action = "<cmd>lua vim.g.toggle_rmpc()<cr>"; # Defined in extraConfigLua.lua
|
action = "<cmd>lua vim.g.toggle_rmpc()<cr>"; # Defined in extraConfigLua.lua
|
||||||
options.desc = "Show Rmpc";
|
options.desc = "Show Rmpc";
|
||||||
}
|
}
|
||||||
# TODO: Something with the environment activation doesn't work
|
|
||||||
# {
|
|
||||||
# mode = "n";
|
|
||||||
# key = "<leader>.";
|
|
||||||
# action = "<cmd>lua vim.g.toggle_failnix()<cr>"; # Defined in extraConfigLua.lua
|
|
||||||
# options.desc = "Show FailNix";
|
|
||||||
# }
|
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>i";
|
key = "<leader>i";
|
||||||
@ -415,58 +408,6 @@ _: let
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
leader-opencode = [
|
|
||||||
{
|
|
||||||
mode = ["n" "v"];
|
|
||||||
key = "<leader>o";
|
|
||||||
action = "+opencode";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = ["n" "v"];
|
|
||||||
key = "<leader>oo";
|
|
||||||
action.__raw = ''function() require("opencode").ask("@this: ") end'';
|
|
||||||
options.desc = "Ask about @this";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = ["n" "v"];
|
|
||||||
key = "<leader>od";
|
|
||||||
action.__raw = ''function() require("opencode").prompt("Explain @diagnostics") end'';
|
|
||||||
options.desc = "Explain @diagnostics";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = ["n" "v"];
|
|
||||||
key = "<leader>oe";
|
|
||||||
action.__raw = ''function() require("opencode").prompt("Explain @this and its context") end'';
|
|
||||||
options.desc = "Explain @this";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = ["n" "v"];
|
|
||||||
key = "<leader>or";
|
|
||||||
action.__raw = ''function() require("opencode").prompt("Review @this for correctness and readability") end'';
|
|
||||||
options.desc = "Review @this";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = ["n" "v"];
|
|
||||||
key = "<leader>os";
|
|
||||||
action.__raw = ''function() require("opencode").select() end'';
|
|
||||||
options.desc = "Select Action";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>oa";
|
|
||||||
action.__raw = ''function() return require("opencode").operator("@this ") .. "_" end'';
|
|
||||||
options.desc = "Append Line to Prompt";
|
|
||||||
options.expr = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "v";
|
|
||||||
key = "<leader>oa";
|
|
||||||
action.__raw = ''function() return require("opencode").operator("@this ") end'';
|
|
||||||
options.desc = "Append Range to Prompt";
|
|
||||||
options.expr = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
leader-file = [
|
leader-file = [
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
@ -564,48 +505,6 @@ _: let
|
|||||||
action = "<cmd>lua Snacks.picker.help()<cr>";
|
action = "<cmd>lua Snacks.picker.help()<cr>";
|
||||||
options.desc = "Helptags Picker";
|
options.desc = "Helptags Picker";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>hd";
|
|
||||||
action = "+devdocs";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# mode = "n";
|
|
||||||
# key = "<leader>hdd";
|
|
||||||
# action.__raw = ''
|
|
||||||
# function()
|
|
||||||
# local devdocs = require("devdocs")
|
|
||||||
# local installedDocs = devdocs.GetInstalledDocs()
|
|
||||||
# vim.ui.select(installedDocs, {}, function(selected)
|
|
||||||
# if not selected then
|
|
||||||
# return
|
|
||||||
# end
|
|
||||||
# local docDir = devdocs.GetDocDir(selected)
|
|
||||||
# -- prettify the filename as you wish
|
|
||||||
# Snacks.picker.files({ cwd = docDir })
|
|
||||||
# end)
|
|
||||||
# end
|
|
||||||
# '';
|
|
||||||
# options.desc = "Open Devdocs";
|
|
||||||
# }
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>hdd";
|
|
||||||
action = "<cmd>DevDocs get<cr>";
|
|
||||||
options.desc = "Open Devdocs in Split";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>hdi";
|
|
||||||
action = "<cmd>DevDocs install<cr>";
|
|
||||||
options.desc = "Install Devdocs";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "n";
|
|
||||||
key = "<leader>hdD";
|
|
||||||
action = "<cmd>DevDocs delete<cr>";
|
|
||||||
options.desc = "Delete Devdocs";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
leader-quit = [
|
leader-quit = [
|
||||||
@ -637,19 +536,19 @@ _: let
|
|||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>sl";
|
key = "<leader>sl";
|
||||||
action = "<cmd>Persisted select<cr>";
|
action = "<cmd>lua require('persisted').select()<cr>";
|
||||||
options.desc = "Restore Session";
|
options.desc = "Restore Session";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>ss";
|
key = "<leader>ss";
|
||||||
action = "<cmd>Persisted save<cr>";
|
action = "<cmd>SessionSave<cr>";
|
||||||
options.desc = "Save Session";
|
options.desc = "Save Session";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>sd";
|
key = "<leader>sd";
|
||||||
action = "<cmd>Persisted delete<cr>";
|
action = "<cmd>SessionDelete<cr>";
|
||||||
options.desc = "Delete Session";
|
options.desc = "Delete Session";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -935,19 +834,19 @@ _: let
|
|||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>tt";
|
key = "<leader>tt";
|
||||||
action = "<cmd>Trouble diagnostics toggle focus=false win.position=bottom<cr>";
|
action = "<cmd>Trouble diagnostics toggle focus=false win.position=left<cr>";
|
||||||
options.desc = "Trouble Diagnostics";
|
options.desc = "Trouble Diagnostics";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>tD";
|
key = "<leader>tD";
|
||||||
action = "<cmd>Trouble todo toggle focus=false win.position=bottom<cr>";
|
action = "<cmd>Trouble todo toggle focus=false win.position=left<cr>";
|
||||||
options.desc = "Toggle TODOs";
|
options.desc = "Toggle TODOs";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>ts";
|
key = "<leader>ts";
|
||||||
action = "<cmd>Trouble symbols toggle focus=false win.position=bottom<cr>";
|
action = "<cmd>Trouble symbols toggle focus=false win.position=left<cr>";
|
||||||
options.desc = "Trouble Symbols";
|
options.desc = "Trouble Symbols";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -1057,7 +956,6 @@ in
|
|||||||
no-leader
|
no-leader
|
||||||
|
|
||||||
leader
|
leader
|
||||||
leader-opencode
|
|
||||||
leader-file
|
leader-file
|
||||||
leader-help
|
leader-help
|
||||||
leader-quit
|
leader-quit
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fork = true # Start neovide detached
|
fork = true # Start neovide detached
|
||||||
frame = "full" # full, buttonless, none
|
frame = "none" # full, buttonless, none
|
||||||
idle = true # Don't render frames without changes
|
idle = true # Don't render frames without changes
|
||||||
title-hidden = true
|
title-hidden = true
|
||||||
tabs = false
|
tabs = false
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{config, ...}: {
|
_: {
|
||||||
showmode = false; # Status line already shows this
|
showmode = false; # Status line already shows this
|
||||||
backspace = ["indent" "eol" "start"];
|
backspace = ["indent" "eol" "start"];
|
||||||
termguicolors = true; # Required by multiple plugins
|
termguicolors = true; # Required by multiple plugins
|
||||||
@ -37,7 +37,7 @@
|
|||||||
# swapfile = true;
|
# swapfile = true;
|
||||||
# backup = false;
|
# backup = false;
|
||||||
undofile = true;
|
undofile = true;
|
||||||
undodir = "${config.home.homeDirectory}/.vim/undo";
|
undodir = "/home/christoph/.vim/undo";
|
||||||
undolevels = 10000;
|
undolevels = 10000;
|
||||||
# autochdir = true;
|
# autochdir = true;
|
||||||
confirm = true;
|
confirm = true;
|
||||||
|
|||||||
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,
|
wrap_navigation: false,
|
||||||
enable_mouse: true,
|
enable_mouse: true,
|
||||||
enable_config_hot_reload: true,
|
enable_config_hot_reload: true,
|
||||||
enable_lyrics_hot_reload: true,
|
|
||||||
enable_lyrics_index: true,
|
|
||||||
status_update_interval_ms: 1000,
|
status_update_interval_ms: 1000,
|
||||||
rewind_to_start_sec: 30,
|
rewind_to_start_sec: 30,
|
||||||
lyrics_dir: "${config.home.homeDirectory}/Music",
|
lyrics_dir: "${config.home.homeDirectory}/Music",
|
||||||
@ -90,37 +88,24 @@ in {
|
|||||||
(
|
(
|
||||||
name: "Queue (1)",
|
name: "Queue (1)",
|
||||||
pane: Split(
|
pane: Split(
|
||||||
|
borders: "NONE",
|
||||||
direction: Horizontal,
|
direction: Horizontal,
|
||||||
panes: [
|
panes: [
|
||||||
// Left Column (Queue + Cava)
|
// Left Column (Queue + Cava)
|
||||||
(
|
(
|
||||||
size: "70%",
|
size: "70%",
|
||||||
|
borders: "NONE",
|
||||||
pane: Split(
|
pane: Split(
|
||||||
direction: Vertical,
|
direction: Vertical,
|
||||||
panes: [
|
panes: [
|
||||||
(
|
(
|
||||||
size: "75%",
|
size: "75%",
|
||||||
borders: "ALL",
|
borders: "ALL",
|
||||||
border_symbols: Rounded,
|
|
||||||
pane: Split(
|
|
||||||
direction: Vertical,
|
|
||||||
panes: [
|
|
||||||
(
|
|
||||||
size: "2",
|
|
||||||
pane: Pane(QueueHeader()),
|
|
||||||
),
|
|
||||||
(
|
|
||||||
size: "100%",
|
|
||||||
pane: Pane(Queue),
|
pane: Pane(Queue),
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
size: "25%",
|
size: "25%",
|
||||||
borders: "ALL",
|
borders: "ALL",
|
||||||
border_symbols: Rounded,
|
|
||||||
pane: Pane(Cava),
|
pane: Pane(Cava),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
@ -130,19 +115,18 @@ in {
|
|||||||
// Right Column (AlbumArt + Lyrics)
|
// Right Column (AlbumArt + Lyrics)
|
||||||
(
|
(
|
||||||
size: "30%",
|
size: "30%",
|
||||||
|
borders: "NONE",
|
||||||
pane: Split(
|
pane: Split(
|
||||||
direction: Vertical,
|
direction: Vertical,
|
||||||
panes: [
|
panes: [
|
||||||
(
|
(
|
||||||
size: "75%",
|
size: "75%",
|
||||||
borders: "ALL",
|
borders: "ALL",
|
||||||
border_symbols: Rounded,
|
|
||||||
pane: Pane(AlbumArt),
|
pane: Pane(AlbumArt),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
size: "25%",
|
size: "25%",
|
||||||
borders: "ALL",
|
borders: "ALL",
|
||||||
border_symbols: Rounded,
|
|
||||||
pane: Pane(Lyrics),
|
pane: Pane(Lyrics),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@ -153,59 +137,31 @@ in {
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
name: "Albums (2)",
|
name: "Albums (2)",
|
||||||
pane: Split(
|
pane: Pane(Albums),
|
||||||
size: "100%",
|
|
||||||
direction: Vertical,
|
|
||||||
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Albums))],
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
name: "Album Artists (3)",
|
name: "Album Artists (3)",
|
||||||
pane: Split(
|
pane: Pane(AlbumArtists),
|
||||||
size: "100%",
|
|
||||||
direction: Vertical,
|
|
||||||
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(AlbumArtists))],
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
name: "Artists (4)",
|
name: "Artists (4)",
|
||||||
pane: Split(
|
pane: Pane(Artists),
|
||||||
size: "100%",
|
|
||||||
direction: Vertical,
|
|
||||||
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Artists))],
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
name: "Playlists (5)",
|
name: "Playlists (5)",
|
||||||
pane: Split(
|
pane: Pane(Playlists),
|
||||||
size: "100%",
|
|
||||||
direction: Vertical,
|
|
||||||
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Playlists))],
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
// (
|
// (
|
||||||
// name: "Directories (6)",
|
// name: "Directories (6)",
|
||||||
// pane: Split(
|
// pane: Pane(Directories),
|
||||||
// size: "100%",
|
|
||||||
// direction: Vertical,
|
|
||||||
// panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Directories))],
|
|
||||||
// )
|
|
||||||
// ),
|
// ),
|
||||||
(
|
(
|
||||||
name: "Search (6)",
|
name: "Search (6)",
|
||||||
pane: Split(
|
pane: Pane(Search),
|
||||||
size: "100%",
|
|
||||||
direction: Vertical,
|
|
||||||
panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Search))],
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
// (
|
// (
|
||||||
// name: "Visualizer (8)",
|
// name: "Visualizer (8)",
|
||||||
// pane: Split(
|
// pane: Pane(Cava),
|
||||||
// size: "100%",
|
|
||||||
// direction: Vertical,
|
|
||||||
// panes: [(size: "100%", borders: "ALL", border_symbols: Rounded, pane: Pane(Cava))],
|
|
||||||
// )
|
|
||||||
// ),
|
// ),
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -331,6 +287,8 @@ in {
|
|||||||
#![enable(unwrap_variant_newtypes)]
|
#![enable(unwrap_variant_newtypes)]
|
||||||
(
|
(
|
||||||
default_album_art_path: None,
|
default_album_art_path: None,
|
||||||
|
show_song_table_header: true,
|
||||||
|
draw_borders: true,
|
||||||
format_tag_separator: " | ",
|
format_tag_separator: " | ",
|
||||||
browser_column_widths: [20, 38, 42],
|
browser_column_widths: [20, 38, 42],
|
||||||
modal_backdrop: false,
|
modal_backdrop: false,
|
||||||
@ -437,8 +395,6 @@ in {
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
pane: Pane(Tabs),
|
pane: Pane(Tabs),
|
||||||
borders: "ALL",
|
|
||||||
border_symbols: Rounded,
|
|
||||||
size: "3",
|
size: "3",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
|
|||||||
@ -35,72 +35,168 @@ in {
|
|||||||
sidebar-mode = false;
|
sidebar-mode = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#basic-layout-structure
|
||||||
|
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#base-widgets
|
||||||
theme = let
|
theme = let
|
||||||
mkLiteral = config.lib.formats.rasi.mkLiteral;
|
inherit (config.lib.formats.rasi) mkLiteral;
|
||||||
in
|
|
||||||
import ./theme.nix {inherit color mkLiteral;};
|
trans = "rgba(0, 0, 0, 0)";
|
||||||
|
in {
|
||||||
|
"element-text,element-icon,mode-switcher" = {
|
||||||
|
background-color = mkLiteral "inherit";
|
||||||
|
text-color = mkLiteral "inherit";
|
||||||
};
|
};
|
||||||
|
|
||||||
# homemodules.hyprland.keybindings = let
|
"window" = {
|
||||||
# vpn-menu =
|
height = mkLiteral "50%";
|
||||||
# pkgs.writeScriptBin
|
width = mkLiteral "33%";
|
||||||
# "rofi-menu-vpn"
|
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||||
# (builtins.readFile ./menus/vpn.fish);
|
border-radius = 6;
|
||||||
#
|
border-color = mkLiteral color.hexS.accent;
|
||||||
# keybinds-menu =
|
|
||||||
# pkgs.writeScriptBin
|
# This is not opacity but translucency
|
||||||
# "rofi-menu-keybinds"
|
background-color = mkLiteral "rgba(${color.rgbS.base}, 0.25)";
|
||||||
# (builtins.readFile ./menus/keybinds.fish);
|
};
|
||||||
#
|
|
||||||
# lectures-menu =
|
"mainbox" = {
|
||||||
# pkgs.writeScriptBin
|
background-color = mkLiteral trans;
|
||||||
# "rofi-menu-lectures"
|
};
|
||||||
# (builtins.readFile ./menus/lectures.fish);
|
|
||||||
#
|
# TOP INPUT BAR START
|
||||||
# power-menu =
|
|
||||||
# mylib.rofi.mkSimpleMenu
|
"inputbar" = {
|
||||||
# "power"
|
children = builtins.map mkLiteral ["prompt" "entry"];
|
||||||
# {
|
background-color = mkLiteral trans;
|
||||||
# " Poweroff" = "poweroff";
|
};
|
||||||
# " Reboot" = "reboot";
|
|
||||||
# " Lock" = "loginctl lock-session";
|
"prompt" = {
|
||||||
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
background-color = mkLiteral color.hexS.accentHl;
|
||||||
# " Reload Hyprland" = "hyprctl reload";
|
padding = 6;
|
||||||
# " Exit Hyprland" = "hyprctl dispatch exit";
|
text-color = mkLiteral color.hexS.accentText;
|
||||||
# };
|
border-radius = 3;
|
||||||
#
|
margin = mkLiteral "10px 0px 0px 10px";
|
||||||
# wallpaper-menu = let
|
};
|
||||||
# setWallpaperOnMonitor = name: monitor:
|
|
||||||
# "hyprctl hyprpaper wallpaper "
|
"entry" = {
|
||||||
# + "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg";
|
padding = 6;
|
||||||
#
|
margin = mkLiteral "10px 10px 0px 5px";
|
||||||
# setWallpaperOnMonitors = monitors: name: {
|
text-color = mkLiteral color.hexS.text;
|
||||||
# ${name} =
|
background-color = mkLiteral trans;
|
||||||
# monitors
|
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||||
# |> builtins.map (setWallpaperOnMonitor name)
|
border-radius = 3;
|
||||||
# |> builtins.concatStringsSep " && ";
|
border-color = mkLiteral color.hexS.accentHl;
|
||||||
# };
|
};
|
||||||
#
|
|
||||||
# monitors = builtins.attrNames config.homemodules.hyprland.monitors;
|
# MESSAGEBOX (usually not visible)
|
||||||
# in
|
|
||||||
# mylib.rofi.mkSimpleMenu
|
"message" = {
|
||||||
# "wall"
|
background-color = mkLiteral trans;
|
||||||
# (color.wallpapers
|
};
|
||||||
# |> builtins.map (setWallpaperOnMonitors monitors)
|
|
||||||
# |> lib.mergeAttrsList);
|
"error-message" = {
|
||||||
# in
|
background-color = mkLiteral trans;
|
||||||
# lib.mkIf (!config.homemodules.hyprland.caelestia.enable) {
|
margin = mkLiteral "0px 0px 10px 0px";
|
||||||
# bindings = lib.mergeAttrsList [
|
};
|
||||||
# {
|
|
||||||
# "$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
|
"textbox" = {
|
||||||
# "$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""];
|
background-color = mkLiteral trans;
|
||||||
# "$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""];
|
padding = 6;
|
||||||
# # "$mainMod, o" = ["exec, \"${lectures-menu}\""];
|
margin = mkLiteral "10px 10px 0px 10px";
|
||||||
# }
|
border-radius = 3;
|
||||||
# (lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) {
|
};
|
||||||
# "$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
|
|
||||||
# })
|
# LISTVIEW
|
||||||
# ];
|
|
||||||
# };
|
"listview" = {
|
||||||
|
# border = mkLiteral "0px 0px 0px";
|
||||||
|
padding = 0;
|
||||||
|
margin = mkLiteral "5px 10px 10px 10px";
|
||||||
|
columns = 1;
|
||||||
|
background-color = mkLiteral trans;
|
||||||
|
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||||
|
border-radius = 3;
|
||||||
|
border-color = mkLiteral color.hexS.accentDim;
|
||||||
|
};
|
||||||
|
|
||||||
|
"element" = {
|
||||||
|
padding = 5;
|
||||||
|
margin = 0;
|
||||||
|
background-color = mkLiteral trans;
|
||||||
|
text-color = mkLiteral color.hexS.text;
|
||||||
|
# border-radius = 3;
|
||||||
|
};
|
||||||
|
|
||||||
|
"element-icon" = {
|
||||||
|
size = 25;
|
||||||
|
};
|
||||||
|
|
||||||
|
"element selected" = {
|
||||||
|
background-color = mkLiteral color.hexS.accentDim;
|
||||||
|
text-color = mkLiteral color.hexS.accentText;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
homemodules.hyprland.keybindings = let
|
||||||
|
vpn-menu =
|
||||||
|
pkgs.writeScriptBin
|
||||||
|
"rofi-menu-vpn"
|
||||||
|
(builtins.readFile ./menus/vpn.fish);
|
||||||
|
|
||||||
|
keybinds-menu =
|
||||||
|
pkgs.writeScriptBin
|
||||||
|
"rofi-menu-keybinds"
|
||||||
|
(builtins.readFile ./menus/keybinds.fish);
|
||||||
|
|
||||||
|
lectures-menu =
|
||||||
|
pkgs.writeScriptBin
|
||||||
|
"rofi-menu-lectures"
|
||||||
|
(builtins.readFile ./menus/lectures.fish);
|
||||||
|
|
||||||
|
power-menu =
|
||||||
|
mylib.rofi.mkSimpleMenu
|
||||||
|
"power"
|
||||||
|
{
|
||||||
|
" Poweroff" = "poweroff";
|
||||||
|
" Reboot" = "reboot";
|
||||||
|
" Lock" = "loginctl lock-session";
|
||||||
|
" Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
||||||
|
" Reload Hyprland" = "hyprctl reload";
|
||||||
|
" Exit Hyprland" = "hyprctl dispatch exit";
|
||||||
|
};
|
||||||
|
|
||||||
|
wallpaper-menu = let
|
||||||
|
setWallpaperOnMonitor = name: monitor:
|
||||||
|
"hyprctl hyprpaper wallpaper "
|
||||||
|
+ "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg";
|
||||||
|
|
||||||
|
setWallpaperOnMonitors = monitors: name: {
|
||||||
|
${name} =
|
||||||
|
monitors
|
||||||
|
|> builtins.map (setWallpaperOnMonitor name)
|
||||||
|
|> builtins.concatStringsSep " && ";
|
||||||
|
};
|
||||||
|
|
||||||
|
monitors = builtins.attrNames config.homemodules.hyprland.monitors;
|
||||||
|
in
|
||||||
|
mylib.rofi.mkSimpleMenu
|
||||||
|
"wall"
|
||||||
|
(color.wallpapers
|
||||||
|
|> builtins.map (setWallpaperOnMonitors monitors)
|
||||||
|
|> lib.mergeAttrsList);
|
||||||
|
in
|
||||||
|
lib.mkIf (!config.homemodules.hyprland.caelestia.enable) {
|
||||||
|
bindings = lib.mergeAttrsList [
|
||||||
|
{
|
||||||
|
"$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
|
||||||
|
"$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""];
|
||||||
|
"$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""];
|
||||||
|
# "$mainMod, o" = ["exec, \"${lectures-menu}\""];
|
||||||
|
}
|
||||||
|
(lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) {
|
||||||
|
"$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
spacing = 0;
|
||||||
margin = "10px 10px 0px 10px";
|
margin = "10px 10px 0px 10px";
|
||||||
fixed-center = true;
|
fixed-center = true;
|
||||||
output = waybar.monitors;
|
output = ["${waybar.monitor}"];
|
||||||
|
|
||||||
modules-left = ["custom/launcher" "niri/workspaces" "niri/window"]; # "user"
|
modules-left = ["custom/launcher" "user" "hyprland/window"];
|
||||||
modules-center = ["mpris"]; # "systemd-failed-units"
|
modules-center = ["hyprland/workspaces"];
|
||||||
modules-right = ["privacy" "pulseaudio" "network" "disk" "cpu" "memory" "clock" "tray"];
|
modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "clock" "tray"];
|
||||||
|
|
||||||
"custom/launcher" = {
|
"custom/launcher" = {
|
||||||
format = "<span></span>";
|
format = "<span></span>";
|
||||||
interval = "once";
|
interval = "once";
|
||||||
on-click = "walker -m desktopapplications";
|
on-click = "rofi -drun-show-actions -show drun";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd-failed-units = {
|
"hyprland/workspaces" = {
|
||||||
hide-on-ok = true;
|
|
||||||
format = " {nr_failed}";
|
|
||||||
format-ok = "✔️";
|
|
||||||
system = true;
|
|
||||||
user = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"niri/workspaces" = {
|
|
||||||
all-outputs = false;
|
all-outputs = false;
|
||||||
format = "{icon}";
|
format = "{name}";
|
||||||
format-icons = {
|
on-click = "activate";
|
||||||
default = "";
|
sort-by-coordinates = false;
|
||||||
focused = "";
|
sort-by-name = true;
|
||||||
active = "";
|
sort-by-number = false;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"niri/window" = {
|
"pulseaudio" = {
|
||||||
format = "{title}";
|
format = "<span></span> {volume}%";
|
||||||
separate-outputs = false;
|
format-muted = "<span></span> ";
|
||||||
icon = true;
|
on-click = "kitty ncpamixer -t o";
|
||||||
icon-size = 22;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mpris = {
|
"network" = {
|
||||||
format = "<span></span> {dynamic}";
|
format = "<span></span> {ipaddr}";
|
||||||
format-paused = "<span>{status_icon}</span> <i>{dynamic}</i>";
|
|
||||||
dynamic-order = ["artist" "title"];
|
|
||||||
status-icons = {
|
|
||||||
paused = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
privacy = {
|
|
||||||
icon-spacing = 4;
|
|
||||||
icon-size = 16;
|
|
||||||
transition-duration = 250;
|
|
||||||
modules = [
|
|
||||||
{
|
|
||||||
type = "screenshare";
|
|
||||||
tooltip = true;
|
|
||||||
tooltip-icon-size = 24;
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# type = "audio-out";
|
|
||||||
# tooltip = true;
|
|
||||||
# tooltip-icon-size = 24;
|
|
||||||
# }
|
|
||||||
{
|
|
||||||
type = "audio-in";
|
|
||||||
tooltip = true;
|
|
||||||
tooltip-icon-size = 24;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
ignore-monitor = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
pulseaudio = {
|
|
||||||
format = "<span></span> {volume}%";
|
|
||||||
format-muted = "<span></span> ";
|
|
||||||
on-click = "kitty --title=WireMix wiremix";
|
|
||||||
};
|
|
||||||
|
|
||||||
network = {
|
|
||||||
format = "<span></span> {ipaddr}";
|
|
||||||
format-disconnected = "<span></span> ";
|
format-disconnected = "<span></span> ";
|
||||||
interface = "enp8s0";
|
interface = "enp8s0";
|
||||||
tooltip = false;
|
tooltip-format = "{ifname} via {gwaddr}";
|
||||||
};
|
|
||||||
|
|
||||||
disk = {
|
|
||||||
interval = 5;
|
|
||||||
format = "<span></span> {percentage_used}%";
|
|
||||||
on-click = "kitty --hold --title=Duf duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu = {
|
cpu = {
|
||||||
interval = 1;
|
format = "<span></span> {load}%";
|
||||||
# states = {
|
|
||||||
# "critical" = 85;
|
|
||||||
# };
|
|
||||||
format = "<span></span> {load}%";
|
|
||||||
# format-critical = "<span color='#${color.hex.red}'><span></span> {load}%</span>";
|
|
||||||
on-click = "kitty --title=Btop btop";
|
|
||||||
tooltip = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
memory = {
|
memory = {
|
||||||
interval = 1;
|
format = "<span></span> {percentage}%";
|
||||||
# states = {
|
};
|
||||||
# "critical" = 85;
|
|
||||||
# };
|
temperature = {
|
||||||
format = "<span></span> {percentage}%";
|
format = "<span></span> {temperatureC}°C";
|
||||||
# format-critical = "<span color='#${color.hex.red}'><span></span> {percentage}%</span>";
|
thermal-zone = 3;
|
||||||
on-click = "kitty --title=Btop btop";
|
|
||||||
tooltip = true;
|
|
||||||
tooltip-format = "RAM: {used}GiB / {total}GiB\nSwap: {swapUsed}GiB / {swapTotal}GiB";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
clock = {
|
clock = {
|
||||||
format = "<span></span> {:%H:%M}";
|
format = "<span></span> {:%H:%M}";
|
||||||
timezone = "Europe/Berlin";
|
timezone = "Europe/Berlin";
|
||||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||||
calendar = {
|
|
||||||
mode = "month";
|
|
||||||
weeks-pos = "right";
|
|
||||||
mode-mon-col = 3;
|
|
||||||
on-scroll = -1;
|
|
||||||
format = {
|
|
||||||
months = "<span color='#${color.hex.peach}'><b>{}</b></span>";
|
|
||||||
days = "<span color='#${color.hex.flamingo}'><b>{}</b></span>";
|
|
||||||
weeks = "<span color='#${color.hex.teal}'><b>W{}</b></span>";
|
|
||||||
weekdays = "<span color='#${color.hex.lavender}'><b>{}</b></span>";
|
|
||||||
today = "<span color='#${color.hex.accent}'><b><u>{}</u></b></span>";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
actions = {
|
|
||||||
on-click-right = "mode";
|
|
||||||
on-scroll-up = "shift_up";
|
|
||||||
on-scroll-down = "shift_down";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
tray = {
|
tray = {
|
||||||
icon-size = 22;
|
icon-size = 20;
|
||||||
show-passive-items = true;
|
show-passive-items = true;
|
||||||
spacing = 5;
|
spacing = 5;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
style = let
|
style = ''
|
||||||
border-width = "2px";
|
|
||||||
border-radius = "10px";
|
|
||||||
in ''
|
|
||||||
/* Order is Top-Right-Bottom-Left for combined properties */
|
/* Order is Top-Right-Bottom-Left for combined properties */
|
||||||
* {
|
* {
|
||||||
|
color: #${color.hex.dark.base};
|
||||||
font-family: ${color.font};
|
font-family: ${color.font};
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: ${border-width};
|
border-width: 2px;
|
||||||
border-radius: ${border-radius};
|
border-radius: 6px;
|
||||||
border-color: #${color.hex.accent};
|
border-color: #${color.hex.dark.lavender};
|
||||||
background-color: rgba(${color.rgbS.mantle}, 1.0);
|
background-color: rgba(${color.rgbString.light.base}, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
color: #${color.hex.text};
|
|
||||||
font-weight: normal;
|
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: ${border-width};
|
border-width: 2px;
|
||||||
border-radius: ${border-radius};
|
border-radius: 6px;
|
||||||
border-color: #${color.hex.accent};
|
border-color: #${color.hex.dark.lavender};
|
||||||
background-color: rgba(${color.rgbS.mantle}, 1.0);
|
background-color: rgba(${color.rgbString.light.base}, 0.7);
|
||||||
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Background colors */
|
/* Background colors */
|
||||||
#custom-launcher {background-color: #${color.hex.accent};}
|
#custom-launcher {background-color: #${color.hex.dark.lavender};}
|
||||||
#workspaces button {background-color: #${color.hex.blue};}
|
#user {background-color: #${color.hex.dark.pink};}
|
||||||
#workspaces button.empty {background-color: #${color.hex.lavender};}
|
#window {background-color: #${color.hex.dark.mauve};}
|
||||||
#workspaces button.active {background-color: #${color.hex.green};}
|
#workspaces button {background-color: #${color.hex.dark.lavender};}
|
||||||
#workspaces button.urgent {background-color: #${color.hex.red};}
|
#workspaces button.active {background-color: #${color.hex.dark.pink};}
|
||||||
#window {background-color: #${color.hex.maroon};}
|
#pulseaudio {background-color: #${color.hex.dark.maroon};}
|
||||||
|
#network {background-color: #${color.hex.dark.peach};}
|
||||||
#mpris {background-color: #${color.hex.accent};}
|
#cpu {background-color: #${color.hex.dark.yellow};}
|
||||||
|
#memory {background-color: #${color.hex.dark.green};}
|
||||||
#privacy {background-color: #${color.hex.red};}
|
#temperature {background-color: #${color.hex.dark.teal};}
|
||||||
#pulseaudio {background-color: #${color.hex.maroon};}
|
#clock {background-color: #${color.hex.dark.sky};}
|
||||||
#network {background-color: #${color.hex.peach};}
|
#tray {background-color: #${color.hex.dark.lavender};}
|
||||||
#disk {background-color: #${color.hex.yellow};}
|
|
||||||
#cpu {background-color: #${color.hex.green};}
|
|
||||||
#memory {background-color: #${color.hex.teal};}
|
|
||||||
#clock {background-color: #${color.hex.sky};}
|
|
||||||
#tray {background-color: #${color.hex.accent};}
|
|
||||||
|
|
||||||
/* Square Widgets */
|
/* Square Widgets */
|
||||||
#custom-launcher,
|
#custom-launcher,
|
||||||
#mpris,
|
#workspaces button,
|
||||||
#tray {
|
#tray {
|
||||||
color: #${color.hex.mantle};
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0px 10px 0px 10px;
|
padding: 0px 10px 0px 10px;
|
||||||
border-radius: ${border-radius};
|
border-radius: 6px;
|
||||||
}
|
|
||||||
|
|
||||||
/* Workspaces */
|
|
||||||
#workspaces button {
|
|
||||||
color: #${color.hex.mantle};
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0px 2px 0px 2px;
|
|
||||||
margin: 8px 2px 8px 2px;
|
|
||||||
border-radius: ${border-radius};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Rectangle Widgets */
|
/* Rectangle Widgets */
|
||||||
#user,
|
#user,
|
||||||
#window,
|
#window,
|
||||||
#pulseaudio,
|
#pulseaudio,
|
||||||
#privacy,
|
|
||||||
#network,
|
#network,
|
||||||
#disk,
|
|
||||||
#cpu,
|
#cpu,
|
||||||
#memory,
|
#memory,
|
||||||
|
#temperature,
|
||||||
#clock {
|
#clock {
|
||||||
color: #${color.hex.mantle};
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0px 10px 0px 10px;
|
padding: 0px 10px 0px 10px;
|
||||||
margin: 8px 5px 8px 5px;
|
margin: 8px 5px 8px 5px;
|
||||||
border-radius: ${border-radius};
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make window module transparent when no windows present */
|
/* Make window module transparent when no windows present */
|
||||||
@ -257,10 +153,14 @@ in {
|
|||||||
/* Tux Icon */
|
/* Tux Icon */
|
||||||
#custom-launcher {
|
#custom-launcher {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
padding-right: 13px;
|
padding-right: 10px;
|
||||||
margin: 0px 5px 0px 0px;
|
margin: 0px 5px 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
margin: 0px 5px 0px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
#tray {
|
#tray {
|
||||||
margin: 0px 0px 0px 5px;
|
margin: 0px 0px 0px 5px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,9 +7,9 @@ with lib;
|
|||||||
with mylib.modules; {
|
with mylib.modules; {
|
||||||
enable = mkEnableOption "Waybar";
|
enable = mkEnableOption "Waybar";
|
||||||
|
|
||||||
monitors = mkOption {
|
monitor = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.str;
|
||||||
example = ''["HDMI-A-1", "DP-1"]'';
|
example = "HDMI-A-1";
|
||||||
description = "What monitor to display the Waybar on";
|
description = "What monitor to display the Waybar on";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,19 +17,7 @@ in {
|
|||||||
shellWrapperName = "y";
|
shellWrapperName = "y";
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
inherit
|
inherit (pkgs.yaziPlugins) chmod diff full-border git lazygit mount ouch rsync starship sudo; # smart-paste
|
||||||
(pkgs.yaziPlugins)
|
|
||||||
chmod
|
|
||||||
diff
|
|
||||||
full-border
|
|
||||||
git
|
|
||||||
lazygit
|
|
||||||
mount
|
|
||||||
ouch
|
|
||||||
rsync
|
|
||||||
starship
|
|
||||||
sudo
|
|
||||||
; # smart-paste
|
|
||||||
};
|
};
|
||||||
|
|
||||||
initLua = ''
|
initLua = ''
|
||||||
@ -82,12 +70,7 @@ in {
|
|||||||
{
|
{
|
||||||
run = ''mpv "$@"'';
|
run = ''mpv "$@"'';
|
||||||
orphan = true;
|
orphan = true;
|
||||||
desc = "Play selection with mpv";
|
desc = "Play selection";
|
||||||
}
|
|
||||||
{
|
|
||||||
run = ''vlc "$@"'';
|
|
||||||
orphan = true;
|
|
||||||
desc = "Play selection with vlc";
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
edit = [
|
edit = [
|
||||||
@ -100,16 +83,7 @@ in {
|
|||||||
open = [
|
open = [
|
||||||
{
|
{
|
||||||
run = ''xdg-open "$@"'';
|
run = ''xdg-open "$@"'';
|
||||||
desc = "Open selection with xdg-open";
|
desc = "Open selection";
|
||||||
}
|
|
||||||
{
|
|
||||||
run = ''imv "$@"'';
|
|
||||||
desc = "Open selection with imv";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
# TODO: For some reason, junction does not exit after choosing an application...
|
|
||||||
run = ''junction "$@"'';
|
|
||||||
desc = "Open selection with junction";
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
extract = [
|
extract = [
|
||||||
@ -127,13 +101,13 @@ in {
|
|||||||
|
|
||||||
plugin.prepend_fetchers = [
|
plugin.prepend_fetchers = [
|
||||||
{
|
{
|
||||||
group = "git";
|
id = "git";
|
||||||
url = "*";
|
name = "*";
|
||||||
run = "git";
|
run = "git";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
group = "git";
|
id = "git";
|
||||||
url = "*/";
|
name = "*/";
|
||||||
run = "git";
|
run = "git";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -183,66 +157,42 @@ in {
|
|||||||
|
|
||||||
mgr.prepend_keymap = [
|
mgr.prepend_keymap = [
|
||||||
{
|
{
|
||||||
on = [
|
on = ["<C-p>" "m"];
|
||||||
"<C-p>"
|
|
||||||
"m"
|
|
||||||
];
|
|
||||||
run = "plugin mount";
|
run = "plugin mount";
|
||||||
desc = "Manage device mounts";
|
desc = "Manage device mounts";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
on = [
|
on = ["<C-p>" "c"];
|
||||||
"<C-p>"
|
|
||||||
"c"
|
|
||||||
];
|
|
||||||
run = "plugin chmod";
|
run = "plugin chmod";
|
||||||
desc = "Chmod selection";
|
desc = "Chmod selection";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
on = [
|
on = ["<C-p>" "g"];
|
||||||
"<C-p>"
|
|
||||||
"g"
|
|
||||||
];
|
|
||||||
run = "plugin lazygit";
|
run = "plugin lazygit";
|
||||||
desc = "Run LazyGit";
|
desc = "Run LazyGit";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
on = [
|
on = ["<C-p>" "a"];
|
||||||
"<C-p>"
|
|
||||||
"a"
|
|
||||||
];
|
|
||||||
run = "plugin ouch";
|
run = "plugin ouch";
|
||||||
desc = "Add selection to archive";
|
desc = "Add selection to archive";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
on = [
|
on = ["<C-p>" "d"];
|
||||||
"<C-p>"
|
|
||||||
"d"
|
|
||||||
];
|
|
||||||
run = ''shell -- ripdrag -a -n "$@"'';
|
run = ''shell -- ripdrag -a -n "$@"'';
|
||||||
desc = "Drag & drop selection";
|
desc = "Drag & drop selection";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
on = [
|
on = ["<C-p>" "D"];
|
||||||
"<C-p>"
|
|
||||||
"D"
|
|
||||||
];
|
|
||||||
run = "plugin diff";
|
run = "plugin diff";
|
||||||
desc = "Diff the selected with the hovered file";
|
desc = "Diff the selected with the hovered file";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
on = [
|
on = ["<C-p>" "r"];
|
||||||
"<C-p>"
|
|
||||||
"r"
|
|
||||||
];
|
|
||||||
run = "plugin rsync";
|
run = "plugin rsync";
|
||||||
desc = "Copy files using rsync";
|
desc = "Copy files using rsync";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
on = [
|
on = ["<C-p>" "w"];
|
||||||
"<C-p>"
|
|
||||||
"w"
|
|
||||||
];
|
|
||||||
run = ''wl-copy < "$0"'';
|
run = ''wl-copy < "$0"'';
|
||||||
desc = "Copy hovered file contents using wl-copy";
|
desc = "Copy hovered file contents using wl-copy";
|
||||||
}
|
}
|
||||||
@ -254,10 +204,7 @@ in {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
on = "y";
|
on = "y";
|
||||||
run = [
|
run = [''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list'' "yank"];
|
||||||
''shell -- for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list''
|
|
||||||
"yank"
|
|
||||||
];
|
|
||||||
desc = "Copy files to system clipboard on yank";
|
desc = "Copy files to system clipboard on yank";
|
||||||
}
|
}
|
||||||
# {
|
# {
|
||||||
@ -276,9 +223,7 @@ in {
|
|||||||
# https://github.com/catppuccin/yazi/blob/main/themes/mocha/catppuccin-mocha-lavender.toml
|
# https://github.com/catppuccin/yazi/blob/main/themes/mocha/catppuccin-mocha-lavender.toml
|
||||||
theme = {
|
theme = {
|
||||||
mgr = {
|
mgr = {
|
||||||
cwd = {
|
cwd = {fg = color.hexS.teal;};
|
||||||
fg = color.hexS.teal;
|
|
||||||
};
|
|
||||||
|
|
||||||
hovered = {
|
hovered = {
|
||||||
fg = color.hexS.accentText;
|
fg = color.hexS.accentText;
|
||||||
@ -335,9 +280,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
border_symbol = "│";
|
border_symbol = "│";
|
||||||
border_style = {
|
border_style = {fg = color.hexS.overlay0;};
|
||||||
fg = color.hexS.overlay0;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
tabs = {
|
tabs = {
|
||||||
@ -406,104 +349,58 @@ in {
|
|||||||
bg = color.hexS.surface0;
|
bg = color.hexS.surface0;
|
||||||
};
|
};
|
||||||
|
|
||||||
perm_type = {
|
perm_type = {fg = color.hexS.blue;};
|
||||||
fg = color.hexS.blue;
|
perm_read = {fg = color.hexS.yellow;};
|
||||||
};
|
perm_write = {fg = color.hexS.red;};
|
||||||
perm_read = {
|
perm_exec = {fg = color.hexS.green;};
|
||||||
fg = color.hexS.yellow;
|
perm_sep = {fg = color.hexS.overlay0;};
|
||||||
};
|
|
||||||
perm_write = {
|
|
||||||
fg = color.hexS.red;
|
|
||||||
};
|
|
||||||
perm_exec = {
|
|
||||||
fg = color.hexS.green;
|
|
||||||
};
|
|
||||||
perm_sep = {
|
|
||||||
fg = color.hexS.overlay0;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
border = {
|
border = {fg = color.hexS.accentDim;};
|
||||||
fg = color.hexS.accentDim;
|
|
||||||
};
|
|
||||||
title = {};
|
title = {};
|
||||||
value = {};
|
value = {};
|
||||||
selected = {
|
selected = {reversed = true;};
|
||||||
reversed = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pick = {
|
pick = {
|
||||||
border = {
|
border = {fg = color.hexS.accentDim;};
|
||||||
fg = color.hexS.accentDim;
|
active = {fg = color.hexS.accentHl;};
|
||||||
};
|
|
||||||
active = {
|
|
||||||
fg = color.hexS.accentHl;
|
|
||||||
};
|
|
||||||
inactive = {};
|
inactive = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
confirm = {
|
confirm = {
|
||||||
border = {
|
border = {fg = color.hexS.accentDim;};
|
||||||
fg = color.hexS.accentDim;
|
title = {fg = color.hexS.accentDim;};
|
||||||
};
|
|
||||||
title = {
|
|
||||||
fg = color.hexS.accentDim;
|
|
||||||
};
|
|
||||||
content = {};
|
content = {};
|
||||||
list = {};
|
list = {};
|
||||||
btn_yes = {
|
btn_yes = {reversed = true;};
|
||||||
reversed = true;
|
|
||||||
};
|
|
||||||
btn_no = {};
|
btn_no = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
cmp = {
|
cmp = {
|
||||||
border = {
|
border = {fg = color.hexS.accentDim;};
|
||||||
fg = color.hexS.accentDim;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
tasks = {
|
tasks = {
|
||||||
border = {
|
border = {fg = color.hexS.accentDim;};
|
||||||
fg = color.hexS.accentDim;
|
|
||||||
};
|
|
||||||
title = {};
|
title = {};
|
||||||
hovered = {
|
hovered = {underline = true;};
|
||||||
underline = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
which = {
|
which = {
|
||||||
cand = {
|
cand = {fg = color.hexS.accent;};
|
||||||
fg = color.hexS.accent;
|
desc = {fg = color.hexS.accentHl;};
|
||||||
};
|
mask = {bg = color.hexS.surface0;};
|
||||||
desc = {
|
rest = {fg = color.hexS.surface0;};
|
||||||
fg = color.hexS.accentHl;
|
|
||||||
};
|
|
||||||
mask = {
|
|
||||||
bg = color.hexS.surface0;
|
|
||||||
};
|
|
||||||
rest = {
|
|
||||||
fg = color.hexS.surface0;
|
|
||||||
};
|
|
||||||
separator = " ";
|
separator = " ";
|
||||||
separator_style = {
|
separator_style = {fg = color.hexS.text;};
|
||||||
fg = color.hexS.text;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
help = {
|
help = {
|
||||||
on = {
|
on = {fg = color.hexS.accent;};
|
||||||
fg = color.hexS.accent;
|
run = {fg = color.hexS.accentHl;};
|
||||||
};
|
desc = {fg = color.hexS.text;};
|
||||||
run = {
|
|
||||||
fg = color.hexS.accentHl;
|
|
||||||
};
|
|
||||||
desc = {
|
|
||||||
fg = color.hexS.text;
|
|
||||||
};
|
|
||||||
hovered = {
|
hovered = {
|
||||||
fg = color.hexS.accentText; # TODO: This is not applied
|
fg = color.hexS.accentText; # TODO: This is not applied
|
||||||
|
|
||||||
@ -518,31 +415,19 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
notify = {
|
notify = {
|
||||||
title_info = {
|
title_info = {fg = color.hexS.teal;};
|
||||||
fg = color.hexS.teal;
|
title_warn = {fg = color.hexS.yellow;};
|
||||||
};
|
title_error = {fg = color.hexS.red;};
|
||||||
title_warn = {
|
|
||||||
fg = color.hexS.yellow;
|
|
||||||
};
|
|
||||||
title_error = {
|
|
||||||
fg = color.hexS.red;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
spot = {
|
spot = {
|
||||||
border = {
|
border = {fg = color.hexS.lavender;};
|
||||||
fg = color.hexS.lavender;
|
title = {fg = color.hexS.lavender;};
|
||||||
};
|
|
||||||
title = {
|
|
||||||
fg = color.hexS.lavender;
|
|
||||||
};
|
|
||||||
tbl_cell = {
|
tbl_cell = {
|
||||||
fg = color.hexS.lavender;
|
fg = color.hexS.lavender;
|
||||||
reversed = true;
|
reversed = true;
|
||||||
};
|
};
|
||||||
tbl_col = {
|
tbl_col = {bold = true;};
|
||||||
bold = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Default rules good enough
|
# Default rules good enough
|
||||||
|
|||||||
@ -18,7 +18,6 @@ in [
|
|||||||
(mkIcon "Public" "")
|
(mkIcon "Public" "")
|
||||||
(mkIcon "Restic" "")
|
(mkIcon "Restic" "")
|
||||||
(mkIcon "Shows" "")
|
(mkIcon "Shows" "")
|
||||||
(mkIcon "SSD" "")
|
|
||||||
(mkIcon "Unity" "")
|
(mkIcon "Unity" "")
|
||||||
(mkIcon "Videos" "")
|
(mkIcon "Videos" "")
|
||||||
]
|
]
|
||||||
|
|||||||
@ -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;};
|
rofi = import ./rofi.nix {inherit inputs pkgs lib;};
|
||||||
generators = import ./generators.nix {inherit inputs pkgs lib;};
|
generators = import ./generators.nix {inherit inputs pkgs lib;};
|
||||||
color = import ./color.nix {inherit inputs pkgs lib;};
|
color = import ./color.nix {inherit inputs pkgs lib;};
|
||||||
containers = import ./containers.nix {inherit inputs pkgs lib;};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,8 +43,6 @@
|
|||||||
routers,
|
routers,
|
||||||
nameservers,
|
nameservers,
|
||||||
routable,
|
routable,
|
||||||
# Extra addresses declared without creating routes (e.g. IPv6 ULA).
|
|
||||||
extraAddresses ? [],
|
|
||||||
}: {
|
}: {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -58,8 +56,7 @@
|
|||||||
address = ips;
|
address = ips;
|
||||||
gateway = routers;
|
gateway = routers;
|
||||||
dns = nameservers;
|
dns = nameservers;
|
||||||
routes = builtins.map (r: {Gateway = r;}) routers;
|
routes = builtins.map (r: {Gateway = r;}) routers; # TODO: We need to add a way to specify addresses without routes (IPv6 ULA)
|
||||||
addresses = builtins.map (a: {Address = a;}) extraAddresses;
|
|
||||||
|
|
||||||
# See man systemd.network
|
# See man systemd.network
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
|
|||||||
111
lib/nixos.nix
111
lib/nixos.nix
@ -4,50 +4,6 @@
|
|||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# Common nix daemon settings shared between NixOS and nix-darwin.
|
|
||||||
# Darwin additionally needs nix.enable = true.
|
|
||||||
mkCommonNixSettings = username: {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.nixVersions.stable;
|
|
||||||
|
|
||||||
extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes pipe-operators
|
|
||||||
'';
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
trusted-users = ["root" username];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
|
|
||||||
download-buffer-size = 524288000; # 500MB
|
|
||||||
|
|
||||||
substituters = [
|
|
||||||
"https://cache.nixos.org"
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
# "https://app.cachix.org/cache/nixos-rocm"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
# "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
gc = {
|
|
||||||
automatic = false;
|
|
||||||
options = "--delete-older-than 5d";
|
|
||||||
};
|
|
||||||
|
|
||||||
optimise = {
|
|
||||||
automatic = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
|
|
||||||
nixPath = [
|
|
||||||
"nixpkgs=${inputs.nixpkgs.outPath}"
|
|
||||||
"home-manager=${inputs.home-manager.outPath}"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
mkNixosConfigWithHomeManagerModule = {
|
mkNixosConfigWithHomeManagerModule = {
|
||||||
system,
|
system,
|
||||||
mylib,
|
mylib,
|
||||||
@ -73,6 +29,7 @@
|
|||||||
|
|
||||||
# Import the toplevel system configuration module.
|
# Import the toplevel system configuration module.
|
||||||
../system
|
../system
|
||||||
|
../system/cachix.nix
|
||||||
|
|
||||||
# Host specific configuration
|
# Host specific configuration
|
||||||
../system/${hostname}
|
../system/${hostname}
|
||||||
@ -123,72 +80,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkDarwinConfigWithHomeManagerModule = {
|
|
||||||
system,
|
|
||||||
mylib,
|
|
||||||
hostname,
|
|
||||||
username,
|
|
||||||
publicKeys,
|
|
||||||
extraModules ? [],
|
|
||||||
headless ? false,
|
|
||||||
}:
|
|
||||||
inputs.nix-darwin.lib.darwinSystem {
|
|
||||||
inherit system;
|
|
||||||
|
|
||||||
# Values in "specialArgs" are propagated to all system modules.
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs system hostname mylib username publicKeys headless;
|
|
||||||
};
|
|
||||||
|
|
||||||
modules = builtins.concatLists [
|
|
||||||
[
|
|
||||||
# Replace the default "pkgs" with my configured version
|
|
||||||
# to allow installation of unfree software and my own overlays.
|
|
||||||
{nixpkgs.pkgs = pkgs;}
|
|
||||||
|
|
||||||
# Host specific configuration
|
|
||||||
../system/${hostname}
|
|
||||||
|
|
||||||
# Import all of my custom system modules
|
|
||||||
../system/systemmodules/darwin.nix
|
|
||||||
]
|
|
||||||
|
|
||||||
extraModules
|
|
||||||
|
|
||||||
# HM is installed as a system module when using mkNixosConfigWithHomeManagerModule.
|
|
||||||
[
|
|
||||||
inputs.home-manager.darwinModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager = {
|
|
||||||
# Values in "extraSpecialArgs" are propagated to all HM modules.
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs system hostname mylib username publicKeys headless;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Use the "pkgs" from the system configuration.
|
|
||||||
# This disables "nixpkgs.*" options in HM modules.
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
|
|
||||||
# Packages in "users.${username}.packages" will be installed
|
|
||||||
# to /etc/profiles instead of ~/.nix-profile.
|
|
||||||
useUserPackages = true;
|
|
||||||
|
|
||||||
users.${username}.imports = [
|
|
||||||
# Host specific configuration
|
|
||||||
../home/${username}/${hostname}
|
|
||||||
];
|
|
||||||
|
|
||||||
sharedModules = [
|
|
||||||
# Import all of my custom HM modules.
|
|
||||||
# Putting them into sharedModules enables correct nixd completions.
|
|
||||||
../home/homemodules/darwin.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
]
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
mkNixosSystemConfig = {
|
mkNixosSystemConfig = {
|
||||||
system,
|
system,
|
||||||
mylib,
|
mylib,
|
||||||
|
|||||||
207
lib/rofi.nix
207
lib/rofi.nix
@ -3,164 +3,75 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: rec {
|
||||||
# Receives attrs like:
|
# Receives attrs like:
|
||||||
# {
|
# {
|
||||||
# "Poweroff" = "poweroff";
|
# "Poweroff" = "poweroff";
|
||||||
# "Reload Hyprland" = "hyprctl reload";
|
# "Reload Hyprland" = "hyprctl reload";
|
||||||
# }
|
# }
|
||||||
# mkSimpleMenu = let
|
mkSimpleMenu = let
|
||||||
# # Makes a string like ''"Poweroff" "Reload Hyprland"''
|
# Makes a string like ''"Poweroff" "Reload Hyprland"''
|
||||||
# unpack-options = attrs: "\"${lib.concatStringsSep "\" \"" (builtins.attrNames attrs)}\"";
|
unpack-options = attrs: "\"${lib.concatStringsSep "\" \"" (builtins.attrNames attrs)}\"";
|
||||||
#
|
|
||||||
# mkCase = option: action: "else if test \"${option}\" = $OPTION\n set ACTION \"${action}\"";
|
|
||||||
#
|
|
||||||
# cases = attrs:
|
|
||||||
# attrs
|
|
||||||
# |> builtins.mapAttrs mkCase
|
|
||||||
# |> builtins.attrValues
|
|
||||||
# |> builtins.concatStringsSep "\n";
|
|
||||||
# in
|
|
||||||
# {
|
|
||||||
# prompt,
|
|
||||||
# attrs,
|
|
||||||
# command ? ''rofi -dmenu -i'',
|
|
||||||
# }:
|
|
||||||
# pkgs.writeScriptBin "rofi-menu-${prompt}" ''
|
|
||||||
# #! ${pkgs.fish}/bin/fish
|
|
||||||
#
|
|
||||||
# # OPTIONS contains all possible values Rofi will display
|
|
||||||
# set OPTIONS ${unpack-options attrs}
|
|
||||||
#
|
|
||||||
# # We choose a single OPTION using Rofi
|
|
||||||
# set OPTION (echo -e (string join "\n" $OPTIONS) | ${command} -p "${prompt}")
|
|
||||||
#
|
|
||||||
# # Check if the chosen OPTION is a valid choice from OPTIONS
|
|
||||||
# if not contains $OPTION $OPTIONS
|
|
||||||
# exit
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# # Set a command to execute based on the chosen OPTION
|
|
||||||
# if false
|
|
||||||
# exit # Easier to generate with this
|
|
||||||
# ${cases attrs}
|
|
||||||
# else
|
|
||||||
# exit
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
# # Execute the command
|
|
||||||
# eval $ACTION
|
|
||||||
# '';
|
|
||||||
|
|
||||||
# Rofi/Dmenu menu generator.
|
mkCase = option: action: "else if test \"${option}\" = $OPTION\n set ACTION \"${action}\"";
|
||||||
#
|
|
||||||
# Each element in `layers` is one of:
|
|
||||||
# - attrset { "Label" = "value"; } # static options: selected value → $OPTIONn
|
|
||||||
# - string "shell-cmd" # dynamic options from command: selected text → $OPTIONn
|
|
||||||
# # may reference $OPTION0, $OPTION1, ... from earlier layers
|
|
||||||
#
|
|
||||||
# The "command" is the last action, it can reference $OPTION0, $OPTION1, ...
|
|
||||||
# If no "command" is given and the last layer is a static attrset, its selected value is evaluated directly.
|
|
||||||
#
|
|
||||||
# The "prompts" list are optional per-layer prompt strings (falls back to "prompt" if not provided).
|
|
||||||
#
|
|
||||||
# vpn.fish equivalent:
|
|
||||||
# mkMenu {
|
|
||||||
# prompt = "vpn";
|
|
||||||
# layers = [
|
|
||||||
# "cat /etc/rofi-vpns"
|
|
||||||
# { "start" = "start"; "stop" = "stop"; "status" = "status"; }
|
|
||||||
# ];
|
|
||||||
# command = "systemctl $OPTION1 $OPTION0.service";
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# lectures.fish equivalent:
|
|
||||||
# mkMenu {
|
|
||||||
# prompt = "lecture";
|
|
||||||
# layers = [
|
|
||||||
# "eza -1 -D ~/Notes/TU"
|
|
||||||
# "eza -1 ~/Notes/TU/$OPTION0/Lecture | grep '.pdf'"
|
|
||||||
# ];
|
|
||||||
# command = "xdg-open ~/Notes/TU/$OPTION0/Lecture/$OPTION1";
|
|
||||||
# }
|
|
||||||
mkMenu = {
|
|
||||||
prompt,
|
|
||||||
layers,
|
|
||||||
prompts ? [],
|
|
||||||
command ? null,
|
|
||||||
rofiCmd ? "rofi -dmenu -i",
|
|
||||||
}: let
|
|
||||||
isStaticLayer = layer: builtins.isAttrs layer && !(layer ? options);
|
|
||||||
isDynamicLayer = layer: builtins.isString layer;
|
|
||||||
|
|
||||||
escStr = s: builtins.replaceStrings [''"'' "\\"] [''\"'' "\\\\"] s;
|
cases = attrs:
|
||||||
|
attrs
|
||||||
layerPrompt = i:
|
|> builtins.mapAttrs mkCase
|
||||||
if i < builtins.length prompts
|
|> builtins.attrValues
|
||||||
then lib.elemAt prompts i
|
|> builtins.concatStringsSep "\n";
|
||||||
else prompt;
|
|
||||||
|
|
||||||
# Static layer: attrset of label -> value
|
|
||||||
# Displays labels in rofi; maps selected label to its value -> $OPTIONi
|
|
||||||
mkStaticLayer = i: attrs: let
|
|
||||||
lp = layerPrompt i;
|
|
||||||
labels = builtins.attrNames attrs;
|
|
||||||
optsStr = "\"${lib.concatStringsSep "\" \"" (map escStr labels)}\"";
|
|
||||||
mkCase = label: value: "else if test \"${escStr label}\" = $_LABEL${toString i}\n set OPTION${toString i} \"${escStr value}\"";
|
|
||||||
casesStr =
|
|
||||||
builtins.concatStringsSep "\n"
|
|
||||||
(builtins.attrValues (builtins.mapAttrs mkCase attrs));
|
|
||||||
in {
|
|
||||||
script = ''
|
|
||||||
set _OPTS${toString i} ${optsStr}
|
|
||||||
set _LABEL${toString i} (echo -e (string join "\n" $_OPTS${toString i}) | ${rofiCmd} -p "${lp}")
|
|
||||||
if not contains $_LABEL${toString i} $_OPTS${toString i}
|
|
||||||
exit
|
|
||||||
end
|
|
||||||
if false
|
|
||||||
exit
|
|
||||||
${casesStr}
|
|
||||||
else
|
|
||||||
exit
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Dynamic layer: shell command string whose output is piped to rofi
|
|
||||||
# Selected text -> $OPTIONi; may reference earlier $OPTIONn variables
|
|
||||||
mkDynamicLayer = i: cmd: let
|
|
||||||
lp = layerPrompt i;
|
|
||||||
in {
|
|
||||||
script = ''
|
|
||||||
set OPTION${toString i} (${cmd} | ${rofiCmd} -p "${lp}")
|
|
||||||
if test -z $OPTION${toString i}
|
|
||||||
exit
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
mkLayer = i: layer:
|
|
||||||
if isStaticLayer layer
|
|
||||||
then mkStaticLayer i layer
|
|
||||||
else if isDynamicLayer layer
|
|
||||||
then mkDynamicLayer i layer
|
|
||||||
else throw "mkMenu: layer ${toString i} has invalid type";
|
|
||||||
|
|
||||||
layerResults = lib.imap0 mkLayer layers; # Map with 0-based index
|
|
||||||
layerScripts = map (r: r.script) layerResults;
|
|
||||||
lastLayer = lib.last layers;
|
|
||||||
|
|
||||||
finalCmd =
|
|
||||||
if command != null
|
|
||||||
then command
|
|
||||||
else if isStaticLayer lastLayer
|
|
||||||
then "$OPTION${toString (builtins.length layers - 1)}"
|
|
||||||
else throw "mkMenu: 'command' must be set when the last layer is not a static attrset";
|
|
||||||
in
|
in
|
||||||
|
prompt: attrs:
|
||||||
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
|
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
|
||||||
#! ${pkgs.fish}/bin/fish
|
#! ${pkgs.fish}/bin/fish
|
||||||
|
|
||||||
${lib.concatStringsSep "\n" layerScripts}
|
# OPTIONS contains all possible values Rofi will display
|
||||||
eval "${finalCmd}"
|
set OPTIONS ${unpack-options attrs}
|
||||||
|
|
||||||
|
# We choose a single OPTION using Rofi
|
||||||
|
set OPTION (echo -e (string join "\n" $OPTIONS) | rofi -dmenu -p " ${prompt} " -i)
|
||||||
|
|
||||||
|
# Check if the chosen OPTION is a valid choice from OPTIONS
|
||||||
|
if not contains $OPTION $OPTIONS
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
|
# Set a command to execute based on the chosen OPTION
|
||||||
|
if false
|
||||||
|
exit # Easier to generate with this
|
||||||
|
${cases attrs}
|
||||||
|
else
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
|
# Execute the command
|
||||||
|
eval $ACTION
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# TODO: I want to generate the containers menu using the actionsA and actionsB attrs:
|
||||||
|
# - actionsA will be generated from the stuff in oci-containers.containers
|
||||||
|
# - actionsB will be set statically for start, stop, status
|
||||||
|
|
||||||
|
# Receives attrs like:
|
||||||
|
# {
|
||||||
|
# optionA = "exa -1 -D ~/Notes/TU";
|
||||||
|
# optionB = "exa -1 -D ~/Notes/TU/$OPTIONA/Lecture | grep \".pdf\"";
|
||||||
|
# commandB = "xdg-open ~/Notes/TU/$OPTIONA/Lecture/$OPTIONB";
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# Keys:
|
||||||
|
# - optionA, optionB # Command that generates Rofi options:
|
||||||
|
# exa -1 -D ~/Notes/TU
|
||||||
|
# cat /etc/rofi-vpns
|
||||||
|
# - commandA, commandB # Action to execute after sth. was chosen (mutually excl. with command)
|
||||||
|
# - actionsA, actionsB # Configure actions by lookup (mutually excl. with command):
|
||||||
|
# actionsB = {"status" = "systemctl status..."}
|
||||||
|
# - colorA, colorB # Configure highlighting conditions:
|
||||||
|
# colorA = {"red" = "systemctl ... | grep ..."};
|
||||||
|
#
|
||||||
|
# Use $OPTIONA and $OPTIONB to use the options chosen by option<A/B>-command and rofi
|
||||||
|
# Use $EVALA and $EVALB to use the outputs generated by command<A/B>
|
||||||
|
mkMenu = let
|
||||||
|
in
|
||||||
|
prompt: attrs: "";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,37 +29,6 @@
|
|||||||
# Remove this after jetbrains.jdk builds again (nixpkgs issue 425328)
|
# Remove this after jetbrains.jdk builds again (nixpkgs issue 425328)
|
||||||
# jetbrains.rider = pkgs-stable.jetbrains.rider;
|
# jetbrains.rider = pkgs-stable.jetbrains.rider;
|
||||||
|
|
||||||
jetbrains =
|
|
||||||
prev.jetbrains
|
|
||||||
// {
|
|
||||||
clion = prev.jetbrains.clion.overrideAttrs (oldAttrs: rec {
|
|
||||||
version = "261.22158.47"; # March 6, 2026
|
|
||||||
|
|
||||||
src = prev.fetchurl {
|
|
||||||
url = "https://download-cdn.jetbrains.com/cpp/CLion-${version}.tar.gz";
|
|
||||||
|
|
||||||
# hash = "sha256-h6tnemVnV1YEsvIndwrq2sMsRZYuvTWMU5oqj/hkjdY="; # 261.21849.6
|
|
||||||
hash = "sha256-FUHNRioJvjwOWN+FkXEr3+NWR+QVxaZUOkJ0egQkcCQ="; # 261.22158.47
|
|
||||||
};
|
|
||||||
|
|
||||||
# autoPatchelfIgnoreMissingDeps = [
|
|
||||||
# "libcrypto.so.1.1"
|
|
||||||
# "libssl.so.1.1"
|
|
||||||
# ];
|
|
||||||
|
|
||||||
postFixup = ''
|
|
||||||
# Patch python3.12 shared libs that the upstream glob (python3.8) misses
|
|
||||||
find $out -path '*/python3.*/lib-dynload/*.so' -exec patchelf \
|
|
||||||
--replace-needed libssl.so.1.1 libssl.so \
|
|
||||||
--replace-needed libcrypto.so.1.1 libcrypto.so \
|
|
||||||
--replace-needed libcrypt.so.1 libcrypt.so \
|
|
||||||
{} +
|
|
||||||
|
|
||||||
${oldAttrs.postFixup or ""}
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
# Now in Nixpkgs
|
# Now in Nixpkgs
|
||||||
# neovide = prev.neovide.overrideAttrs (finalAttrs: prevAttrs: {
|
# neovide = prev.neovide.overrideAttrs (finalAttrs: prevAttrs: {
|
||||||
# version = "0.15.1";
|
# version = "0.15.1";
|
||||||
|
|||||||
16
system/cachix.nix
Normal file
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;
|
|
||||||
}
|
|
||||||
@ -91,7 +91,6 @@ with mylib.networking; {
|
|||||||
"ssh-private-key"
|
"ssh-private-key"
|
||||||
"nix-github-token"
|
"nix-github-token"
|
||||||
"docker-password"
|
"docker-password"
|
||||||
"jellyfin-password"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -105,7 +104,31 @@ with mylib.networking; {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Enable flakes
|
# Enable flakes
|
||||||
nix = mylib.nixos.mkCommonNixSettings username;
|
nix = {
|
||||||
|
package = pkgs.nixVersions.stable;
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes pipe-operators
|
||||||
|
'';
|
||||||
|
|
||||||
|
settings.trusted-users = ["root" "${username}"];
|
||||||
|
|
||||||
|
# Auto garbage-collect and optimize store
|
||||||
|
gc.automatic = false; # Done by nh.clean.enable;
|
||||||
|
gc.options = "--delete-older-than 5d";
|
||||||
|
settings.auto-optimise-store = true;
|
||||||
|
optimise.automatic = true;
|
||||||
|
|
||||||
|
# This will add your inputs as registries, making operations with them (such
|
||||||
|
# as nix shell nixpkgs#name) consistent with your flake inputs.
|
||||||
|
# (Registry contains flakes)
|
||||||
|
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
|
||||||
|
|
||||||
|
# Set NIX_PATH to find nixpgks
|
||||||
|
nixPath = [
|
||||||
|
"nixpkgs=${inputs.nixpkgs.outPath}"
|
||||||
|
"home-manager=${inputs.home-manager.outPath}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Bootloader/Kernel stuff
|
# Bootloader/Kernel stuff
|
||||||
boot = {
|
boot = {
|
||||||
@ -144,9 +167,9 @@ with mylib.networking; {
|
|||||||
|
|
||||||
documentation = {
|
documentation = {
|
||||||
# NOTE: Disable this while configuring stuff, it's slow
|
# NOTE: Disable this while configuring stuff, it's slow
|
||||||
enable = false;
|
enable = true;
|
||||||
man.enable = config.documentation.enable;
|
man.enable = config.documentation.enable;
|
||||||
man.cache.enable = true; # Slow but needed for neovim man picker
|
man.generateCaches = true; # Slow but needed for neovim man picker
|
||||||
info.enable = config.documentation.enable;
|
info.enable = config.documentation.enable;
|
||||||
dev.enable = config.documentation.enable;
|
dev.enable = config.documentation.enable;
|
||||||
doc.enable = config.documentation.enable;
|
doc.enable = config.documentation.enable;
|
||||||
@ -235,7 +258,6 @@ with mylib.networking; {
|
|||||||
description = "Christoph";
|
description = "Christoph";
|
||||||
group = "users";
|
group = "users";
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
home = "/home/${username}";
|
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel"
|
"wheel"
|
||||||
@ -254,7 +276,7 @@ with mylib.networking; {
|
|||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
|
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
publicKeys.${username}.ssh
|
publicKeys.christoph.ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
# We do this with HomeManager
|
# We do this with HomeManager
|
||||||
|
|||||||
@ -116,23 +116,21 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
1111 # FAIL*
|
7777 # AvaTalk
|
||||||
# 4242 # Lan-Mouse
|
12777 # AvaTalk
|
||||||
# 7777 # AvaTalk
|
|
||||||
# 12777 # AvaTalk
|
|
||||||
# 31431 # Parsec
|
# 31431 # Parsec
|
||||||
5173 # SvelteKit
|
5173 # SvelteKit
|
||||||
8090 # PocketBase
|
8090 # PocketBase
|
||||||
|
4242 # Lan-Mouse
|
||||||
];
|
];
|
||||||
|
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
1111 # FAIL*
|
7777 # AvaTalk
|
||||||
# 4242 # Lan-Mouse
|
12777 # AvaTalk
|
||||||
# 7777 # AvaTalk
|
|
||||||
# 12777 # AvaTalk
|
|
||||||
# 31431 # Parsec
|
# 31431 # Parsec
|
||||||
5173 # SvelteKit
|
5173 # SvelteKit
|
||||||
8090 # PocketBase
|
8090 # PocketBase
|
||||||
|
4242 # Lan-Mouse
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -155,7 +153,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_zen;
|
# kernelPackages = pkgs.linuxPackages_zen;
|
||||||
# kernelPackages = pkgs.linuxPackages_latest;
|
# kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# Why do I need to know if something fails during boot???
|
# Why do I need to know if something fails during boot???
|
||||||
@ -190,38 +188,13 @@
|
|||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
# environment.systemPackages = with pkgs; [];
|
||||||
spice
|
|
||||||
spice-gtk
|
|
||||||
];
|
|
||||||
|
|
||||||
virtualisation = {
|
|
||||||
libvirtd = {
|
|
||||||
enable = true;
|
|
||||||
qemu = {
|
|
||||||
package = pkgs.qemu_kvm;
|
|
||||||
# ovmf.enable = true; # deprecated
|
|
||||||
swtpm.enable = true;
|
|
||||||
runAsRoot = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
spiceUSBRedirection.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.trustedInterfaces = ["virbr0"]; # libvirt
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
ausweisapp = {
|
ausweisapp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true; # Directly set port in firewall
|
openFirewall = true; # Directly set port in firewall
|
||||||
};
|
};
|
||||||
|
|
||||||
ghidra = {
|
|
||||||
enable = true;
|
|
||||||
gdb = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
virt-manager.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
@ -231,52 +204,76 @@
|
|||||||
fileSystems = ["/"];
|
fileSystems = ["/"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Temporarily ban IPs for SSH after failed login attempts
|
||||||
|
fail2ban = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
greetd = {
|
||||||
|
enable = false;
|
||||||
|
restart = false;
|
||||||
|
useTextGreeter = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
terminal.vt = 1;
|
||||||
|
|
||||||
|
default_session = {
|
||||||
|
# command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd $SHELL";
|
||||||
|
command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd niri-session";
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
kmscon = {
|
kmscon = {
|
||||||
enable = false;
|
enable = false;
|
||||||
|
hwRender = true;
|
||||||
useXkbConfig = true;
|
useXkbConfig = true;
|
||||||
# autologinUser = username;
|
# autologinUser = username;
|
||||||
|
|
||||||
config = let
|
fonts = [
|
||||||
color = config.home-manager.users.${username}.homemodules.color;
|
{
|
||||||
in {
|
name = "MonoLisa Alt Script";
|
||||||
# term=xterm-256color
|
package = pkgs.monolisa;
|
||||||
|
}
|
||||||
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!
|
# NOTE: Do NOT use multline strings here!
|
||||||
# This will create a linebreak in the systemd service and break login!
|
# This will create a linebreak in the systemd service and break login!
|
||||||
extraOptions = "";
|
extraOptions = "";
|
||||||
|
|
||||||
|
extraConfig = let
|
||||||
|
color = config.home-manager.users.${username}.homemodules.color;
|
||||||
|
in ''
|
||||||
|
# term=xterm-256color
|
||||||
|
font-size=14
|
||||||
|
mode=3440x1440
|
||||||
|
palette=custom
|
||||||
|
|
||||||
|
palette-black=0,0,0
|
||||||
|
pallette-white=255,255,255
|
||||||
|
|
||||||
|
palette-red=${color.rgbS.red}
|
||||||
|
palette-light-red=${color.rgbS.red}
|
||||||
|
|
||||||
|
palette-green=${color.rgbS.green}
|
||||||
|
palette-light-green=${color.rgbS.green}
|
||||||
|
|
||||||
|
palette-yellow=${color.rgbS.yellow}
|
||||||
|
palette-light-yellow=${color.rgbS.yellow}
|
||||||
|
|
||||||
|
palette-blue=${color.rgbS.blue}
|
||||||
|
palette-light-blue=${color.rgbS.blue}
|
||||||
|
|
||||||
|
palette-magenta=${color.rgbS.pink}
|
||||||
|
palette-light-magenta=${color.rgbS.pink}
|
||||||
|
|
||||||
|
palette-cyan=${color.rgbS.teal}
|
||||||
|
palette-light-cyan=${color.rgbS.teal}
|
||||||
|
|
||||||
|
palette-foreground=${color.rgbS.text}
|
||||||
|
palette-background=0,0,0
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
openssh = {
|
openssh = {
|
||||||
@ -294,60 +291,59 @@
|
|||||||
# TODO: The repository gets corrupted all the time, maybe because the service runs before the repository is mounted?
|
# TODO: The repository gets corrupted all the time, maybe because the service runs before the repository is mounted?
|
||||||
# - Was this caused by the NFS "soft" option?
|
# - Was this caused by the NFS "soft" option?
|
||||||
# - Might this be caused by the restic service being interrupted by shutdown/rebooting?
|
# - Might this be caused by the restic service being interrupted by shutdown/rebooting?
|
||||||
#
|
restic.backups."synology" = {
|
||||||
# restic.backups."synology" = {
|
# user = "${username}"; # Keep default (root), so restic can read everything
|
||||||
# # user = "${username}"; # Keep default (root), so restic can read everything
|
|
||||||
#
|
repository = "/home/${username}/Restic";
|
||||||
# repository = "/home/${username}/Restic";
|
initialize = true;
|
||||||
# initialize = true;
|
passwordFile = config.sops.secrets.restic-repo-key.path;
|
||||||
# passwordFile = config.sops.secrets.restic-repo-key.path;
|
createWrapper = true;
|
||||||
# createWrapper = true;
|
|
||||||
#
|
timerConfig = {
|
||||||
# timerConfig = {
|
OnCalendar = "daily";
|
||||||
# OnCalendar = "daily";
|
Persistent = true;
|
||||||
# Persistent = true;
|
RandomizedDelaySec = "5h";
|
||||||
# RandomizedDelaySec = "5h";
|
};
|
||||||
# };
|
|
||||||
#
|
runCheck = true;
|
||||||
# runCheck = true;
|
checkOpts = [
|
||||||
# checkOpts = [
|
"--with-cache"
|
||||||
# "--with-cache"
|
];
|
||||||
# ];
|
|
||||||
#
|
pruneOpts = [
|
||||||
# pruneOpts = [
|
"--keep-daily 3"
|
||||||
# "--keep-daily 3"
|
"--keep-weekly 2"
|
||||||
# "--keep-weekly 2"
|
# "--keep-monthly 0"
|
||||||
# # "--keep-monthly 0"
|
# "--keep-yearly 0"
|
||||||
# # "--keep-yearly 0"
|
|
||||||
#
|
"--prune" # Automatically remove dangling files not referenced by any snapshot
|
||||||
# "--prune" # Automatically remove dangling files not referenced by any snapshot
|
"--repack-uncompressed"
|
||||||
# "--repack-uncompressed"
|
];
|
||||||
# ];
|
|
||||||
#
|
paths = ["/persist"];
|
||||||
# paths = ["/persist"];
|
exclude = [
|
||||||
# exclude = [
|
# The backup is just supposed to allow a system restore
|
||||||
# # The backup is just supposed to allow a system restore
|
"/persist/old_homes"
|
||||||
# "/persist/old_homes"
|
"/persist/old_roots"
|
||||||
# "/persist/old_roots"
|
|
||||||
#
|
# Those are synced by nextcloud, no need to backup them 50 times
|
||||||
# # Those are synced by nextcloud, no need to backup them 50 times
|
"/persist/home/${username}/Documents"
|
||||||
# "/persist/home/${username}/Documents"
|
"/persist/home/${username}/NixFlake"
|
||||||
# "/persist/home/${username}/NixFlake"
|
"/persist/home/${username}/Notes"
|
||||||
# "/persist/home/${username}/Notes"
|
"/persist/home/${username}/Projects"
|
||||||
# "/persist/home/${username}/Projects"
|
"/persist/home/${username}/Public"
|
||||||
# "/persist/home/${username}/Public"
|
|
||||||
#
|
# Some more caches
|
||||||
# # Some more caches
|
".cache"
|
||||||
# ".cache"
|
"cache2" # firefox
|
||||||
# "cache2" # firefox
|
"Cache"
|
||||||
# "Cache"
|
];
|
||||||
# ];
|
extraBackupArgs = [
|
||||||
# extraBackupArgs = [
|
"--exclude-caches" # Excludes marked cache directories
|
||||||
# "--exclude-caches" # Excludes marked cache directories
|
"--one-file-system" # Only stay on /persist (in case symlinks lead elsewhere)
|
||||||
# "--one-file-system" # Only stay on /persist (in case symlinks lead elsewhere)
|
"--cleanup-cache" # Auto remove old cache directories
|
||||||
# "--cleanup-cache" # Auto remove old cache directories
|
];
|
||||||
# ];
|
};
|
||||||
# };
|
|
||||||
|
|
||||||
xserver = {
|
xserver = {
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
|
|||||||
@ -82,104 +82,7 @@
|
|||||||
};
|
};
|
||||||
"swap" = {
|
"swap" = {
|
||||||
mountpoint = "/swap";
|
mountpoint = "/swap";
|
||||||
# Configured in hardware-configuration.nix
|
swap.swapfile.size = "16G";
|
||||||
# swap.swapfile.size = "64G";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
games = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/disk/by-id/nvme-WD_BLACK_SN850X_2000GB_231623802252";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
luks = {
|
|
||||||
label = "LUKS_GAMES";
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "luks";
|
|
||||||
name = "crypted_games";
|
|
||||||
|
|
||||||
extraOpenArgs = [
|
|
||||||
"--perf-no_read_workqueue"
|
|
||||||
"--perf-no_write_workqueue"
|
|
||||||
];
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
allowDiscards = true;
|
|
||||||
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10" "tries=5"];
|
|
||||||
|
|
||||||
# Disable for interactive password entry
|
|
||||||
# This is contained on the main disk, so by unlocking the main disk with the password,
|
|
||||||
# the second disk can unlock automatically
|
|
||||||
keyFile = "/persist/home/christoph/.secrets/luks.keyfile";
|
|
||||||
fallbackToPassword = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
content = {
|
|
||||||
type = "btrfs";
|
|
||||||
extraArgs = ["-L" "GAMES" "-f"];
|
|
||||||
subvolumes = {
|
|
||||||
"data" = {
|
|
||||||
mountpoint = "/home/christoph/Games";
|
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ssd = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/disk/by-id/nvme-eui.00253857019ebd67";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
luks = {
|
|
||||||
label = "LUKS_SSD";
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "luks";
|
|
||||||
name = "crypted_ssd";
|
|
||||||
|
|
||||||
extraOpenArgs = [
|
|
||||||
"--perf-no_read_workqueue"
|
|
||||||
"--perf-no_write_workqueue"
|
|
||||||
];
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
allowDiscards = true;
|
|
||||||
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10" "tries=5"];
|
|
||||||
|
|
||||||
# Disable for interactive password entry
|
|
||||||
# This is contained on the main disk, so by unlocking the main disk with the password,
|
|
||||||
# the second disk can unlock automatically
|
|
||||||
keyFile = "/persist/home/christoph/.secrets/luks.keyfile";
|
|
||||||
fallbackToPassword = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
content = {
|
|
||||||
type = "btrfs";
|
|
||||||
extraArgs = ["-L" "SSD" "-f"];
|
|
||||||
subvolumes = {
|
|
||||||
"data" = {
|
|
||||||
mountpoint = "/home/christoph/SSD";
|
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -121,13 +121,18 @@
|
|||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["defaults" "rw" "noatime" "_netdev" "bg" "hard"];
|
options = ["defaults" "rw" "noatime" "_netdev" "bg" "hard"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"/media/Box" = {
|
||||||
|
device = "192.168.86.20:/mnt/Seagate4TB/Box";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
device = "/swap/swapfile";
|
device = "/var/swap";
|
||||||
size = 1024 * 64; # Without hibernation 4.0 GB to 0.5 x RAM
|
size = 1024 * 16; # Without hibernation 4.0 GB to 0.5 x RAM
|
||||||
randomEncryption.enable = false; # The disk is already encrypted. Useless and might lead to system freeze.
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# programs.light.enable = true; # Unmaintained
|
programs.light.enable = true;
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
# General services
|
# General services
|
||||||
../services/authelia.nix
|
../services/authelia.nix
|
||||||
../services/bazarr.nix
|
../services/bazarr.nix
|
||||||
|
../services/box.nix
|
||||||
../services/fileflows.nix
|
../services/fileflows.nix
|
||||||
../services/gitea.nix
|
../services/gitea.nix
|
||||||
../services/immich.nix
|
../services/immich.nix
|
||||||
@ -31,7 +32,6 @@
|
|||||||
../services/kiwix.nix
|
../services/kiwix.nix
|
||||||
../services/kopia.nix
|
../services/kopia.nix
|
||||||
../services/nextcloud.nix
|
../services/nextcloud.nix
|
||||||
../services/ntfy.nix
|
|
||||||
../services/nginx-proxy-manager.nix
|
../services/nginx-proxy-manager.nix
|
||||||
../services/paperless.nix
|
../services/paperless.nix
|
||||||
# ../services/plex.nix # Their monetization strategy is absolutely atrocious
|
# ../services/plex.nix # Their monetization strategy is absolutely atrocious
|
||||||
@ -65,13 +65,52 @@
|
|||||||
useNetworkManager = false;
|
useNetworkManager = false;
|
||||||
|
|
||||||
networks = {
|
networks = {
|
||||||
"10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {
|
# "10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {
|
||||||
interface = "ens18";
|
# interface = "ens18";
|
||||||
ips = ["192.168.86.25/24"];
|
# ips = ["192.168.86.25/24" "fd00::19/64"];
|
||||||
routers = ["192.168.86.5"]; # Don't add IPv6 gateway, rely on router advertisement instead
|
# routers = ["192.168.86.5" "fd00::5"];
|
||||||
nameservers = ["8.8.8.8" "8.8.4.4" "2001:4860:4860:8888" "2001:4860:4860:8844"]; # NOTE: Use reliable DNS for servers instead of 192.168.86.26
|
# nameservers = ["8.8.8.8" "2001:4860:4860::8888"]; # NOTE: Use reliable DNS for servers instead of 192.168.86.26
|
||||||
routable = true;
|
# routable = true;
|
||||||
extraAddresses = ["fd00::19/64"]; # IPv6 ULA — declared without creating a route
|
# };
|
||||||
|
|
||||||
|
# TODO: mylib.networking.mkStaticSystemdNetwork needs improvement to accomodate for this
|
||||||
|
"10-ether-1G" = rec {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# See man systemd.link, man systemd.netdev, man systemd.network
|
||||||
|
matchConfig = {
|
||||||
|
# This corresponds to the [MATCH] section
|
||||||
|
Name = "ens18"; # Match ethernet interface
|
||||||
|
};
|
||||||
|
|
||||||
|
# Static IP + DNS + Gateway
|
||||||
|
address = ["192.168.86.25/24"];
|
||||||
|
gateway = ["192.168.86.5"]; # Don't add IPv6 gateway, rely on router advertisement instead
|
||||||
|
dns = ["8.8.8.8" "8.8.4.4" "2001:4860:4860:8888" "2001:4860:4860:8844"];
|
||||||
|
routes = builtins.map (r: {Gateway = r;}) gateway;
|
||||||
|
|
||||||
|
# See man systemd.network
|
||||||
|
networkConfig = {
|
||||||
|
# This corresponds to the [NETWORK] section
|
||||||
|
DHCP = "no";
|
||||||
|
|
||||||
|
IPv6AcceptRA = "yes"; # Accept Router Advertisements
|
||||||
|
# MulticastDNS = "no";
|
||||||
|
# LLMNR = "no";
|
||||||
|
# LinkLocalAddressing = "ipv6";
|
||||||
|
};
|
||||||
|
|
||||||
|
addresses = [
|
||||||
|
{
|
||||||
|
# Don't add this to address, we don't want to create any routes with this
|
||||||
|
Address = "fd00::19/64";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
linkConfig = {
|
||||||
|
# This corresponds to the [LINK] section
|
||||||
|
RequiredForOnline = "routable";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -110,8 +149,6 @@
|
|||||||
"kopia-server-password"
|
"kopia-server-password"
|
||||||
"kopia-user-password"
|
"kopia-user-password"
|
||||||
"paperless-nextcloud-sync-password"
|
"paperless-nextcloud-sync-password"
|
||||||
"ntfy-auth-users"
|
|
||||||
"ntfy-auth-tokens"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -69,6 +69,12 @@
|
|||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
|
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"/media/Box" = {
|
||||||
|
device = "192.168.86.20:/mnt/Seagate4TB/Box";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
@ -86,7 +92,7 @@
|
|||||||
nvidia-container-toolkit.enable = true;
|
nvidia-container-toolkit.enable = true;
|
||||||
|
|
||||||
nvidia = {
|
nvidia = {
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.legacy_580;
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
|
||||||
modesetting.enable = false;
|
modesetting.enable = false;
|
||||||
open = false; # GTX 1070 is too old for open drivers
|
open = false; # GTX 1070 is too old for open drivers
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
mylib,
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -17,7 +16,14 @@ in {
|
|||||||
image = "TEMPLATE:${TEMPLATEVersion}";
|
image = "TEMPLATE:${TEMPLATEVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = mylib.containers.mkDockerLogin config;
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
mylib,
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -12,7 +11,14 @@ in {
|
|||||||
image = "adguard/adguardhome:${adguardVersion}";
|
image = "adguard/adguardhome:${adguardVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = mylib.containers.mkDockerLogin config;
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
mylib,
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -12,7 +11,14 @@ in {
|
|||||||
image = "authelia/authelia:${autheliaVersion}";
|
image = "authelia/authelia:${autheliaVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = mylib.containers.mkDockerLogin config;
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
mylib,
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -12,7 +11,14 @@ in {
|
|||||||
image = "linuxserver/bazarr:${bazarrVersion}";
|
image = "linuxserver/bazarr:${bazarrVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = mylib.containers.mkDockerLogin config;
|
login = {
|
||||||
|
# Uses DockerHub by default
|
||||||
|
# registry = "";
|
||||||
|
|
||||||
|
# DockerHub Credentials
|
||||||
|
username = "christoph.urlacher@protonmail.com";
|
||||||
|
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||||
|
};
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user