1

Compare commits

..

1 Commits

Author SHA1 Message Date
d2e3405342 Home/Darwinix: Set environment variables 2026-03-21 15:39:07 +01:00
98 changed files with 1787 additions and 2281 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

View File

@ -3,7 +3,6 @@
Modular NixOS configuration, using [Niri](https://github.com/niri-wm/niri) and [Waybar](https://github.com/Alexays/Waybar) for a light desktop.
![](FastFetch.png)
![](Darwin.png)
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
Alternatively, use `nh os switch` or `nh os boot`.

View File

@ -98,65 +98,38 @@ rec {
buildDebug = mkBuildScript "Debug";
buildRelease = mkBuildScript "Release";
# Add project-local fish abbrs here
abbrs = {
# Use this to specify commands that should be ran after entering fish shell
initProjectShell = pkgs.writers.writeFish "init-shell.fish" ''
echo "Entering \"${description}\" environment..."
# Determine the project root, used e.g. in cmake scripts
set -g -x FLAKE_PROJECT_ROOT (git rev-parse --show-toplevel)
# Rust Bevy:
# build-release-windows = "CARGO_FEATURE_PURE=1 cargo xwin build --release --target x86_64-pc-windows-msvc";
# abbr -a build-release-windows "CARGO_FEATURE_PURE=1 cargo xwin build --release --target x86_64-pc-windows-msvc"
# C/C++:
# cmake-debug = "${cmakeDebug}";
# cmake-release = "${cmakeRelease}";
# build-debug = "${buildDebug}";
# build-release = "${buildRelease}";
# abbr -a cmake-debug "${cmakeDebug}"
# abbr -a cmake-release "${cmakeRelease}"
# abbr -a build-debug "${buildDebug}"
# abbr -a build-release "${buildRelease}"
# Clojure:
# clojure-deps = "deps-lock --lein";
# abbr -a clojure-deps "deps-lock --lein"
# Python:
# run = "python ./app/main.py";
# profile = "py-spy record -o profile.svg -- python ./app/main.py && firefox profile.svg";
# ptop = "py-spy top -- python ./app/main.py";
};
eraseAbbr = name: value: ''abbr --erase ${name} 2>/dev/null'';
createAbbr = name: value: ''abbr -a ${name} "${value}"'';
# This will be sourced by the global fish config if INIT_PROJECT_SHELL gets unset
unloadProjectShell = pkgs.writers.writeFish "unload-shell.fish" ''
echo "Unloading \"${description}\" environment..."
${builtins.concatStringsSep "\n" (lib.mapAttrsToList eraseAbbr abbrs)}
'';
# This will be sourced by the global fish config if INIT_PROJECT_SHELL gets set
initProjectShell = pkgs.writers.writeFish "init-shell.fish" ''
# Unload just in case, to not have redefinition errors
source ${unloadProjectShell}
echo "Sourcing \"${description}\" environment..."
${builtins.concatStringsSep "\n" (lib.mapAttrsToList createAbbr abbrs)}
# abbr -a run "python ./app/main.py"
# abbr -a profile "py-spy record -o profile.svg -- python ./app/main.py && firefox profile.svg"
# abbr -a ptop "py-spy top -- python ./app/main.py"
'';
in
builtins.concatStringsSep "\n" [
# Launch into pure fish shell
''
# Determine the project root, used e.g. in cmake scripts
export FLAKE_PROJECT_ROOT="$(git rev-parse --show-toplevel)"
# Can't do the "exec" with nix-direnv
# - The "exec fish" would call direnv again => Infinite loop
# - The shellHook is Bash/POSIX, so fish syntax doesn't work
# Use this for "nix develop" without direnv
# exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
# Use this for direnv without "nix develop"
export INIT_PROJECT_SHELL="${initProjectShell}"
export UNLOAD_PROJECT_SHELL="${unloadProjectShell}"
exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
''
# Qt: Launch into wrapped fish shell (direnv incompatible)
# Qt: Launch into wrapped fish shell
# https://nixos.org/manual/nixpkgs/stable/#sec-language-qt
# ''
# fishdir=$(mktemp -d)

View File

@ -238,11 +238,11 @@ $ mode: echo -e "--export \tExport public key\n--export-secret-keys\t
% sops
# Edit secrets.yaml
sops ~/NixFlake/system/systemmodules/sops-nix/secrets.yaml
sops ~/NixFlake/system/modules/sops-nix/secrets.yaml
% sops
# Rekey secrets.yaml
sops updatekeys ~/NixFlake/system/systemmodules/sops-nix/secrets.yaml
sops updatekeys ~/NixFlake/system/modules/sops-nix/secrets.yaml
% ssh
# Generate a new SSH key
@ -308,33 +308,27 @@ mkdir -p "<name>" && cd "<name>" && spotdl --client-id (cat /home/christoph/.sec
% ffmpeg
# Create a slow motion version of a video with interpolated/blended frames
ffmpeg -i <input> -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=<doublefps>',setpts=2*PTS" output.mp4
ffmpeg -i "<input>" -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=<doublefps>',setpts=2*PTS" output.mp4
$ input: eza -f -1
% ffmpeg
# Detect black bar dimensions automatically by looking at the first 10 frames
ffmpeg -i <input> -vframes 10 -vf cropdetect -f null -
ffmpeg -i "<input>" -vframes 10 -vf cropdetect -f null -
$ input: eza -f -1
% ffmpeg
# Preview video with applied crop settings
ffplay -vf crop=<width>:<height>:<x>:<y> <input>
ffplay -vf crop=<width>:<height>:<x>:<y> "<input>"
$ input: eza -f -1
% ffmpeg
# Re-encode the video with applied crop settings
ffmpeg -i <input> -vf crop=<width>:<height>:<x>:<y> -c:a copy output.mp4
ffmpeg -i "<input>" -vf crop=<width>:<height>:<x>:<y> -c:a copy output.mp4
$ input: eza -f -1
% ffmpeg
# Reencode and compress the video using the h265 codec
ffmpeg -i <input> -vcodec libx265 -crf <quality> out_<input>
$ input: eza -f -1
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"
% ffmpeg
# Reencode, compress and scale the video using the h265 codec
ffmpeg -i <input> -vcodec libx265 -crf <quality> -vf scale=<width>:-2,setsar=1:1 out_<input>
ffmpeg -i "<input>" -vcodec libx265 -crf <quality> "out_<input>"
$ input: eza -f -1
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"

View File

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

View File

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

View File

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

View File

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

412
flake.lock generated
View File

@ -1,24 +1,5 @@
{
"nodes": {
"comfyui-nix": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1776979072,
"narHash": "sha256-1BUQDAMWGVcUhPuI5JFQmCTYlBmN/Fmon6MGmaKXrCk=",
"owner": "utensils",
"repo": "comfyui-nix",
"rev": "8a90889efc8fae81a8e03b8d9a8406c9f8ff425b",
"type": "github"
},
"original": {
"owner": "utensils",
"repo": "comfyui-nix",
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1754269165,
@ -36,7 +17,7 @@
},
"devshell": {
"inputs": {
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1768818222,
@ -52,28 +33,6 @@
"type": "github"
}
},
"direnv-instant": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1776984766,
"narHash": "sha256-QkT7k2MCfPDcmAXwTC0ZDbMxD1UX2l7SkDPWWoAE4ZY=",
"owner": "Mic92",
"repo": "direnv-instant",
"rev": "c51044f2cf19a5361bb8b3a50e9206ba4b6eaa26",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "direnv-instant",
"type": "github"
}
},
"disko": {
"inputs": {
"nixpkgs": [
@ -97,15 +56,15 @@
},
"elephant": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_2",
"systems": "systems"
},
"locked": {
"lastModified": 1775706155,
"narHash": "sha256-h7Rw0vlb0n0Jsk21WJPm7H+1T1bG+PEuxE5cJ2TZl8A=",
"lastModified": 1773079031,
"narHash": "sha256-RvCzINnVISBT3d0F1DoIcQFbQsbRJISW9qZeKTzmNaA=",
"owner": "abenz1267",
"repo": "elephant",
"rev": "376ee71c66db38683daabd57350bf3f6f086eaf8",
"rev": "53afe39cef252010f7c55bd33c5bae6dd50dcf0c",
"type": "github"
},
"original": {
@ -137,6 +96,29 @@
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"nixpkgs": [
"textfox",
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1754512310,
"narHash": "sha256-gXE5lTYMOhpDJo+siLXW/3BzySPmLMD12GVB1QFVbyw=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "2008f9aa7a5ccde48bfc1de5a919be5898da09c2",
"type": "gitlab"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -183,45 +165,6 @@
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1767609335,
"narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "250481aafeb741edfe23d29195671c19b36b6dca",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"direnv-instant",
"nixpkgs"
]
},
"locked": {
"lastModified": 1775087534,
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"lanzaboote",
@ -242,7 +185,7 @@
"type": "github"
}
},
"flake-parts_4": {
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
@ -250,11 +193,11 @@
]
},
"locked": {
"lastModified": 1775087534,
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github"
},
"original": {
@ -263,7 +206,7 @@
"type": "github"
}
},
"flake-parts_5": {
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"nur",
@ -344,11 +287,11 @@
},
"hardware": {
"locked": {
"lastModified": 1776983936,
"narHash": "sha256-ZOQyNqSvJ8UdrrqU1p7vaFcdL53idK+LOM8oRWEWh6o=",
"lastModified": 1772972630,
"narHash": "sha256-mUJxsNOrBMNOUJzN0pfdVJ1r2pxeqm9gI/yIKXzVVbk=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "2096f3f411ce46e88a79ae4eafcfc9df8ed41c61",
"rev": "3966ce987e1a9a164205ac8259a5fe8a64528f72",
"type": "github"
},
"original": {
@ -364,11 +307,11 @@
]
},
"locked": {
"lastModified": 1777594677,
"narHash": "sha256-h90sHwoRJLRvaTpZroTvU2JRHDFj0czUafM8eqLe1RI=",
"lastModified": 1773332277,
"narHash": "sha256-1V+wRrZD9Sw12AQBUWk9CR+XhDZQ8q6yBE0S3Wjbd1M=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "899c08a15beae5da51a5cecd6b2b994777a948da",
"rev": "4aeef1941f862fe3a70d1b8264b4e289358c2325",
"type": "github"
},
"original": {
@ -400,14 +343,14 @@
},
"hytale-launcher": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1777394001,
"narHash": "sha256-FNHydw2We/qvxBJ2cMNc/eGcxSZkvOXZn2WYGiH6WfE=",
"lastModified": 1773947929,
"narHash": "sha256-flpkAPM3zpMpWoqvVkMTo3ptuBF0QKNi6Raa8rnIq7o=",
"owner": "JPyke3",
"repo": "hytale-launcher-nix",
"rev": "822e54c97348a6fbc28dfac563e5bbe9fe1783b8",
"rev": "a8d0a974b187f0997c03c23000dea552194edf39",
"type": "github"
},
"original": {
@ -419,7 +362,7 @@
"impermanence": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1769548169,
@ -439,7 +382,7 @@
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
@ -469,11 +412,11 @@
]
},
"locked": {
"lastModified": 1776677689,
"narHash": "sha256-wzdMqyyNkEPEfuCqSTzaz3ikH3+Rm7oWILNcURNax34=",
"lastModified": 1773343116,
"narHash": "sha256-5wnd9z3atP264FMin5MNq4ZaOR/2SYYspFXw8cecrKA=",
"ref": "refs/heads/main",
"rev": "768d26aa3fe80949bd64f62d6c5b35455c8cb768",
"revCount": 140,
"rev": "6248c10a251c5f2628389b982919ba4a8125d71e",
"revCount": 139,
"type": "git",
"url": "https://gitea.local.chriphost.de/christoph/cpp-masssprings"
},
@ -485,7 +428,7 @@
"naersk": {
"inputs": {
"fenix": "fenix",
"nixpkgs": "nixpkgs_8"
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1763384566,
@ -513,11 +456,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1777542749,
"narHash": "sha256-j4W+WwdiRxTTFdsoB8A7jlLNLbMQANKJxh9eKf8nOIs=",
"lastModified": 1773329386,
"narHash": "sha256-Xoy4j0NKRrZEAkiFxtTKTsmtUumpvjh3ievyat00eA8=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "36130bc452e0a84c07761d2e176ae875b48eebf3",
"rev": "815e692569fbb01701770a49ad2fe942cec7f431",
"type": "github"
},
"original": {
@ -546,11 +489,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1777468255,
"narHash": "sha256-lBZc1UMy+1P1T/E41j3jQrpS7EFI3qegd+ktHZdamIg=",
"lastModified": 1773130184,
"narHash": "sha256-3bwx4WqCB06yfQIGB+OgIckOkEDyKxiTD5pOo4Xz2rI=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "dd1c3bcb9f1ef416df33ffa22d1d9bcee1398e7d",
"rev": "b07bde3ee82dd73115e6b949e4f3f63695da35ea",
"type": "github"
},
"original": {
@ -563,14 +506,14 @@
"inputs": {
"flake-compat": "flake-compat_2",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_6"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1776242217,
"narHash": "sha256-TRts0fKUPFcf1i6rZHFGUDTfti/x3oKEg/CqsPRpSgs=",
"lastModified": 1771150922,
"narHash": "sha256-+oQJun4CFDlOQRocbZpqQDj7agoy56/4ZjT1oUR7NOs=",
"owner": "thiagokokada",
"repo": "nix-alien",
"rev": "4c5e52dda0d6ab3de814e364046769321d3e1021",
"rev": "96045e886ba0dd45b27590e7c0c6e77bbb54033d",
"type": "github"
},
"original": {
@ -586,11 +529,11 @@
]
},
"locked": {
"lastModified": 1775037210,
"narHash": "sha256-KM2WYj6EA7M/FVZVCl3rqWY+TFV5QzSyyGE2gQxeODU=",
"lastModified": 1773000227,
"narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "06648f4902343228ce2de79f291dd5a58ee12146",
"rev": "da529ac9e46f25ed5616fd634079a5f3c579135f",
"type": "github"
},
"original": {
@ -624,11 +567,11 @@
]
},
"locked": {
"lastModified": 1775970782,
"narHash": "sha256-7jt9Vpm48Yy5yAWigYpde+HxtYEpEuyzIQJF4VYehhk=",
"lastModified": 1771130777,
"narHash": "sha256-UIKOwG0D9XVIJfNWg6+gENAvQP+7LO46eO0Jpe+ItJ0=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "bedba5989b04614fc598af9633033b95a937933f",
"rev": "efec7aaad8d43f8e5194df46a007456093c40f88",
"type": "github"
},
"original": {
@ -638,69 +581,6 @@
}
},
"nixpkgs": {
"locked": {
"lastModified": 1766902085,
"narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1765674936,
"narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1777428379,
"narHash": "sha256-ypxFOeDz+CqADEQNL72haqGjvZQdBR5Vc7pyx2JDttI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "755f5aa91337890c432639c60b6064bb7fe67769",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1777428379,
"narHash": "sha256-ypxFOeDz+CqADEQNL72haqGjvZQdBR5Vc7pyx2JDttI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "755f5aa91337890c432639c60b6064bb7fe67769",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1762156382,
"narHash": "sha256-Yg7Ag7ov5+36jEFC1DaZh/12SEXo6OO3/8rqADRxiqs=",
@ -716,7 +596,39 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs-stable": {
"locked": {
"lastModified": 1773222311,
"narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0590cd39f728e129122770c029970378a79d076a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1773814637,
"narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1764242076,
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
@ -732,13 +644,13 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_3": {
"locked": {
"lastModified": 1777268161,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
"lastModified": 1773821835,
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
"type": "github"
},
"original": {
@ -748,7 +660,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_4": {
"locked": {
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
@ -764,13 +676,13 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_5": {
"locked": {
"lastModified": 1775710090,
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"lastModified": 1771008912,
"narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"rev": "a82ccc39b39b621151d6732718e3e250109076fa",
"type": "github"
},
"original": {
@ -780,23 +692,23 @@
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1773122722,
"narHash": "sha256-FIqHByVqxCprNjor1NqF80F2QQoiiyqanNNefdlvOg4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "62dc67aa6a52b4364dd75994ec00b51fbf474e50",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1777268161,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1752077645,
"narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=",
@ -812,13 +724,13 @@
"type": "github"
}
},
"nixpkgs_9": {
"nixpkgs_8": {
"locked": {
"lastModified": 1775710090,
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github"
},
"original": {
@ -830,18 +742,18 @@
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_4",
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3"
},
"locked": {
"lastModified": 1777236345,
"narHash": "sha256-ALOqlq7bE30lsX4rA76hXeQ2aLLEpb44hS+D1+jWS88=",
"lastModified": 1772402258,
"narHash": "sha256-3DmCFOdmbkFML1/G9gj8Wb+rCCZFPOQtNoMCpqOF8SA=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "a67d9cd6ff725a763afe88727aac73208ded3bf4",
"rev": "21ae25e13b01d3b4cdc750b5f9e7bad68b150c10",
"type": "github"
},
"original": {
@ -875,17 +787,17 @@
},
"nur": {
"inputs": {
"flake-parts": "flake-parts_5",
"flake-parts": "flake-parts_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1777624369,
"narHash": "sha256-nQOSodcDhXiKlfCKb4pE/4GBAs2FnBOD+AHVem0EqOc=",
"lastModified": 1773339783,
"narHash": "sha256-07iRHomuUvJ7Mmp+F7qo68xIb+y3gy0o/B7kuR1K2Qc=",
"owner": "nix-community",
"repo": "NUR",
"rev": "c3ec6b994c235a53a28304564da6422a45230603",
"rev": "1a4ca0d650fbfd4c58e1b1c2b153151fec77d6b2",
"type": "github"
},
"original": {
@ -922,9 +834,7 @@
},
"root": {
"inputs": {
"comfyui-nix": "comfyui-nix",
"devshell": "devshell",
"direnv-instant": "direnv-instant",
"disko": "disko",
"elephant": "elephant",
"hardware": "hardware",
@ -937,7 +847,7 @@
"nix-alien": "nix-alien",
"nix-darwin": "nix-darwin",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_7",
"nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable_2",
"nixvim": "nixvim",
"nps": "nps",
@ -992,11 +902,11 @@
]
},
"locked": {
"lastModified": 1777338324,
"narHash": "sha256-bc+ZZCmOTNq86/svGnw0tVpH7vJaLYvGLLKFYP08Q8E=",
"lastModified": 1773096132,
"narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "8eaee5c45428b28b8c47a83e4c09dccec5f279b5",
"rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784",
"type": "github"
},
"original": {
@ -1082,16 +992,17 @@
},
"textfox": {
"inputs": {
"firefox-addons": "firefox-addons",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1777451299,
"narHash": "sha256-Okqpw+zxAwHKXuuxlwYy9Ge9JUpnTbsMXqws2eOKfKo=",
"lastModified": 1773044834,
"narHash": "sha256-R2u3z09DuUbSoWClASPUqKXQG/QZYlBsiy8vYXrJ2VU=",
"owner": "adriankarlen",
"repo": "textfox",
"rev": "3af57df1ed3a38eb584475fd9e032d9643f2a94d",
"rev": "0b8873d30db55a94e9e0dd934405dcac5e4d8a73",
"type": "github"
},
"original": {
@ -1100,41 +1011,20 @@
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"direnv-instant",
"nixpkgs"
]
},
"locked": {
"lastModified": 1775636079,
"narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"walker": {
"inputs": {
"elephant": [
"elephant"
],
"nixpkgs": "nixpkgs_9",
"nixpkgs": "nixpkgs_8",
"systems": "systems_5"
},
"locked": {
"lastModified": 1777299395,
"narHash": "sha256-ZoLkqwPVw8SdW+f9Raf15/ttyKqmC6vtKd5R+orNN/g=",
"lastModified": 1773675699,
"narHash": "sha256-GrormZ2KxchtCLuO90+5fioEQmlUCKBIil0Mzr9w0Iw=",
"owner": "abenz1267",
"repo": "walker",
"rev": "7b0cb0fd1f8b0a60b241081483aea4277f0b4500",
"rev": "d2702235710da3d7daf55c912ca7534261cf20f5",
"type": "github"
},
"original": {
@ -1163,11 +1053,11 @@
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1773622265,
"narHash": "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=",
"lastModified": 1772429643,
"narHash": "sha256-M+bAeCCcjBnVk6w/4dIVvXvpJwOKnXjwi/lDbaN6Yws=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "a879e5e0896a326adc79c474bf457b8b99011027",
"rev": "10f985b84cdbcc3bbf35b3e7e43d1b2a84fa9ce2",
"type": "github"
},
"original": {

View File

@ -78,17 +78,10 @@
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
# nix-flatpak.inputs.nixpkgs.follows = "nixpkgs"; # nix-flatpak doesn't have this
# Instant Direnv (load environment in background)
direnv-instant.url = "github:Mic92/direnv-instant";
direnv-instant.inputs.nixpkgs.follows = "nixpkgs";
# Realtime audio
# musnix.url = "github:musnix/musnix";
# musnix.inputs.nixpkgs.follows = "nixpkgs";
# ComfyUI
comfyui-nix.url = "github:utensils/comfyui-nix";
# HyTale
hytale-launcher.url = "github:JPyke3/hytale-launcher-nix";
@ -145,7 +138,7 @@
inputs.nur.overlays.default
inputs.niri.overlays.niri
# inputs.emacs-overlay.overlay
inputs.comfyui-nix.overlays.default
# inputs.comfyui-nix.overlays.default
# All my own overlays (derivations + modifications)
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
@ -228,9 +221,7 @@
hostname = "darwinix";
username = "christoph";
headless = false;
extraModules = [
inputs.sops-nix.darwinModules.sops
];
extraModules = [];
};
};
@ -257,7 +248,7 @@
[
inputs.disko.nixosModules.disko
# inputs.nixified-ai.nixosModules.comfyui
inputs.comfyui-nix.nixosModules.default
# inputs.comfyui-nix.nixosModules.default
]
++ commonModules;
};

View File

@ -8,7 +8,9 @@
inputs,
...
}: {
config = {
config = let
inherit (config.homemodules) color;
in {
paths = rec {
nixflake = "${config.home.homeDirectory}/NixFlake";
dotfiles = "${nixflake}/config";
@ -25,8 +27,26 @@
font = "MonoLisa Alt Script";
};
packages.enable = true;
terminal.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 = true;
};
yazi.enable = true;
};
home = {
@ -42,13 +62,341 @@
TERMINAL = "kitty";
};
# packages = with pkgs; []; # Configured in homemodules/packages
packages = with pkgs; [
(ripgrep.override {withPCRE2 = true;})
gdu
duf
sd
fclones
tealdeer
killall
atool
exiftool
ouch
ffmpegthumbnailer
mediainfo
file
unrar
p7zip
unzip
progress
tokei
nix-search-tv
nix-tree
just
ffmpeg-full
imagemagick
poppler-utils
pdf2svg
pandoc
dig
tcpdump
gping
curlie
wget
doggo
rsync
rclone
httpie
inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default
cachix
# GUI
ripdrag
jellyfin-tui
];
stateVersion = "25.11";
};
programs = {};
# TODO: Deduplicate with other configs
programs = {
home-manager.enable = true;
services = {};
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";
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
eza = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
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";
}
];
};
};
fd.enable = true;
fzf = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
navi = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
forwardAgent = false;
addKeysToAgent = "yes";
compression = true;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"nixinator" = {
user = "christoph";
hostname = "192.168.86.50";
};
"servenix" = {
user = "christoph";
hostname = "local.chriphost.de";
};
"thinknix" = {
user = "christoph";
hostname = "think.chriphost.de";
};
"vps" = {
user = "root";
hostname = "vps.chriphost.de";
};
"mars" = {
user = "smchurla";
hostname = "mars.cs.tu-dortmund.de";
serverAliveInterval = 60;
localForwards = [
{
# Resultbrowser
bind.port = 22941;
host.address = "127.0.0.1";
host.port = 22941;
}
{
# Mysql
bind.port = 3306;
host.address = "127.0.0.1";
host.port = 3306;
}
];
};
};
};
tmux = {
enable = 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"
'';
};
yt-dlp.enable = true;
zoxide = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
};
services = {
};
};
}

