1

Compare commits

..

30 Commits

Author SHA1 Message Date
7fbab2b1f6 Modules/Fish: Enable vi keybindings 2026-05-06 21:06:31 +02:00
df1cadae60 Modules/Kitty: Enable cursor_trail 2026-05-06 21:06:20 +02:00
b5cb085083 Modules/Packages: Disable cine 2026-05-01 11:58:54 +02:00
2a2d96d97e System/Nixtop: Disable deprecated modules 2026-05-01 11:56:49 +02:00
307a8b5fb7 Modules/Firefox: Set configPath after update 2026-05-01 11:56:38 +02:00
9861866c6f Modules/Niri: Replace swww with awww after update 2026-05-01 11:56:31 +02:00
05dd3fd75f Flake: Update lock 2026-05-01 11:55:40 +02:00
15e2290267 Modules/Impermanence: Persist tableplus and binaryninja state 2026-04-30 09:15:03 +02:00
3646bceff9 Modules/Packages: Add binaryninja and tableplus 2026-04-30 09:14:43 +02:00
f429a50206 Modules/Niri: Add factorio window rule 2026-04-27 23:46:24 +02:00
024908500a Modules/Neovim: Add ggalluvial R package 2026-04-27 23:46:06 +02:00
c7098e2208 Config/Navi: Update ffmpeg cheats 2026-04-27 23:45:06 +02:00
0e86ca0371 Modules/Niri: Update window rules (fix obsidian match, neovide focus) 2026-04-21 10:17:52 +02:00
663f21bdda Modules/Neovim: Add TextCSV_XS perl plugin 2026-04-21 10:17:38 +02:00
2533183d80 Modules/Fish: Add mechanism to load/unload fish environment shells with direnv 2026-04-20 11:27:18 +02:00
f259b7d326 Modules/Packages: Remove disktui from nix-darwin 2026-04-20 09:22:12 +02:00
ac1b8c9f07 Modules/Neovim: Configure perl lsp/formatter + R lsp/formatter 2026-04-19 22:51:07 +02:00
00e3713682 Services/Nfty: Bind port for VPS 2026-04-17 14:21:21 +02:00
84eabaa4d3 Modules/Sops: Add ntfy secrets 2026-04-17 14:17:45 +02:00
d0916c49e5 Services/Nfty: Init at v2.21 2026-04-17 14:17:19 +02:00
91c35fd55c Modules/Neovim: Enable perl-language-server (PLS) and PerlTidy 2026-04-17 13:37:55 +02:00
166c35caec Modules/Niri: Configure default floating window sizes for eyedropper + junction 2026-04-17 12:46:00 +02:00
c204312423 Modules/Yazi: Add junction hotkey 2026-04-17 12:45:46 +02:00
ddc5722bbe Modules/Packages: Add junction (app chooser) 2026-04-17 12:45:38 +02:00
cadd7bd949 System: Disable documentation 2026-04-17 12:45:12 +02:00
2fbf61c052 System: Move cachix configuration to mkCommonNixSettings library function 2026-04-17 12:44:58 +02:00
5d699a2d58 Home/Nixinator: Add onlyoffice (flatpak) 2026-04-17 12:44:17 +02:00
593437fa94 Config/Obsidian: Add !important to snippets 2026-04-15 01:28:40 +02:00
00e412cb20 Config/Obsidian: Add image borders snippet 2026-04-15 00:23:34 +02:00
1290f14cb7 Config/Obsidian: Add justify text snippet 2026-04-15 00:19:31 +02:00
29 changed files with 701 additions and 266 deletions

View File

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

View File

@ -308,27 +308,33 @@ 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>"
ffmpeg -i <input> -vcodec libx265 -crf <quality> out_<input>
$ input: eza -f -1
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"
% ffmpeg
# Reencode, compress and scale the video using the h265 codec
ffmpeg -i <input> -vcodec libx265 -crf <quality> -vf scale=<width>:-2,setsar=1:1 out_<input>
$ input: eza -f -1
$ quality: echo -e "24\n25\n26\n27\n28\n29\n30\n"

View File

@ -0,0 +1,10 @@
.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;
margin-left: auto;
margin-right: auto;
display: block !important;
margin-left: auto !important;
margin-right: auto !important;
}

View File

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

View File

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

408
flake.lock generated
View File

