Compare commits
106 Commits
b799d86823
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
a056e4d98b
|
|||
|
5f17a04fbb
|
|||
|
f514387f64
|
|||
|
c328c188b8
|
|||
|
585f74ce0f
|
|||
|
8263fe01eb
|
|||
|
d61e6f8b9c
|
|||
|
7c7c195083
|
|||
|
2e78898c5a
|
|||
|
1f61e9958c
|
|||
|
c8954e5854
|
|||
|
e772d93f23
|
|||
|
4c17560020
|
|||
|
e1542a1168
|
|||
|
a351bf59ba
|
|||
|
7a62f38084
|
|||
|
b50c5f9f71
|
|||
|
0087145957
|
|||
|
48c77e9654
|
|||
|
71d06d61b1
|
|||
|
75d024111e
|
|||
|
b67aee2a64
|
|||
|
554a76b585
|
|||
|
d9e7e315da
|
|||
|
daee8da3ae
|
|||
|
c2b661adbb
|
|||
|
aa4ebfbc06
|
|||
|
db850552e3
|
|||
|
63afac3d04
|
|||
|
645fc64ead
|
|||
|
6561d4c979
|
|||
|
f1ed339968
|
|||
|
50d14ecf83
|
|||
|
1cdc3f25e0
|
|||
|
9e62f755bb
|
|||
|
d0e6fe072a
|
|||
|
86ea11c8e8
|
|||
|
1adacf5e1e
|
|||
|
e53787deae
|
|||
|
efce5c6293
|
|||
|
6069a12e64
|
|||
|
91bd79a051
|
|||
|
9bec5f42b1
|
|||
|
602aa4cd56
|
|||
|
3573a705af
|
|||
|
615d886a98
|
|||
|
4416f39f0c
|
|||
|
0bb481c037
|
|||
|
98a3788f4f
|
|||
|
ac4b005f9b
|
|||
|
901f58a527
|
|||
|
9a5bc3e981
|
|||
|
fe69d39769
|
|||
|
2f675e96f0
|
|||
|
56512194ef
|
|||
|
d1a6aafed5
|
|||
|
6305d9ca2e
|
|||
|
887f7db0c7
|
|||
|
d8dbdbc5de
|
|||
|
4014ed0318
|
|||
|
87fa954937
|
|||
|
934644c5e2
|
|||
|
0bda035ccd
|
|||
|
6e999ffa02
|
|||
|
807388d032
|
|||
|
9b1a7c73e6
|
|||
|
da729f8c22
|
|||
|
d08d795adf
|
|||
|
ffc2516353
|
|||
|
135e1e5701
|
|||
|
5b2fc78889
|
|||
|
4cbe9885b2
|
|||
|
9b43074248
|
|||
|
be3f6baa17
|
|||
|
837233b552
|
|||
|
ca0c718f3b
|
|||
|
3c68574aea
|
|||
|
aa668d04d3
|
|||
|
d16b645078
|
|||
|
b71264b864
|
|||
|
6ed1882429
|
|||
|
952802d4f7
|
|||
|
53fc6eedc8
|
|||
|
2e0f378c9e
|
|||
|
abab1cf2b4
|
|||
|
ad3210f150
|
|||
|
afe74b8fa1
|
|||
|
8f5a9d753f
|
|||
|
d45a9946bb
|
|||
|
c0f8356205
|
|||
|
72a8dcb8d5
|
|||
|
da548f10bb
|
|||
|
9bfbbc0dc9
|
|||
|
26ac3a8e02
|
|||
|
632fcc3dab
|
|||
|
a204951964
|
|||
|
9aea533693
|
|||
|
a07499813d
|
|||
|
6e2a64a50c
|
|||
|
80d932838f
|
|||
|
4bed2e7021
|
|||
|
75ffcc5c6e
|
|||
|
cb14d79586
|
|||
|
9b41d5552e
|
|||
|
3d50b8fea7
|
|||
|
5aec2aa971
|
BIN
Darwin.png
Normal file
BIN
Darwin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 MiB |
BIN
FastFetch.png
BIN
FastFetch.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.6 MiB |
BIN
NeoVim.png
BIN
NeoVim.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 MiB |
11
README.md
11
README.md
@ -1,16 +1,9 @@
|
|||||||
# NixOS Configuration
|
# NixOS Configuration
|
||||||
|
|
||||||
Modular NixOS configuration, using Hyprland (yikes) or Niri for a tiling/scrolling desktop.
|
Modular NixOS configuration, using [Niri](https://github.com/niri-wm/niri) and [Waybar](https://github.com/Alexays/Waybar) for a light desktop.
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
<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`.
|
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`.
|
Alternatively, use `nh os switch` or `nh os boot`.
|
||||||
|
|||||||
232
config/flake.nix
232
config/flake.nix
@ -21,6 +21,9 @@ 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;
|
||||||
@ -28,7 +31,18 @@ rec {
|
|||||||
rust-overlay.overlays.default
|
rust-overlay.overlays.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
inherit (pkgs) lib stdenv;
|
|
||||||
|
# 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
|
# Package set for cross-compilation
|
||||||
# windowsPkgs = import nixpkgs {
|
# windowsPkgs = import nixpkgs {
|
||||||
@ -39,6 +53,91 @@ rec {
|
|||||||
# config.allowUnfree = true;
|
# config.allowUnfree = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
inherit (pkgs) lib stdenv;
|
||||||
|
|
||||||
|
# =========================================================================================
|
||||||
|
# Define shell environment
|
||||||
|
# =========================================================================================
|
||||||
|
|
||||||
|
# Setup the shell when entering the "nix develop" environment (bash script).
|
||||||
|
shellHook = let
|
||||||
|
mkCmakeScript = type: let
|
||||||
|
typeLower = lib.toLower type;
|
||||||
|
in
|
||||||
|
pkgs.writers.writeFish "cmake-${typeLower}.fish" ''
|
||||||
|
cd $FLAKE_PROJECT_ROOT
|
||||||
|
|
||||||
|
echo "Removing build directory ./cmake-build-${typeLower}/"
|
||||||
|
rm -rf ./cmake-build-${typeLower}
|
||||||
|
|
||||||
|
echo "Creating build directory"
|
||||||
|
mkdir cmake-build-${typeLower}
|
||||||
|
cd cmake-build-${typeLower}
|
||||||
|
|
||||||
|
echo "Running cmake"
|
||||||
|
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="${type}" -DCMAKE_EXPORT_COMPILE_COMMANDS="On" ..
|
||||||
|
|
||||||
|
echo "Linking compile_commands.json"
|
||||||
|
cd ..
|
||||||
|
ln -sf ./cmake-build-${typeLower}/compile_commands.json ./compile_commands.json
|
||||||
|
'';
|
||||||
|
|
||||||
|
cmakeDebug = mkCmakeScript "Debug";
|
||||||
|
cmakeRelease = mkCmakeScript "Release";
|
||||||
|
|
||||||
|
mkBuildScript = type: let
|
||||||
|
typeLower = lib.toLower type;
|
||||||
|
in
|
||||||
|
pkgs.writers.writeFish "cmake-build.fish" ''
|
||||||
|
cd $FLAKE_PROJECT_ROOT/cmake-build-${typeLower}
|
||||||
|
|
||||||
|
echo "Running cmake"
|
||||||
|
cmake --build .
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildDebug = mkBuildScript "Debug";
|
||||||
|
buildRelease = mkBuildScript "Release";
|
||||||
|
|
||||||
|
# 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}"'"
|
||||||
|
# ''
|
||||||
|
];
|
||||||
|
|
||||||
# ===========================================================================================
|
# ===========================================================================================
|
||||||
# Define custom dependencies
|
# Define custom dependencies
|
||||||
# ===========================================================================================
|
# ===========================================================================================
|
||||||
@ -128,11 +227,15 @@ rec {
|
|||||||
# jdk
|
# jdk
|
||||||
|
|
||||||
# C/C++:
|
# C/C++:
|
||||||
|
# pkg-config
|
||||||
|
# cmake
|
||||||
|
# gnumake
|
||||||
|
# ninja
|
||||||
# gdb
|
# gdb
|
||||||
# valgrind
|
# valgrind
|
||||||
# gnumake
|
# kdePackages.kcachegrind
|
||||||
# cmake
|
# perf
|
||||||
# pkg-config
|
# hotspot
|
||||||
|
|
||||||
# Clojure:
|
# Clojure:
|
||||||
# leiningen
|
# leiningen
|
||||||
@ -156,6 +259,8 @@ rec {
|
|||||||
# C/C++:
|
# C/C++:
|
||||||
# boost
|
# boost
|
||||||
# sfml
|
# sfml
|
||||||
|
# raylib
|
||||||
|
# backward-cpp
|
||||||
|
|
||||||
# Qt:
|
# Qt:
|
||||||
# qt6.qtbase
|
# qt6.qtbase
|
||||||
@ -171,8 +276,12 @@ rec {
|
|||||||
# src = ./.;
|
# src = ./.;
|
||||||
#
|
#
|
||||||
# installPhase = ''
|
# installPhase = ''
|
||||||
|
# runHook preInstall
|
||||||
|
#
|
||||||
# mkdir -p $out/bin
|
# mkdir -p $out/bin
|
||||||
# cp ./${pname} $out/bin/
|
# cp -rv ./${pname} $out/bin/
|
||||||
|
#
|
||||||
|
# runHook postInstall
|
||||||
# '';
|
# '';
|
||||||
# };
|
# };
|
||||||
# windowsPackage = windowsPkgs.stdenv.mkDerivation rec {
|
# windowsPackage = windowsPkgs.stdenv.mkDerivation rec {
|
||||||
@ -193,8 +302,12 @@ rec {
|
|||||||
# ];
|
# ];
|
||||||
#
|
#
|
||||||
# installPhase = ''
|
# installPhase = ''
|
||||||
|
# runHook preInstall
|
||||||
|
#
|
||||||
# mkdir -p $out/bin
|
# mkdir -p $out/bin
|
||||||
# cp ./${pname}.exe $out/bin/
|
# cp ./${pname}.exe $out/bin/
|
||||||
|
#
|
||||||
|
# runHook postInstall
|
||||||
# '';
|
# '';
|
||||||
# };
|
# };
|
||||||
# package = clj-nix.lib.mkCljApp {
|
# package = clj-nix.lib.mkCljApp {
|
||||||
@ -220,13 +333,15 @@ rec {
|
|||||||
# default = package;
|
# default = package;
|
||||||
# windows = windowsPackage;
|
# windows = windowsPackage;
|
||||||
# };
|
# };
|
||||||
# apps.default = flake-utils.lib.mkApp {drv = package;};
|
# 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;
|
inherit nativeBuildInputs buildInputs shellHook;
|
||||||
name = description;
|
name = description;
|
||||||
|
|
||||||
# =========================================================================================
|
# =========================================================================================
|
||||||
@ -263,90 +378,27 @@ rec {
|
|||||||
|
|
||||||
# Set matplotlib backend
|
# Set matplotlib backend
|
||||||
# MPLBACKEND = "TkAgg";
|
# MPLBACKEND = "TkAgg";
|
||||||
|
|
||||||
# =========================================================================================
|
|
||||||
# Define shell environment
|
|
||||||
# =========================================================================================
|
|
||||||
|
|
||||||
# Setup the shell when entering the "nix develop" environment (bash script).
|
|
||||||
shellHook = let
|
|
||||||
mkCmakeScript = type: let
|
|
||||||
typeLower = lib.toLower type;
|
|
||||||
in
|
|
||||||
pkgs.writers.writeFish "cmake-${typeLower}.fish" ''
|
|
||||||
cd $FLAKE_PROJECT_ROOT
|
|
||||||
|
|
||||||
echo "Removing build directory ./cmake-build-${typeLower}/"
|
|
||||||
rm -rf ./cmake-build-${typeLower}
|
|
||||||
|
|
||||||
echo "Creating build directory"
|
|
||||||
mkdir cmake-build-${typeLower}
|
|
||||||
cd cmake-build-${typeLower}
|
|
||||||
|
|
||||||
echo "Running cmake"
|
|
||||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="${type}" -DCMAKE_EXPORT_COMPILE_COMMANDS="On" ..
|
|
||||||
|
|
||||||
echo "Linking compile_commands.json"
|
|
||||||
cd ..
|
|
||||||
ln -sf ./cmake-build-${typeLower}/compile_commands.json ./compile_commands.json
|
|
||||||
'';
|
|
||||||
|
|
||||||
cmakeDebug = mkCmakeScript "Debug";
|
|
||||||
cmakeRelease = mkCmakeScript "Release";
|
|
||||||
|
|
||||||
mkBuildScript = type: let
|
|
||||||
typeLower = lib.toLower type;
|
|
||||||
in
|
|
||||||
pkgs.writers.writeFish "cmake-build.fish" ''
|
|
||||||
cd $FLAKE_PROJECT_ROOT/cmake-build-${typeLower}
|
|
||||||
|
|
||||||
echo "Running cmake"
|
|
||||||
cmake --build .
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildDebug = mkBuildScript "Debug";
|
|
||||||
buildRelease = mkBuildScript "Release";
|
|
||||||
|
|
||||||
# Use this to specify commands that should be ran after entering fish shell
|
|
||||||
initProjectShell = pkgs.writers.writeFish "init-shell.fish" ''
|
|
||||||
echo "Entering \"${description}\" environment..."
|
|
||||||
|
|
||||||
# Determine the project root, used e.g. in cmake scripts
|
|
||||||
set -g -x FLAKE_PROJECT_ROOT (git rev-parse --show-toplevel)
|
|
||||||
|
|
||||||
# Rust Bevy:
|
|
||||||
# abbr -a build-release-windows "CARGO_FEATURE_PURE=1 cargo xwin build --release --target x86_64-pc-windows-msvc"
|
|
||||||
|
|
||||||
# C/C++:
|
|
||||||
# abbr -a cmake-debug "${cmakeDebug}"
|
|
||||||
# abbr -a cmake-release "${cmakeRelease}"
|
|
||||||
# abbr -a build-debug "${buildDebug}"
|
|
||||||
# abbr -a build-release "${buildRelease}"
|
|
||||||
|
|
||||||
# Clojure:
|
|
||||||
# abbr -a clojure-deps "deps-lock --lein"
|
|
||||||
|
|
||||||
# Python:
|
|
||||||
# abbr -a run "python ./app/main.py"
|
|
||||||
# abbr -a profile "py-spy record -o profile.svg -- python ./app/main.py && firefox profile.svg"
|
|
||||||
# abbr -a ptop "py-spy top -- python ./app/main.py"
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
builtins.concatStringsSep "\n" [
|
|
||||||
# Launch into pure fish shell
|
|
||||||
''
|
|
||||||
exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
|
|
||||||
''
|
|
||||||
|
|
||||||
# Qt: Launch into wrapped fish shell
|
|
||||||
# https://nixos.org/manual/nixpkgs/stable/#sec-language-qt
|
|
||||||
# ''
|
|
||||||
# fishdir=$(mktemp -d)
|
|
||||||
# makeWrapper "$(type -p fish)" "$fishdir/fish" "''${qtWrapperArgs[@]}"
|
|
||||||
# exec "$fishdir/fish" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
|
|
||||||
# ''
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Provide environment with clang stdenv for "nix develop .#clang"
|
||||||
|
# clang =
|
||||||
|
# pkgs.mkShell.override {
|
||||||
|
# stdenv = pkgs.clangStdenv;
|
||||||
|
# } {
|
||||||
|
# inherit shellHook;
|
||||||
|
# name = description;
|
||||||
|
#
|
||||||
|
# # If not required, use pkgs instead of clangPkgs for a lighter build
|
||||||
|
# nativeBuildInputs = with pkgs; [];
|
||||||
|
# buildInputs = with pkgs; [];
|
||||||
|
#
|
||||||
|
# # =========================================================================================
|
||||||
|
# # Define environment variables
|
||||||
|
# # =========================================================================================
|
||||||
|
#
|
||||||
|
# # Dynamic libraries from buildinputs:
|
||||||
|
# LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath buildInputs;
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,9 @@
|
|||||||
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: {
|
||||||
|
|||||||
1014
flake.lock
generated
1014
flake.lock
generated
File diff suppressed because it is too large
Load Diff
108
flake.nix
108
flake.nix
@ -12,8 +12,12 @@
|
|||||||
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.05";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
|
|
||||||
# Home Manager
|
# Home Manager
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
@ -53,50 +57,10 @@
|
|||||||
niri.url = "github:sodiboo/niri-flake";
|
niri.url = "github:sodiboo/niri-flake";
|
||||||
niri.inputs.nixpkgs.follows = "nixpkgs";
|
niri.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Quickshell
|
# Walker
|
||||||
quickshell.url = "github:quickshell-mirror/quickshell";
|
elephant.url = "github:abenz1267/elephant";
|
||||||
quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
walker.url = "github:abenz1267/walker";
|
||||||
|
walker.inputs.elephant.follows = "elephant";
|
||||||
# Noctalia shell
|
|
||||||
noctalia.url = "github:noctalia-dev/noctalia-shell";
|
|
||||||
noctalia.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
# noctalia.inputs.quickshell.follows = "quickshell";
|
|
||||||
|
|
||||||
# Lol
|
|
||||||
waifu-cursors.url = "github:kagurazakei/waifu-cursors";
|
|
||||||
|
|
||||||
# Caelestia shell
|
|
||||||
caelestia.url = "github:caelestia-dots/shell";
|
|
||||||
caelestia.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
caelestia.inputs.quickshell.follows = "quickshell";
|
|
||||||
# caelestia-cli.url = "github:caelestia-dots/cli";
|
|
||||||
# caelestia-cli.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
# DankMaterialShell
|
|
||||||
# dgop.url = "github:AvengeMedia/dgop";
|
|
||||||
# dgop.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
# dms-cli.url = "github:AvengeMedia/danklinux";
|
|
||||||
# dms-cli.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
dank-material-shell.url = "github:AvengeMedia/DankMaterialShell";
|
|
||||||
dank-material-shell.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
# dank-material-shell.inputs.dgop.follows = "dgop";
|
|
||||||
danksearch.url = "github:AvengeMedia/danksearch";
|
|
||||||
danksearch.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
# Hyprland (use flake so plugins are not built from source)
|
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
|
||||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
# HyprPlugins
|
|
||||||
hyprland-plugins.url = "github:hyprwm/hyprland-plugins";
|
|
||||||
hyprland-plugins.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
hyprland-plugins.inputs.hyprland.follows = "hyprland";
|
|
||||||
hypr-dynamic-cursors.url = "github:VirtCode/hypr-dynamic-cursors";
|
|
||||||
hypr-dynamic-cursors.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
hypr-dynamic-cursors.inputs.hyprland.follows = "hyprland";
|
|
||||||
hyprspace.url = "github:KZDKM/Hyprspace";
|
|
||||||
# hyprspace.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
hyprspace.inputs.hyprland.follows = "hyprland";
|
|
||||||
|
|
||||||
# NeoVim <3
|
# NeoVim <3
|
||||||
nixvim.url = "github:nix-community/nixvim";
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
@ -117,6 +81,12 @@
|
|||||||
# 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.
|
||||||
@ -125,12 +95,14 @@
|
|||||||
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),
|
||||||
@ -166,12 +138,33 @@
|
|||||||
inputs.nur.overlays.default
|
inputs.nur.overlays.default
|
||||||
inputs.niri.overlays.niri
|
inputs.niri.overlays.niri
|
||||||
# inputs.emacs-overlay.overlay
|
# inputs.emacs-overlay.overlay
|
||||||
|
# inputs.comfyui-nix.overlays.default
|
||||||
|
|
||||||
# All my own overlays (derivations + modifications)
|
# All my own overlays (derivations + modifications)
|
||||||
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
|
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
darwinPkgs = import nixpkgs {
|
||||||
|
system = darwinSystem;
|
||||||
|
|
||||||
|
hostPlatform = darwinSystem;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
config.allowUnfreePredicate = pkg: true;
|
||||||
|
|
||||||
|
overlays = let
|
||||||
|
pkgs-stable = import inputs.nixpkgs-stable {
|
||||||
|
system = darwinSystem;
|
||||||
|
|
||||||
|
config.allowUnfree = true;
|
||||||
|
config.allowUnfreePredicate = pkg: true;
|
||||||
|
};
|
||||||
|
in [
|
||||||
|
# All my own overlays (derivations + modifications)
|
||||||
|
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# My own library functions are imported here.
|
# 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 {
|
||||||
@ -186,8 +179,15 @@
|
|||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
# NOTE: Keep public keys here so they're easy to rotate
|
darwinMylib = import ./lib {
|
||||||
|
inherit inputs darwinPkgs;
|
||||||
|
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
|
pkgs = darwinPkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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";
|
||||||
@ -211,6 +211,20 @@
|
|||||||
# 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 = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# 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
|
||||||
@ -233,6 +247,8 @@
|
|||||||
extraModules =
|
extraModules =
|
||||||
[
|
[
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
|
# inputs.nixified-ai.nixosModules.comfyui
|
||||||
|
# inputs.comfyui-nix.nixosModules.default
|
||||||
]
|
]
|
||||||
++ commonModules;
|
++ commonModules;
|
||||||
};
|
};
|
||||||
|
|||||||
54
home/christoph/darwinix/default.nix
Normal file
54
home/christoph/darwinix/default.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
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,8 +34,7 @@ in
|
|||||||
|
|
||||||
homemodules = {
|
homemodules = {
|
||||||
beets.enable = !headless;
|
beets.enable = !headless;
|
||||||
|
cava.enable = !headless;
|
||||||
btop.enable = true;
|
|
||||||
|
|
||||||
chromium = {
|
chromium = {
|
||||||
enable = !headless;
|
enable = !headless;
|
||||||
@ -47,7 +46,8 @@ in
|
|||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
bibata-cursors
|
bibata-cursors
|
||||||
inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all
|
# Lol
|
||||||
|
# inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all
|
||||||
];
|
];
|
||||||
|
|
||||||
cursor = "Bibata-Modern-Classic";
|
cursor = "Bibata-Modern-Classic";
|
||||||
@ -77,221 +77,15 @@ 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;
|
||||||
rofi = {
|
terminal.enable = true;
|
||||||
enable = !headless;
|
waybar.enable = !headless;
|
||||||
};
|
|
||||||
|
|
||||||
waybar.enable = false; # Use hyprpanel
|
|
||||||
yazi.enable = true;
|
|
||||||
zathura.enable = !headless;
|
zathura.enable = !headless;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -430,6 +224,15 @@ 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
|
||||||
|
'';
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -444,365 +247,13 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Add stuff for your user as you see fit:
|
# Add stuff for your user as you see fit:
|
||||||
# TODO: Make the headless installations smaller
|
# packages = with pkgs; []; # Configured in homemodules/packages
|
||||||
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 = {
|
||||||
@ -830,11 +281,6 @@ 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;
|
||||||
@ -864,73 +310,6 @@ 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 = {
|
||||||
@ -981,14 +360,18 @@ 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 = ["/nix/store:ro"];
|
Context.filesystems = [
|
||||||
|
"/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 = "Adwaita:light";
|
GTK_THEME = config.gtk.theme.name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
username,
|
username,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = {
|
config = {
|
||||||
@ -16,52 +17,7 @@
|
|||||||
# because it forces en-US keyboard layout.
|
# because it forces en-US keyboard layout.
|
||||||
fcitx.enable = true;
|
fcitx.enable = true;
|
||||||
|
|
||||||
hyprland = {
|
waybar.monitors = ["DP-1" "DP-2"];
|
||||||
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";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
waybar.monitor = "DP-1";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home = let
|
home = let
|
||||||
@ -113,7 +69,7 @@
|
|||||||
# 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
|
||||||
@ -121,6 +77,7 @@
|
|||||||
# jetbrains.rider
|
# jetbrains.rider
|
||||||
zed-editor
|
zed-editor
|
||||||
vscode
|
vscode
|
||||||
|
# ghidra # launch with _JAVA_AWT_WM_NONREPARENTING=1 (use programs.ghidra)
|
||||||
|
|
||||||
# Unity Stuff
|
# Unity Stuff
|
||||||
# unityhub
|
# unityhub
|
||||||
@ -129,6 +86,7 @@
|
|||||||
# 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;})
|
||||||
@ -143,6 +101,7 @@
|
|||||||
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
|
||||||
@ -152,22 +111,22 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
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";
|
||||||
# desktopName = "Rider";
|
# desktopName = "Rider";
|
||||||
# exec = "\"${rider-unity}/bin/rider\"";
|
# exec = "\"${rider-unity}/bin/rider\"";
|
||||||
# icon = "rider";
|
# icon = "rider";
|
||||||
# type = "Application";
|
# type = "Application";
|
||||||
# # Don't show desktop icon in search or run launcher
|
# # Don't show desktop icon in search or run launcher
|
||||||
# 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
|
||||||
@ -181,46 +140,19 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
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"
|
||||||
|
|
||||||
# "com.unity.UnityHub"
|
# "com.unity.UnityHub"
|
||||||
];
|
];
|
||||||
@ -250,6 +182,13 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"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,5 +1,5 @@
|
|||||||
# 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 = {
|
||||||
hyprland = {
|
hyprland = {
|
||||||
@ -29,7 +29,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
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.
|
||||||
|
|||||||
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
186
home/homemodules/1_deprecated/hyprland/hyprland.nix
Normal file
186
home/homemodules/1_deprecated/hyprland/hyprland.nix
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
{
|
||||||
|
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"
|
||||||
|
];
|
||||||
|
}
|
||||||
34
home/homemodules/bat/default.nix
Normal file
34
home/homemodules/bat/default.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
home/homemodules/bat/options.nix
Normal file
7
home/homemodules/bat/options.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
enable = lib.mkEnableOption "Enable bat";
|
||||||
|
}
|
||||||
48
home/homemodules/cava/default.nix
Normal file
48
home/homemodules/cava/default.nix
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
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}'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
home/homemodules/cava/options.nix
Normal file
7
home/homemodules/cava/options.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
enable = lib.mkEnableOption "Enable cava";
|
||||||
|
}
|
||||||
24
home/homemodules/darwin.nix
Normal file
24
home/homemodules/darwin.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{inputs, ...}: {
|
||||||
|
imports = [
|
||||||
|
# My own HM modules
|
||||||
|
./bat
|
||||||
|
./btop
|
||||||
|
./color
|
||||||
|
./fastfetch
|
||||||
|
./fish
|
||||||
|
./git
|
||||||
|
./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,28 +3,33 @@
|
|||||||
# 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
|
||||||
./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
|
||||||
./yazi
|
./yazi
|
||||||
./zathura
|
./zathura
|
||||||
|
|
||||||
@ -32,12 +37,13 @@
|
|||||||
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.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
|
||||||
|
|||||||
163
home/homemodules/fastfetch/default.nix
Normal file
163
home/homemodules/fastfetch/default.nix
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
home/homemodules/fastfetch/options.nix
Normal file
7
home/homemodules/fastfetch/options.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
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://mipmip.github.io/home-manager-option-search/")
|
(mkBm "HM Search" "https://home-manager-options.extranix.com/")
|
||||||
(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")
|
||||||
|
|||||||
@ -163,12 +163,19 @@ in {
|
|||||||
"google"
|
"google"
|
||||||
];
|
];
|
||||||
|
|
||||||
engines = {
|
engines = let
|
||||||
|
mkMan = section: page: p: {
|
||||||
|
name = "Man Pages - ${section}";
|
||||||
|
urls = [{template = "https://man7.org/linux/man-pages/man${page}/{searchTerms}.${page}${p}.html";}];
|
||||||
|
iconMapObj."16" = "https://man7.org/favicon.ico";
|
||||||
|
definedAliases = ["@man${page}"];
|
||||||
|
};
|
||||||
|
in {
|
||||||
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 = ["@k"];
|
definedAliases = ["@kg"];
|
||||||
};
|
};
|
||||||
|
|
||||||
wiki = {
|
wiki = {
|
||||||
@ -178,13 +185,34 @@ in {
|
|||||||
definedAliases = ["@w"];
|
definedAliases = ["@w"];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixos-packages = {
|
searchix = {
|
||||||
name = "NixOS Packages";
|
name = "Searchix";
|
||||||
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}";}];
|
||||||
@ -192,6 +220,13 @@ 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}";}];
|
||||||
@ -206,13 +241,6 @@ 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";}];
|
||||||
@ -220,6 +248,32 @@ 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,159 +42,198 @@ in {
|
|||||||
fish_pager_color_description ${color.hex.overlay0}
|
fish_pager_color_description ${color.hex.overlay0}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = let
|
||||||
enable = true;
|
# Only add " | bat" if bat is installed
|
||||||
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
|
||||||
|
|
||||||
functions = lib.mergeAttrsList [
|
# Same as above but with args for bat
|
||||||
(lib.optionalAttrs config.homemodules.nnn.enable {
|
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
|
||||||
nnncd = {
|
|
||||||
wraps = "nnn";
|
|
||||||
description = "support nnn quit and change directory";
|
|
||||||
body = ''
|
|
||||||
# Block nesting of nnn in subshells
|
|
||||||
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
|
|
||||||
echo "nnn is already running"
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
|
# These can be used for my config.homemodules and for HM config.programs,
|
||||||
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
|
# as both of these add the package to home.packages
|
||||||
# see. To cd on quit only on ^G, remove the "-x" from both lines below,
|
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
|
||||||
# without changing the paths.
|
|
||||||
if test -n "$XDG_CONFIG_HOME"
|
|
||||||
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
|
|
||||||
else
|
|
||||||
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
# Only add fish abbr if package is installed
|
||||||
# stty start undef
|
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
|
||||||
# stty stop undef
|
in
|
||||||
# stty lwrap undef
|
lib.mkMerge [
|
||||||
# stty lnext undef
|
# Darwin exclusive config
|
||||||
|
(lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
|
shellInit = ''
|
||||||
|
set fish_greeting
|
||||||
|
yes | fish_config theme save "system-theme"
|
||||||
|
|
||||||
# The command function allows one to alias this function to `nnn` without
|
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
|
||||||
# making an infinitely recursive alias
|
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
|
||||||
command nnn $argv
|
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;
|
||||||
|
'';
|
||||||
|
|
||||||
if test -e $NNN_TMPFILE
|
shellAbbrs = lib.mkMerge [
|
||||||
source $NNN_TMPFILE
|
{
|
||||||
rm $NNN_TMPFILE
|
rebuild = "sudo darwin-rebuild switch --flake .#darwinix";
|
||||||
end
|
}
|
||||||
'';
|
|
||||||
};
|
(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;
|
||||||
|
|
||||||
|
shellInit = ''
|
||||||
|
set fish_greeting
|
||||||
|
yes | fish_config theme save "system-theme"
|
||||||
|
'';
|
||||||
|
|
||||||
|
functions = lib.mergeAttrsList [
|
||||||
|
(lib.optionalAttrs config.homemodules.nnn.enable {
|
||||||
|
nnncd = {
|
||||||
|
wraps = "nnn";
|
||||||
|
description = "support nnn quit and change directory";
|
||||||
|
body = ''
|
||||||
|
# Block nesting of nnn in subshells
|
||||||
|
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
|
||||||
|
echo "nnn is already running"
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||||
|
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
|
||||||
|
# see. To cd on quit only on ^G, remove the "-x" from both lines below,
|
||||||
|
# without changing the paths.
|
||||||
|
if test -n "$XDG_CONFIG_HOME"
|
||||||
|
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
|
||||||
|
else
|
||||||
|
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||||||
|
# stty start undef
|
||||||
|
# stty stop undef
|
||||||
|
# stty lwrap undef
|
||||||
|
# stty lnext undef
|
||||||
|
|
||||||
|
# The command function allows one to alias this function to `nnn` without
|
||||||
|
# making an infinitely recursive alias
|
||||||
|
command nnn $argv
|
||||||
|
|
||||||
|
if test -e $NNN_TMPFILE
|
||||||
|
source $NNN_TMPFILE
|
||||||
|
rm $NNN_TMPFILE
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
shellAbbrs = lib.mkMerge [
|
||||||
|
# Abbrs that are always available are defined here.
|
||||||
|
{
|
||||||
|
# Tools
|
||||||
|
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
||||||
|
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
||||||
|
|
||||||
|
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra"; # env var for wayland
|
||||||
|
}
|
||||||
|
|
||||||
|
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
||||||
|
|
||||||
|
# Doesn't work with abbrify because I have nnn.override...
|
||||||
|
(lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";})
|
||||||
|
(lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";})
|
||||||
|
|
||||||
|
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
||||||
|
|
||||||
|
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
|
||||||
|
|
||||||
|
# (abbrify pkgs.sd {sed = "sd";})
|
||||||
|
];
|
||||||
|
})
|
||||||
|
|
||||||
|
# Common config
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
shellAbbrs = lib.mkMerge [
|
||||||
|
{
|
||||||
|
# Shell
|
||||||
|
c = "clear";
|
||||||
|
q = "exit";
|
||||||
|
mkdir = "mkdir -p"; # also create parents (-p)
|
||||||
|
watch = "watch -d -c -n 0.5";
|
||||||
|
sy = "sudo yazi";
|
||||||
|
cd = "z"; # zoxide for quickjump to previously visited locations
|
||||||
|
cdd = "zi";
|
||||||
|
b = "z -"; # jump to previous dir
|
||||||
|
|
||||||
|
# Fish
|
||||||
|
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
|
||||||
|
abbrs = batifyWithArgs "abbr" "-l fish";
|
||||||
|
|
||||||
|
# Nix
|
||||||
|
nd = "nix develop";
|
||||||
|
nb = "nix build -L";
|
||||||
|
ns = "nix shell nixpkgs#";
|
||||||
|
nr = "nix run";
|
||||||
|
nps = "nps -e";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Abbrs only available if package is installed
|
||||||
|
(abbrify pkgs.rsync rec {
|
||||||
|
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
||||||
|
copy = rsync;
|
||||||
|
})
|
||||||
|
|
||||||
|
(abbrify pkgs.duf {
|
||||||
|
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
||||||
|
alldisks = "duf";
|
||||||
|
})
|
||||||
|
|
||||||
|
(abbrify pkgs.ripgrep {
|
||||||
|
rg = "rg --trim --pretty";
|
||||||
|
# grep = rg;
|
||||||
|
})
|
||||||
|
|
||||||
|
(abbrify pkgs.eza {
|
||||||
|
ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions";
|
||||||
|
lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l";
|
||||||
|
lsa = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l -a";
|
||||||
|
tre = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -T -L 2";
|
||||||
|
})
|
||||||
|
|
||||||
|
(abbrify pkgs.fd {find = "fd";})
|
||||||
|
|
||||||
|
(abbrify pkgs.fzf {fuzzy = "fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'";})
|
||||||
|
|
||||||
|
(abbrify pkgs.gdu {
|
||||||
|
# du = "gdu";
|
||||||
|
storage = "gdu";
|
||||||
|
})
|
||||||
|
|
||||||
|
(abbrify pkgs.git {
|
||||||
|
gs = "git status";
|
||||||
|
gd = "git diff --output-indicator-new=' ' --output-indicator-old=' '";
|
||||||
|
gl = "git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
|
||||||
|
ga = "git add";
|
||||||
|
gap = "git add --patch";
|
||||||
|
gc = "git commit --verbose";
|
||||||
|
gcm = "git commit -m";
|
||||||
|
gcl = "git clone";
|
||||||
|
})
|
||||||
|
|
||||||
|
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
|
||||||
|
|
||||||
|
(abbrify pkgs.lazygit {lg = "lazygit";})
|
||||||
|
];
|
||||||
|
|
||||||
|
plugins = [];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins = [];
|
|
||||||
|
|
||||||
shellInit = ''
|
|
||||||
set fish_greeting
|
|
||||||
yes | fish_config theme save "system-theme"
|
|
||||||
'';
|
|
||||||
|
|
||||||
shellAbbrs = let
|
|
||||||
# Only add " | bat" if bat is installed
|
|
||||||
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
|
|
||||||
|
|
||||||
# Same as above but with args for bat
|
|
||||||
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
|
|
||||||
|
|
||||||
# These can be used for my config.homemodules and for HM config.programs,
|
|
||||||
# as both of these add the package to home.packages
|
|
||||||
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
|
|
||||||
|
|
||||||
# Only add fish abbr if package is installed
|
|
||||||
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
|
|
||||||
in
|
|
||||||
lib.mkMerge [
|
|
||||||
# Abbrs that are always available are defined here.
|
|
||||||
{
|
|
||||||
# Shell basics
|
|
||||||
c = "clear";
|
|
||||||
q = "exit";
|
|
||||||
|
|
||||||
# Fish
|
|
||||||
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
|
|
||||||
abbrs = batifyWithArgs "abbr" "-l fish";
|
|
||||||
|
|
||||||
# Tools
|
|
||||||
cd = "z"; # zoxide for quickjump to previously visited locations
|
|
||||||
cdd = "zi";
|
|
||||||
b = "z -"; # jump to previous dir
|
|
||||||
mkdir = "mkdir -p"; # also create parents (-p)
|
|
||||||
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
|
||||||
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
|
||||||
watch = "watch -d -c -n 0.5";
|
|
||||||
nps = "nps -e";
|
|
||||||
nd = "nix develop";
|
|
||||||
nb = "nix build -L";
|
|
||||||
ns = "nix shell nixpkgs#";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Abbrs only available if package is installed
|
|
||||||
|
|
||||||
(abbrify pkgs.duf {
|
|
||||||
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*'";
|
|
||||||
alldisks = "duf";
|
|
||||||
})
|
|
||||||
|
|
||||||
(abbrify pkgs.eza {
|
|
||||||
ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions";
|
|
||||||
lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l";
|
|
||||||
lsa = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l -a";
|
|
||||||
tre = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -T -L 2";
|
|
||||||
})
|
|
||||||
|
|
||||||
(abbrify pkgs.fd {find = "fd";})
|
|
||||||
|
|
||||||
(abbrify pkgs.fzf {fuzzy = "fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'";})
|
|
||||||
|
|
||||||
(abbrify pkgs.gdu {
|
|
||||||
# du = "gdu";
|
|
||||||
storage = "gdu";
|
|
||||||
})
|
|
||||||
|
|
||||||
(abbrify pkgs.git {
|
|
||||||
gs = "git status";
|
|
||||||
gd = "git diff --output-indicator-new=' ' --output-indicator-old=' '";
|
|
||||||
gl = "git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
|
|
||||||
ga = "git add";
|
|
||||||
gap = "git add --patch";
|
|
||||||
gc = "git commit --verbose";
|
|
||||||
gcm = "git commit -m";
|
|
||||||
gcl = "git clone";
|
|
||||||
})
|
|
||||||
|
|
||||||
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
|
|
||||||
|
|
||||||
(abbrify pkgs.lazygit {lg = "lazygit";})
|
|
||||||
|
|
||||||
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
|
|
||||||
|
|
||||||
# Doesn't work with abbrify because I have nnn.override...
|
|
||||||
(lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";})
|
|
||||||
(lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";})
|
|
||||||
|
|
||||||
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
|
||||||
|
|
||||||
(abbrify pkgs.ripgrep rec {
|
|
||||||
rg = "rg --trim --pretty";
|
|
||||||
# grep = rg;
|
|
||||||
})
|
|
||||||
|
|
||||||
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
|
|
||||||
|
|
||||||
(abbrify pkgs.rsync rec {
|
|
||||||
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
|
||||||
copy = rsync;
|
|
||||||
})
|
|
||||||
|
|
||||||
# (abbrify pkgs.sd {sed = "sd";})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = config.homemodules.fish.enable;
|
enableFishIntegration = config.homemodules.fish.enable;
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (config.homemodules) kitty color;
|
inherit (config.homemodules) kitty color;
|
||||||
@ -27,96 +28,102 @@ in {
|
|||||||
"kitty_mod+l" = "next_layout";
|
"kitty_mod+l" = "next_layout";
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = lib.mkMerge [
|
||||||
editor = config.home.sessionVariables.EDITOR;
|
# Linux config
|
||||||
scrollback_lines = 10000;
|
(lib.mkIf pkgs.stdenv.isLinux {
|
||||||
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
|
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
|
||||||
# hide_window_decorations = "yes";
|
listen_on = "unix:@mykitty";
|
||||||
enabled_layouts = "grid,vertical,horizontal";
|
})
|
||||||
|
|
||||||
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
|
# Common config
|
||||||
listen_on = "unix:@mykitty";
|
{
|
||||||
|
editor = config.home.sessionVariables.EDITOR;
|
||||||
|
scrollback_lines = 10000;
|
||||||
|
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
|
||||||
|
# hide_window_decorations = "yes";
|
||||||
|
enabled_layouts = "grid,vertical,horizontal";
|
||||||
|
|
||||||
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";
|
||||||
tab_bar_style = "powerline";
|
tab_bar_style = "powerline";
|
||||||
tab_powerline_style = "round";
|
tab_powerline_style = "round";
|
||||||
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
|
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
|
||||||
|
|
||||||
#
|
#
|
||||||
# Color Theme
|
# Color Theme
|
||||||
#
|
#
|
||||||
|
|
||||||
# The basic colors
|
# The basic colors
|
||||||
background = color.hexS.base;
|
background = color.hexS.base;
|
||||||
foreground = color.hexS.text;
|
foreground = color.hexS.text;
|
||||||
selection_foreground = color.hexS.base;
|
selection_foreground = color.hexS.base;
|
||||||
selection_background = color.hexS.rosewater;
|
selection_background = color.hexS.rosewater;
|
||||||
|
|
||||||
# Cursor colors
|
# Cursor colors
|
||||||
cursor = color.hexS.rosewater;
|
cursor = color.hexS.rosewater;
|
||||||
cursor_text_color = color.hexS.base;
|
cursor_text_color = color.hexS.base;
|
||||||
|
|
||||||
# URL underline color when hovering with mouse
|
# URL underline color when hovering with mouse
|
||||||
url_color = color.hexS.rosewater;
|
url_color = color.hexS.rosewater;
|
||||||
|
|
||||||
# Kitty window border colors
|
# Kitty window border colors
|
||||||
active_border_color = color.hexS.lavender;
|
active_border_color = color.hexS.lavender;
|
||||||
inactive_border_color = color.hexS.overlay0;
|
inactive_border_color = color.hexS.overlay0;
|
||||||
bell_border_color = color.hexS.yellow;
|
bell_border_color = color.hexS.yellow;
|
||||||
|
|
||||||
# OS Window titlebar colors
|
# OS Window titlebar colors
|
||||||
wayland_titlebar_color = "system";
|
wayland_titlebar_color = "system";
|
||||||
macos_titlebar_color = "system";
|
macos_titlebar_color = "system";
|
||||||
|
|
||||||
# Tab bar colors
|
# Tab bar colors
|
||||||
active_tab_foreground = color.hexS.base;
|
active_tab_foreground = color.hexS.base;
|
||||||
active_tab_background = color.hexS.lavender;
|
active_tab_background = color.hexS.lavender;
|
||||||
inactive_tab_foreground = color.hexS.text;
|
inactive_tab_foreground = color.hexS.text;
|
||||||
inactive_tab_background = color.hexS.crust;
|
inactive_tab_background = color.hexS.crust;
|
||||||
tab_bar_background = color.hexS.base;
|
tab_bar_background = color.hexS.base;
|
||||||
|
|
||||||
# Color for marks (marked text in the terminal)
|
# Color for marks (marked text in the terminal)
|
||||||
mark1_foreground = color.hexS.base;
|
mark1_foreground = color.hexS.base;
|
||||||
mark1_background = color.hexS.lavender;
|
mark1_background = color.hexS.lavender;
|
||||||
mark2_foreground = color.hexS.base;
|
mark2_foreground = color.hexS.base;
|
||||||
mark2_background = color.hexS.mauve;
|
mark2_background = color.hexS.mauve;
|
||||||
mark3_foreground = color.hexS.base;
|
mark3_foreground = color.hexS.base;
|
||||||
mark3_background = color.hexS.sapphire;
|
mark3_background = color.hexS.sapphire;
|
||||||
|
|
||||||
# The 16 terminal colors
|
# The 16 terminal colors
|
||||||
# black
|
# black
|
||||||
color0 = color.hexS.subtext1;
|
color0 = color.hexS.subtext1;
|
||||||
color8 = color.hexS.subtext0;
|
color8 = color.hexS.subtext0;
|
||||||
|
|
||||||
# red
|
# red
|
||||||
color1 = color.hexS.red;
|
color1 = color.hexS.red;
|
||||||
color9 = color.hexS.red;
|
color9 = color.hexS.red;
|
||||||
|
|
||||||
# green
|
# green
|
||||||
color2 = color.hexS.green;
|
color2 = color.hexS.green;
|
||||||
color10 = color.hexS.green;
|
color10 = color.hexS.green;
|
||||||
|
|
||||||
# yellow
|
# yellow
|
||||||
color3 = color.hexS.yellow;
|
color3 = color.hexS.yellow;
|
||||||
color11 = color.hexS.yellow;
|
color11 = color.hexS.yellow;
|
||||||
|
|
||||||
# blue
|
# blue
|
||||||
color4 = color.hexS.blue;
|
color4 = color.hexS.blue;
|
||||||
color12 = color.hexS.blue;
|
color12 = color.hexS.blue;
|
||||||
|
|
||||||
# magenta
|
# magenta
|
||||||
color5 = color.hexS.pink;
|
color5 = color.hexS.pink;
|
||||||
color13 = color.hexS.pink;
|
color13 = color.hexS.pink;
|
||||||
|
|
||||||
# cyan
|
# cyan
|
||||||
color6 = color.hexS.teal;
|
color6 = color.hexS.teal;
|
||||||
color14 = color.hexS.teal;
|
color14 = color.hexS.teal;
|
||||||
|
|
||||||
# white
|
# white
|
||||||
color7 = color.hexS.surface2;
|
color7 = color.hexS.surface2;
|
||||||
color15 = color.hexS.surface1;
|
color15 = color.hexS.surface1;
|
||||||
};
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,6 +77,7 @@ in {
|
|||||||
typstyle
|
typstyle
|
||||||
mbake
|
mbake
|
||||||
just-formatter
|
just-formatter
|
||||||
|
tombi
|
||||||
])
|
])
|
||||||
|
|
||||||
[
|
[
|
||||||
@ -125,7 +126,7 @@ in {
|
|||||||
maplocalleader = ",";
|
maplocalleader = ",";
|
||||||
};
|
};
|
||||||
|
|
||||||
opts = import ./vim_opts.nix {inherit lib mylib;};
|
opts = import ./vim_opts.nix {inherit config lib mylib;};
|
||||||
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
|
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
|
||||||
extraConfigLua = builtins.readFile ./extraConfigLua.lua;
|
extraConfigLua = builtins.readFile ./extraConfigLua.lua;
|
||||||
|
|
||||||
@ -526,6 +527,7 @@ in {
|
|||||||
qml = ["qmlformat"];
|
qml = ["qmlformat"];
|
||||||
rust = ["rustfmt"];
|
rust = ["rustfmt"];
|
||||||
svelte = ["prettierd" "prettier"];
|
svelte = ["prettierd" "prettier"];
|
||||||
|
toml = ["tombi"];
|
||||||
typescript = ["prettierd" "prettier"];
|
typescript = ["prettierd" "prettier"];
|
||||||
typst = ["typstyle"];
|
typst = ["typstyle"];
|
||||||
};
|
};
|
||||||
@ -550,6 +552,21 @@ 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;
|
||||||
@ -860,12 +877,15 @@ in {
|
|||||||
|
|
||||||
cmd = [
|
cmd = [
|
||||||
"clangd"
|
"clangd"
|
||||||
|
"--all-scopes-completion"
|
||||||
"--background-index"
|
"--background-index"
|
||||||
"--clang-tidy"
|
"--clang-tidy"
|
||||||
"--header-insertion=iwyu"
|
|
||||||
"--completion-style=detailed"
|
"--completion-style=detailed"
|
||||||
"--function-arg-placeholders"
|
|
||||||
"--fallback-style=llvm"
|
"--fallback-style=llvm"
|
||||||
|
"--function-arg-placeholders=0"
|
||||||
|
"--header-insertion=iwyu"
|
||||||
|
"--header-insertion-decorators"
|
||||||
|
"--pch-storage=memory"
|
||||||
];
|
];
|
||||||
|
|
||||||
capabilities = {
|
capabilities = {
|
||||||
@ -883,7 +903,7 @@ in {
|
|||||||
{name = "cmake";}
|
{name = "cmake";}
|
||||||
{name = "cssls";}
|
{name = "cssls";}
|
||||||
{name = "html";} # vscode-langservers-extracted
|
{name = "html";} # vscode-langservers-extracted
|
||||||
{name = "just-lsp";} # TODO: Doesn't autostart?
|
{name = "just";}
|
||||||
{name = "lua_ls";}
|
{name = "lua_ls";}
|
||||||
{
|
{
|
||||||
name = "ltex";
|
name = "ltex";
|
||||||
@ -1552,7 +1572,7 @@ in {
|
|||||||
icon = " ";
|
icon = " ";
|
||||||
key = "s";
|
key = "s";
|
||||||
desc = "Restore Session";
|
desc = "Restore Session";
|
||||||
action = "<cmd>lua require('persisted').select()<cr>";
|
action = "<cmd>Persisted select<cr>";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
icon = " ";
|
icon = " ";
|
||||||
@ -2155,6 +2175,7 @@ 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
|
||||||
|
|||||||
@ -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 Script:h12:Medium"
|
o.guifont = "MonoLisa Alt:h12:Medium"
|
||||||
else
|
else
|
||||||
-- require("notify").notify("Not running in NeoVide")
|
-- require("notify").notify("Not running in NeoVide")
|
||||||
end
|
end
|
||||||
|
|||||||
@ -505,6 +505,48 @@ _: 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 = [
|
||||||
@ -536,19 +578,19 @@ _: let
|
|||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>sl";
|
key = "<leader>sl";
|
||||||
action = "<cmd>lua require('persisted').select()<cr>";
|
action = "<cmd>Persisted select<cr>";
|
||||||
options.desc = "Restore Session";
|
options.desc = "Restore Session";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>ss";
|
key = "<leader>ss";
|
||||||
action = "<cmd>SessionSave<cr>";
|
action = "<cmd>Persisted save<cr>";
|
||||||
options.desc = "Save Session";
|
options.desc = "Save Session";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>sd";
|
key = "<leader>sd";
|
||||||
action = "<cmd>SessionDelete<cr>";
|
action = "<cmd>Persisted delete<cr>";
|
||||||
options.desc = "Delete Session";
|
options.desc = "Delete Session";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -834,19 +876,19 @@ _: let
|
|||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>tt";
|
key = "<leader>tt";
|
||||||
action = "<cmd>Trouble diagnostics toggle focus=false win.position=left<cr>";
|
action = "<cmd>Trouble diagnostics toggle focus=false win.position=bottom<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=left<cr>";
|
action = "<cmd>Trouble todo toggle focus=false win.position=bottom<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=left<cr>";
|
action = "<cmd>Trouble symbols toggle focus=false win.position=bottom<cr>";
|
||||||
options.desc = "Trouble Symbols";
|
options.desc = "Trouble Symbols";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fork = true # Start neovide detached
|
fork = true # Start neovide detached
|
||||||
frame = "none" # full, buttonless, none
|
frame = "full" # 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 = "/home/christoph/.vim/undo";
|
undodir = "${config.home.homeDirectory}/.vim/undo";
|
||||||
undolevels = 10000;
|
undolevels = 10000;
|
||||||
# autochdir = true;
|
# autochdir = true;
|
||||||
confirm = true;
|
confirm = true;
|
||||||
|
|||||||
@ -17,26 +17,101 @@ in {
|
|||||||
assertion = nixosConfig.programs.niri.enable;
|
assertion = nixosConfig.programs.niri.enable;
|
||||||
message = "Can't enable Niri config with Niri disabled!";
|
message = "Can't enable Niri config with Niri disabled!";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
assertion = !(programs.noctalia-shell.enable && programs.dank-material-shell.enable);
|
|
||||||
message = "Can't enable Noctalia and DankMaterialShell at the same time!";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme.package = color.iconPackage;
|
iconTheme.package = color.iconPackage;
|
||||||
iconTheme.name = color.iconTheme;
|
iconTheme.name = color.iconTheme;
|
||||||
|
|
||||||
|
colorScheme = "dark";
|
||||||
|
gtk3.colorScheme = "dark";
|
||||||
|
gtk4.colorScheme = "dark";
|
||||||
|
|
||||||
|
theme = {
|
||||||
|
# name = "adw-gtk3-dark";
|
||||||
|
# package = pkgs.adw-gtk3;
|
||||||
|
name = "catppuccin-mocha-mauve-standard";
|
||||||
|
package = pkgs.catppuccin-gtk.override {
|
||||||
|
variant = "mocha";
|
||||||
|
accents = ["mauve"];
|
||||||
|
size = "standard";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
gtk3.extraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Disable niri polkit if we use DMS, as it has its own
|
dconf = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
color-scheme = "prefer-dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Disable Niri's kde auth agent and start gnome auth agent instead
|
||||||
systemd.user.services.niri-flake-polkit = lib.mkForce {};
|
systemd.user.services.niri-flake-polkit = lib.mkForce {};
|
||||||
|
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
|
Unit = {
|
||||||
|
Description = "polkit-gnome-authentication-agent-1";
|
||||||
|
Wants = ["graphical-session.target"];
|
||||||
|
After = ["graphical-session.target"];
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = ["graphical-session.target"];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
# Mute the stupid DMS popups
|
file = {
|
||||||
# TODO: Is there a DMS option to disable those?
|
# Link theme for flatpak
|
||||||
file.".config/DankMaterialShell/.firstlaunch".text = "";
|
".themes/${config.gtk.theme.name}".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}";
|
||||||
file.".config/DankMaterialShell/.changelog-1.4".text = "";
|
|
||||||
|
".config/waypaper/config.ini".text = lib.generators.toINI {} {
|
||||||
|
Settings = {
|
||||||
|
use_xdg_state = true;
|
||||||
|
|
||||||
|
# Those are contained in the statefile (.local/state/waypaper/state.ini):
|
||||||
|
# backend = "swww";
|
||||||
|
# folder = "~/NixFlake/wallpapers";
|
||||||
|
# monitors = "All";
|
||||||
|
# wallpaper =
|
||||||
|
|
||||||
|
language = "en";
|
||||||
|
show_path_in_tooltip = true;
|
||||||
|
fill = "fill";
|
||||||
|
sort = "name";
|
||||||
|
color = "#ffffff";
|
||||||
|
subfolders = false;
|
||||||
|
all_subfolders = false;
|
||||||
|
show_hidden = false;
|
||||||
|
show_gifs_only = false;
|
||||||
|
zen_mode = false;
|
||||||
|
number_of_columns = 3;
|
||||||
|
swww_transition_type = "wipe";
|
||||||
|
swww_transition_step = 90;
|
||||||
|
swww_transition_angle = 30;
|
||||||
|
swww_transition_duration = 1;
|
||||||
|
swww_transition_fps = 60;
|
||||||
|
mpvpaper_sound = false;
|
||||||
|
# mpvpaper_options = "";
|
||||||
|
# post_command =
|
||||||
|
# stylesheet = /home/christoph/.config/waypaper/style.css
|
||||||
|
# keybindings = ~/.config/waypaper/keybindings.ini
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
QT_QPA_PLATFORMTHEME = "gtk3"; # For Noctalia
|
QT_QPA_PLATFORMTHEME = "gtk3"; # For Noctalia
|
||||||
@ -53,21 +128,275 @@ in {
|
|||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
xwayland-satellite
|
xwayland-satellite
|
||||||
ncpamixer # Audio control
|
# ncpamixer # Audio control
|
||||||
|
wiremix # Audio control
|
||||||
|
swww
|
||||||
|
waypaper
|
||||||
|
|
||||||
|
# GTK apps (look good and work well with xdg portals)
|
||||||
nautilus # Fallback file chooser used by xdg-desktop-portal-gnome
|
nautilus # Fallback file chooser used by xdg-desktop-portal-gnome
|
||||||
|
|
||||||
# In case we fallback to the default config
|
# Catppuccin-GTK theme
|
||||||
|
sassc
|
||||||
|
gtk-engine-murrine
|
||||||
|
gnome-themes-extra
|
||||||
|
|
||||||
|
# In case we fallback to the default niri config/keybindings
|
||||||
alacritty
|
alacritty
|
||||||
fuzzel
|
fuzzel
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
dunst = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
iconTheme.package = color.iconPackage;
|
||||||
|
iconTheme.name = color.iconTheme;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
# monitor = config.homemodules.waybar.monitor;
|
||||||
|
follow = "keyboard";
|
||||||
|
font = "${color.font} 11";
|
||||||
|
offset = "9x11";
|
||||||
|
background = color.hexS.base;
|
||||||
|
foreground = color.hexS.text;
|
||||||
|
frame_width = 2;
|
||||||
|
corner_radius = 8;
|
||||||
|
separator_color = "frame";
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_low = {
|
||||||
|
frame_color = color.hexS.green;
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_normal = {
|
||||||
|
frame_color = color.hexS.green;
|
||||||
|
};
|
||||||
|
|
||||||
|
urgency_critical = {
|
||||||
|
frame_color = color.hexS.red;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
# TODO: Those should be modules with their own options
|
walker = {
|
||||||
noctalia-shell = import ./noctalia.nix {inherit color;};
|
enable = true;
|
||||||
dank-material-shell = import ./dankMaterialShell.nix {inherit config color;};
|
runAsService = true;
|
||||||
dsearch.enable = false;
|
|
||||||
|
# https://github.com/abenz1267/walker/blob/master/resources/config.toml
|
||||||
|
config = {
|
||||||
|
theme = "cattpuccin-mocha";
|
||||||
|
|
||||||
|
providers = {
|
||||||
|
default = ["desktopapplications"];
|
||||||
|
};
|
||||||
|
empty = ["desktopapplications"];
|
||||||
|
};
|
||||||
|
|
||||||
|
themes."cattpuccin-mocha" = let
|
||||||
|
border-radius = "8px";
|
||||||
|
in {
|
||||||
|
style = ''
|
||||||
|
@define-color rosewater #${color.hex.rosewater};
|
||||||
|
@define-color flamingo #${color.hex.flamingo};
|
||||||
|
@define-color pink #${color.hex.pink};
|
||||||
|
@define-color mauve #${color.hex.mauve};
|
||||||
|
@define-color red #${color.hex.red};
|
||||||
|
@define-color maroon #${color.hex.maroon};
|
||||||
|
@define-color peach #${color.hex.peach};
|
||||||
|
@define-color yellow #${color.hex.yellow};
|
||||||
|
@define-color green #${color.hex.green};
|
||||||
|
@define-color teal #${color.hex.teal};
|
||||||
|
@define-color sky #${color.hex.sky};
|
||||||
|
@define-color sapphire #${color.hex.sapphire};
|
||||||
|
@define-color blue #${color.hex.blue};
|
||||||
|
@define-color lavender #${color.hex.lavender};
|
||||||
|
@define-color text #${color.hex.text};
|
||||||
|
@define-color subtext1 #${color.hex.subtext1};
|
||||||
|
@define-color subtext0 #${color.hex.subtext0};
|
||||||
|
@define-color overlay2 #${color.hex.overlay2};
|
||||||
|
@define-color overlay1 #${color.hex.overlay1};
|
||||||
|
@define-color overlay0 #${color.hex.overlay0};
|
||||||
|
@define-color surface2 #${color.hex.surface2};
|
||||||
|
@define-color surface1 #${color.hex.surface1};
|
||||||
|
@define-color surface0 #${color.hex.surface0};
|
||||||
|
@define-color base #${color.hex.base};
|
||||||
|
@define-color mantle #${color.hex.mantle};
|
||||||
|
@define-color crust #${color.hex.crust};
|
||||||
|
|
||||||
|
@define-color accent #${color.hex.accent};
|
||||||
|
|
||||||
|
* {
|
||||||
|
all: unset;
|
||||||
|
font-family: ${color.font};
|
||||||
|
}
|
||||||
|
|
||||||
|
.normal-icons {
|
||||||
|
-gtk-icon-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.large-icons {
|
||||||
|
-gtk-icon-size: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
scrollbar {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-wrapper {
|
||||||
|
box-shadow:
|
||||||
|
0 19px 38px rgba(0, 0, 0, 0.3),
|
||||||
|
0 15px 12px rgba(0, 0, 0, 0.22);
|
||||||
|
background: @base;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: ${border-radius};
|
||||||
|
border: 2px solid @accent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-box,
|
||||||
|
.elephant-hint,
|
||||||
|
.placeholder {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-container {
|
||||||
|
border-radius: ${border-radius};
|
||||||
|
background: @mantle;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input placeholder {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input selection {
|
||||||
|
background: @surface1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
caret-color: @text;
|
||||||
|
background: none;
|
||||||
|
padding: 10px;
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-box {
|
||||||
|
border-radius: ${border-radius};
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-quick-activation {
|
||||||
|
background: alpha(@mauve, 0.25);
|
||||||
|
border-radius: ${border-radius};
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
child:selected .item-box,
|
||||||
|
row:selected .item-box {
|
||||||
|
background: alpha(@surface0, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-subtext {
|
||||||
|
font-size: 12px;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.providerlist .item-subtext {
|
||||||
|
font-size: unset;
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-image-text {
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview {
|
||||||
|
border: 1px solid alpha(@mauve, 0.25);
|
||||||
|
border-radius: ${border-radius};
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calc .item-text {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.symbols .item-image {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo.done .item-text-box {
|
||||||
|
opacity: 0.25;
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo.urgent {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.todo.active {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bluetooth.disconnected {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview .large-icons {
|
||||||
|
-gtk-icon-size: 64px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.keybinds {
|
||||||
|
padding-top: 10px;
|
||||||
|
border-top: 1px solid @surface0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.keybind-button {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.keybind-button:hover {
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
.keybind-bind {
|
||||||
|
text-transform: lowercase;
|
||||||
|
opacity: 0.35;
|
||||||
|
}
|
||||||
|
|
||||||
|
.keybind-label {
|
||||||
|
padding: 2px 4px;
|
||||||
|
border-radius: ${border-radius};
|
||||||
|
border: 1px solid @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
padding: 10px;
|
||||||
|
background: @red;
|
||||||
|
color: @base;
|
||||||
|
}
|
||||||
|
|
||||||
|
:not(.calc).current {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-content.archlinuxpkgs,
|
||||||
|
.preview-content.dnfpackages {
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# layouts = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# TODO: Extract options
|
# TODO: Extract options
|
||||||
niri = {
|
niri = {
|
||||||
@ -106,9 +435,8 @@ in {
|
|||||||
prefer-no-csd = true; # Disable client-side decorations (e.g. window titlebars)
|
prefer-no-csd = true; # Disable client-side decorations (e.g. window titlebars)
|
||||||
|
|
||||||
spawn-at-startup = [
|
spawn-at-startup = [
|
||||||
# TODO: Depend on options
|
{argv = ["ashell" "-c" "${config.paths.dotfiles}/ashell/config.toml"];}
|
||||||
# {argv = ["noctalia-shell"];}
|
{argv = ["waypaper" "--restore"];}
|
||||||
{argv = ["dms" "run"];}
|
|
||||||
|
|
||||||
{argv = ["kitty" "--hold" "fastfetch"];}
|
{argv = ["kitty" "--hold" "fastfetch"];}
|
||||||
{argv = ["fcitx5"];}
|
{argv = ["fcitx5"];}
|
||||||
@ -198,6 +526,11 @@ in {
|
|||||||
top = 4; # Somehow the bar eclusivity doesn't work as expected
|
top = 4; # Somehow the bar eclusivity doesn't work as expected
|
||||||
bottom = 2;
|
bottom = 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
enable = true;
|
||||||
|
draw-behind-window = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gestures = {
|
gestures = {
|
||||||
@ -240,6 +573,11 @@ in {
|
|||||||
open-on-workspace = "2";
|
open-on-workspace = "2";
|
||||||
open-maximized = true;
|
open-maximized = true;
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
matches = [{app-id = "jetbrains-clion";}];
|
||||||
|
open-on-workspace = "2";
|
||||||
|
open-maximized = true;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
matches = [{app-id = "code-url-handler";}];
|
matches = [{app-id = "code-url-handler";}];
|
||||||
open-on-workspace = "2";
|
open-on-workspace = "2";
|
||||||
@ -290,14 +628,13 @@ in {
|
|||||||
|
|
||||||
layer-rules = [
|
layer-rules = [
|
||||||
{
|
{
|
||||||
# Set the overview wallpaper on the backdrop (Noctalia).
|
# Waybar rounded corners background clipping fix
|
||||||
matches = [{namespace = "^noctalia-overview*";}];
|
matches = [{namespace = "waybar";}];
|
||||||
place-within-backdrop = true;
|
opacity = 0.99;
|
||||||
}
|
shadow = {
|
||||||
{
|
enable = true;
|
||||||
# Set the overview wallpaper on the backdrop (DMS).
|
draw-behind-window = true;
|
||||||
matches = [{namespace = "^dms:blurwallpaper$";}];
|
};
|
||||||
place-within-backdrop = true;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -306,8 +643,6 @@ in {
|
|||||||
honor-xdg-activation-with-invalid-serial = [];
|
honor-xdg-activation-with-invalid-serial = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: Only start hypr... stuff with hyprland, not systemd (hypridle, hyprpaper currently)
|
|
||||||
|
|
||||||
# TODO: Move values to config option and set in home/christoph/niri.nix
|
# TODO: Move values to config option and set in home/christoph/niri.nix
|
||||||
binds = with config.lib.niri.actions; {
|
binds = with config.lib.niri.actions; {
|
||||||
# Applications
|
# Applications
|
||||||
@ -343,42 +678,42 @@ in {
|
|||||||
action = spawn "neovide" "${config.paths.dotfiles}/flake.nix";
|
action = spawn "neovide" "${config.paths.dotfiles}/flake.nix";
|
||||||
hotkey-overlay = {title = "Edit the NixFlake.";};
|
hotkey-overlay = {title = "Edit the NixFlake.";};
|
||||||
};
|
};
|
||||||
|
"Mod+W" = {
|
||||||
|
action = spawn "waypaper";
|
||||||
|
hotkey-overlay = {title = "Open wallpaper chooser.";};
|
||||||
|
};
|
||||||
|
"Mod+Shift+W" = {
|
||||||
|
action = spawn "waypaper" "--random";
|
||||||
|
hotkey-overlay = {title = "Select random wallpaper.";};
|
||||||
|
};
|
||||||
|
|
||||||
# TODO: Enable with Noctalia option
|
|
||||||
# Noctalia
|
|
||||||
# "Mod+A" = {
|
|
||||||
# action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle";
|
|
||||||
# hotkey-overlay = {title = "Toggle the application launcher.";};
|
|
||||||
# };
|
|
||||||
# "Mod+Ctrl+L" = {
|
|
||||||
# action = spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock";
|
|
||||||
# hotkey-overlay = {title = "Lock the screen.";};
|
|
||||||
# };
|
|
||||||
# "Mod+W" = {
|
|
||||||
# action = spawn "noctalia-shell" "ipc" "call" "wallpaper" "toggle";
|
|
||||||
# hotkey-overlay = {title = "Toggle the wallpaper chooser.";};
|
|
||||||
# };
|
|
||||||
# "Mod+Escape" = {
|
|
||||||
# action = spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle";
|
|
||||||
# hotkey-overlay = {title = "Toggle the session menu.";};
|
|
||||||
# };
|
|
||||||
|
|
||||||
# TODO: Enable with DMS option
|
|
||||||
# DankMaterialShell
|
|
||||||
"Mod+A" = {
|
"Mod+A" = {
|
||||||
action = spawn "dms" "ipc" "call" "spotlight" "toggle";
|
action = spawn "walker" "-m" "desktopapplications";
|
||||||
hotkey-overlay = {title = "Toggle the application launcher.";};
|
hotkey-overlay = {title = "Toggle the application launcher.";};
|
||||||
};
|
};
|
||||||
"Mod+Ctrl+L" = {
|
"Mod+Shift+A" = {
|
||||||
action = spawn "dms" "ipc" "call" "lock" "lock";
|
action = spawn "walker" "-m" "providerlist";
|
||||||
hotkey-overlay = {title = "Lock the screen.";};
|
hotkey-overlay = {title = "Toggle the launcher.";};
|
||||||
};
|
};
|
||||||
"Mod+Escape" = {
|
"Mod+Escape" = let
|
||||||
action = spawn "dms" "ipc" "call" "powermenu" "toggle";
|
powerMenu = mylib.rofi.mkSimpleMenu rec {
|
||||||
|
prompt = "Session";
|
||||||
|
attrs = {
|
||||||
|
" Poweroff" = "poweroff";
|
||||||
|
" Reboot" = "reboot";
|
||||||
|
" Lock" = "loginctl lock-session";
|
||||||
|
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
||||||
|
# " Reload Hyprland" = "hyprctl reload";
|
||||||
|
# " Exit Hyprland" = "hyprctl dispatch exit";
|
||||||
|
};
|
||||||
|
command = "walker -d -p ${prompt}";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
action = spawn "${powerMenu}/bin/rofi-menu-Session";
|
||||||
hotkey-overlay = {title = "Toggle the session menu.";};
|
hotkey-overlay = {title = "Toggle the session menu.";};
|
||||||
};
|
};
|
||||||
"Mod+C" = {
|
"Mod+C" = {
|
||||||
action = spawn "dms" "ipc" "call" "clipboard" "toggle";
|
action = spawn "walker" "-m" "clipboard";
|
||||||
hotkey-overlay = {title = "Show clipboard history.";};
|
hotkey-overlay = {title = "Show clipboard history.";};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
221
home/homemodules/packages/default.nix
Normal file
221
home/homemodules/packages/default.nix
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
{
|
||||||
|
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 {
|
||||||
|
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
|
||||||
|
])
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# 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)) [
|
||||||
|
veracrypt
|
||||||
|
wl-clipboard
|
||||||
|
|
||||||
|
# Proton
|
||||||
|
protonvpn-gui
|
||||||
|
protonmail-bridge-gui
|
||||||
|
|
||||||
|
# GUI stuff
|
||||||
|
nautilus # Just in case
|
||||||
|
signal-desktop
|
||||||
|
anki
|
||||||
|
font-manager # Previews fonts, but doesn't set them
|
||||||
|
nextcloud-client
|
||||||
|
keepassxc
|
||||||
|
thunderbird # TODO: Email module
|
||||||
|
obsidian
|
||||||
|
zotero
|
||||||
|
zeal # docs browser
|
||||||
|
# helvum # unmaintained
|
||||||
|
crosspipe
|
||||||
|
vlc
|
||||||
|
audacity
|
||||||
|
ferdium
|
||||||
|
gparted
|
||||||
|
# feishin # electron :(
|
||||||
|
jellyfin-tui
|
||||||
|
playerctl # Media player control
|
||||||
|
czkawka-full # file deduplicator
|
||||||
|
|
||||||
|
# Office
|
||||||
|
kdePackages.wacomtablet # For xournalpp/krita
|
||||||
|
xournalpp # Write with a pen, like old people
|
||||||
|
hunspell # I cna't type
|
||||||
|
hunspellDicts.en_US
|
||||||
|
hunspellDicts.de_DE
|
||||||
|
|
||||||
|
inputs.masssprings.packages.${stdenv.hostPlatform.system}.default
|
||||||
|
])
|
||||||
|
|
||||||
|
# Darwin exclusive packages
|
||||||
|
(lib.optionals pkgs.stdenv.isDarwin [
|
||||||
|
# Use homebrew instead
|
||||||
|
# alt-tab-macos
|
||||||
|
# discord
|
||||||
|
# obsidian
|
||||||
|
# nextcloud-client
|
||||||
|
# protonvpn-gui
|
||||||
|
# iina
|
||||||
|
])
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
# The home-manager management tool.
|
||||||
|
# Will only be enabled if HM is installed standalone.
|
||||||
|
home-manager.enable = true;
|
||||||
|
|
||||||
|
direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
home/homemodules/packages/options.nix
Normal file
7
home/homemodules/packages/options.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
enable = lib.mkEnableOption "Enable common packages";
|
||||||
|
}
|
||||||
@ -35,168 +35,72 @@ 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
|
||||||
inherit (config.lib.formats.rasi) mkLiteral;
|
mkLiteral = config.lib.formats.rasi.mkLiteral;
|
||||||
|
in
|
||||||
trans = "rgba(0, 0, 0, 0)";
|
import ./theme.nix {inherit color mkLiteral;};
|
||||||
in {
|
|
||||||
"element-text,element-icon,mode-switcher" = {
|
|
||||||
background-color = mkLiteral "inherit";
|
|
||||||
text-color = mkLiteral "inherit";
|
|
||||||
};
|
|
||||||
|
|
||||||
"window" = {
|
|
||||||
height = mkLiteral "50%";
|
|
||||||
width = mkLiteral "33%";
|
|
||||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
|
||||||
border-radius = 6;
|
|
||||||
border-color = mkLiteral color.hexS.accent;
|
|
||||||
|
|
||||||
# This is not opacity but translucency
|
|
||||||
background-color = mkLiteral "rgba(${color.rgbS.base}, 0.25)";
|
|
||||||
};
|
|
||||||
|
|
||||||
"mainbox" = {
|
|
||||||
background-color = mkLiteral trans;
|
|
||||||
};
|
|
||||||
|
|
||||||
# TOP INPUT BAR START
|
|
||||||
|
|
||||||
"inputbar" = {
|
|
||||||
children = builtins.map mkLiteral ["prompt" "entry"];
|
|
||||||
background-color = mkLiteral trans;
|
|
||||||
};
|
|
||||||
|
|
||||||
"prompt" = {
|
|
||||||
background-color = mkLiteral color.hexS.accentHl;
|
|
||||||
padding = 6;
|
|
||||||
text-color = mkLiteral color.hexS.accentText;
|
|
||||||
border-radius = 3;
|
|
||||||
margin = mkLiteral "10px 0px 0px 10px";
|
|
||||||
};
|
|
||||||
|
|
||||||
"entry" = {
|
|
||||||
padding = 6;
|
|
||||||
margin = mkLiteral "10px 10px 0px 5px";
|
|
||||||
text-color = mkLiteral color.hexS.text;
|
|
||||||
background-color = mkLiteral trans;
|
|
||||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
|
||||||
border-radius = 3;
|
|
||||||
border-color = mkLiteral color.hexS.accentHl;
|
|
||||||
};
|
|
||||||
|
|
||||||
# MESSAGEBOX (usually not visible)
|
|
||||||
|
|
||||||
"message" = {
|
|
||||||
background-color = mkLiteral trans;
|
|
||||||
};
|
|
||||||
|
|
||||||
"error-message" = {
|
|
||||||
background-color = mkLiteral trans;
|
|
||||||
margin = mkLiteral "0px 0px 10px 0px";
|
|
||||||
};
|
|
||||||
|
|
||||||
"textbox" = {
|
|
||||||
background-color = mkLiteral trans;
|
|
||||||
padding = 6;
|
|
||||||
margin = mkLiteral "10px 10px 0px 10px";
|
|
||||||
border-radius = 3;
|
|
||||||
};
|
|
||||||
|
|
||||||
# LISTVIEW
|
|
||||||
|
|
||||||
"listview" = {
|
|
||||||
# border = mkLiteral "0px 0px 0px";
|
|
||||||
padding = 0;
|
|
||||||
margin = mkLiteral "5px 10px 10px 10px";
|
|
||||||
columns = 1;
|
|
||||||
background-color = mkLiteral trans;
|
|
||||||
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
|
||||||
border-radius = 3;
|
|
||||||
border-color = mkLiteral color.hexS.accentDim;
|
|
||||||
};
|
|
||||||
|
|
||||||
"element" = {
|
|
||||||
padding = 5;
|
|
||||||
margin = 0;
|
|
||||||
background-color = mkLiteral trans;
|
|
||||||
text-color = mkLiteral color.hexS.text;
|
|
||||||
# border-radius = 3;
|
|
||||||
};
|
|
||||||
|
|
||||||
"element-icon" = {
|
|
||||||
size = 25;
|
|
||||||
};
|
|
||||||
|
|
||||||
"element selected" = {
|
|
||||||
background-color = mkLiteral color.hexS.accentDim;
|
|
||||||
text-color = mkLiteral color.hexS.accentText;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
homemodules.hyprland.keybindings = let
|
# homemodules.hyprland.keybindings = let
|
||||||
vpn-menu =
|
# vpn-menu =
|
||||||
pkgs.writeScriptBin
|
# pkgs.writeScriptBin
|
||||||
"rofi-menu-vpn"
|
# "rofi-menu-vpn"
|
||||||
(builtins.readFile ./menus/vpn.fish);
|
# (builtins.readFile ./menus/vpn.fish);
|
||||||
|
#
|
||||||
keybinds-menu =
|
# keybinds-menu =
|
||||||
pkgs.writeScriptBin
|
# pkgs.writeScriptBin
|
||||||
"rofi-menu-keybinds"
|
# "rofi-menu-keybinds"
|
||||||
(builtins.readFile ./menus/keybinds.fish);
|
# (builtins.readFile ./menus/keybinds.fish);
|
||||||
|
#
|
||||||
lectures-menu =
|
# lectures-menu =
|
||||||
pkgs.writeScriptBin
|
# pkgs.writeScriptBin
|
||||||
"rofi-menu-lectures"
|
# "rofi-menu-lectures"
|
||||||
(builtins.readFile ./menus/lectures.fish);
|
# (builtins.readFile ./menus/lectures.fish);
|
||||||
|
#
|
||||||
power-menu =
|
# power-menu =
|
||||||
mylib.rofi.mkSimpleMenu
|
# mylib.rofi.mkSimpleMenu
|
||||||
"power"
|
# "power"
|
||||||
{
|
# {
|
||||||
" Poweroff" = "poweroff";
|
# " Poweroff" = "poweroff";
|
||||||
" Reboot" = "reboot";
|
# " Reboot" = "reboot";
|
||||||
" Lock" = "loginctl lock-session";
|
# " Lock" = "loginctl lock-session";
|
||||||
" Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
||||||
" Reload Hyprland" = "hyprctl reload";
|
# " Reload Hyprland" = "hyprctl reload";
|
||||||
" Exit Hyprland" = "hyprctl dispatch exit";
|
# " Exit Hyprland" = "hyprctl dispatch exit";
|
||||||
};
|
# };
|
||||||
|
#
|
||||||
wallpaper-menu = let
|
# wallpaper-menu = let
|
||||||
setWallpaperOnMonitor = name: monitor:
|
# setWallpaperOnMonitor = name: monitor:
|
||||||
"hyprctl hyprpaper wallpaper "
|
# "hyprctl hyprpaper wallpaper "
|
||||||
+ "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg";
|
# + "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg";
|
||||||
|
#
|
||||||
setWallpaperOnMonitors = monitors: name: {
|
# setWallpaperOnMonitors = monitors: name: {
|
||||||
${name} =
|
# ${name} =
|
||||||
monitors
|
# monitors
|
||||||
|> builtins.map (setWallpaperOnMonitor name)
|
# |> builtins.map (setWallpaperOnMonitor name)
|
||||||
|> builtins.concatStringsSep " && ";
|
# |> builtins.concatStringsSep " && ";
|
||||||
};
|
# };
|
||||||
|
#
|
||||||
monitors = builtins.attrNames config.homemodules.hyprland.monitors;
|
# monitors = builtins.attrNames config.homemodules.hyprland.monitors;
|
||||||
in
|
# in
|
||||||
mylib.rofi.mkSimpleMenu
|
# mylib.rofi.mkSimpleMenu
|
||||||
"wall"
|
# "wall"
|
||||||
(color.wallpapers
|
# (color.wallpapers
|
||||||
|> builtins.map (setWallpaperOnMonitors monitors)
|
# |> builtins.map (setWallpaperOnMonitors monitors)
|
||||||
|> lib.mergeAttrsList);
|
# |> lib.mergeAttrsList);
|
||||||
in
|
# in
|
||||||
lib.mkIf (!config.homemodules.hyprland.caelestia.enable) {
|
# lib.mkIf (!config.homemodules.hyprland.caelestia.enable) {
|
||||||
bindings = lib.mergeAttrsList [
|
# bindings = lib.mergeAttrsList [
|
||||||
{
|
# {
|
||||||
"$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
|
# "$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
|
||||||
"$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""];
|
# "$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""];
|
||||||
"$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""];
|
# "$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""];
|
||||||
# "$mainMod, o" = ["exec, \"${lectures-menu}\""];
|
# # "$mainMod, o" = ["exec, \"${lectures-menu}\""];
|
||||||
}
|
# }
|
||||||
(lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) {
|
# (lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) {
|
||||||
"$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
|
# "$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
|
||||||
})
|
# })
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
101
home/homemodules/rofi/theme.nix
Normal file
101
home/homemodules/rofi/theme.nix
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
# 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;
|
||||||
|
};
|
||||||
|
}
|
||||||
70
home/homemodules/ssh/default.nix
Normal file
70
home/homemodules/ssh/default.nix
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
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" = {
|
||||||
|
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;
|
||||||
|
localForwards = [
|
||||||
|
{
|
||||||
|
# Resultbrowser
|
||||||
|
bind.port = 22941;
|
||||||
|
host.address = "127.0.0.1";
|
||||||
|
host.port = 22941;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Mysql
|
||||||
|
bind.port = 3306;
|
||||||
|
host.address = "127.0.0.1";
|
||||||
|
host.port = 3306;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
home/homemodules/ssh/options.nix
Normal file
7
home/homemodules/ssh/options.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
enable = lib.mkEnableOption "Enable ssh";
|
||||||
|
}
|
||||||
43
home/homemodules/terminal/default.nix
Normal file
43
home/homemodules/terminal/default.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
|
kitty.enable = true;
|
||||||
|
lazygit.enable = true;
|
||||||
|
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
alias = true;
|
||||||
|
neovide = !headless;
|
||||||
|
};
|
||||||
|
|
||||||
|
ssh.enable = true;
|
||||||
|
tmux.enable = true;
|
||||||
|
yazi.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
home/homemodules/terminal/options.nix
Normal file
7
home/homemodules/terminal/options.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
enable = lib.mkEnableOption "Enable terminal tools";
|
||||||
|
}
|
||||||
38
home/homemodules/tmux/default.nix
Normal file
38
home/homemodules/tmux/default.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
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"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
home/homemodules/tmux/options.nix
Normal file
7
home/homemodules/tmux/options.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
enable = lib.mkEnableOption "Enable tmux";
|
||||||
|
}
|
||||||
@ -21,126 +21,230 @@ in {
|
|||||||
spacing = 0;
|
spacing = 0;
|
||||||
margin = "10px 10px 0px 10px";
|
margin = "10px 10px 0px 10px";
|
||||||
fixed-center = true;
|
fixed-center = true;
|
||||||
output = ["${waybar.monitor}"];
|
output = waybar.monitors;
|
||||||
|
|
||||||
modules-left = ["custom/launcher" "user" "hyprland/window"];
|
modules-left = ["custom/launcher" "niri/workspaces" "niri/window"]; # "user"
|
||||||
modules-center = ["hyprland/workspaces"];
|
modules-center = ["mpris"]; # "systemd-failed-units"
|
||||||
modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "clock" "tray"];
|
modules-right = ["privacy" "pulseaudio" "network" "disk" "cpu" "memory" "clock" "tray"];
|
||||||
|
|
||||||
"custom/launcher" = {
|
"custom/launcher" = {
|
||||||
format = "<span></span>";
|
format = "<span></span>";
|
||||||
interval = "once";
|
interval = "once";
|
||||||
on-click = "rofi -drun-show-actions -show drun";
|
on-click = "walker -m desktopapplications";
|
||||||
};
|
};
|
||||||
|
|
||||||
"hyprland/workspaces" = {
|
systemd-failed-units = {
|
||||||
|
hide-on-ok = true;
|
||||||
|
format = " {nr_failed}";
|
||||||
|
format-ok = "✔️";
|
||||||
|
system = true;
|
||||||
|
user = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"niri/workspaces" = {
|
||||||
all-outputs = false;
|
all-outputs = false;
|
||||||
format = "{name}";
|
format = "{icon}";
|
||||||
on-click = "activate";
|
format-icons = {
|
||||||
sort-by-coordinates = false;
|
default = "";
|
||||||
sort-by-name = true;
|
focused = "";
|
||||||
sort-by-number = false;
|
active = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"pulseaudio" = {
|
"niri/window" = {
|
||||||
format = "<span></span> {volume}%";
|
format = "{title}";
|
||||||
format-muted = "<span></span> ";
|
separate-outputs = false;
|
||||||
on-click = "kitty ncpamixer -t o";
|
icon = true;
|
||||||
|
icon-size = 22;
|
||||||
};
|
};
|
||||||
|
|
||||||
"network" = {
|
mpris = {
|
||||||
format = "<span></span> {ipaddr}";
|
format = "<span></span> {dynamic}";
|
||||||
|
format-paused = "<span>{status_icon}</span> <i>{dynamic}</i>";
|
||||||
|
dynamic-order = ["artist" "title"];
|
||||||
|
status-icons = {
|
||||||
|
paused = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
privacy = {
|
||||||
|
icon-spacing = 4;
|
||||||
|
icon-size = 16;
|
||||||
|
transition-duration = 250;
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
type = "screenshare";
|
||||||
|
tooltip = true;
|
||||||
|
tooltip-icon-size = 24;
|
||||||
|
}
|
||||||
|
# {
|
||||||
|
# type = "audio-out";
|
||||||
|
# tooltip = true;
|
||||||
|
# tooltip-icon-size = 24;
|
||||||
|
# }
|
||||||
|
{
|
||||||
|
type = "audio-in";
|
||||||
|
tooltip = true;
|
||||||
|
tooltip-icon-size = 24;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
ignore-monitor = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
pulseaudio = {
|
||||||
|
format = "<span></span> {volume}%";
|
||||||
|
format-muted = "<span></span> ";
|
||||||
|
on-click = "kitty --title=WireMix wiremix";
|
||||||
|
};
|
||||||
|
|
||||||
|
network = {
|
||||||
|
format = "<span></span> {ipaddr}";
|
||||||
format-disconnected = "<span></span> ";
|
format-disconnected = "<span></span> ";
|
||||||
interface = "enp8s0";
|
interface = "enp8s0";
|
||||||
tooltip-format = "{ifname} via {gwaddr}";
|
tooltip = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
disk = {
|
||||||
|
interval = 5;
|
||||||
|
format = "<span></span> {percentage_used}%";
|
||||||
|
on-click = "kitty --hold --title=Duf duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu = {
|
cpu = {
|
||||||
format = "<span></span> {load}%";
|
interval = 1;
|
||||||
|
# states = {
|
||||||
|
# "critical" = 85;
|
||||||
|
# };
|
||||||
|
format = "<span></span> {load}%";
|
||||||
|
# format-critical = "<span color='#${color.hex.red}'><span></span> {load}%</span>";
|
||||||
|
on-click = "kitty --title=Btop btop";
|
||||||
|
tooltip = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
memory = {
|
memory = {
|
||||||
format = "<span></span> {percentage}%";
|
interval = 1;
|
||||||
};
|
# states = {
|
||||||
|
# "critical" = 85;
|
||||||
temperature = {
|
# };
|
||||||
format = "<span></span> {temperatureC}°C";
|
format = "<span></span> {percentage}%";
|
||||||
thermal-zone = 3;
|
# format-critical = "<span color='#${color.hex.red}'><span></span> {percentage}%</span>";
|
||||||
|
on-click = "kitty --title=Btop btop";
|
||||||
|
tooltip = true;
|
||||||
|
tooltip-format = "RAM: {used}GiB / {total}GiB\nSwap: {swapUsed}GiB / {swapTotal}GiB";
|
||||||
};
|
};
|
||||||
|
|
||||||
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 = 20;
|
icon-size = 22;
|
||||||
show-passive-items = true;
|
show-passive-items = true;
|
||||||
spacing = 5;
|
spacing = 5;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
style = ''
|
style = let
|
||||||
|
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: 2px;
|
border-width: ${border-width};
|
||||||
border-radius: 6px;
|
border-radius: ${border-radius};
|
||||||
border-color: #${color.hex.dark.lavender};
|
border-color: #${color.hex.accent};
|
||||||
background-color: rgba(${color.rgbString.light.base}, 0.3);
|
background-color: rgba(${color.rgbS.mantle}, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
border-style: solid;
|
color: #${color.hex.text};
|
||||||
border-width: 2px;
|
|
||||||
border-radius: 6px;
|
|
||||||
border-color: #${color.hex.dark.lavender};
|
|
||||||
background-color: rgba(${color.rgbString.light.base}, 0.7);
|
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: ${border-width};
|
||||||
|
border-radius: ${border-radius};
|
||||||
|
border-color: #${color.hex.accent};
|
||||||
|
background-color: rgba(${color.rgbS.mantle}, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Background colors */
|
/* Background colors */
|
||||||
#custom-launcher {background-color: #${color.hex.dark.lavender};}
|
#custom-launcher {background-color: #${color.hex.accent};}
|
||||||
#user {background-color: #${color.hex.dark.pink};}
|
#workspaces button {background-color: #${color.hex.blue};}
|
||||||
#window {background-color: #${color.hex.dark.mauve};}
|
#workspaces button.empty {background-color: #${color.hex.lavender};}
|
||||||
#workspaces button {background-color: #${color.hex.dark.lavender};}
|
#workspaces button.active {background-color: #${color.hex.green};}
|
||||||
#workspaces button.active {background-color: #${color.hex.dark.pink};}
|
#workspaces button.urgent {background-color: #${color.hex.red};}
|
||||||
#pulseaudio {background-color: #${color.hex.dark.maroon};}
|
#window {background-color: #${color.hex.maroon};}
|
||||||
#network {background-color: #${color.hex.dark.peach};}
|
|
||||||
#cpu {background-color: #${color.hex.dark.yellow};}
|
#mpris {background-color: #${color.hex.accent};}
|
||||||
#memory {background-color: #${color.hex.dark.green};}
|
|
||||||
#temperature {background-color: #${color.hex.dark.teal};}
|
#privacy {background-color: #${color.hex.red};}
|
||||||
#clock {background-color: #${color.hex.dark.sky};}
|
#pulseaudio {background-color: #${color.hex.maroon};}
|
||||||
#tray {background-color: #${color.hex.dark.lavender};}
|
#network {background-color: #${color.hex.peach};}
|
||||||
|
#disk {background-color: #${color.hex.yellow};}
|
||||||
|
#cpu {background-color: #${color.hex.green};}
|
||||||
|
#memory {background-color: #${color.hex.teal};}
|
||||||
|
#clock {background-color: #${color.hex.sky};}
|
||||||
|
#tray {background-color: #${color.hex.accent};}
|
||||||
|
|
||||||
/* Square Widgets */
|
/* Square Widgets */
|
||||||
#custom-launcher,
|
#custom-launcher,
|
||||||
#workspaces button,
|
#mpris,
|
||||||
#tray {
|
#tray {
|
||||||
|
color: #${color.hex.mantle};
|
||||||
|
font-weight: bold;
|
||||||
padding: 0px 10px 0px 10px;
|
padding: 0px 10px 0px 10px;
|
||||||
border-radius: 6px;
|
border-radius: ${border-radius};
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Workspaces */
|
||||||
|
#workspaces button {
|
||||||
|
color: #${color.hex.mantle};
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 0px 2px 0px 2px;
|
||||||
|
margin: 8px 2px 8px 2px;
|
||||||
|
border-radius: ${border-radius};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 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: 6px;
|
border-radius: ${border-radius};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make window module transparent when no windows present */
|
/* Make window module transparent when no windows present */
|
||||||
@ -153,14 +257,10 @@ in {
|
|||||||
/* Tux Icon */
|
/* Tux Icon */
|
||||||
#custom-launcher {
|
#custom-launcher {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
padding-right: 10px;
|
padding-right: 13px;
|
||||||
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";
|
||||||
|
|
||||||
monitor = mkOption {
|
monitors = mkOption {
|
||||||
type = types.str;
|
type = types.listOf types.str;
|
||||||
example = "HDMI-A-1";
|
example = ''["HDMI-A-1", "DP-1"]'';
|
||||||
description = "What monitor to display the Waybar on";
|
description = "What monitor to display the Waybar on";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ in [
|
|||||||
(mkIcon "Public" "")
|
(mkIcon "Public" "")
|
||||||
(mkIcon "Restic" "")
|
(mkIcon "Restic" "")
|
||||||
(mkIcon "Shows" "")
|
(mkIcon "Shows" "")
|
||||||
|
(mkIcon "SSD" "")
|
||||||
(mkIcon "Unity" "")
|
(mkIcon "Unity" "")
|
||||||
(mkIcon "Videos" "")
|
(mkIcon "Videos" "")
|
||||||
]
|
]
|
||||||
|
|||||||
13
lib/containers.nix
Normal file
13
lib/containers.nix
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
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,4 +13,5 @@
|
|||||||
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,6 +43,8 @@
|
|||||||
routers,
|
routers,
|
||||||
nameservers,
|
nameservers,
|
||||||
routable,
|
routable,
|
||||||
|
# Extra addresses declared without creating routes (e.g. IPv6 ULA).
|
||||||
|
extraAddresses ? [],
|
||||||
}: {
|
}: {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -56,7 +58,8 @@
|
|||||||
address = ips;
|
address = ips;
|
||||||
gateway = routers;
|
gateway = routers;
|
||||||
dns = nameservers;
|
dns = nameservers;
|
||||||
routes = builtins.map (r: {Gateway = r;}) routers; # TODO: We need to add a way to specify addresses without routes (IPv6 ULA)
|
routes = builtins.map (r: {Gateway = r;}) routers;
|
||||||
|
addresses = builtins.map (a: {Address = a;}) extraAddresses;
|
||||||
|
|
||||||
# See man systemd.network
|
# See man systemd.network
|
||||||
networkConfig = {
|
networkConfig = {
|
||||||
|
|||||||
@ -4,6 +4,26 @@
|
|||||||
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];
|
||||||
|
gc.automatic = false;
|
||||||
|
gc.options = "--delete-older-than 5d";
|
||||||
|
settings.auto-optimise-store = true;
|
||||||
|
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,
|
||||||
@ -80,6 +100,75 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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;}
|
||||||
|
|
||||||
|
# Import the toplevel system configuration module.
|
||||||
|
../system/cachix.nix
|
||||||
|
|
||||||
|
# Host specific configuration
|
||||||
|
../system/${hostname}
|
||||||
|
|
||||||
|
# Import all of my custom system modules
|
||||||
|
# ../system/systemmodules # TODO:
|
||||||
|
]
|
||||||
|
|
||||||
|
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,
|
||||||
|
|||||||
@ -21,7 +21,11 @@
|
|||||||
|> builtins.attrValues
|
|> builtins.attrValues
|
||||||
|> builtins.concatStringsSep "\n";
|
|> builtins.concatStringsSep "\n";
|
||||||
in
|
in
|
||||||
prompt: attrs:
|
{
|
||||||
|
prompt,
|
||||||
|
attrs,
|
||||||
|
command ? ''rofi -dmenu -p " ${prompt} " -i'',
|
||||||
|
}:
|
||||||
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
|
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
|
||||||
#! ${pkgs.fish}/bin/fish
|
#! ${pkgs.fish}/bin/fish
|
||||||
|
|
||||||
@ -29,7 +33,7 @@
|
|||||||
set OPTIONS ${unpack-options attrs}
|
set OPTIONS ${unpack-options attrs}
|
||||||
|
|
||||||
# We choose a single OPTION using Rofi
|
# We choose a single OPTION using Rofi
|
||||||
set OPTION (echo -e (string join "\n" $OPTIONS) | rofi -dmenu -p " ${prompt} " -i)
|
set OPTION (echo -e (string join "\n" $OPTIONS) | ${command})
|
||||||
|
|
||||||
# Check if the chosen OPTION is a valid choice from OPTIONS
|
# Check if the chosen OPTION is a valid choice from OPTIONS
|
||||||
if not contains $OPTION $OPTIONS
|
if not contains $OPTION $OPTIONS
|
||||||
|
|||||||
@ -29,6 +29,37 @@
|
|||||||
# 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";
|
||||||
|
|||||||
@ -3,10 +3,12 @@
|
|||||||
substituters = [
|
substituters = [
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
# "https://app.cachix.org/cache/nixos-rocm"
|
# "https://app.cachix.org/cache/nixos-rocm"
|
||||||
|
# "https://ai.cachix.org"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
# "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
|
# "nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
|
||||||
|
# "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
147
system/darwinix/default.nix
Normal file
147
system/darwinix/default.nix
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
publicKeys,
|
||||||
|
hostname,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
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} = {
|
||||||
|
isHidden = false;
|
||||||
|
description = "Christoph";
|
||||||
|
home = "/Users/${username}";
|
||||||
|
createHome = 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;
|
||||||
|
};
|
||||||
|
|
||||||
|
brews = [];
|
||||||
|
|
||||||
|
casks = [
|
||||||
|
"alt-tab"
|
||||||
|
"discord"
|
||||||
|
"iina"
|
||||||
|
"nextcloud"
|
||||||
|
"obsidian"
|
||||||
|
"protonvpn"
|
||||||
|
"signal"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
}
|
||||||
@ -104,31 +104,7 @@ with mylib.networking; {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Enable flakes
|
# Enable flakes
|
||||||
nix = {
|
nix = mylib.nixos.mkCommonNixSettings username;
|
||||||
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 = {
|
||||||
@ -169,7 +145,7 @@ with mylib.networking; {
|
|||||||
# NOTE: Disable this while configuring stuff, it's slow
|
# NOTE: Disable this while configuring stuff, it's slow
|
||||||
enable = true;
|
enable = true;
|
||||||
man.enable = config.documentation.enable;
|
man.enable = config.documentation.enable;
|
||||||
man.generateCaches = true; # Slow but needed for neovim man picker
|
man.cache.enable = 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;
|
||||||
@ -276,7 +252,7 @@ with mylib.networking; {
|
|||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
|
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
publicKeys.christoph.ssh
|
publicKeys.${username}.ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
# We do this with HomeManager
|
# We do this with HomeManager
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
./disks.nix
|
./disks.nix
|
||||||
|
|
||||||
# General services
|
# General services
|
||||||
|
../services/comfyui.nix
|
||||||
../services/fileflows-node.nix
|
../services/fileflows-node.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -116,21 +117,25 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
7777 # AvaTalk
|
1111 # FAIL*
|
||||||
12777 # AvaTalk
|
# 4242 # Lan-Mouse
|
||||||
|
# 7777 # AvaTalk
|
||||||
|
# 12777 # AvaTalk
|
||||||
# 31431 # Parsec
|
# 31431 # Parsec
|
||||||
5173 # SvelteKit
|
5173 # SvelteKit
|
||||||
8090 # PocketBase
|
8090 # PocketBase
|
||||||
4242 # Lan-Mouse
|
8188 # ComfyUI
|
||||||
];
|
];
|
||||||
|
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
7777 # AvaTalk
|
1111 # FAIL*
|
||||||
12777 # AvaTalk
|
# 4242 # Lan-Mouse
|
||||||
|
# 7777 # AvaTalk
|
||||||
|
# 12777 # AvaTalk
|
||||||
# 31431 # Parsec
|
# 31431 # Parsec
|
||||||
5173 # SvelteKit
|
5173 # SvelteKit
|
||||||
8090 # PocketBase
|
8090 # PocketBase
|
||||||
4242 # Lan-Mouse
|
8188 # ComfyUI
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -195,6 +200,11 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true; # Directly set port in firewall
|
openFirewall = true; # Directly set port in firewall
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ghidra = {
|
||||||
|
enable = true;
|
||||||
|
gdb = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
@ -291,59 +301,60 @@
|
|||||||
# 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" = {
|
#
|
||||||
# user = "${username}"; # Keep default (root), so restic can read everything
|
# restic.backups."synology" = {
|
||||||
|
# # user = "${username}"; # Keep default (root), so restic can read everything
|
||||||
repository = "/home/${username}/Restic";
|
#
|
||||||
initialize = true;
|
# repository = "/home/${username}/Restic";
|
||||||
passwordFile = config.sops.secrets.restic-repo-key.path;
|
# initialize = true;
|
||||||
createWrapper = true;
|
# passwordFile = config.sops.secrets.restic-repo-key.path;
|
||||||
|
# createWrapper = true;
|
||||||
timerConfig = {
|
#
|
||||||
OnCalendar = "daily";
|
# timerConfig = {
|
||||||
Persistent = true;
|
# OnCalendar = "daily";
|
||||||
RandomizedDelaySec = "5h";
|
# Persistent = true;
|
||||||
};
|
# RandomizedDelaySec = "5h";
|
||||||
|
# };
|
||||||
runCheck = true;
|
#
|
||||||
checkOpts = [
|
# runCheck = true;
|
||||||
"--with-cache"
|
# checkOpts = [
|
||||||
];
|
# "--with-cache"
|
||||||
|
# ];
|
||||||
pruneOpts = [
|
#
|
||||||
"--keep-daily 3"
|
# pruneOpts = [
|
||||||
"--keep-weekly 2"
|
# "--keep-daily 3"
|
||||||
# "--keep-monthly 0"
|
# "--keep-weekly 2"
|
||||||
# "--keep-yearly 0"
|
# # "--keep-monthly 0"
|
||||||
|
# # "--keep-yearly 0"
|
||||||
"--prune" # Automatically remove dangling files not referenced by any snapshot
|
#
|
||||||
"--repack-uncompressed"
|
# "--prune" # Automatically remove dangling files not referenced by any snapshot
|
||||||
];
|
# "--repack-uncompressed"
|
||||||
|
# ];
|
||||||
paths = ["/persist"];
|
#
|
||||||
exclude = [
|
# paths = ["/persist"];
|
||||||
# The backup is just supposed to allow a system restore
|
# exclude = [
|
||||||
"/persist/old_homes"
|
# # The backup is just supposed to allow a system restore
|
||||||
"/persist/old_roots"
|
# "/persist/old_homes"
|
||||||
|
# "/persist/old_roots"
|
||||||
# Those are synced by nextcloud, no need to backup them 50 times
|
#
|
||||||
"/persist/home/${username}/Documents"
|
# # Those are synced by nextcloud, no need to backup them 50 times
|
||||||
"/persist/home/${username}/NixFlake"
|
# "/persist/home/${username}/Documents"
|
||||||
"/persist/home/${username}/Notes"
|
# "/persist/home/${username}/NixFlake"
|
||||||
"/persist/home/${username}/Projects"
|
# "/persist/home/${username}/Notes"
|
||||||
"/persist/home/${username}/Public"
|
# "/persist/home/${username}/Projects"
|
||||||
|
# "/persist/home/${username}/Public"
|
||||||
# Some more caches
|
#
|
||||||
".cache"
|
# # Some more caches
|
||||||
"cache2" # firefox
|
# ".cache"
|
||||||
"Cache"
|
# "cache2" # firefox
|
||||||
];
|
# "Cache"
|
||||||
extraBackupArgs = [
|
# ];
|
||||||
"--exclude-caches" # Excludes marked cache directories
|
# extraBackupArgs = [
|
||||||
"--one-file-system" # Only stay on /persist (in case symlinks lead elsewhere)
|
# "--exclude-caches" # Excludes marked cache directories
|
||||||
"--cleanup-cache" # Auto remove old cache directories
|
# "--one-file-system" # Only stay on /persist (in case symlinks lead elsewhere)
|
||||||
];
|
# "--cleanup-cache" # Auto remove old cache directories
|
||||||
};
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
xserver = {
|
xserver = {
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
|
|||||||
@ -91,6 +91,102 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.light.enable = true;
|
# programs.light.enable = true; # Unmaintained
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
|
|||||||
@ -65,52 +65,13 @@
|
|||||||
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" "fd00::19/64"];
|
ips = ["192.168.86.25/24"];
|
||||||
# routers = ["192.168.86.5" "fd00::5"];
|
routers = ["192.168.86.5"]; # Don't add IPv6 gateway, rely on router advertisement instead
|
||||||
# nameservers = ["8.8.8.8" "2001:4860:4860::8888"]; # NOTE: Use reliable DNS for servers instead of 192.168.86.26
|
nameservers = ["8.8.8.8" "8.8.4.4" "2001:4860:4860:8888" "2001:4860:4860:8844"]; # NOTE: Use reliable DNS for servers instead of 192.168.86.26
|
||||||
# routable = true;
|
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";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -16,14 +17,7 @@ in {
|
|||||||
image = "TEMPLATE:${TEMPLATEVersion}";
|
image = "TEMPLATE:${TEMPLATEVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "adguard/adguardhome:${adguardVersion}";
|
image = "adguard/adguardhome:${adguardVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "authelia/authelia:${autheliaVersion}";
|
image = "authelia/authelia:${autheliaVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "linuxserver/bazarr:${bazarrVersion}";
|
image = "linuxserver/bazarr:${bazarrVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "stashapp/stash:${boxVersion}";
|
image = "stashapp/stash:${boxVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
56
system/services/comfyui.nix
Normal file
56
system/services/comfyui.nix
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
mylib,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
# comfyuiVersion = "cu128-slim-20260316";
|
||||||
|
comfyuiVersion = "cu128-megapak-20260323";
|
||||||
|
in {
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
comfyui = {
|
||||||
|
image = "yanwk/comfyui-boot:${comfyuiVersion}";
|
||||||
|
autoStart = false;
|
||||||
|
|
||||||
|
login = mylib.containers.mkDockerLogin config;
|
||||||
|
|
||||||
|
dependsOn = [];
|
||||||
|
|
||||||
|
ports = [
|
||||||
|
"8188:8188"
|
||||||
|
];
|
||||||
|
|
||||||
|
volumes = let
|
||||||
|
rootDir = "/home/christoph/Games/ComfyUI";
|
||||||
|
in [
|
||||||
|
"${rootDir}/storage:/root"
|
||||||
|
"${rootDir}/storage-models/models:/root/ComfyUI/models"
|
||||||
|
"${rootDir}/storage-models/hf-hub:/root/.cache/huggingface/hub"
|
||||||
|
"${rootDir}/storage-models/torch-hub:/root/.cache/torch/hub"
|
||||||
|
"${rootDir}/storage-user/input:/root/ComfyUI/input"
|
||||||
|
"${rootDir}/storage-user/output:/root/ComfyUI/output"
|
||||||
|
"${rootDir}/storage-user/workflows:/root/ComfyUI/user/default/workflows"
|
||||||
|
];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PUID = "1000";
|
||||||
|
PGID = "1000";
|
||||||
|
TZ = "Europe/Berlin";
|
||||||
|
|
||||||
|
# https://github.com/Comfy-Org/ComfyUI/blob/master/comfy/cli_args.py
|
||||||
|
# --use-sage-attention # => OOM
|
||||||
|
# --lowvram
|
||||||
|
# --disable-pinned-memory
|
||||||
|
# --cache-none
|
||||||
|
# CLI_ARGS = "--use-sage-attention";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = [
|
||||||
|
"--privileged"
|
||||||
|
"--device=nvidia.com/gpu=all"
|
||||||
|
# "--net=behind-nginx"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -1,24 +1,18 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
fileflowsVersion = "25.10";
|
fileflowsVersion = "26.01";
|
||||||
in {
|
in {
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
fileflows-node = {
|
fileflows-node = {
|
||||||
image = "revenz/fileflows:${fileflowsVersion}";
|
image = "revenz/fileflows:${fileflowsVersion}";
|
||||||
autoStart = true;
|
autoStart = false;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,24 +1,18 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
version = "25.10";
|
version = "26.01";
|
||||||
in {
|
in {
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
fileflows = {
|
fileflows = {
|
||||||
image = "revenz/fileflows:${version}";
|
image = "revenz/fileflows:${version}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -27,14 +28,7 @@ in {
|
|||||||
image = "postgres:14";
|
image = "postgres:14";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
@ -59,14 +53,7 @@ in {
|
|||||||
image = "gitea/gitea:${giteaVersion}";
|
image = "gitea/gitea:${giteaVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
"gitea-db"
|
"gitea-db"
|
||||||
@ -107,14 +94,7 @@ in {
|
|||||||
image = "gitea/act_runner:${runnerVersion}"; # NOTE: vegardit has other runner images
|
image = "gitea/act_runner:${runnerVersion}"; # NOTE: vegardit has other runner images
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
"gitea"
|
"gitea"
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -39,14 +40,7 @@ in {
|
|||||||
image = "redis";
|
image = "redis";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "linuxserver/jellyfin:${jellyfinVersion}";
|
image = "linuxserver/jellyfin:${jellyfinVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
# "pihole"
|
# "pihole"
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -18,14 +19,7 @@ in {
|
|||||||
image = "kopia/kopia:${kopiaVersion}";
|
image = "kopia/kopia:${kopiaVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -33,14 +34,7 @@ in {
|
|||||||
image = "postgres:alpine";
|
image = "postgres:alpine";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
@ -67,14 +61,7 @@ in {
|
|||||||
image = "redis:alpine";
|
image = "redis:alpine";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
@ -97,14 +84,7 @@ in {
|
|||||||
image = "nextcloud:${nextcloudVersion}";
|
image = "nextcloud:${nextcloudVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
"nextcloud-db"
|
"nextcloud-db"
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "jc21/nginx-proxy-manager:${nginxVersion}";
|
image = "jc21/nginx-proxy-manager:${nginxVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -16,14 +17,7 @@ in {
|
|||||||
image = "flor1der/paperless-nextcloud-sync:${paperlessNCVersion}";
|
image = "flor1der/paperless-nextcloud-sync:${paperlessNCVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
@ -59,14 +53,7 @@ in {
|
|||||||
image = "redis:7";
|
image = "redis:7";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
@ -87,14 +74,7 @@ in {
|
|||||||
image = "postgres:15";
|
image = "postgres:15";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "plexinc/pms-docker:${plexVersion}";
|
image = "plexinc/pms-docker:${plexVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [
|
dependsOn = [
|
||||||
# "pihole"
|
# "pihole"
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -13,14 +14,7 @@ in {
|
|||||||
image = "portainer/agent:${portainerVersion}";
|
image = "portainer/agent:${portainerVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -12,14 +13,7 @@ in {
|
|||||||
image = "portainer/portainer-ce:${portainerVersion}";
|
image = "portainer/portainer-ce:${portainerVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "linuxserver/prowlarr:${prowlarrVersion}";
|
image = "linuxserver/prowlarr:${prowlarrVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "rcourtman/pulse:${pulseVersion}";
|
image = "rcourtman/pulse:${pulseVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "linuxserver/radarr:${radarrVersion}";
|
image = "linuxserver/radarr:${radarrVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "linuxserver/sabnzbd:${sabnzbdVersion}";
|
image = "linuxserver/sabnzbd:${sabnzbdVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "linuxserver/sabnzbd:${sabnzbdVersion}";
|
image = "linuxserver/sabnzbd:${sabnzbdVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# Uses DockerHub by default
|
|
||||||
# registry = "";
|
|
||||||
|
|
||||||
# DockerHub Credentials
|
|
||||||
username = "christoph.urlacher@protonmail.com";
|
|
||||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
dependsOn = [];
|
dependsOn = [];
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
mylib,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
@ -11,14 +12,7 @@ in {
|
|||||||
image = "linuxserver/sonarr:${sonarrVersion}";
|
image = "linuxserver/sonarr:${sonarrVersion}";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|
||||||
login = {
|
login = mylib.containers.mkDockerLogin config;
|
||||||
# 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