View File

@ -34,7 +34,8 @@ in
homemodules = {
beets.enable = !headless;
cava.enable = !headless;
btop.enable = true;
chromium = {
enable = !headless;
@ -77,15 +78,37 @@ in
disableTabBar = true;
};
fish.enable = true;
git = {
enable = true;
userName = "Christoph Urlacher";
userEmail = "christoph.urlacher@protonmail.com";
signCommits = true;
};
kitty.enable = !headless;
lazygit.enable = true;
mpd.enable = !headless;
neovim = {
enable = true;
alias = true;
neovide = !headless;
};
niri.enable = nixosConfig.programs.niri.enable;
nnn.enable = false; # Use yazi
packages.enable = true;
qutebrowser.enable = !headless;
rmpc.enable = !headless;
rofi.enable = false;
terminal.enable = true;
rofi = {
enable = false;
};
waybar.enable = !headless;
yazi.enable = true;
zathura.enable = !headless;
};
@ -247,13 +270,374 @@ in
};
# Add stuff for your user as you see fit:
# packages = with pkgs; []; # Configured in homemodules/packages
# TODO: Make the headless installations smaller. Don't install stuff here if !headless but in nixinator config.
packages = with pkgs;
lib.mkMerge [
[
# Shell utils
(ripgrep.override {withPCRE2 = true;}) # fast as fuck
gdu # Alternative to du-dust (I like it better)
duf # Disk usage analyzer (for all disk overview)
sd # Sed alternative
fclones # Duplicate file finder
tealdeer # Very fast tldr (so readable man)
killall
atool # Archive preview
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
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
lazyjournal # Journalctl viewer
systemctl-tui
restic # Backups
gnumake
just # make alternative
binsider # .elf analyzer
jujutsu # git-like vcs
lurk # strace analysis
radare2
# Hardware/Software info
pciutils # lspci
mesa-demos # OpenGL info
wayland-utils # wayland-info
clinfo # OpenCL info
vulkan-tools # vulkaninfo
libva-utils # vainfo
vdpauinfo # Video-Decode and Presentation API for Unix info
hwloc # Generate CPU topology diagram
lm_sensors # Readout hardware sensors
acpica-tools # Dump ACPI tables etc.
smartmontools # Disk health
nvme-cli # NVME disk health
# Video/Image/Audio utils
ffmpeg-full # I love ffmpeg (including ffplay)
ffmpeg-normalize # Normalize audio
imagemagick # Convert image (magic)
mp3val # Validate mp3 files
flac # Validate flac files
# spotdl
# Document utils
poppler-utils # pdfunite
graphviz # generate graphs from code
d2 # generate diagrams from code
plantuml # generate diagrams
gnuplot # generate function plots
pdf2svg # extract vector graphics from pdf
pandoc # document converting madness
# Networking
dig # Make DNS requests
tcpdump # Listen in on TCP traffic
traceroute # "Follow" a packet
gping # ping with graph
curlie # curl a'la httpie
wget # download that shit
doggo # dns client
rsync # cp on steroids
rclone # Rsync for cloud
httpie # Cool http client
cifs-utils # Mount samba shares
nfs-utils # Mount NFS shares
sshfs # Mount remote directories via SSH
# Run unpatched binaries on NixOS
# Sets NIX_LD_LIBRARY_PATH and NIX_LD variables for nix-ld.
# Usage: "nix-alien-ld -- <Executable>".
inputs.nix-alien.packages.${pkgs.stdenv.hostPlatform.system}.nix-alien
# Search nixpkgs
inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default
# Use NixCommunity binary cache
cachix
]
(lib.mkIf (!headless) [
ripdrag # drag & drop from terminal
veracrypt
wl-clipboard
# Proton
protonvpn-gui
protonmail-bridge-gui
# GUI stuff
nautilus # Just in case
signal-desktop
anki
font-manager # Previews fonts, but doesn't set them
nextcloud-client
keepassxc
thunderbird # TODO: Email module
obsidian
zotero
zeal # docs browser
# helvum # unmaintained
crosspipe
vlc
audacity
ferdium
gparted
# feishin # electron :(
jellyfin-tui
czkawka-full # file deduplicator
# Office
kdePackages.wacomtablet # For xournalpp/krita
xournalpp # Write with a pen, like old people
hunspell # I cna't type
hunspellDicts.en_US
hunspellDicts.de_DE
inputs.masssprings.packages.${stdenv.hostPlatform.system}.default
])
];
};
# home.file.".options-doc".source = "${pkgs.modules-options-doc}";
# Packages with extra options managed by HomeManager natively
programs = {
# The home-manager management tool.
# Will only be enabled if HM is installed standalone.
home-manager.enable = true;
bat = {
enable = true;
themes = {
catppuccin-latte = {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
};
file = "Catppuccin-latte.tmTheme";
};
};
config = {
theme = "catppuccin-latte";
};
};
cava = {
enable = !headless;
settings = {
general = {
framerate = 60; # default 60
autosens = 1; # default 1
sensitivity = 100; # default 100
lower_cutoff_freq = 50; # not passed to cava if not provided
higher_cutoff_freq = 10000; # not passed to cava if not provided
};
smoothing = {
noise_reduction = 77; # default 77
monstercat = false; # default false
waves = false; # default false
};
color = {
# https://github.com/catppuccin/cava/blob/main/themes/latte-transparent.cava
gradient = 1;
gradient_color_1 = "'${color.hexS.teal}'";
gradient_color_2 = "'${color.hexS.sky}'";
gradient_color_3 = "'${color.hexS.sapphire}'";
gradient_color_4 = "'${color.hexS.blue}'";
gradient_color_5 = "'${color.hexS.mauve}'";
gradient_color_6 = "'${color.hexS.pink}'";
gradient_color_7 = "'${color.hexS.maroon}'";
gradient_color_8 = "'${color.hexS.red}'";
};
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
eza = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
# TODO: Module
fastfetch = {
enable = true;
settings = {
logo = {
padding = {
top = 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";
}
];
};
};
fd.enable = true;
fzf = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
imv = {
enable = !headless;
settings = {
@ -281,6 +665,11 @@ in
};
};
navi = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
nix-index = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
@ -310,6 +699,92 @@ in
# pointer
# ];
# };
ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
forwardAgent = false;
addKeysToAgent = "no";
compression = true;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"nixinator" = {
user = "christoph";
hostname = "192.168.86.50";
};
"servenix" = {
user = "christoph";
hostname = "local.chriphost.de";
};
"thinknix" = {
user = "christoph";
hostname = "think.chriphost.de";
};
"vps" = {
user = "root";
hostname = "vps.chriphost.de";
};
"mars" = {
user = "smchurla";
hostname = "mars.cs.tu-dortmund.de";
serverAliveInterval = 60;
localForwards = [
{
# Resultbrowser
bind.port = 22941;
host.address = "127.0.0.1";
host.port = 22941;
}
{
# Mysql
bind.port = 3306;
host.address = "127.0.0.1";
host.port = 3306;
}
];
};
};
};
tmux = {
enable = 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"
'';
};
yt-dlp.enable = true;
zoxide = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
};
services = {

View File

@ -101,16 +101,11 @@
jellyfin-mpv-shim
# tidal-hifi
# tidal-dl-ng # TODO: Borked
# spotdl
tiddl
picard
handbrake
teamspeak6-client
# virt-manager # use system program option
virt-viewer
gnome-boxes # doesn't list VMs imported using virsh
steam-devices-udev-rules
];
@ -158,8 +153,6 @@
"com.usebottles.bottles"
"io.github.lawstorant.boxflat"
"org.onlyoffice.desktopeditors"
# "com.unity.UnityHub"
];