@ -1,5 +1,24 @@
{
"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,
@ -17,7 +36,7 @@
},
"devshell": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1768818222,
@ -33,6 +52,28 @@
"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": [
@ -56,15 +97,15 @@
},
"elephant": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"systems": "systems"
},
"locked": {
"lastModified": 1773079031,
"narHash": "sha256-RvCzINnVISBT3d0F1DoIcQFbQsbRJISW9qZeKTzmNaA=",
"lastModified": 1775706155,
"narHash": "sha256-h7Rw0vlb0n0Jsk21WJPm7H+1T1bG+PEuxE5cJ2TZl8A=",
"owner": "abenz1267",
"repo": "elephant",
"rev": "53afe39cef252010f7c55bd33c5bae6dd50dcf0c",
"rev": "376ee71c66db38683daabd57350bf3f6f086eaf8",
"type": "github"
},
"original": {
@ -96,29 +137,6 @@
"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": {
@ -165,6 +183,45 @@
}
},
"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",
@ -185,7 +242,7 @@
"type": "github"
}
},
"flake-parts_2": {
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
@ -193,11 +250,11 @@
]
},
"locked": {
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"lastModified": 1775087534,
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github"
},
"original": {
@ -206,7 +263,7 @@
"type": "github"
}
},
"flake-parts_3": {
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": [
"nur",
@ -287,11 +344,11 @@
},
"hardware": {
"locked": {
"lastModified": 1774465523,
"narHash": "sha256-4v7HPm63Q90nNn4fgkgKsjW1AH2Klw7XzPtHJr562nM=",
"lastModified": 1776983936,
"narHash": "sha256-ZOQyNqSvJ8UdrrqU1p7vaFcdL53idK+LOM8oRWEWh6o=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "de895be946ad1d8aafa0bb6dfc7e7e0e9e466a29",
"rev": "2096f3f411ce46e88a79ae4eafcfc9df8ed41c61",
"type": "github"
},
"original": {
@ -307,11 +364,11 @@
]
},
"locked": {
"lastModified": 1774534244,
"narHash": "sha256-WnmXKsbkwokDdrdI1XwRWH4RYYalOVKgV/hYQmL3/TE=",
"lastModified": 1777594677,
"narHash": "sha256-h90sHwoRJLRvaTpZroTvU2JRHDFj0czUafM8eqLe1RI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "86014e836ca6f4a04d59b85111d39660bdda01cd",
"rev": "899c08a15beae5da51a5cecd6b2b994777a948da",
"type": "github"
},
"original": {
@ -343,14 +400,14 @@
},
"hytale-launcher": {
"inputs": {
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1774383212,
"narHash": "sha256-PyF1nTQp+q5oUYk05yjZMOFvd/rT43mMN1zXyycivBw=",
"lastModified": 1777394001,
"narHash": "sha256-FNHydw2We/qvxBJ2cMNc/eGcxSZkvOXZn2WYGiH6WfE=",
"owner": "JPyke3",
"repo": "hytale-launcher-nix",
"rev": "f9392e30a2e74e502116eec6c7d42da7be87de0f",
"rev": "822e54c97348a6fbc28dfac563e5bbe9fe1783b8",
"type": "github"
},
"original": {
@ -362,7 +419,7 @@
"impermanence": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1769548169,
@ -382,7 +439,7 @@
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"flake-parts": "flake-parts_3",
"nixpkgs": [
"nixpkgs"
],
@ -412,11 +469,11 @@
]
},
"locked": {
"lastModified": 1773343116,
"narHash": "sha256-5wnd9z3atP264FMin5MNq4ZaOR/2SYYspFXw8cecrKA=",
"lastModified": 1776677689,
"narHash": "sha256-wzdMqyyNkEPEfuCqSTzaz3ikH3+Rm7oWILNcURNax34=",
"ref": "refs/heads/main",
"rev": "6248c10a251c5f2628389b982919ba4a8125d71e",
"revCount": 139,
"rev": "768d26aa3fe80949bd64f62d6c5b35455c8cb768",
"revCount": 140,
"type": "git",
"url": "https://gitea.local.chriphost.de/christoph/cpp-masssprings"
},
@ -428,7 +485,7 @@
"naersk": {
"inputs": {
"fenix": "fenix",
"nixpkgs": "nixpkgs_7"
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1763384566,
@ -456,11 +513,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1774489385,
"narHash": "sha256-xGyog2cPoxTo8O6vW0CiCCUhkt866qpI3PN2su9XjV0=",
"lastModified": 1777542749,
"narHash": "sha256-j4W+WwdiRxTTFdsoB8A7jlLNLbMQANKJxh9eKf8nOIs=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "11fe033ac3d0a97c1e62ffb33f9a6a1852fedab1",
"rev": "36130bc452e0a84c07761d2e176ae875b48eebf3",
"type": "github"
},
"original": {
@ -489,11 +546,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1773130184,
"narHash": "sha256-3bwx4WqCB06yfQIGB+OgIckOkEDyKxiTD5pOo4Xz2rI=",
"lastModified": 1777468255,
"narHash": "sha256-lBZc1UMy+1P1T/E41j3jQrpS7EFI3qegd+ktHZdamIg=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "b07bde3ee82dd73115e6b949e4f3f63695da35ea",
"rev": "dd1c3bcb9f1ef416df33ffa22d1d9bcee1398e7d",
"type": "github"
},
"original": {
@ -506,14 +563,14 @@
"inputs": {
"flake-compat": "flake-compat_2",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1771150922,
"narHash": "sha256-+oQJun4CFDlOQRocbZpqQDj7agoy56/4ZjT1oUR7NOs=",
"lastModified": 1776242217,
"narHash": "sha256-TRts0fKUPFcf1i6rZHFGUDTfti/x3oKEg/CqsPRpSgs=",
"owner": "thiagokokada",
"repo": "nix-alien",
"rev": "96045e886ba0dd45b27590e7c0c6e77bbb54033d",
"rev": "4c5e52dda0d6ab3de814e364046769321d3e1021",
"type": "github"
},
"original": {
@ -529,11 +586,11 @@
]
},
"locked": {
"lastModified": 1773000227,
"narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=",
"lastModified": 1775037210,
"narHash": "sha256-KM2WYj6EA7M/FVZVCl3rqWY+TFV5QzSyyGE2gQxeODU=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "da529ac9e46f25ed5616fd634079a5f3c579135f",
"rev": "06648f4902343228ce2de79f291dd5a58ee12146",
"type": "github"
},
"original": {
@ -567,11 +624,11 @@
]
},
"locked": {
"lastModified": 1771130777,
"narHash": "sha256-UIKOwG0D9XVIJfNWg6+gENAvQP+7LO46eO0Jpe+ItJ0=",
"lastModified": 1775970782,
"narHash": "sha256-7jt9Vpm48Yy5yAWigYpde+HxtYEpEuyzIQJF4VYehhk=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "efec7aaad8d43f8e5194df46a007456093c40f88",
"rev": "bedba5989b04614fc598af9633033b95a937933f",
"type": "github"
},
"original": {
@ -581,6 +638,69 @@
}
},
"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=",
@ -596,39 +716,7 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1774244481,
"narHash": "sha256-4XfMXU0DjN83o6HWZoKG9PegCvKvIhNUnRUI19vzTcQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4590696c8693fea477850fe379a01544293ca4e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1774244481,
"narHash": "sha256-4XfMXU0DjN83o6HWZoKG9PegCvKvIhNUnRUI19vzTcQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4590696c8693fea477850fe379a01544293ca4e2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1764242076,
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
@ -644,13 +732,13 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1774106199,
"narHash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=",
"lastModified": 1777268161,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655",
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
"type": "github"
},
"original": {
@ -660,7 +748,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
@ -676,39 +764,39 @@
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1771008912,
"narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a82ccc39b39b621151d6732718e3e250109076fa",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1774386573,
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
"owner": "nixos",
"lastModified": 1775710090,
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"type": "github"
},
"original": {
"owner": "nixos",
"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=",
@ -724,13 +812,13 @@
"type": "github"
}
},
"nixpkgs_8": {
"nixpkgs_9": {
"locked": {
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"lastModified": 1775710090,
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"type": "github"
},
"original": {
@ -742,18 +830,18 @@
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_4",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3"
},
"locked": {
"lastModified": 1774309640,
"narHash": "sha256-8oWL7YLwElBY9ebYri1LlSlhf/gd1Qoqj0nbBwG2yso=",
"lastModified": 1777236345,
"narHash": "sha256-ALOqlq7bE30lsX4rA76hXeQ2aLLEpb44hS+D1+jWS88=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "28c58bf023bf537354f78d6e496a349d7a0ed554",
"rev": "a67d9cd6ff725a763afe88727aac73208ded3bf4",
"type": "github"
},
"original": {
@ -787,17 +875,17 @@
},
"nur": {
"inputs": {
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_5",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1774534046,
"narHash": "sha256-7BrSW+vVmBFUJfpLhyyfymm70NWjjtax1bjgIWLEg2E=",
"lastModified": 1777624369,
"narHash": "sha256-nQOSodcDhXiKlfCKb4pE/4GBAs2FnBOD+AHVem0EqOc=",
"owner": "nix-community",
"repo": "NUR",
"rev": "ef199666902a675bca657f63e32c96649aade49d",
"rev": "c3ec6b994c235a53a28304564da6422a45230603",
"type": "github"
},
"original": {
@ -834,7 +922,9 @@
},
"root": {
"inputs": {
"comfyui-nix": "comfyui-nix",
"devshell": "devshell",
"direnv-instant": "direnv-instant",
"disko": "disko",
"elephant": "elephant",
"hardware": "hardware",
@ -847,7 +937,7 @@
"nix-alien": "nix-alien",
"nix-darwin": "nix-darwin",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_6",
"nixpkgs": "nixpkgs_7",
"nixpkgs-stable": "nixpkgs-stable_2",
"nixvim": "nixvim",
"nps": "nps",
@ -902,11 +992,11 @@
]
},
"locked": {
"lastModified": 1774303811,
"narHash": "sha256-fhG4JAcLgjKwt+XHbjs8brpWnyKUfU4LikLm3s0Q/ic=",
"lastModified": 1777338324,
"narHash": "sha256-bc+ZZCmOTNq86/svGnw0tVpH7vJaLYvGLLKFYP08Q8E=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "614e256310e0a4f8a9ccae3fa80c11844fba7042",
"rev": "8eaee5c45428b28b8c47a83e4c09dccec5f279b5",
"type": "github"
},
"original": {
@ -992,17 +1082,16 @@
},
"textfox": {
"inputs": {
"firefox-addons": "firefox-addons",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1774424849,
"narHash": "sha256-kDRdpgTmxuwyqTyTcXYtgycBvU28tTXm9Es9g/sDpxI=",
"lastModified": 1777451299,
"narHash": "sha256-Okqpw+zxAwHKXuuxlwYy9Ge9JUpnTbsMXqws2eOKfKo=",
"owner": "adriankarlen",
"repo": "textfox",
"rev": "98ad395b4fb451b30dbca77be76975d04d97f281",
"rev": "3af57df1ed3a38eb584475fd9e032d9643f2a94d",
"type": "github"
},
"original": {
@ -1011,20 +1100,41 @@
"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_8",
"nixpkgs": "nixpkgs_9",
"systems": "systems_5"
},
"locked": {
"lastModified": 1773675699,
"narHash": "sha256-GrormZ2KxchtCLuO90+5fioEQmlUCKBIil0Mzr9w0Iw=",
"lastModified": 1777299395,
"narHash": "sha256-ZoLkqwPVw8SdW+f9Raf15/ttyKqmC6vtKd5R+orNN/g=",
"owner": "abenz1267",
"repo": "walker",
"rev": "d2702235710da3d7daf55c912ca7534261cf20f5",
"rev": "7b0cb0fd1f8b0a60b241081483aea4277f0b4500",
"type": "github"
},
"original": {

View File

@ -78,10 +78,17 @@
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";
@ -138,7 +145,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;})
@ -250,7 +257,7 @@
[
inputs.disko.nixosModules.disko
# inputs.nixified-ai.nixosModules.comfyui
# inputs.comfyui-nix.nixosModules.default
inputs.comfyui-nix.nixosModules.default
]
++ commonModules;
};

View File

@ -158,6 +158,8 @@
"com.usebottles.bottles"
"io.github.lawstorant.boxflat"
"org.onlyoffice.desktopeditors"
# "com.unity.UnityHub"
];

View File

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

View File

@ -39,6 +39,7 @@
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

@ -33,6 +33,8 @@ in {
"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

@ -86,6 +86,8 @@ 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

@ -84,9 +84,50 @@ in {
(lib.mkIf pkgs.stdenv.isLinux {
generateCompletions = nixosConfig.programs.fish.generateCompletions;
# TODO: There's a bug with the direnv mechanism:
# - When leaving an env, it unloads (good)
# - When entering another env, it loads (good)
# - When leaving this one, it doesn't unload (bad)
# - When entering leaving it again, it works...
# This only happens sometimes, is there a race condition?
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
fish_vi_key_bindings
# Because we can't source that in a project flake's shellHook (is POSIX), source it here
function __project_shell_reload --on-variable INIT_PROJECT_SHELL
# Leaving the environment
if not set -q INIT_PROJECT_SHELL; or test -z "$INIT_PROJECT_SHELL"
if test -n "$__last_unload_project_shell"; and test -f "$__last_unload_project_shell"
source "$__last_unload_project_shell"
end
set -e __last_init_project_shell
set -e __last_unload_project_shell
return
end
# Entering or switching environments
if test "$INIT_PROJECT_SHELL" != "$__last_init_project_shell"
# Cleanup the previous environment
if test -n "$__last_unload_project_shell"; and test -f "$__last_unload_project_shell"
source "$__last_unload_project_shell"
end
# Store into variables to persist until next environment switch in the same shell
set -g __last_init_project_shell "$INIT_PROJECT_SHELL"
if set -q UNLOAD_PROJECT_SHELL; and test -f "$UNLOAD_PROJECT_SHELL"
set -g __last_unload_project_shell "$UNLOAD_PROJECT_SHELL"
else
set -e __last_unload_project_shell
end
# Source the new environment
if test -f "$INIT_PROJECT_SHELL"
source "$INIT_PROJECT_SHELL"
end
end
end
'';
functions = lib.mergeAttrsList [

View File

@ -31,8 +31,8 @@ in {
settings = lib.mkMerge [
# Linux config
(lib.mkIf pkgs.stdenv.isLinux {
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
listen_on = "unix:@mykitty";
allow_remote_control = true; # For nnn file preview or nvim scrollback
listen_on = lib.mkDefault "unix:@mykitty"; # This conflicts with direnv-instant
})
# Common config
@ -42,6 +42,7 @@ 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,54 +30,58 @@ 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
basedpyright
# perl5Packages.PLS
pyrefly
ty
# rPackages.languageserver
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
# prettierd # Use prettier instead because of plugins
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
rustfmt
stylua
typstyle
mbake
just-formatter
tombi
typstyle
])
[
@ -87,6 +91,48 @@ 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
]
@ -523,8 +569,10 @@ in {
make = ["bake"];
markdown = ["prettierd" "prettier"];
nix = ["alejandra"];
perl = ["perltidy"];
python = ["black"];
qml = ["qmlformat"];
r = ["air"];
rust = ["rustfmt"];
svelte = ["prettierd" "prettier"];
toml = ["tombi"];
@ -860,9 +908,8 @@ 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 = {
@ -914,7 +961,6 @@ in {
};
};
}
{name = "autotools-language-server";}
# {name = "nil_ls";}
{
name = "nixd";
@ -956,6 +1002,7 @@ in {
};
};
}
{name = "perlpls";}
{
name = "qmlls";
extraOptions.cmd = [
@ -963,6 +1010,8 @@ in {
"-E" # Use QML_IMPORT_PATH env variable
];
}
# {name = "pyrefly";} # TODO: Config
{name = "r_language_server";}
{name = "svelte";}
{name = "tailwindcss";}
{name = "texlab";}
@ -974,6 +1023,7 @@ 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

View File

@ -66,3 +66,16 @@ 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,6 +340,13 @@ _: 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";

View File

@ -143,7 +143,7 @@ in {
xwayland-satellite
# ncpamixer # Audio control
wiremix # Audio control
swww
awww
waypaper
wtype # For elephant
@ -581,11 +581,45 @@ 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 = "neovide";}];
open-on-workspace = "2";
open-maximized = true;
open-focused = true;
}
{
matches = [{app-id = "jetbrains-clion";}];
@ -598,12 +632,21 @@ in {
open-floating = true;
}
{
matches = [{app-id = "obsidian";}];
matches = [
{
app-id = "electron";
title = ".*Chriphost - 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";}];
@ -632,6 +675,12 @@ 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";

View File

@ -39,7 +39,6 @@ in {
tokei # Text file statistics in a project
ttyper
wiki-tui
disktui
# Nix
nix-search-tv # Search nixpkgs, nur, nixos options and homemanager options
@ -86,7 +85,7 @@ in {
pastel # Color tools
nvd # Nix rebuild diff
nurl # Generate nix fetcher sections based on URLs
python313 # Nicer scripting than bash
# python313 # Nicer scripting than bash
lazyjournal # Journalctl viewer
systemctl-tui
restic # Backups
@ -96,6 +95,7 @@ in {
jujutsu # git-like vcs
lurk # strace analysis
radare2
disktui
# Hardware/Software info
pciutils # lspci
@ -157,6 +157,8 @@ in {
# feishin # electron :(
playerctl # Media player control
czkawka-full # file deduplicator
binaryninja-free # reverse engineering
tableplus # database explorer
# Office
kdePackages.wacomtablet # For xournalpp/krita
@ -175,8 +177,9 @@ in {
gparted
resources
# celluloid
cine
# cine
eyedropper
junction
])
# Darwin exclusive packages
@ -203,9 +206,19 @@ in {
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;

View File

@ -85,6 +85,11 @@ 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

@ -9,14 +9,40 @@
mkCommonNixSettings = username: {
enable = true;
package = pkgs.nixVersions.stable;
extraOptions = ''
experimental-features = nix-command flakes pipe-operators
'';
settings.trusted-users = ["root" username];
gc.automatic = false;
gc.options = "--delete-older-than 5d";
settings.auto-optimise-store = true;
optimise.automatic = true;
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}"
@ -49,7 +75,6 @@
# Import the toplevel system configuration module.
../system
../system/cachix.nix
# Host specific configuration
../system/${hostname}
@ -123,9 +148,6 @@
# 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}

View File

@ -1,16 +0,0 @@
# 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

@ -1,14 +0,0 @@
{
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

@ -144,7 +144,7 @@ with mylib.networking; {
documentation = {
# NOTE: Disable this while configuring stuff, it's slow
enable = true;
enable = false;
man.enable = config.documentation.enable;
man.cache.enable = true; # Slow but needed for neovim man picker
info.enable = config.documentation.enable;

View File

@ -32,6 +32,7 @@
../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
@ -110,6 +111,8 @@
"kopia-server-password"
"kopia-user-password"
"paperless-nextcloud-sync-password"
"ntfy-auth-users"
"ntfy-auth-tokens"
];
};

79
system/services/ntfy.nix Normal file
View File

@ -0,0 +1,79 @@
{
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

@ -69,7 +69,10 @@ in {
# https://github.com/nix-community/impermanence/issues/253
(mkRDir "/usr/systemd-placeholder" m755)
(mkDir "mandb" "/var/cache/man" m755)
# TODO: Why does this use the mandb user?
# TODO: Why does this apparently conflict with comfyui-nix?
# (mkDir "mandb" "/var/cache/man" m755)
# (mkRDir "/var/cache/restic-backups-synology" m755)
(mkRDir "/var/db/sudo" m711)
@ -129,6 +132,7 @@ 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)
@ -143,6 +147,7 @@ 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
@ -168,6 +173,7 @@ 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

@ -19,6 +19,8 @@ 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]
#
@ -34,7 +36,7 @@ sops:
SURMTmh1TGIrRmtENzc0Sk4rNFJNUE0KOpjN6jkEHO+lvdWdp4P++r9SNSPWaT0h
FAbbvZZ/EdIk/njLEcayFN7B4ftTcD/f4XJZiyosilZnIkk76bMOHA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2026-03-26T19:30:04Z"
mac: ENC[AES256_GCM,data:DGsz+TNyYXuX45Go4fkFDoWePhx1KUzq94awp+1bQtmq2MC+bPJrTNqvhBDx/I2OWFUNSh/0lXJVvaz4gfeYT9z8YCniJeb3z53ui7ldFL0BNnA6ua1iIViWbJvYARgWlSiuU7wTsb8om57Kainkpm9C9pp2U+vQqQ4suxLmrko=,iv:sUibX01AHDrscPqz+gIPyJhLRJYkyW4DPcQ3QtUGha0=,tag:8yuSGHMg1Z7kDMo2Bx4QlA==,type:str]
lastmodified: "2026-04-17T12:17:23Z"
mac: ENC[AES256_GCM,data:YEHM2ebPhV6ycj8OxNy7mOlpy6VrvV6Gz9sHEWc9alnrwZ0qLzp5m4AUMuWBSfFTMtVgeAFdJ8Nf4X5b+AzQXahlHWJVAwiMiE8KqhRLGWF21OyDN2aIdwd4ue2vYyPDGYP43mC+19v9SW5isF901G28e5Q9SxmGJjNOkiVuiCI=,iv:WFvCN/7YGQnCSqjXBkkfiuPoNQ37bpxHx9jreZDc3EM=,tag:AUjFpbJ6//eScnn6P2QMgA==,type:str]
unencrypted_suffix: _unencrypted
version: 3.12.2