View File

@ -2,32 +2,30 @@
{pkgs, ...}: {
config = {
homemodules = {
# TODO: Niri config (needs to modularize niri module)
hyprland = {
keyboard = {
layout = "us";
variant = "altgr-intl";
option = "nodeadkeys";
};
# hyprland = {
# keyboard = {
# layout = "us";
# variant = "altgr-intl";
# option = "nodeadkeys";
# };
#
# monitors = {
# "eDP-1" = {
# width = 1920;
# height = 1080;
# rate = 60;
# x = 0;
# y = 0;
# scale = 1;
# };
# };
#
# workspaces = {
# "eDP-1" = [1 2 3 4 5 6 7 8 9];
# };
# };
monitors = {
"eDP-1" = {
width = 1920;
height = 1080;
rate = 60;
x = 0;
y = 0;
scale = 1;
};
};
waybar.monitors = ["eDP-1"];
workspaces = {
"eDP-1" = [1 2 3 4 5 6 7 8 9];
};
};
waybar.monitor = "eDP-1";
};
home = {

View File

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

View File

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

View File

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

View File

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

View File

@ -1,21 +1,13 @@
{inputs, ...}: {
imports = [
# My own HM modules
./bat
./btop
./color
./fastfetch
./fish
./git
./jellyfin-tui
./kitty
./lazygit
./neovim
./packages
./paths
./ssh
./terminal
./tmux
./yazi
# HM modules imported from the flake inputs

View File

@ -3,34 +3,26 @@
# Obsolete modules are kept in "1_deprecated" for reference.
# My own HM modules
./bat
./beets
./btop
./cava
./chromium
./color
./docs
./fastfetch
./fcitx
./firefox
./fish
./git
./jellyfin-tui
./kitty
./lazygit
./mpd
./neovim
./niri
./nnn
./packages
./paths
./qutebrowser
./rmpc
./rofi
./waybar
./ssh
./terminal
./tmux
./yazi
./zathura
@ -39,7 +31,6 @@
inputs.nixvim.homeModules.nixvim
inputs.textfox.homeManagerModules.default
inputs.walker.homeManagerModules.default
inputs.direnv-instant.homeModules.direnv-instant
# inputs.niri.homeModules.niri # Imported by system module
# inputs.noctalia.homeModules.default
# inputs.caelestia.homeManagerModules.default

View File

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

View File

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

View File

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

View File

@ -103,9 +103,9 @@ in [
(mkBm "Heise" "https://www.heise.de/")
(mkBm "HN" "https://news.ycombinator.com/news")
(mkBm "Reddit" "https://www.reddit.com/user/FightingMushroom/saved/")
# (mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
(mkBm "F12" "https://f12.local.chriphost.gay/racepicks")
(mkBm "F12PB" "https://f12pb.local.chriphost.de/_/")
(mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
(mkBm "F11" "https://f11.local.chriphost.de/racepicks")
(mkBm "F11PB" "https://f11pb.local.chriphost.de/_/#/collections?collection=pbc_1736455494&filter=&sort=-%40rowid")
(mkBm "ISBNDB" "https://isbndb.com/")
(mkBm "Music" "https://bandcamp.com/chriphost")
(mkBm "Albums" "https://www.albumoftheyear.org/user/chriphost/list/307966/2025/")

View File

@ -86,8 +86,6 @@ in {
programs.firefox = {
enable = true;
configPath = "${config.xdg.configHome}/mozilla/firefox";
# firefox-unwrapped is the pure firefox browser, wrapFirefox adds configuration ontop
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
# About policies: https://github.com/mozilla/policy-templates#enterprisepoliciesenabled

View File

@ -42,141 +42,99 @@ in {
fish_pager_color_description ${color.hex.overlay0}
'';
programs.fish = let
# Only add " | bat" if bat is installed
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
programs.fish = lib.mkMerge [
# Darwin exclusive config
(lib.mkIf pkgs.stdenv.isDarwin {
shellAbbrs = let
# 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);
# Same as above but with args for bat
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
# These can be used for my config.homemodules and for HM config.programs,
# as both of these add the package to home.packages
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
# Only add fish abbr if package is installed
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
in
lib.mkMerge [
# Darwin exclusive config
(lib.mkIf pkgs.stdenv.isDarwin {
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
set --global --export HOMEBREW_REPOSITORY "/opt/homebrew"
fish_add_path --global --move --path "/opt/homebrew/bin" "/opt/homebrew/sbin"
if test -n "$MANPATH[1]"; set --global --export MANPATH ''' $MANPATH; end;
if not contains "/opt/homebrew/share/info" $INFOPATH; set --global --export INFOPATH "/opt/homebrew/share/info" $INFOPATH; end;
'';
shellAbbrs = lib.mkMerge [
# Only add fish abbr if package is installed
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
in
lib.mkMerge [
{
rebuild = "sudo darwin-rebuild switch --flake .#darwinix";
}
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'darwin,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
];
})
})
# Linux exclusive config
(lib.mkIf pkgs.stdenv.isLinux {
generateCompletions = nixosConfig.programs.fish.generateCompletions;
# Linux exclusive config
(lib.mkIf pkgs.stdenv.isLinux {
generateCompletions = nixosConfig.programs.fish.generateCompletions;
# TODO: There's a bug with the direnv mechanism:
# - When leaving an env, it unloads (good)
# - When entering another env, it loads (good)
# - When leaving this one, it doesn't unload (bad)
# - When entering leaving it again, it works...
# This only happens sometimes, is there a race condition?
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
fish_vi_key_bindings
# Because we can't source that in a project flake's shellHook (is POSIX), source it here
function __project_shell_reload --on-variable INIT_PROJECT_SHELL
# Leaving the environment
if not set -q INIT_PROJECT_SHELL; or test -z "$INIT_PROJECT_SHELL"
if test -n "$__last_unload_project_shell"; and test -f "$__last_unload_project_shell"
source "$__last_unload_project_shell"
end
set -e __last_init_project_shell
set -e __last_unload_project_shell
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
# Entering or switching environments
if test "$INIT_PROJECT_SHELL" != "$__last_init_project_shell"
# Cleanup the previous environment
if test -n "$__last_unload_project_shell"; and test -f "$__last_unload_project_shell"
source "$__last_unload_project_shell"
end
# Store into variables to persist until next environment switch in the same shell
set -g __last_init_project_shell "$INIT_PROJECT_SHELL"
if set -q UNLOAD_PROJECT_SHELL; and test -f "$UNLOAD_PROJECT_SHELL"
set -g __last_unload_project_shell "$UNLOAD_PROJECT_SHELL"
else
set -e __last_unload_project_shell
end
# Source the new environment
if test -f "$INIT_PROJECT_SHELL"
source "$INIT_PROJECT_SHELL"
end
# 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
end
'';
functions = lib.mergeAttrsList [
(lib.optionalAttrs config.homemodules.nnn.enable {
nnncd = {
wraps = "nnn";
description = "support nnn quit and change directory";
body = ''
# Block nesting of nnn in subshells
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
echo "nnn is already running"
return
end
# 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 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
# The command function allows one to alias this function to `nnn` without
# making an infinitely recursive alias
command nnn $argv
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm $NNN_TMPFILE
end
'';
};
})
];
# The command function allows one to alias this function to `nnn` without
# making an infinitely recursive alias
command nnn $argv
shellAbbrs = let
# Only add " | bat" if bat is installed
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm $NNN_TMPFILE
end
'';
};
})
];
# Same as above but with args for bat
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
shellAbbrs = lib.mkMerge [
# 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.
{
# Fish
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
abbrs = batifyWithArgs "abbr" "-l fish";
# Tools
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
nd = "nix develop";
nb = "nix build -L";
ns = "nix shell nixpkgs#";
nr = "nix run";
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra"; # env var for wayland
}
@ -193,33 +151,31 @@ in {
# (abbrify pkgs.sd {sed = "sd";})
];
})
})
# Common config
{
enable = true;
# Common config
{
enable = true;
shellAbbrs = lib.mkMerge [
shellAbbrs = let
# 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 [
{
# Shell
# Shell basics
c = "clear";
q = "exit";
mkdir = "mkdir -p"; # also create parents (-p)
watch = "watch -d -c -n 0.5";
sy = "sudo yazi";
sy = "sudo -u ${username} 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";
}
@ -271,9 +227,14 @@ in {
(abbrify pkgs.lazygit {lg = "lazygit";})
];
plugins = [];
}
];
plugins = [];
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
'';
}
];
programs.starship = {
enable = true;

View File

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

View File

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

View File

@ -31,8 +31,8 @@ in {
settings = lib.mkMerge [
# Linux config
(lib.mkIf pkgs.stdenv.isLinux {
allow_remote_control = true; # For nnn file preview or nvim scrollback
listen_on = lib.mkDefault "unix:@mykitty"; # This conflicts with direnv-instant
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
listen_on = "unix:@mykitty";
})
# Common config
@ -42,7 +42,6 @@ in {
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
# hide_window_decorations = "yes";
enabled_layouts = "grid,vertical,horizontal";
cursor_trail = 3;
tab_bar_min_tabs = 2; # Don't show a single tab
tab_bar_edge = "bottom";

View File

@ -30,58 +30,54 @@ in {
(lib.optionals (!headless) [
# Language servers
autotools-language-server
basedpyright
clang-tools
clojure-lsp
cmake-language-server
haskell-language-server
jdt-language-server
just-lsp
ltex-ls # TODO: Only enable on-demand
lua-language-server
# nil
# perl5Packages.PLS
basedpyright
pyrefly
# rPackages.languageserver
ty
rust-analyzer
svelte-language-server
tailwindcss-language-server
tex-fmt
texlab
tinymist
ty
typescript
vscode-langservers-extracted # includes nodejs
autotools-language-server
just-lsp
# Linters
checkstyle # java
clippy # rust
clj-kondo # clojure
eslint_d # javascript
# python313Packages.ruff
# python313Packages.flake8
# python313Packages.pylint
python313Packages.ruff
python313Packages.flake8
python313Packages.pylint
lua54Packages.luacheck
vale # text
# statix # nix (doesn't recognize pipe operator)
# Formatters
air-formatter
cljfmt
python313Packages.black
google-java-format
html-tidy
jq # json
just-formatter
mbake
# nodePackages_latest.prettier # Use local install as plugins change per project
# perl5Packages.PerlTidy
# prettierd # Use prettier instead because of plugins
# python313Packages.black
# nodePackages_latest.prettier # Use local install as plugins change per project
rustfmt
stylua
tombi
typstyle
mbake
just-formatter
tombi
])
[
@ -91,48 +87,6 @@ in {
lua54Packages.jsregexp # For tree-sitter
# nodejs_latest
# TODO: Create a perl module where I can add packages to, so I don't end up with multiple perl installations
# TODO: The same is required for python and R (below)
(perl.withPackages (p:
with p; [
PLS
PerlTidy
NetOpenSSH
DateTime
DBI
DBDMariaDB
CursesUI
TextCSV_XS
]))
(python314.withPackages (p:
with p; [
# Linters
ruff
flake8
pylint
# Formatters
black
numpy
matplotlib
requests
]))
(rWrapper.override {
packages = with rPackages; [
languageserver
ggplot2
ggalluvial
plotly
shiny
readr
tibble
svglite
];
})
nixd
alejandra # nix
]
@ -569,10 +523,8 @@ in {
make = ["bake"];
markdown = ["prettierd" "prettier"];
nix = ["alejandra"];
perl = ["perltidy"];
python = ["black"];
qml = ["qmlformat"];
r = ["air"];
rust = ["rustfmt"];
svelte = ["prettierd" "prettier"];
toml = ["tombi"];
@ -600,21 +552,6 @@ in {
};
};
devdocs = rec {
name = "devdocs";
pkg = pkgs.vimPlugins.devdocs-nvim;
lazy = true;
cmd = ["DevDocs"];
dependencies = [snacks];
config = mkDefaultConfig name;
# opts = {
# ensure_installed = [
# "c"
# "cpp"
# ];
# };
};
direnv = {
name = "direnv";
pkg = pkgs.vimPlugins.direnv-vim;
@ -908,8 +845,9 @@ in {
dependencies = [_lazydev];
config = let
servers = mylib.generators.toLuaObject [
{name = "autotools-language-server";}
{name = "basedpyright";}
# {name = "pyrefly";} # TODO: Config
# {name = "ty";} # TODO: Config
{
name = "clangd";
extraOptions = {
@ -961,6 +899,7 @@ in {
};
};
}
{name = "autotools-language-server";}
# {name = "nil_ls";}
{
name = "nixd";
@ -1002,7 +941,6 @@ in {
};
};
}
{name = "perlpls";}
{
name = "qmlls";
extraOptions.cmd = [
@ -1010,8 +948,6 @@ in {
"-E" # Use QML_IMPORT_PATH env variable
];
}
# {name = "pyrefly";} # TODO: Config
{name = "r_language_server";}
{name = "svelte";}
{name = "tailwindcss";}
{name = "texlab";}
@ -1023,7 +959,6 @@ in {
semanticTokens = "disable";
};
}
# {name = "ty";} # TODO: Config
# {name = "jdtls";} # Don't set up when using nvim-jdtls
# {name = "rust_analyzer";} # Don't set up when using rustaceanvim
@ -2225,7 +2160,6 @@ in {
# dap # Debug adapter protocol # TODO:
# dap-ui # Debugger UI # TODO:
devdocs
diffview # Git diff # TODO: Check the keybindings
direnv # Automatically load local environments

View File

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

View File

@ -340,13 +340,6 @@ _: let
action = "<cmd>lua vim.g.toggle_rmpc()<cr>"; # Defined in extraConfigLua.lua
options.desc = "Show Rmpc";
}
# TODO: Something with the environment activation doesn't work
# {
# mode = "n";
# key = "<leader>.";
# action = "<cmd>lua vim.g.toggle_failnix()<cr>"; # Defined in extraConfigLua.lua
# options.desc = "Show FailNix";
# }
{
mode = "n";
key = "<leader>i";
@ -512,48 +505,6 @@ _: let
action = "<cmd>lua Snacks.picker.help()<cr>";
options.desc = "Helptags Picker";
}
{
mode = "n";
key = "<leader>hd";
action = "+devdocs";
}
# {
# mode = "n";
# key = "<leader>hdd";
# action.__raw = ''
# function()
# local devdocs = require("devdocs")
# local installedDocs = devdocs.GetInstalledDocs()
# vim.ui.select(installedDocs, {}, function(selected)
# if not selected then
# return
# end
# local docDir = devdocs.GetDocDir(selected)
# -- prettify the filename as you wish
# Snacks.picker.files({ cwd = docDir })
# end)
# end
# '';
# options.desc = "Open Devdocs";
# }
{
mode = "n";
key = "<leader>hdd";
action = "<cmd>DevDocs get<cr>";
options.desc = "Open Devdocs in Split";
}
{
mode = "n";
key = "<leader>hdi";
action = "<cmd>DevDocs install<cr>";
options.desc = "Install Devdocs";
}
{
mode = "n";
key = "<leader>hdD";
action = "<cmd>DevDocs delete<cr>";
options.desc = "Delete Devdocs";
}
];
leader-quit = [

View File

@ -19,43 +19,30 @@ in {
}
];
gtk = let
gtkConfig = {
enable = true;
gtk = {
enable = true;
iconTheme.package = color.iconPackage;
iconTheme.name = color.iconTheme;
colorScheme = "dark";
colorScheme = "dark";
gtk3.colorScheme = "dark";
gtk4.colorScheme = "dark";
iconTheme = {
package = color.iconPackage;
name = color.iconTheme;
};
cursorTheme = {
name = color.cursor;
package = color.cursorPackage;
};
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";
};
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";
};
};
gtkExtraConfig = {
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
in
gtkConfig
// {
gtk3 = gtkConfig // {extraConfig = gtkExtraConfig;};
gtk4 = gtkConfig // {extraConfig = gtkExtraConfig;};
};
};
dconf = {
enable = true;
@ -143,9 +130,8 @@ in {
xwayland-satellite
# ncpamixer # Audio control
wiremix # Audio control
awww
swww
waypaper
wtype # For elephant
# GTK apps (look good and work well with xdg portals)
nautilus # Fallback file chooser used by xdg-desktop-portal-gnome
@ -209,10 +195,6 @@ in {
default = ["desktopapplications"];
};
empty = ["desktopapplications"];
selection_wrap = true;
hide_quick_activation = true;
actions_as_menu = true;
};
themes."cattpuccin-mocha" = let
@ -581,45 +563,15 @@ in {
# opacity = 0.8;
}
# Floating + unmaximized windows
{
matches = [
{app-id = "com.github.finefindus.eyedropper";}
{app-id = "re.sonny.Junction";}
];
open-maximized = false;
open-floating = true;
# default-floating-position = {
# x = 0;
# y = 0;
# relative-to = "center";
# };
}
# Specific floating windows
{
matches = [
{app-id = "re.sonny.Junction";}
];
default-column-width.fixed = 500;
default-window-height.fixed = 250;
}
{
matches = [
{app-id = "com.github.finefindus.eyedropper";}
];
default-column-width.fixed = 250;
default-window-height.fixed = 500;
}
# Rules for specific windows
{
matches = [{app-id = "Zotero";}];
open-on-workspace = "2";
}
{
matches = [{app-id = "neovide";}];
open-on-workspace = "2";
open-maximized = true;
open-focused = true;
}
{
matches = [{app-id = "jetbrains-clion";}];
@ -632,21 +584,8 @@ in {
open-floating = true;
}
{
matches = [
{
app-id = "electron";
title = ".*Chriphost - Obsidian.*";
}
];
matches = [{app-id = "obsidian";}];
open-on-workspace = "3";
# open-maximized = true;
open-focused = true;
}
{
matches = [{app-id = "Zotero";}];
open-on-workspace = "3";
# open-maximized = true;
open-focused = true;
}
{
matches = [{app-id = "firefox";}];
@ -675,12 +614,6 @@ in {
open-floating = true;
open-maximized = true;
}
{
matches = [{app-id = "factorio";}];
open-on-workspace = "6";
# open-floating = true;
open-maximized = true;
}
{
matches = [{app-id = "signal";}];
open-on-workspace = "7";
@ -711,112 +644,8 @@ in {
};
# TODO: Move values to config option and set in home/christoph/niri.nix
binds = with config.lib.niri.actions; let
sessionMenu = mylib.rofi.mkMenu {
prompt = "Session";
layers = [
{
"󰤂 Poweroff" = "poweroff";
"󰜉 Reboot" = "reboot";
"󰌾 Lock" = "loginctl lock-session";
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
# " Reload Hyprland" = "hyprctl reload";
# " Exit Hyprland" = "hyprctl dispatch exit";
" Exit Niri" = "niri msg action quit";
}
];
prompts = ["Select Session Action"];
rofiCmd = "walker -d";
};
wallpaperMenu = mylib.rofi.mkMenu {
prompt = "Wallpaper";
layers = [
"eza -1 ${config.paths.nixflake}/wallpapers"
];
prompts = ["Select Wallpaper"];
# Use waypaper instead of swww directly, so the chosen wallpaper will be restored after reboot
command = "waypaper --wallpaper ${config.paths.nixflake}/wallpapers/$OPTION0";
rofiCmd = "walker -d";
};
# No lectures anymore :) - Kept as example
lecturesMenu = mylib.rofi.mkMenu {
prompt = "Lecture";
layers = [
"eza -1 -D ~/Notes/TU"
"eza -1 -D ~/Notes/TU/$OPTION0"
"eza -1 ~/Notes/TU/$OPTION0/$OPTION1 | grep '.pdf'"
];
prompts = [
"Select Lecture"
"Select Subfolder"
"Select Deck"
];
command = "xdg-open ~/Notes/TU/$OPTION0/$OPTION1/$OPTION2";
rofiCmd = "walker -d";
};
# niriMenu = mylib.rofi.mkMenu {
# prompt = "Niri";
# layers = [
# {
# "󰹑 Take Region Screenshot" = "niri msg action screenshot -p false";
# "󰹑 Take Window Screenshot" = "niri msg action screenshot-window -p false -d true";
# "󰹑 Take Full-Screen Screenshot" = "niri msg action screenshot-screen -p false -d true";
# }
# ];
# prompts = ["Execute Niri Action"];
# rofiCmd = "walker -d";
# };
globalMenu = mylib.rofi.mkMenu {
prompt = "Global";
layers = [
{
" Control Session" = "${sessionMenu}/bin/rofi-menu-Session";
"󰸉 Change Wallpaper" = "${wallpaperMenu}/bin/rofi-menu-Wallpaper";
"󰋗 View Keybindings" = "niri msg action show-hotkey-overlay";
" Open Lecture Material" = "${lecturesMenu}/bin/rofi-menu-Lecture";
# " Niri Actions" = "${niriMenu}/bin/rofi-menu-Niri";
# TODO: What else? SSH menu?
}
];
prompts = ["Select Action"];
rofiCmd = "walker -d";
};
in {
# DMenu
"Mod+Shift+A" = {
action = spawn "walker" "-m" "providerlist";
hotkey-overlay = {title = "Toggle the launcher.";};
};
"Mod+A" = {
action = spawn "walker" "-m" "desktopapplications";
hotkey-overlay = {title = "Toggle the application launcher.";};
};
"Mod+C" = {
action = spawn "walker" "-m" "clipboard";
hotkey-overlay = {title = "Show clipboard history.";};
};
"Mod+Escape" = {
action = spawn "${sessionMenu}/bin/rofi-menu-Session";
hotkey-overlay = {title = "Toggle the session menu.";};
};
"Mod+W" = {
action = spawn "${wallpaperMenu}/bin/rofi-menu-Wallpaper";
hotkey-overlay = {title = "Open wallpaper menu.";};
};
"Mod+D" = {
action = spawn "${globalMenu}/bin/rofi-menu-Global";
hotkey-overlay = {title = "Open global menu.";};
};
binds = with config.lib.niri.actions; {
# Applications
"Mod+Ctrl+W" = {
action = spawn "waypaper";
hotkey-overlay = {title = "Open waypaper.";};
};
"Mod+Shift+W" = {
action = spawn "waypaper" "--random";
hotkey-overlay = {title = "Select random wallpaper.";};
};
"Mod+T" = {
action = spawn "kitty";
hotkey-overlay = {title = "Spawn Kitty.";};
@ -849,24 +678,52 @@ in {
action = spawn "neovide" "${config.paths.dotfiles}/flake.nix";
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.";};
};
"Mod+A" = {
action = spawn "walker" "-m" "desktopapplications";
hotkey-overlay = {title = "Toggle the application launcher.";};
};
"Mod+Shift+A" = {
action = spawn "walker" "-m" "providerlist";
hotkey-overlay = {title = "Toggle the launcher.";};
};
"Mod+Escape" = let
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.";};
};
"Mod+C" = {
action = spawn "walker" "-m" "clipboard";
hotkey-overlay = {title = "Show clipboard history.";};
};
# Screenshots
"Mod+S" = {
action.screenshot-window = {
write-to-disk = true;
show-pointer = false;
};
action.screenshot-window = {write-to-disk = true;};
hotkey-overlay = {title = "Take a screenshot of the current window.";};
};
"Mod+Ctrl+S" = {
action.screenshot-screen = {
write-to-disk = true;
show-pointer = false;
};
hotkey-overlay = {title = "Take a screenshot of the current screen.";};
};
"Mod+Shift+S" = {
action.screenshot = {show-pointer = false;};
action.screenshot = {show-pointer = true;};
hotkey-overlay = {title = "Take a screenshot of a region.";};
};

View File

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

View File

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

View File

@ -1,73 +0,0 @@
{
config,
nixosConfig,
lib,
mylib,
pkgs,
...
}: let
inherit (config.homemodules) ssh color;
in {
options.homemodules.ssh = import ./options.nix {inherit lib mylib;};
config = lib.mkIf ssh.enable {
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
forwardAgent = false;
addKeysToAgent =
if pkgs.stdenv.isLinux
then "no"
else "yes"; # Don't have keychain on darwin
compression = true;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"nixinator" = {
port = 5432;
user = "christoph";
hostname = "vps.chriphost.de";
};
"servenix" = {
user = "christoph";
hostname = "local.chriphost.de";
};
"thinknix" = {
user = "christoph";
hostname = "think.chriphost.de";
};
"vps" = {
user = "root";
hostname = "vps.chriphost.de";
};
"mars" = {
user = "smchurla";
hostname = "mars.cs.tu-dortmund.de";
serverAliveInterval = 60;
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;
}
];
};
};
};
};
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -24,7 +24,7 @@ in {
output = waybar.monitors;
modules-left = ["custom/launcher" "niri/workspaces" "niri/window"]; # "user"
modules-center = ["mpris"]; # "systemd-failed-units"
modules-center = ["systemd-failed-units" "mpris"];
modules-right = ["privacy" "pulseaudio" "network" "disk" "cpu" "memory" "clock" "tray"];
"custom/launcher" = {
@ -77,11 +77,11 @@ in {
tooltip = true;
tooltip-icon-size = 24;
}
# {
# type = "audio-out";
# tooltip = true;
# tooltip-icon-size = 24;
# }
{
type = "audio-out";
tooltip = true;
tooltip-icon-size = 24;
}
{
type = "audio-in";
tooltip = true;
@ -105,29 +105,30 @@ in {
};
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 = {
interval = 1;
# states = {
# "critical" = 85;
# };
states = {
"warning" = 65;
"critical" = 85;
};
format = "<span></span> {load}%";
# format-critical = "<span color='#${color.hex.red}'><span></span> {load}%</span>";
format-warning = "<span color='#${color.hex.yellow}'><span></span> {load}%</span>";
format-critical = "<span color='#${color.hex.red}'><span></span> {load}%</span>";
on-click = "kitty --title=Btop btop";
tooltip = false;
};
memory = {
interval = 1;
# states = {
# "critical" = 85;
# };
states = {
"warning" = 65;
"critical" = 85;
};
format = "<span></span> {percentage}%";
# format-critical = "<span color='#${color.hex.red}'><span></span> {percentage}%</span>";
format-warning = "<span color='#${color.hex.yellow}'><span></span> {percentage}%</span>";
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";
@ -143,7 +144,7 @@ in {
mode-mon-col = 3;
on-scroll = -1;
format = {
months = "<span color='#${color.hex.peach}'><b>{}</b></span>";
months = "<span color='#${color.hex.yellow}'><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>";
@ -193,26 +194,24 @@ in {
}
/* Background colors */
#custom-launcher {background-color: #${color.hex.accent};}
#workspaces button {background-color: #${color.hex.blue};}
#workspaces button.empty {background-color: #${color.hex.lavender};}
#workspaces button.active {background-color: #${color.hex.green};}
#workspaces button.urgent {background-color: #${color.hex.red};}
#window {background-color: #${color.hex.maroon};}
#mpris {background-color: #${color.hex.accent};}
#privacy {background-color: #${color.hex.red};}
#pulseaudio {background-color: #${color.hex.maroon};}
#network {background-color: #${color.hex.peach};}
#disk {background-color: #${color.hex.yellow};}
#cpu {background-color: #${color.hex.green};}
#memory {background-color: #${color.hex.teal};}
#clock {background-color: #${color.hex.sky};}
#tray {background-color: #${color.hex.accent};}
#custom-launcher {background-color: #${color.hex.accent};}
#workspaces button {background-color: #${color.hex.lavender};}
#workspaces button.active {background-color: #${color.hex.pink};}
#window {background-color: #${color.hex.maroon};}
#systemd-failed-units {background-color: #${color.hex.red};}
#mpris {background-color: #${color.hex.accent};}
#privacy {background-color: #${color.hex.red};}
#pulseaudio {background-color: #${color.hex.maroon};}
#network {background-color: #${color.hex.peach};}
#disk {background-color: #${color.hex.yellow};}
#cpu {background-color: #${color.hex.green};}
#memory {background-color: #${color.hex.teal};}
#clock {background-color: #${color.hex.sky};}
#tray {background-color: #${color.hex.accent};}
/* Square Widgets */
#custom-launcher,
#systemd-failed-units,
#mpris,
#tray {
color: #${color.hex.mantle};
@ -261,6 +260,10 @@ in {
margin: 0px 5px 0px 0px;
}
#systemd-failed-units {
margin: 0px 5px 0px 0px;
}
#tray {
margin: 0px 0px 0px 5px;
}

View File

@ -85,11 +85,6 @@ in {
run = ''xdg-open "$@"'';
desc = "Open selection";
}
{
# TODO: For some reason, junction does not exit after choosing an application...
run = ''junction "$@"'';
desc = "Open selection in chosen application";
}
];
extract = [
{

View File

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

View File

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

View File

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

View File

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

View File

@ -3,164 +3,79 @@
pkgs,
lib,
...
}: {
}: rec {
# Receives attrs like:
# {
# "Poweroff" = "poweroff";
# "Reload Hyprland" = "hyprctl reload";
# }
# mkSimpleMenu = let
# # Makes a string like ''"Poweroff" "Reload Hyprland"''
# unpack-options = attrs: "\"${lib.concatStringsSep "\" \"" (builtins.attrNames attrs)}\"";
#
# mkCase = option: action: "else if test \"${option}\" = $OPTION\n set ACTION \"${action}\"";
#
# cases = attrs:
# attrs
# |> builtins.mapAttrs mkCase
# |> builtins.attrValues
# |> builtins.concatStringsSep "\n";
# in
# {
# prompt,
# attrs,
# command ? ''rofi -dmenu -i'',
# }:
# pkgs.writeScriptBin "rofi-menu-${prompt}" ''
# #! ${pkgs.fish}/bin/fish
#
# # OPTIONS contains all possible values Rofi will display
# set OPTIONS ${unpack-options attrs}
#
# # We choose a single OPTION using Rofi
# set OPTION (echo -e (string join "\n" $OPTIONS) | ${command} -p "${prompt}")
#
# # Check if the chosen OPTION is a valid choice from OPTIONS
# if not contains $OPTION $OPTIONS
# exit
# end
#
# # Set a command to execute based on the chosen OPTION
# if false
# exit # Easier to generate with this
# ${cases attrs}
# else
# exit
# end
#
# # Execute the command
# eval $ACTION
# '';
mkSimpleMenu = let
# Makes a string like ''"Poweroff" "Reload Hyprland"''
unpack-options = attrs: "\"${lib.concatStringsSep "\" \"" (builtins.attrNames attrs)}\"";
# Rofi/Dmenu menu generator.
#
# Each element in `layers` is one of:
# - attrset { "Label" = "value"; } # static options: selected value → $OPTIONn
# - string "shell-cmd" # dynamic options from command: selected text → $OPTIONn
# # may reference $OPTION0, $OPTION1, ... from earlier layers
#
# The "command" is the last action, it can reference $OPTION0, $OPTION1, ...
# If no "command" is given and the last layer is a static attrset, its selected value is evaluated directly.
#
# The "prompts" list are optional per-layer prompt strings (falls back to "prompt" if not provided).
#
# vpn.fish equivalent:
# mkMenu {
# prompt = "vpn";
# layers = [
# "cat /etc/rofi-vpns"
# { "start" = "start"; "stop" = "stop"; "status" = "status"; }
# ];
# command = "systemctl $OPTION1 $OPTION0.service";
# }
#
# lectures.fish equivalent:
# mkMenu {
# prompt = "lecture";
# layers = [
# "eza -1 -D ~/Notes/TU"
# "eza -1 ~/Notes/TU/$OPTION0/Lecture | grep '.pdf'"
# ];
# command = "xdg-open ~/Notes/TU/$OPTION0/Lecture/$OPTION1";
# }
mkMenu = {
prompt,
layers,
prompts ? [],
command ? null,
rofiCmd ? "rofi -dmenu -i",
}: let
isStaticLayer = layer: builtins.isAttrs layer && !(layer ? options);
isDynamicLayer = layer: builtins.isString layer;
mkCase = option: action: "else if test \"${option}\" = $OPTION\n set ACTION \"${action}\"";
escStr = s: builtins.replaceStrings [''"'' "\\"] [''\"'' "\\\\"] s;
cases = attrs:
attrs
|> builtins.mapAttrs mkCase
|> builtins.attrValues
|> builtins.concatStringsSep "\n";
in
{
prompt,
attrs,
command ? ''rofi -dmenu -p " ${prompt} " -i'',
}:
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
#! ${pkgs.fish}/bin/fish
layerPrompt = i:
if i < builtins.length prompts
then lib.elemAt prompts i
else prompt;
# OPTIONS contains all possible values Rofi will display
set OPTIONS ${unpack-options attrs}
# Static layer: attrset of label -> value
# Displays labels in rofi; maps selected label to its value -> $OPTIONi
mkStaticLayer = i: attrs: let
lp = layerPrompt i;
labels = builtins.attrNames attrs;
optsStr = "\"${lib.concatStringsSep "\" \"" (map escStr labels)}\"";
mkCase = label: value: "else if test \"${escStr label}\" = $_LABEL${toString i}\n set OPTION${toString i} \"${escStr value}\"";
casesStr =
builtins.concatStringsSep "\n"
(builtins.attrValues (builtins.mapAttrs mkCase attrs));
in {
script = ''
set _OPTS${toString i} ${optsStr}
set _LABEL${toString i} (echo -e (string join "\n" $_OPTS${toString i}) | ${rofiCmd} -p "${lp}")
if not contains $_LABEL${toString i} $_OPTS${toString i}
# We choose a single OPTION using Rofi
set OPTION (echo -e (string join "\n" $OPTIONS) | ${command})
# Check if the chosen OPTION is a valid choice from OPTIONS
if not contains $OPTION $OPTIONS
exit
end
# Set a command to execute based on the chosen OPTION
if false
exit
${casesStr}
exit # Easier to generate with this
${cases attrs}
else
exit
end
# Execute the command
eval $ACTION
'';
};
# Dynamic layer: shell command string whose output is piped to rofi
# Selected text -> $OPTIONi; may reference earlier $OPTIONn variables
mkDynamicLayer = i: cmd: let
lp = layerPrompt i;
in {
script = ''
set OPTION${toString i} (${cmd} | ${rofiCmd} -p "${lp}")
if test -z $OPTION${toString i}
exit
end
'';
};
# TODO: I want to generate the containers menu using the actionsA and actionsB attrs:
# - actionsA will be generated from the stuff in oci-containers.containers
# - actionsB will be set statically for start, stop, status
mkLayer = i: layer:
if isStaticLayer layer
then mkStaticLayer i layer
else if isDynamicLayer layer
then mkDynamicLayer i layer
else throw "mkMenu: layer ${toString i} has invalid type";
layerResults = lib.imap0 mkLayer layers; # Map with 0-based index
layerScripts = map (r: r.script) layerResults;
lastLayer = lib.last layers;
finalCmd =
if command != null
then command
else if isStaticLayer lastLayer
then "$OPTION${toString (builtins.length layers - 1)}"
else throw "mkMenu: 'command' must be set when the last layer is not a static attrset";
# Receives attrs like:
# {
# optionA = "exa -1 -D ~/Notes/TU";
# optionB = "exa -1 -D ~/Notes/TU/$OPTIONA/Lecture | grep \".pdf\"";
# commandB = "xdg-open ~/Notes/TU/$OPTIONA/Lecture/$OPTIONB";
# }
#
# Keys:
# - optionA, optionB # Command that generates Rofi options:
# exa -1 -D ~/Notes/TU
# cat /etc/rofi-vpns
# - commandA, commandB # Action to execute after sth. was chosen (mutually excl. with command)
# - actionsA, actionsB # Configure actions by lookup (mutually excl. with command):
# actionsB = {"status" = "systemctl status..."}
# - colorA, colorB # Configure highlighting conditions:
# colorA = {"red" = "systemctl ... | grep ..."};
#
# Use $OPTIONA and $OPTIONB to use the options chosen by option<A/B>-command and rofi
# Use $EVALA and $EVALB to use the outputs generated by command<A/B>
mkMenu = let
in
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
#! ${pkgs.fish}/bin/fish
${lib.concatStringsSep "\n" layerScripts}
eval "${finalCmd}"
'';
prompt: attrs: "";
}

16
system/cachix.nix Normal file
View File

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

View File

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

View File

@ -10,23 +10,31 @@
hostname,
...
}: {
systemmodules = {
sops-nix.bootSecrets.${username} = [
"user-password"
];
nix = {
enable = true;
sops-nix.secrets.${username} = [
"ssh-private-key"
"nix-github-token"
"docker-password"
"jellyfin-password"
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}"
];
};
nix = mylib.nixos.mkCommonNixSettings username;
networking = {
hostName = "${hostname}";
hostname = "${hostname}";
localHostName = "${hostname}";
computerName = "${hostname}";
@ -38,11 +46,6 @@
blockAllIncoming = false;
};
knownNetworkServices = [
"Wi-Fi"
"Thunderbold Bridge"
];
dns = [
"192.168.86.26"
"8.8.8.8"
@ -53,8 +56,8 @@
};
power = {
# restartAfterFreeze = false;
# restartAfterPowerFailure = false;
restartAfterFreeze = false;
restartAfterPowerFailure = false;
sleep = {
computer = 10; # 10 minutes until sleep
@ -64,37 +67,28 @@
};
system = {
primaryUser = "${username}";
# TODO:
defaults = {
# dock = {};
trackpad = {
ActuateDetents = true; # Haptic feedback
ActuateDetents = true;
ActuationStrength = 1;
Clicking = true; # Tap to click
Dragging = true; # Double tap to drag
TrackpadRightClick = true;
TrackpadPinch = true;
};
};
keyboard = {
enableKeyMapping = true;
swapLeftCtrlAndFn = false;
swapLeftCommandAndLeftAlt = false;
swapLeftCtrlAndFn = true;
swapLeftCommandAndLeftAlt = true;
};
};
users.users.${username} = {
name = "${username}";
description = "Christoph";
uid = 501;
gid = 20;
createHome = false;
home = "/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;
@ -124,41 +118,14 @@
};
services = {
# For another time maybe
# sketchybar = {};
# skhd = {};
# yabai = {};
# aerospace = {};
};
# NOTE: Not installed automatically
homebrew = {
enable = true;
enableFishIntegration = true;
onActivation = {
autoUpdate = true;
cleanup = "zap"; # Uninstall unlisted casks and associated files on rebuild
upgrade = true;
};
# taps = [
# "homebrew-zathura/zathura"
# ];
brews = [];
casks = [
"alt-tab"
"discord"
"iina"
"nextcloud"
"obsidian"
"protonvpn"
"signal"
# "zathura"
# "zathura-pdf-mupdf"
"zotero"
];
# brews = [];
};
# Set Git commit hash for darwin-version.

View File

@ -91,7 +91,6 @@ with mylib.networking; {
"ssh-private-key"
"nix-github-token"
"docker-password"
"jellyfin-password"
];
};
@ -105,7 +104,31 @@ with mylib.networking; {
};
# Enable flakes
nix = mylib.nixos.mkCommonNixSettings username;
nix = {
package = pkgs.nixVersions.stable;
extraOptions = ''
experimental-features = nix-command flakes pipe-operators
'';
settings.trusted-users = ["root" "${username}"];
# Auto garbage-collect and optimize store
gc.automatic = false; # Done by nh.clean.enable;
gc.options = "--delete-older-than 5d";
settings.auto-optimise-store = true;
optimise.automatic = true;
# This will add your inputs as registries, making operations with them (such
# as nix shell nixpkgs#name) consistent with your flake inputs.
# (Registry contains flakes)
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
# Set NIX_PATH to find nixpgks
nixPath = [
"nixpkgs=${inputs.nixpkgs.outPath}"
"home-manager=${inputs.home-manager.outPath}"
];
};
# Bootloader/Kernel stuff
boot = {
@ -144,7 +167,7 @@ with mylib.networking; {
documentation = {
# NOTE: Disable this while configuring stuff, it's slow
enable = false;
enable = true;
man.enable = config.documentation.enable;
man.cache.enable = true; # Slow but needed for neovim man picker
info.enable = config.documentation.enable;
@ -235,7 +258,6 @@ with mylib.networking; {
description = "Christoph";
group = "users";
uid = 1000;
home = "/home/${username}";
extraGroups = [
"networkmanager"
"wheel"

View File

@ -12,7 +12,7 @@
./disks.nix
# General services
# ../services/comfyui.nix
../services/comfyui.nix
../services/fileflows-node.nix
];
@ -124,7 +124,6 @@
# 31431 # Parsec
5173 # SvelteKit
8090 # PocketBase
8188 # ComfyUI
];
allowedUDPPorts = [
@ -135,7 +134,6 @@
# 31431 # Parsec
5173 # SvelteKit
8090 # PocketBase
8188 # ComfyUI
];
};
@ -158,7 +156,7 @@
};
boot = {
kernelPackages = pkgs.linuxPackages_zen;
# kernelPackages = pkgs.linuxPackages_zen;
# kernelPackages = pkgs.linuxPackages_latest;
# Why do I need to know if something fails during boot???
@ -193,25 +191,7 @@
# };
};
environment.systemPackages = with pkgs; [
spice
spice-gtk
];
virtualisation = {
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
# ovmf.enable = true; # deprecated
swtpm.enable = true;
runAsRoot = true;
};
};
spiceUSBRedirection.enable = true;
};
networking.firewall.trustedInterfaces = ["virbr0"]; # libvirt
# environment.systemPackages = with pkgs; [];
programs = {
ausweisapp = {
@ -223,8 +203,6 @@
enable = true;
gdb = true;
};
virt-manager.enable = true;
};
services = {

View File

@ -82,8 +82,7 @@
};
"swap" = {
mountpoint = "/swap";
# Configured in hardware-configuration.nix
# swap.swapfile.size = "64G";
swap.swapfile.size = "16G";
};
};
};

View File

@ -131,9 +131,8 @@
swapDevices = [
{
device = "/swap/swapfile";
size = 1024 * 64; # Without hibernation 4.0 GB to 0.5 x RAM
randomEncryption.enable = false; # The disk is already encrypted. Useless and might lead to system freeze.
device = "/var/swap";
size = 1024 * 16; # Without hibernation 4.0 GB to 0.5 x RAM
}
];

View File

@ -32,7 +32,6 @@
../services/kiwix.nix
../services/kopia.nix
../services/nextcloud.nix
../services/ntfy.nix
../services/nginx-proxy-manager.nix
../services/paperless.nix
# ../services/plex.nix # Their monetization strategy is absolutely atrocious
@ -66,13 +65,52 @@
useNetworkManager = false;
networks = {
"10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {
interface = "ens18";
ips = ["192.168.86.25/24"];
routers = ["192.168.86.5"]; # Don't add IPv6 gateway, rely on router advertisement instead
nameservers = ["8.8.8.8" "8.8.4.4" "2001:4860:4860:8888" "2001:4860:4860:8844"]; # NOTE: Use reliable DNS for servers instead of 192.168.86.26
routable = true;
extraAddresses = ["fd00::19/64"]; # IPv6 ULA — declared without creating a route
# "10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {
# interface = "ens18";
# ips = ["192.168.86.25/24" "fd00::19/64"];
# routers = ["192.168.86.5" "fd00::5"];
# nameservers = ["8.8.8.8" "2001:4860:4860::8888"]; # NOTE: Use reliable DNS for servers instead of 192.168.86.26
# routable = true;
# };
# TODO: mylib.networking.mkStaticSystemdNetwork needs improvement to accomodate for this
"10-ether-1G" = rec {
enable = true;
# See man systemd.link, man systemd.netdev, man systemd.network
matchConfig = {
# This corresponds to the [MATCH] section
Name = "ens18"; # Match ethernet interface
};
# Static IP + DNS + Gateway
address = ["192.168.86.25/24"];
gateway = ["192.168.86.5"]; # Don't add IPv6 gateway, rely on router advertisement instead
dns = ["8.8.8.8" "8.8.4.4" "2001:4860:4860:8888" "2001:4860:4860:8844"];
routes = builtins.map (r: {Gateway = r;}) gateway;
# See man systemd.network
networkConfig = {
# This corresponds to the [NETWORK] section
DHCP = "no";
IPv6AcceptRA = "yes"; # Accept Router Advertisements
# MulticastDNS = "no";
# LLMNR = "no";
# LinkLocalAddressing = "ipv6";
};
addresses = [
{
# Don't add this to address, we don't want to create any routes with this
Address = "fd00::19/64";
}
];
linkConfig = {
# This corresponds to the [LINK] section
RequiredForOnline = "routable";
};
};
};
@ -111,8 +149,6 @@
"kopia-server-password"
"kopia-user-password"
"paperless-nextcloud-sync-password"
"ntfy-auth-users"
"ntfy-auth-tokens"
];
};

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -17,7 +16,14 @@ in {
image = "TEMPLATE:${TEMPLATEVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "adguard/adguardhome:${adguardVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "authelia/authelia:${autheliaVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/bazarr:${bazarrVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,18 +1,24 @@
{
mylib,
config,
lib,
pkgs,
...
}: let
boxVersion = "v0.31.0";
boxVersion = "v0.30.1";
in {
virtualisation.oci-containers.containers = {
box = {
image = "stashapp/stash:${boxVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,21 +1,24 @@
{
mylib,
config,
lib,
pkgs,
...
}: let
# comfyuiVersion = "cu128-slim-20260316";
# comfyuiVersion = "cu128-megapak-20260413";
# comfyuiVersion = "cu130-megapak-pt211-20260330";
comfyuiVersion = "cu130-megapak-pt211-20260413";
comfyuiVersion = "cu128-slim-20260316";
in {
virtualisation.oci-containers.containers = {
comfyui = {
image = "yanwk/comfyui-boot:${comfyuiVersion}";
autoStart = false;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -26,45 +29,19 @@ in {
volumes = let
rootDir = "/home/christoph/Games/ComfyUI";
in [
# cu128-slim / cu128-megapak
# "${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"
# cu130-megapak
"${rootDir}/storage-cache/dot-cache:/root/.cache"
"${rootDir}/storage-cache/dot-config:/root/.config"
"${rootDir}/storage-nodes/dot-local:/root/.local"
"${rootDir}/storage-nodes/comfy-extras:/root/ComfyUI/comfy_extras"
"${rootDir}/storage-nodes/custom_nodes:/root/ComfyUI/custom_nodes"
"${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/user-profile:/root/ComfyUI/user"
"${rootDir}/storage-user/user-scripts:/root/user-scripts"
"${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
CLI_ARGS = lib.concatStringsSep " " [
# "--cache-none" # Leads to single nodes being executed multiple times for each output connection :/
"--lowvram"
"--disable-smart-memory"
"--disable-pinned-memory"
"--disable-xformers"
"--use-sage-attention" # Crashes
# "--reserve-vram 1" # (1 or 2) => Assume less vram is available to mitigate OOM due to wrong vram estimation
];
};
extraOptions = [

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "revenz/fileflows:${fileflowsVersion}";
autoStart = false;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "revenz/fileflows:${version}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -28,7 +27,14 @@ in {
image = "postgres:14";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -53,7 +59,14 @@ in {
image = "gitea/gitea:${giteaVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
"gitea-db"
@ -94,7 +107,14 @@ in {
image = "gitea/act_runner:${runnerVersion}"; # NOTE: vegardit has other runner images
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
"gitea"

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -40,7 +39,14 @@ in {
image = "redis";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/jellyfin:${jellyfinVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
# "pihole"

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -19,7 +18,14 @@ in {
image = "kopia/kopia:${kopiaVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -34,7 +33,14 @@ in {
image = "postgres:alpine";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -61,7 +67,14 @@ in {
image = "redis:alpine";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -84,7 +97,14 @@ in {
image = "nextcloud:${nextcloudVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
"nextcloud-db"

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "jc21/nginx-proxy-manager:${nginxVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,79 +0,0 @@
{
mylib,
config,
lib,
pkgs,
...
}: let
ntfyVersion = "v2.21";
in {
# If we need to pass secrets to containers we can't use plain env variables.
sops.templates."ntfy_secrets.env".content = ''
NTFY_AUTH_USERS=${config.sops.placeholder.ntfy-auth-users}
NTFY_AUTH_TOKENS=${config.sops.placeholder.ntfy-auth-tokens}
'';
virtualisation.oci-containers.containers = {
# NTFY_AUTH_USERS='admin:$2b$10$13iMkFcSNXcb/DKlUSS03OM25saLd8/hDlKkowFtXYctu2fQBoLJK:admin,christoph:$2b$10$8jgrgBltBXj/Qw0BxBWf1eIfH53VV6wTdlJZEqWBIH3htwEP9PKgq:user'
# NTFY_AUTH_TOKENS="christoph:tk_rx8fd6hojuz4ekcb72j7juugkbmga:FAIL*-Notif"
# NTFY_BASE_URL="https://ntfy.vps.chriphost.de"
# NTFY_BEHIND_PROXY="true"
# NTFY_AUTH_FILE="/var/lib/ntfy/auth.db"
# NTFY_AUTH_DEFAULT_ACCESS="deny-all"
# NTFY_ENABLE_LOGIN="true"
# NTFY_REQUIRE_LOGIN="true"
# NTFY_ATTACHMENT_CACHE_DIR="/var/cache/ntfy/attachments"
# NTFY_CACHE_FILE="/var/cache/ntfy/cache.db"
# NTFY_UPSTREAM_BASE_URL="https://ntfy.sh"
# NTFY_AUTH_ACCESS="christoph:*:read-write"
ntfy = {
image = "binwiederhier/ntfy:${ntfyVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
dependsOn = [];
ports = [
"8042:80"
];
volumes = [
"ntfy_cache:/var/cache/ntfy"
"ntfy_attachments:/var/cache/ntfy/attachments"
"ntfy_lib:/var/lib/ntfy"
"ntfy_etc:/etc/ntfy"
];
cmd = ["serve"];
environment = {
PUID = "1000";
PGID = "1000";
TZ = "Europe/Berlin";
NTFY_BASE_URL = "https://ntfy.vps.chriphost.de";
NTFY_BEHIND_PROXY = "true";
NTFY_AUTH_FILE = "/var/lib/ntfy/auth.db";
NTFY_AUTH_DEFAULT_ACCESS = "deny-all";
NTFY_ENABLE_LOGIN = "true";
NTFY_REQUIRE_LOGIN = "true";
NTFY_ATTACHMENT_CACHE_DIR = "/var/cache/ntfy/attachments";
NTFY_CACHE_FILE = "/var/cache/ntfy/cache.db";
NTFY_UPSTREAM_BASE_URL = "https://ntfy.sh";
NTFY_AUTH_ACCESS = "christoph:*:read-write";
};
environmentFiles = [
config.sops.templates."ntfy_secrets.env".path
];
extraOptions = [
# "--privileged"
# "--device=nvidia.com/gpu=all"
"--net=behind-nginx"
];
};
};
}

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -17,7 +16,14 @@ in {
image = "flor1der/paperless-nextcloud-sync:${paperlessNCVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -53,7 +59,14 @@ in {
image = "redis:7";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -74,7 +87,14 @@ in {
image = "postgres:15";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "plexinc/pms-docker:${plexVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
# "pihole"

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -14,7 +13,14 @@ in {
image = "portainer/agent:${portainerVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -13,7 +12,14 @@ in {
image = "portainer/portainer-ce:${portainerVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/prowlarr:${prowlarrVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "rcourtman/pulse:${pulseVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/radarr:${radarrVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/sabnzbd:${sabnzbdVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/sabnzbd:${sabnzbdVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "linuxserver/sonarr:${sonarrVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,18 +1,24 @@
{
mylib,
config,
lib,
pkgs,
...
}: let
teamspeakVersion = "v6.0.0-beta8";
teamspeakVersion = "v6.0.0-beta7";
in {
virtualisation.oci-containers.containers = {
teamspeak = {
image = "teamspeaksystems/teamspeak6-server:${teamspeakVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
@ -24,8 +30,7 @@ in {
];
volumes = [
# "teamspeak_data:/var/tsserver"
"teamspeak_data2:/var/tsserver"
"teamspeak_data:/var/tsserver"
];
environment = {

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "tinymediamanager/tinymediamanager:${version}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];

View File

@ -1,5 +1,4 @@
{
mylib,
config,
lib,
pkgs,
@ -12,7 +11,14 @@ in {
image = "getwud/wud:${wudVersion}";
autoStart = true;
login = mylib.containers.mkDockerLogin config;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [
# "pihole"

View File

@ -1,5 +0,0 @@
{...}: {
imports = [
./sops-nix
];
}

View File

@ -72,6 +72,7 @@ in {
if docker.podman
then "podman"
else "docker"; # "docker" or "podman"
libvirtd.enable = true;
};
systemd.services = let

View File

@ -69,10 +69,7 @@ in {
# https://github.com/nix-community/impermanence/issues/253
(mkRDir "/usr/systemd-placeholder" m755)
# TODO: Why does this use the mandb user?
# TODO: Why does this apparently conflict with comfyui-nix?
# (mkDir "mandb" "/var/cache/man" m755)
(mkDir "mandb" "/var/cache/man" m755)
# (mkRDir "/var/cache/restic-backups-synology" m755)
(mkRDir "/var/db/sudo" m711)
@ -132,7 +129,6 @@ in {
# (mkUDir ".nv" m755) # Unity
# (mkUDir ".ollama" m755)
# (mkUDir ".plastic4" m755) # Unity
(mkUDir ".tableplus" m755)
(mkUDir ".tiddl" m755)
(mkUDir ".var/app" m755)
(mkUDir ".vim/undo" m755)
@ -147,7 +143,6 @@ in {
# Config
# (mkUDir ".config/.android" m755) # Unity
# (mkUDir ".config/beekeeper-studio" m755)
(mkUDir ".config/beets" m755)
(mkUDir ".config/blender" m755)
(mkUDir ".config/chromium" m755) # TODO: Remove this someday
@ -157,13 +152,13 @@ in {
(mkUDir ".config/ghidra" m755)
(mkUDir ".config/impermanence" m755)
(mkUDir ".config/jellyfin-mpv-shim" m755)
# (mkUDir ".config/jellyfin-tui" m755) # Configured using nix
(mkUDir ".config/jellyfin-tui" m755) # TODO: Generate this config file, have to use sops because it includes the password in cleartext
(mkUDir ".config/JetBrains" m755)
(mkUDir ".config/kdeconnect" m755)
(mkUDir ".config/keepassxc" m755)
(mkUDir ".config/Msty" m755)
(mkUDir ".config/Nextcloud" m755)
# (mkUDir ".config/niri/dms" m755)
(mkUDir ".config/niri/dms" m755)
(mkUDir ".config/obsidian" m755)
(mkUDir ".config/obs-studio" m755)
(mkUDir ".config/Signal" m755)
@ -173,7 +168,6 @@ in {
(mkUDir ".config/tidal_dl_ng" m755)
# (mkUDir ".config/unity3d" m755) # Unity
# (mkUDir ".config/unityhub" m755) # Unity
(mkUDir ".config/Vector 35" m755)
(mkUDir ".config/vlc" m755)
(mkUDir ".config/Zeal" m755)
(mkUDir ".config/zed" m755)

View File

@ -26,23 +26,17 @@ in {
defaultSopsFile = ./secrets.yaml;
age = {
keyFile = lib.mkDefault "${config.users.users.${username}.home}/.secrets/age/age.key";
keyFile = lib.mkDefault "/home/${username}/.secrets/age/age.key";
generateKey = false;
sshKeyPaths = [];
};
secrets = let
mkSecret = name: {
${name} = lib.mkMerge [
(lib.optionalAttrs pkgs.stdenv.isLinux {
owner = config.users.users.${username}.name;
group = config.users.users.${username}.group;
})
(lib.optionalAttrs pkgs.stdenv.isDarwin {
owner = config.users.users.${username}.name;
group = "staff"; # Apparently there's no way to get the primary group?
})
];
${name} = {
owner = config.users.users.${username}.name;
group = config.users.users.${username}.group;
};
};
mkBootSecret = name: {

View File

@ -5,7 +5,6 @@ user-password: ENC[AES256_GCM,data:okgvaTTesCDwriI8PxhNdHZF8XgzB4yxapuFl2/CK8x4W
ssh-private-key: ENC[AES256_GCM,data:JrRarfeS3y6b9gxg4Za5GIc5Ci3aGR+OyZxQybj4dcv2mzxXmT/bm7KOwM1zkz1PFl1xW5X82T5jte+XQOKx0+6m4ovjUgUmQUMP4E/yosp8XSdi0+YlUKBEHEJx6HqCZy+v6qx5kfp9JC6fZqCbL1J6FIqWqAoKTFXoiou1YnhmBa2fM17Q++i6TflDWiVrUS7X9xjuZFq1hz1aQXS303uvJEUOEpXdqPyJvUKJWzVsFrAwpa9FG+reO70SSc+1hBbqdw1QjrzNWh3eNnztwZURauJtVFBYUZ5ozHmWBr4aVFjYvqz+t6G1SAunmBRbVqbH4bjBv9jXXjHAB4U0wanvkJN2C+EY1zxwjyx2fWckMdhoLr9gtC1FJKMbV49UFHJ3iXWNczKj1t7LrctehEKXJa0Eb3UogYuaRxbVYbC++kD8LvL4AY8ertgc9/pxQQZmogdINJmIxKN4HTlGbX8kSDLbohZLheOfzZ5ycTlrbOjfJ1EBMLo+mJcMUW0qhFySl1aamPqTeII7lvgTOE3xV/d/9VAQTFKsftWPNkfhAJIym51bYrrMPV8AVeFQnLhSid3d3zK4w20zIQKSYnq9A8zcNhM0keddiv4XC+M=,iv:7HP7VCFpMRZXRD6GD/zFzDSBO02V/DyxKLmuDCLXTLU=,tag:Ugx81JwCP8HmhtflYoevLg==,type:str]
nix-github-token: ENC[AES256_GCM,data:AXV0ODLhfa4M6+7clulfIKm0qCOeo3lQ+66iYgoDeR12RxZOV19UtA==,iv:1XECVKyzH3NumKwRSPKNlUwJMLFwptcG8DQ09U4LrGk=,tag:QdtvJNV8BttWjhH4v0RtRQ==,type:str]
docker-password: ENC[AES256_GCM,data:mK5YWEQPKWBtVCgRBZvwWTdVAi8MEGbLnLeP7hfDkcc=,iv:Az8+eAK6R6xssmmbhuEsDbLU+ks8lS+qzc4L33WfefA=,tag:NSXvRhbIuRZZqRR28Tu0PQ==,type:str]
jellyfin-password: ENC[AES256_GCM,data:ugfwgpkIiLY0O+m/UGnBB5AFPBkCcai+RQOkxiCSohE=,iv:VP+Jyv2lUIBz1dFow038uN0KT+tQKK9uGr7/T5crlgk=,tag:rPGPpaqZApfHkecLBSs4Yw==,type:str]
#
#ENC[AES256_GCM,data:y5dlZFhK38dR+Q==,iv:1JYizUeyWeMR4KUblkj7kVSHPCL5l8mFpaQdo774BcM=,tag:kUTnBZb46KYQyi8bgIYSOQ==,type:comment]
#
@ -19,8 +18,6 @@ kopia-server-username: ENC[AES256_GCM,data:4onewFkWpi9g,iv:aA4WSS8T6KUcGbAIHDd8B
kopia-server-password: ENC[AES256_GCM,data:6nMnhRA=,iv:Qz9qP+m0obzL+eHFmW1qVmc/0TR4Iw4X1GL4zACOSMk=,tag:v3v+33+g4y6se5q+b4e8mA==,type:str]
kopia-user-password: ENC[AES256_GCM,data:jPWeru4e2w9qzA==,iv:WpZS3Qmx8v12v3q1Lq1YrPnWw7BY0FhxurXYuaOdfwA=,tag:+8bQAnHRh55rUMdyoK6N8w==,type:str]
paperless-nextcloud-sync-password: ENC[AES256_GCM,data:pfLg3OVBqLsM4R7mSgLQEachj9gMkexPjBMSyzU=,iv:XBe1cdwlTjPfQW70NIEjD8CikK58iGErI9ZTlLWtCA4=,tag:qO35GdjljgS3/z5/1fCOFg==,type:str]
ntfy-auth-users: ENC[AES256_GCM,data:IHnJJgUL9RqkEAoJ2Q9Oo0RkfgLXG7vih5NFPrPNBoIzMafdLXxHqNOAd1oRaOUd6AKmWdQ3uKAZINj7oGZEKMsMxUEv1WW6IXUuPnDeJe5EthINWCuaW2Z64PJl+uqgnWr4wDi7QT0zwjb/oL3gYfjH1xtfMadTzkWbmnxQ9jlP/nXe9JR1/oCrHv3dio5uU017cA==,iv:JmWnu25ZB/qqI2RsgHQ0bcat69V7p5MJ6cf5eFcSsns=,tag:6Z2LseCav/qyLh2nn+7uuw==,type:str]
ntfy-auth-tokens: ENC[AES256_GCM,data:C23r9djvEukUgDDloFGm52spwcW1DB5Jcwt9kxghLjL3vNiQ9HzGrvlSl5oEppoNa23BF0+t,iv:O9LepUKGbyXTHMvwn1avdJEhcMgtr2Sb1imIJ8ALMYY=,tag:o3g6f7YZL2VfgfeymzJK1g==,type:str]
#
#ENC[AES256_GCM,data:Gdh/hjCaOuAE,iv:XjPXn3SskpUPUkDIEDl5701/g9QhuS83fACMaoPMiIM=,tag:Q7s8xZG/GsOtQrasekBnkQ==,type:comment]
#
@ -36,7 +33,7 @@ sops:
SURMTmh1TGIrRmtENzc0Sk4rNFJNUE0KOpjN6jkEHO+lvdWdp4P++r9SNSPWaT0h
FAbbvZZ/EdIk/njLEcayFN7B4ftTcD/f4XJZiyosilZnIkk76bMOHA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2026-04-17T12:17:23Z"
mac: ENC[AES256_GCM,data:YEHM2ebPhV6ycj8OxNy7mOlpy6VrvV6Gz9sHEWc9alnrwZ0qLzp5m4AUMuWBSfFTMtVgeAFdJ8Nf4X5b+AzQXahlHWJVAwiMiE8KqhRLGWF21OyDN2aIdwd4ue2vYyPDGYP43mC+19v9SW5isF901G28e5Q9SxmGJjNOkiVuiCI=,iv:WFvCN/7YGQnCSqjXBkkfiuPoNQ37bpxHx9jreZDc3EM=,tag:AUjFpbJ6//eScnn6P2QMgA==,type:str]
lastmodified: "2025-07-19T01:29:00Z"
mac: ENC[AES256_GCM,data:IzLYRuOlkUpry37sw7OB5MglntVflMjCcNiWpi7rvT2suOivLX9IT36qZFfYIbVIFXDmfsi1hsTvsPyekD7vVWQ1vkajAlGQYYTVpnO2cFrK3+TfWCyYjiD01rQBiRikybrR11zWRq6atieurDIxMUMEI7ypiqFOwpYaqSePAFc=,iv:9bc6rc4gjuiJWNjg1g0KfySqxnPjpzmlzDi/R+Iv2g4=,tag:tEwthVZAmdXbwRtoNykGrQ==,type:str]
unencrypted_suffix: _unencrypted
version: 3.12.2
version: 3.10.2

View File

@ -46,13 +46,52 @@
useNetworkManager = false;
networks = {
"10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {
interface = "ens18";
ips = ["192.168.86.26/24"];
routers = ["192.168.86.5"]; # Don't add "fd00::5", rely on router advertisement instead
nameservers = ["8.8.8.8" "8.8.4.4" "2001:4860:4860::8888" "2001:4860:4860::8844"]; # NOTE: Use reliable DNS for servers instead of 127.0.0.1
routable = true;
extraAddresses = ["fd00::1a/64"]; # IPv6 ULA — declared without creating a route
# "10-ether-1G" = mylib.networking.mkStaticSystemdNetwork {
# interface = "ens18";
# ips = ["192.168.86.26/24" "fd00::1a/64"];
# routers = ["192.168.86.5" "fd00::5"];
# nameservers = ["8.8.8.8" "2001:4860:4860::8888"]; # NOTE: Use reliable DNS for servers instead of 127.0.0.1
# routable = true;
# };
# TODO: mylib.networking.mkStaticSystemdNetwork needs improvement to accomodate for this
"10-ether-1G" = rec {
enable = true;
# See man systemd.link, man systemd.netdev, man systemd.network
matchConfig = {
# This corresponds to the [MATCH] section
Name = "ens18"; # Match ethernet interface
};
# Static IP + DNS + Gateway
address = ["192.168.86.26/24"];
gateway = ["192.168.86.5"]; # Don't add "fd00::5", 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::1a/64"; # IPv6 Unique-Local Address (ULA)
}
];
linkConfig = {
# This corresponds to the [LINK] section
RequiredForOnline = "routable";
};
};
};

BIN
wallpapers/Concrete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

BIN
wallpapers/Moon_1.jpg (Stored with Git LFS)

Binary file not shown.

BIN
wallpapers/Moon_2.jpg (Stored with Git LFS)

Binary file not shown.

BIN
wallpapers/Moon_3.jpg (Stored with Git LFS)

Binary file not shown.

BIN
wallpapers/Moon_4.jpg (Stored with Git LFS)

Binary file not shown.

BIN
wallpapers/Moon_5.jpg (Stored with Git LFS)

Binary file not shown.

BIN
wallpapers/NASA.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
wallpapers/Windows_1.jpg (Stored with Git LFS) Normal file

Binary file not shown.