diff --git a/configuration.nix b/configuration.nix index 9d84c13..6dc0e36 100644 --- a/configuration.nix +++ b/configuration.nix @@ -42,9 +42,11 @@ ./system-modules/ydotool.nix ]) ++ (if (host == "NxACE") then [ ./system-modules/nx2site.nix + ./system-modules/hugo.nix ./system-modules/postgres.nix ./system-modules/nx2site/proxy.nix ./system-modules/nx2site/audiobookshelf.nix + # ./system-modules/nx2site/dyn_dns.nix ./system-modules/nx2site/gitea.nix ./system-modules/nx2site/open-web-calendar.nix ./system-modules/nx2site/radicale.nix @@ -54,6 +56,7 @@ ./system-modules/calendar-publish.nix ./system-modules/calendar-lec.nix + ./system-modules/calendar-lr.nix ./system-modules/calendar-dicos.nix ] else []); diff --git a/flake.lock b/flake.lock index 3201ee4..62797f7 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1739004667, - "narHash": "sha256-t/KaeHEgzh225HUdAiHXRsgDeyDrBCMTg0LjR73v3Nw=", + "lastModified": 1742767019, + "narHash": "sha256-FdyHDbf31jl5rIU7IQtBVTbZ1ojGrrp5aFaRrE2819s=", "owner": "KZDKM", "repo": "Hyprspace", - "rev": "ac55bbdb6cee760af9315899b5b187a40ce43e46", + "rev": "5b62529c2011ede6069445de9b5b3f8a1f10ecfe", "type": "github" }, "original": { @@ -41,11 +41,11 @@ ] }, "locked": { - "lastModified": 1739103745, - "narHash": "sha256-c53dcRaw0F4Os9WD05HwIRs9kTDZw4Mxe1XK4edEALo=", + "lastModified": 1742213273, + "narHash": "sha256-0l0vDb4anfsBu1rOs94bC73Hub+xEivgBAo6QXl2MmU=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "a3dda0d10ce9aa1d1dfb7a6c139ea8c2872c74bd", + "rev": "484b732195cc53f4536ce4bd59a5c6402b1e7ccf", "type": "github" }, "original": { @@ -278,14 +278,14 @@ "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable": "nixpkgs-unstable", "zig": "zig", - "zig2nix": "zig2nix" + "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1739767522, - "narHash": "sha256-VuHnvVVLFDZe9GAPH67clJNhp+H3WoRB5JfQpUbwsbk=", + "lastModified": 1743191728, + "narHash": "sha256-LrQd2IkfcmHdBh+pwPEPXzcosBerIEFzz/DbVNzBqig=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "429c8ab277f75b581959ac5515b0c32636839168", + "rev": "1067cd3d8a061eb5b23bc1a4c46ca10af4481941", "type": "github" }, "original": { @@ -367,11 +367,11 @@ ] }, "locked": { - "lastModified": 1739757849, - "narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=", + "lastModified": 1742655702, + "narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe", + "rev": "0948aeedc296f964140d9429223c7e4a0702a1ff", "type": "github" }, "original": { @@ -397,11 +397,11 @@ ] }, "locked": { - "lastModified": 1738664950, - "narHash": "sha256-xIeGNM+iivwVHkv9tHwOqoUP5dDrtees34bbFKKMZYs=", + "lastModified": 1742215578, + "narHash": "sha256-zfs71PXVVPEe56WEyNi2TJQPs0wabU4WAlq0XV7GcdE=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "7c6d165e1eb9045a996551eb9f121b6d1b30adc3", + "rev": "2fd36421c21aa87e2fe3bee11067540ae612f719", "type": "github" }, "original": { @@ -455,11 +455,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1739757807, - "narHash": "sha256-R+fSm684OXCOjhhdANCgBvUPRPiya6Cyi2zV5Xf6sHI=", + "lastModified": 1743297135, + "narHash": "sha256-4JgyJLuHxeoeSsSbi4MkpVYsI4R74Trov33sIg1fa/0=", "ref": "refs/heads/main", - "rev": "59c615c321c45302491de3b1c003844c86aefca7", - "revCount": 5825, + "rev": "da2d7c3971d40f841f2afd7def8e4bad9a351e41", + "revCount": 5948, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -487,11 +487,11 @@ ] }, "locked": { - "lastModified": 1738966025, - "narHash": "sha256-MzgrF0jKlTNnNS33D8PwI5z2MJ1Tzf5MQVf/oms2pdw=", + "lastModified": 1743339740, + "narHash": "sha256-G6a7R/gb1xH0yI2uevTmDpxZf6rvMh1lOu0gYrqVu5U=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "4f48dbe12f3cbbeb4d31c91c67b21edbc5b4b451", + "rev": "6dca4ece21864e329394b81cfc767778089097e2", "type": "github" }, "original": { @@ -609,11 +609,11 @@ ] }, "locked": { - "lastModified": 1739048914, - "narHash": "sha256-vd5rJBTmp2w7SDgfv23Zcd84ktI5eDA7e5UBzx+pKrU=", + "lastModified": 1741191527, + "narHash": "sha256-kM+11Nch47Xwfgtw2EpRitJuORy4miwoMuRi5tyMBDY=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "a7334904d591f38757c46fbe2ab68651877d9099", + "rev": "72df3861f1197e41b078faa3e38eedd60e00018d", "type": "github" }, "original": { @@ -629,11 +629,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1738828244, - "narHash": "sha256-cmo544QvdacVTHPqmc6er4xnSSc63e6Z71BS0FxSklE=", + "lastModified": 1741036724, + "narHash": "sha256-nCsqa5dXW1Qja+smRkVpNkGAHfYkBFJ6U3bVilY5pDo=", "owner": "h3rmt", "repo": "hyprswitch", - "rev": "bb06fb046aa1c204c2effa382573b8045cefd355", + "rev": "3feeccf2f1d3d6c0fb7c79b965ccf382118651d2", "type": "github" }, "original": { @@ -655,11 +655,11 @@ ] }, "locked": { - "lastModified": 1739048933, - "narHash": "sha256-ck6MaoYvISBQKqZR+HcxXnx0wOhyCauxfVMaV5zhJxQ=", + "lastModified": 1741534688, + "narHash": "sha256-EV3945SnjOCuRVbGRghsWx/9D89FyshnSO1Q6/TuQ14=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "e4e018a2ca6f5a9c33511973454199e1c7c85499", + "rev": "dd1f720cbc2dbb3c71167c9598045dd3261d27b3", "type": "github" }, "original": { @@ -680,11 +680,11 @@ ] }, "locked": { - "lastModified": 1739049028, - "narHash": "sha256-RleJp7LYbr6s+M1xgbmhtBs+fYa3ZdIiF7+QalJ4D1g=", + "lastModified": 1739870480, + "narHash": "sha256-SiDN5BGxa/1hAsqhgJsS03C3t2QrLgBT8u+ENJ0Qzwc=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "04146df74a8d5ec0b579657307be01f1e241125f", + "rev": "206367a08dc5ac4ba7ad31bdca391d098082e64b", "type": "github" }, "original": { @@ -720,11 +720,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1739020877, - "narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=", + "lastModified": 1742669843, + "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a79cfe0ebd24952b580b1cf08cd906354996d547", + "rev": "1e5b653dff12029333a6546c11e108ede13052eb", "type": "github" }, "original": { @@ -736,11 +736,11 @@ }, "nixpkgs-latest": { "locked": { - "lastModified": 1739782683, - "narHash": "sha256-AnuWOZmBxX/pjQKwNnjGU5jjGKncfxV8Os10Ynv4I1k=", + "lastModified": 1743346368, + "narHash": "sha256-DJv361yCiMiMyKA1elFtgJ9CbK/nEXLKj7vY0zUBmTk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6534c6ea0867d38662b8c0d9af62cebffa00e353", + "rev": "e68c2965da5c7f149dd8543c63d7217753e00c32", "type": "github" }, "original": { @@ -764,11 +764,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1738255539, - "narHash": "sha256-hP2eOqhIO/OILW+3moNWO4GtdJFYCqAe9yJZgvlCoDQ=", + "lastModified": 1741992157, + "narHash": "sha256-nlIfTsTrMSksEJc1f7YexXiPVuzD1gOfeN1ggwZyUoc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c3511a3b53b482aa7547c9d1626fd7310c1de1c5", + "rev": "da4b122f63095ca1199bd4d526f9e26426697689", "type": "github" }, "original": { @@ -796,11 +796,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1738136902, - "narHash": "sha256-pUvLijVGARw4u793APze3j6mU1Zwdtz7hGkGGkD87qw=", + "lastModified": 1741865919, + "narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9a5db3142ce450045840cc8d832b13b8a2018e0c", + "rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a", "type": "github" }, "original": { @@ -812,11 +812,11 @@ }, "nixpkgs-unstable_2": { "locked": { - "lastModified": 1739580444, - "narHash": "sha256-+/bSz4EAVbqz8/HsIGLroF8aNaO8bLRL7WfACN+24g4=", + "lastModified": 1743095683, + "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8bb37161a0488b89830168b81c48aed11569cb93", + "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", "type": "github" }, "original": { @@ -858,11 +858,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1739624908, - "narHash": "sha256-f84lBmLl4tkDp1ZU5LBTSFzlxXP4926DVW3KnXrke10=", + "lastModified": 1743231893, + "narHash": "sha256-tpJsHMUPEhEnzySoQxx7+kA+KUtgWqvlcUBqROYNNt0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a60651b217d2e529729cbc7d989c19f3941b9250", + "rev": "c570c1f5304493cafe133b8d843c7c1c4a10d3a6", "type": "github" }, "original": { @@ -913,11 +913,11 @@ ] }, "locked": { - "lastModified": 1737465171, - "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", + "lastModified": 1742649964, + "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", + "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", "type": "github" }, "original": { @@ -1049,11 +1049,11 @@ ] }, "locked": { - "lastModified": 1739262228, - "narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=", + "lastModified": 1743305778, + "narHash": "sha256-Ux/UohNtnM5mn9SFjaHp6IZe2aAnUCzklMluNtV6zFo=", "owner": "Mic92", "repo": "sops-nix", - "rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975", + "rev": "8e873886bbfc32163fe027b8676c75637b7da114", "type": "github" }, "original": { @@ -1180,11 +1180,11 @@ ] }, "locked": { - "lastModified": 1737634991, - "narHash": "sha256-dBAnb7Kbnier30cA7AgxVSxxARmxKZ1vHZT33THSIr8=", + "lastModified": 1741934139, + "narHash": "sha256-ZhTcTH9FoeAtbPfWGrhkH7RjLJZ7GeF18nygLAMR+WE=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "e09dfe2726c8008f983e45a0aa1a3b7416aaeb8a", + "rev": "150b0b6f52bb422a1b232a53698606fe0320dde0", "type": "github" }, "original": { @@ -1200,11 +1200,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1739776850, - "narHash": "sha256-XWzxhk0Nrw9cu6E5yjsmhAVfbt9ArVN54zz8qgzBA/I=", + "lastModified": 1743344227, + "narHash": "sha256-Lp1JUMrhvAmCzftOSQ2Sr0+svemxSxcLeZ4HkmdLXbE=", "owner": "sxyazi", "repo": "yazi", - "rev": "1ddbbfea711636dcb997239ea9d2b483cea16f80", + "rev": "1765aba68440f73c590cedac14ece6778fe88ff5", "type": "github" }, "original": { @@ -1224,11 +1224,11 @@ "systems": "systems_6" }, "locked": { - "lastModified": 1737417368, - "narHash": "sha256-JExM3nZwg07iMhXDQSIXc5KmVqbBRA4IfNgs1gFmneg=", + "lastModified": 1742573336, + "narHash": "sha256-7cVQTyMA9V1YqqVXwaxmrsUKE8LjnBdIj6fvpKKuAxo=", "owner": "lordkekz", "repo": "nix-yazi-plugins", - "rev": "c251d3db84f3a10f95993112132fe5ffc37a279f", + "rev": "76e0104f5bfc2517d86cae0332ede54c6d5ba4e8", "type": "github" }, "original": { @@ -1270,11 +1270,11 @@ ] }, "locked": { - "lastModified": 1738239110, - "narHash": "sha256-Y5i9mQ++dyIQr+zEPNy+KIbc5wjPmfllBrag3cHZgcE=", + "lastModified": 1741825901, + "narHash": "sha256-aeopo+aXg5I2IksOPFN79usw7AeimH1+tjfuMzJHFdk=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "1a8fb6f3a04724519436355564b95fce5e272504", + "rev": "0b14285e283f5a747f372fb2931835dd937c4383", "type": "github" }, "original": { @@ -1283,7 +1283,7 @@ "type": "github" } }, - "zig2nix": { + "zon2nix": { "inputs": { "flake-utils": [ "ghostty", @@ -1291,21 +1291,21 @@ ], "nixpkgs": [ "ghostty", - "nixpkgs-stable" + "nixpkgs-unstable" ] }, "locked": { - "lastModified": 1738263917, - "narHash": "sha256-j/3fwe2pEOquHabP/puljOKwAZFjIE9gXZqA91sC48M=", + "lastModified": 1742104771, + "narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=", "owner": "jcollie", - "repo": "zig2nix", - "rev": "c311d8e77a6ee0d995f40a6e10a89a3a4ab04f9a", + "repo": "zon2nix", + "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", "type": "github" }, "original": { "owner": "jcollie", - "ref": "c311d8e77a6ee0d995f40a6e10a89a3a4ab04f9a", - "repo": "zig2nix", + "ref": "56c159be489cc6c0e73c3930bd908ddc6fe89613", + "repo": "zon2nix", "type": "github" } } diff --git a/git-crypt/secrets.nix b/git-crypt/secrets.nix index 72f7017..04e30d3 100644 Binary files a/git-crypt/secrets.nix and b/git-crypt/secrets.nix differ diff --git a/home-modules/calendar.nix b/home-modules/calendar.nix index a9bc358..d185cf2 100644 --- a/home-modules/calendar.nix +++ b/home-modules/calendar.nix @@ -40,6 +40,20 @@ read-only = true; type = "ics"; } + { + name = "LR"; + url = "https://${domain}/lr.ics"; + color = "#005040"; + read-only = true; + type = "ics"; + } + { + name = "Feiertage Hessen"; + url = "https://ics.tools/Feiertage/hessen.ics"; + color = "#303030"; + read-only = true; + type = "ics"; + } # { # name = "Handball Männer"; # url = "http://i.cal.to/ical/108/dhb/handball-nationalmannschaft/c687e97f.bc7c3eb6-11a0e356.ics"; diff --git a/home-modules/chatterino.nix b/home-modules/chatterino.nix index 96478bb..1b5dff4 100644 --- a/home-modules/chatterino.nix +++ b/home-modules/chatterino.nix @@ -2,28 +2,30 @@ let channels = [ "Caedrel" - "agurin" - "asmongold" + # "agurin" + # "asmongold" # "Caedrel" - "EintrachtSpandau" + # "EintrachtSpandau" "GamesDoneQuick" "gdolphn" "GRONKH" "handofblood" "HisWattson" "Jankos" - "KuruHS" + # "KuruHS" "LEC" "lol_nemesis" - "NASA" + # "NASA" "NoWay4u_Sir" "OfficialMikeShinoda" "Rekkles" "riotgames" + "thebausffs" "ThePrimeagen" "Tolkin" - "TSM_ImperialHal" - "Xisuma" + # "TSM_ImperialHal" + "velja_lol" + # "Xisuma" "zackrawrr" ]; tabber = channel-name: { diff --git a/home-modules/fish.nix b/home-modules/fish.nix index 8687dc2..bfecb3b 100644 --- a/home-modules/fish.nix +++ b/home-modules/fish.nix @@ -38,14 +38,17 @@ programs.fish = { enable = true; - shellAliases = { - ls = "eza --icons --git --smart-group --group-directories-first"; - ll = "eza --icons --git --smart-group --group-directories-first --long"; - la = "eza --icons --git --smart-group --group-directories-first --all"; - lla = "eza --icons --git --smart-group --group-directories-first --all --long"; - lt = "eza --icons --git --smart-group --group-directories-first --long --tree"; - ltd = "eza --icons --git --smart-group --group-directories-first --long --tree -D"; - lt2 = "eza --icons --git --smart-group --group-directories-first --long --tree -L 2"; + shellAliases = let + base-eza = "eza --icons --git --smart-group --group-directories-first"; + in { + ls = "${base-eza}"; + ll = "${base-eza} --long"; + lg = "${base-eza} --group --long"; + la = "${base-eza} --all"; + lla = "${base-eza} --all --long"; + lt = "${base-eza} --long --tree"; + ltd = "${base-eza} --long --tree -D"; + lt2 = "${base-eza} --long --tree -L 2"; sr = "sudo reboot"; nf = "neofetch"; nxf = "nxfetch"; diff --git a/home-modules/games.nix b/home-modules/games.nix index 544539d..17a14cb 100644 --- a/home-modules/games.nix +++ b/home-modules/games.nix @@ -1,5 +1,6 @@ { pkgs-unstable, pkgs, lib, host, ... }: -lib.mkIf (host == "NxNORTH" || host == "NxACE") +# lib.mkIf (host == "NxNORTH" || host == "NxACE") +lib.mkIf (host == "NxNORTH") { home = { packages = (with pkgs-unstable; [ diff --git a/home-modules/gimp.nix b/home-modules/gimp.nix index 4ed7ca4..b9ebf9a 100644 --- a/home-modules/gimp.nix +++ b/home-modules/gimp.nix @@ -1,9 +1,10 @@ -{ pkgs, lib, host, ... }: +{ pkgs-latest, ... }: { - home.packages = with pkgs; [ - (gimp-with-plugins.override { - plugins = with gimpPlugins; [ bimp ]; - }) + home.packages = with pkgs-latest; [ + # (gimp-with-plugins.override { + # plugins = with gimpPlugins; [ bimp ]; + # }) + gimp ]; } diff --git a/home-modules/helix.nix b/home-modules/helix.nix index a3c5336..24add18 100644 --- a/home-modules/helix.nix +++ b/home-modules/helix.nix @@ -17,6 +17,7 @@ marksman # markdown vale-ls # style-checker lsp (needs vale) ltex-ls # Ltex (language tool) + vscode-langservers-extracted ] ++ (with pkgs-unstable; [ bash-language-server helix @@ -185,13 +186,13 @@ enable = false; supersend-menu = false; }; - # inline-diagnostics = { - # cursor-line = "hint"; - # other-lines = "disable"; - # prefix-len = 1; - # # max-wrap = set above - # max-diagnostics = 20; - # }; + inline-diagnostics = { + cursor-line = "hint"; + other-lines = "disable"; + prefix-len = 1; + # max-wrap = set above + max-diagnostics = 20; + }; }; keys = { normal = { @@ -303,8 +304,8 @@ base16 = with rice.color; { "attributes" = foreground; "comment" = { - "fg" = black.bright; - "modifiers" = [ "italic" ]; + fg = black.bright; + modifiers = [ "italic" ]; }; "constant" = accent.bright; "constant.character.escape" = special.bright; @@ -320,6 +321,7 @@ "hint" = tertiary.bright; "info" = foreground; "keyword" = special.base; + "keyword.modifiers" = [ "italic" ]; "label" = foreground; "namespace" = weird.bright; "operator" = foreground; @@ -332,131 +334,127 @@ "markup.heading" = accent.base; "markup.bold" = { - "fg" = tertiary.bright; - "modifiers" = [ "bold" ]; + fg = tertiary.bright; + modifiers = [ "bold" ]; }; "italic" = { - "fg" = secondary.bright; - "modifiers" = [ "italic" ]; + fg = secondary.bright; + modifiers = [ "italic" ]; }; "markup.linktext" = accent.base; "markup.linkurl" = { - "fg" = tertiary.dark; - "modifiers" = [ "underlined" ]; + fg = tertiary.dark; + modifiers = [ "underlined" ]; }; "markup.list" = accent.bright; "markup.quote" = weird.bright; "markup.raw" = special.bright; - "markup.strikethrough" = { - "modifiers" = [ "crossed_out" ]; - }; + "markup.strikethrough".modifiers = [ "crossed_out" ]; - "diagnostic.hint" = { - "underline" = { style = "curl"; }; - }; - "diagnostic.info" = { - "underline" = { style = "curl"; }; - }; - "diagnostic.warning" = { - "underline" = { style = "curl"; }; - }; - "diagnostic.error" = { - "underline" = { style = "curl"; }; - }; + "diagnostic.hint".underline.style = "curl"; + "diagnostic.info".underline.style = "curl"; + "diagnostic.warning".underline.style = "curl"; + "diagnostic.error".underline.style = "curl"; "ui.background" = { # general background of the editor window - # "bg" = background; + # bg = background; }; "ui.bufferline" = { # the top line ("tab"-line) - "fg" = accent.base; - "bg" = black.base; + fg = accent.base; + bg = black.base; }; "ui.bufferline.active" = { # the active "tab" - "fg" = background; - "bg" = accent.base; - "modifiers" = [ "bold" ]; + fg = background; + bg = accent.base; + modifiers = [ "bold" ]; }; "ui.cursor" = { # the cursor in Normal mode - "fg" = foreground; - "modifiers" = [ "reversed" ]; + fg = foreground; + modifiers = [ "reversed" ]; }; "ui.cursorline.primary" = { # the line on which the cursor is on - "bg" = black.base; + bg = black.base; }; "ui.cursor.match" = { # Matching bracket etc. - "bg" = green.dark; - "modifiers" = [ ]; + bg = green.dark; + modifiers = [ ]; }; "ui.gutter" = { - "bg" = black.base; + bg = black.base; }; "ui.help" = { - "fg" = green.base; - "bg" = black.base; + fg = green.base; + bg = black.base; }; "ui.linenr" = { - "fg" = white.dark; - "bg" = black.base; + fg = white.dark; + bg = black.base; }; "ui.linenr.selected" = { - "fg" = accent.bright; - "modifiers" = [ "bold" ]; + fg = accent.bright; + modifiers = [ "bold" ]; }; "ui.menu" = { - "fg" = accent.base; - "bg" = black.base; + fg = accent.base; + bg = black.base; }; "ui.menu.scroll" = { - "fg" = yellow.dark; - "bg" = background; + fg = yellow.dark; + bg = background; }; "ui.menu.selected" = { - "fg" = red.base; - "bg" = blue.dark; + fg = red.base; + bg = blue.dark; }; "ui.popup" = { - "bg" = black.base; + bg = black.base; }; "ui.selection" = { - "bg" = white.dark; + bg = white.dark; }; "ui.selection.primary" = { - "bg" = black.bright; + bg = black.bright; }; "ui.statusline" = { - "fg" = blue.bright; - "bg" = black.base; + fg = blue.bright; + bg = black.base; }; "ui.statusline.inactive" = { - "fg" = red.bright; - "bg" = red.dark; + fg = red.bright; + bg = red.dark; }; "ui.statusline.insert" = { - "fg" = green.bright; - "bg" = green.dark; + fg = green.bright; + bg = green.dark; }; "ui.statusline.normal" = { - "fg" = yellow.bright; - "bg" = yellow.dark; + fg = yellow.bright; + bg = yellow.dark; }; "ui.statusline.select" = { - "fg" = cyan.bright; - "bg" = cyan.dark; + fg = cyan.bright; + bg = cyan.dark; }; "ui.text" = foreground; "ui.text.focus" = accent.base; "ui.virtual.indent-guide" = { - "fg" = black.bright; + fg = black.bright; }; "ui.virtual.inlay-hint" = { - "fg" = weird.dark; - "bg" = weird.base; + fg = weird.dark; + bg = weird.base; }; "ui.virtual.ruler" = { - "bg" = background; + bg = background; + }; + "ui.virtual.jump-label" = { + fg = special.base; + underline = { + style = "dotted"; + }; }; "ui.window" = { - "bg" = black.base; + bg = black.base; }; }; }; diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index 5e40186..cdaf089 100644 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -13,7 +13,7 @@ let scale = "1.0"; }; second = { - name = "DP-1"; + name = "DP-3"; resolution = "1920x1080"; position = "0x0"; scale = "1.0"; diff --git a/home-modules/ssh.nix b/home-modules/ssh.nix index 0d8438f..5811c21 100644 --- a/home-modules/ssh.nix +++ b/home-modules/ssh.nix @@ -9,12 +9,12 @@ Port 50022 HOST nxacel - HostName 192.168.178.32 + HostName 10.0.1.1 User nx2 Port 50022 HOST nxrpil - HostName 192.168.178.31 + HostName 10.0.1.31 User nx2 Port 22 diff --git a/home-modules/waybar.nix b/home-modules/waybar.nix index b4de74f..ef3bf7e 100644 --- a/home-modules/waybar.nix +++ b/home-modules/waybar.nix @@ -47,104 +47,113 @@ in { '';}) (writers.writePython3Bin "caldav_event" { libraries = with pkgs.python3Packages; [ caldav ics pytz ]; - flakeIgnore = [ "E302" "E305""E501" ]; + flakeIgnore = [ "E302" "E305""E501" "E261" ]; } /* python */ '' import os +import json from caldav import DAVClient from datetime import datetime, timezone -import json from ics import Calendar +from pytz import UTC def get_password(password_file): with open(password_file, "r") as file: return file.read().strip() +def datetime_converter(obj): + if isinstance(obj, datetime): + return obj.isoformat() + return obj + +def datetime_parser(dct): + for key, value in dct.items(): + if isinstance(value, str): + try: + dct[key] = datetime.fromisoformat(value) + except ValueError: + pass + return dct + def load_cache(cache_file): if os.path.exists(cache_file): with open(cache_file, "r") as file: - return json.load(file) + return json.load(file, object_hook=datetime_parser) return None def save_cache(cache_file, data): with open(cache_file, "w") as file: - json.dump(data, file) + json.dump(data, file, default=datetime_converter) -def get_ongoing_and_next_event(url, username, password): + +def get_ongoing_or_next_event(url, username, password): now = datetime.now(timezone.utc) - ongoing_events = [] - upcoming_events = [] try: client = DAVClient(url, username=username, password=password) principal = client.principal() calendars = principal.calendars() + next_event_dict = { + 'event_name': "fake", + 'event_begin': datetime(9000, 1, 1, tzinfo=UTC), # in the year 9000 + 'event_end': datetime(9000, 1, 1, 8, tzinfo=UTC), + } + for calendar in calendars: - events = calendar.events() - for event in events: - ical_data = event.data - calendar_parsed = Calendar(ical_data) + for event in calendar.events(): + calendar_parsed = Calendar(event.data) + for ics_event in calendar_parsed.events: + event_dict = {} + event_dict['event_name'] = ics_event.name or "(No Title)" + event_dict['event_begin'] = ics_event.begin.astimezone(timezone.utc) + event_dict['event_end'] = ics_event.end.astimezone(timezone.utc) - for event in calendar_parsed.events: - event_name = event.name or "(No Title)" - start_time = event.begin.astimezone(timezone.utc) - end_time = event.end.astimezone(timezone.utc) + if event_dict['event_begin'] <= now and now <= event_dict['event_end']: + return event_dict + elif event_dict['event_begin'] >= now and next_event_dict['event_begin'] > event_dict['event_begin']: + next_event_dict = event_dict + return next_event_dict - if start_time <= now <= end_time: - ongoing_events.append((event_name, start_time.timestamp(), end_time.timestamp())) - elif start_time > now: - upcoming_events.append((event_name, start_time.timestamp(), end_time.timestamp())) except Exception as e: print(f"Error accessing {url}: {e}") - - upcoming_events.sort(key=lambda x: x[1]) # Sort by start time - return ongoing_events, upcoming_events[0] if upcoming_events else None + return None if __name__ == "__main__": - password_file = "${config.sops.secrets."nx2site/radicale/password".path}" # Path to password file + password_file = "/home/nx2/.config/sops-nix/secrets/nx2site/radicale/password" # Path to password file cache_file = "/tmp/caldav_event_cache.json" # Path to cache file url = "https://dav.${domain}/" username = "${user}" password = get_password(password_file) - cache = load_cache(cache_file) + event_dict = load_cache(cache_file) now = datetime.now(timezone.utc).timestamp() - if cache and cache.get("next_event_start") and now < cache["next_event_start"]: - ongoing_events = cache.get("ongoing_events", []) - next_event = (cache["next_event_name"], cache["next_event_start"], cache["next_event_end"]) if "next_event_name" in cache else None - else: - ongoing_events, next_event = get_ongoing_and_next_event(url, username, password) - + if event_dict is None or event_dict['event_begin'].timestamp() <= now and now < event_dict['event_end'].timestamp(): + event_dict = get_ongoing_or_next_event(url, username, password) + if event_dict is None: + print("No upcoming events found.") + exit(0) cache_data = { - "ongoing_events": ongoing_events, - "next_event_name": next_event[0] if next_event else None, - "next_event_start": next_event[1] if next_event else None, - "next_event_end": next_event[2] if next_event else None + "event_name": event_dict['event_name'] if event_dict is not None else None, + "event_begin": event_dict['event_begin'] if event_dict is not None else None, + "event_end": event_dict['event_end'] if event_dict is not None else None } save_cache(cache_file, cache_data) - if ongoing_events: - for event_name, start_time, end_time in ongoing_events: - time_remaining = end_time - now - hours, rem = divmod(int(time_remaining), 3600) - minutes, _ = divmod(rem, 60) + if event_dict: + event_start = event_dict['event_begin'].timestamp() + event_end = event_dict['event_end'].timestamp() - if hours == 0: - print(f"{event_name} {minutes} minute{'s ' if minutes > 1 else ' '}left") + if event_start <= now <= event_end: + time_remaining = event_end - now + hours, rem = divmod(int(time_remaining), 3600) + minutes, _ = divmod(rem, 60) + print(f"{event_dict['event_name']} ends in {hours} hour{'s ' if hours != 1 else ' '}and {minutes} minute{'s ' if minutes != 1 else ' '}") else: - print(f"{event_name} {hours} hour{'s ' if hours > 1 else ' '}and {minutes} minute{'s ' if minutes > 1 else ' '}left") - else: - if next_event: - event_name, start_time, end_time = next_event - time_until_start = start_time - now - hours, rem = divmod(int(time_until_start), 3600) - minutes, _ = divmod(rem, 60) - - if hours == 0: - print(f"'{event_name}' starts in {minutes} minute{'s ' if minutes > 1 else ' '}") - else: - print(f"'{event_name}' starts in {hours} hour{'s ' if hours > 1 else ' '}and {minutes} minute{'s ' if minutes > 1 else ' '}") + time_until_start = event_start - now + hours, rem = divmod(int(time_until_start), 3600) + minutes, _ = divmod(rem, 60) + print(f"{event_dict['event_name']} starts in {hours} hour{'s ' if hours != 1 else ' '}and {minutes} minute{'s ' if minutes != 1 else ' '}") else: print("No upcoming events found.") '') diff --git a/home-modules/yazi.nix b/home-modules/yazi.nix index 54abce9..b60aa46 100644 --- a/home-modules/yazi.nix +++ b/home-modules/yazi.nix @@ -13,170 +13,172 @@ enableFishIntegration = true; shellWrapperName = "ya"; plugins = with inputs.yazi-plugins.packages.${system}; { - inherit chmod starship; + inherit + # chmod + starship; }; # initLua = /* lua */ '' ''; keymap = { manager.keymap = [ - { on = ""; run = "escape"; desc = "Exit visual mode, clear selected, or cancel search"; } - { on = "q"; run = "quit"; desc = "Exit the process"; } - { on = "Q"; run = "quit --no-cwd-file"; desc = "Exit the process without writing cwd-file"; } - { on = ""; run = "close"; desc = "Close the current tab, or quit if it is last tab"; } - { on = ""; run = "suspend"; desc = "Suspend the process"; } + { on = ""; run = "escape"; desc = "Exit visual mode, clear selected, or cancel search"; } + { on = "q"; run = "quit"; desc = "Exit the process"; } + { on = "Q"; run = "quit --no-cwd-file"; desc = "Exit the process without writing cwd-file"; } + { on = ""; run = "close"; desc = "Close the current tab, or quit if it is last tab"; } + { on = ""; run = "suspend"; desc = "Suspend the process"; } # Hopping - { on = "k"; run = "arrow -1"; desc = "Move cursor up"; } - { on = "j"; run = "arrow 1"; desc = "Move cursor down"; } - { on = ""; run = "arrow -1"; desc = "Move cursor up"; } - { on = ""; run = "arrow 1"; desc = "Move cursor down"; } - { on = ""; run = "arrow -50%"; desc = "Move cursor up half page"; } - { on = ""; run = "arrow 50%"; desc = "Move cursor down half page"; } - { on = ""; run = "arrow -100%"; desc = "Move cursor up one page"; } - { on = ""; run = "arrow 100%"; desc = "Move cursor down one page"; } - { on = ""; run = "arrow -100%"; desc = "Move cursor up one page"; } - { on = ""; run = "arrow 100%"; desc = "Move cursor down one page"; } - { on = [ "g" "g" ]; run = "arrow down"; desc = "Move cursor to the top"; } - { on = [ "g" "e" ]; run = "arrow up"; desc = "Move cursor to the end"; } - { on = [ "g" "h" ]; run = "cd ~"; desc = "Go to the home directory"; } - { on = [ "g" "n" ]; run = "cd ~/nix-dots"; desc = "Go to the Nix-Dotfiles directory"; } - { on = [ "g" "n" ]; run = "cd /nix/store"; desc = "Go to the Nix-Store"; } - { on = [ "g" "c" ]; run = "cd ~/.config"; desc = "Go to the config directory"; } - { on = [ "g" "l" ]; run = "cd ~/.locale"; desc = "Go to the .locale directory"; } - { on = [ "g" "C" ]; run = "cd ~/.cache"; desc = "Go to the .cache directory"; } + { on = "k"; run = "arrow -1"; desc = "Move cursor up"; } + { on = "j"; run = "arrow 1"; desc = "Move cursor down"; } + { on = ""; run = "arrow -1"; desc = "Move cursor up"; } + { on = ""; run = "arrow 1"; desc = "Move cursor down"; } + { on = ""; run = "arrow -50%"; desc = "Move cursor up half page"; } + { on = ""; run = "arrow 50%"; desc = "Move cursor down half page"; } + { on = ""; run = "arrow -100%"; desc = "Move cursor up one page"; } + { on = ""; run = "arrow 100%"; desc = "Move cursor down one page"; } + { on = ""; run = "arrow -100%"; desc = "Move cursor up one page"; } + { on = ""; run = "arrow 100%"; desc = "Move cursor down one page"; } + { on = [ "g" "g" ]; run = "arrow down"; desc = "Move cursor to the top"; } + { on = [ "g" "e" ]; run = "arrow up"; desc = "Move cursor to the end"; } + { on = [ "g" "h" ]; run = "cd ~"; desc = "Go to the home directory"; } + { on = [ "g" "n" ]; run = "cd ~/nix-dots"; desc = "Go to the Nix-Dotfiles directory"; } + { on = [ "g" "n" ]; run = "cd /nix/store"; desc = "Go to the Nix-Store"; } + { on = [ "g" "c" ]; run = "cd ~/.config"; desc = "Go to the config directory"; } + { on = [ "g" "l" ]; run = "cd ~/.locale"; desc = "Go to the .locale directory"; } + { on = [ "g" "C" ]; run = "cd ~/.cache"; desc = "Go to the .cache directory"; } { on = [ "g" "m" ]; run = "cd ~/media"; desc = "Go to the media (udiskie mount) directory"; } - { on = [ "g" "v" ]; run = "cd ~/Videos"; desc = "Go to the Videos directory"; } - { on = [ "g" "d" ]; run = "cd ~/Downloads"; desc = "Go to the downloads directory"; } - { on = [ "g" "D" ]; run = "cd ~/Documents"; desc = "Go to the Documents directory"; } - { on = [ "g" "r" ]; run = "cd /"; desc = "Go to the root (/) directory"; } - { on = [ "g" "t" ]; run = "cd /tmp"; desc = "Go to the /tmp directory"; } - { on = [ "g" "/" ]; run = "cd /"; desc = "Go to the root (/) directory"; } - { on = [ "g" "" ]; run = "cd --interactive"; desc = "Go to a directory interactively"; } + { on = [ "g" "v" ]; run = "cd ~/Videos"; desc = "Go to the Videos directory"; } + { on = [ "g" "t" ]; run = "cd /tmp"; desc = "Go to the /tmp directory"; } + { on = [ "g" "d" ]; run = "cd ~/Downloads"; desc = "Go to the downloads directory"; } + { on = [ "g" "D" ]; run = "cd ~/Documents"; desc = "Go to the Documents directory"; } + { on = [ "g" "r" ]; run = "cd /"; desc = "Go to the root (/) directory"; } + { on = [ "g" "/" ]; run = "cd /"; desc = "Go to the root (/) directory"; } + { on = [ "g" "" ]; run = "cd --interactive"; desc = "Go to a directory interactively"; } # Navigation - { on = "h"; run = "leave"; desc = "Go back to the parent directory"; } - { on = "l"; run = "enter"; desc = "Enter the child directory"; } - { on = ""; run = "leave"; desc = "Go back to the parent directory"; } - { on = ""; run = "enter"; desc = "Enter the child directory"; } + { on = "h"; run = "leave"; desc = "Go back to the parent directory"; } + { on = "l"; run = "enter"; desc = "Enter the child directory"; } + { on = ""; run = "leave"; desc = "Go back to the parent directory"; } + { on = ""; run = "enter"; desc = "Enter the child directory"; } { on = "H"; run = "back"; desc = "Go back to the previous directory"; } - { on = "L"; run = "forward"; desc = "Go forward to the next directory"; } + { on = "L"; run = "forward"; desc = "Go forward to the next directory"; } # Seeking - { on = "K"; run = "seek -5"; desc = "Seek up 5 units in the preview"; } + { on = "K"; run = "seek -5"; desc = "Seek up 5 units in the preview"; } { on = "J"; run = "seek 5"; desc = "Seek down 5 units in the preview"; } # Selection - { on = ""; run = [ "toggle --state=none" "arrow 1" ]; desc = "Toggle the current selection state"; } + { on = ""; run = [ "toggle --state=none" "arrow 1" ]; desc = "Toggle the current selection state"; } { on = "v"; run = "visual_mode"; desc = "Enter visual mode (selection mode)"; } - { on = "V"; run = "visual_mode --unset"; desc = "Enter visual mode (unset mode)"; } - { on = ""; run = "toggle_all --state=on"; desc = "Select all files"; } - { on = ""; run = "toggle_all --state=off"; desc = "Deselect all files"; } - { on = ""; run = "toggle_all --state=none"; desc = "Inverse selection of all files"; } + { on = "V"; run = "visual_mode --unset"; desc = "Enter visual mode (unset mode)"; } + { on = ""; run = "toggle_all --state=on"; desc = "Select all files"; } + { on = ""; run = "toggle_all --state=off"; desc = "Deselect all files"; } + { on = ""; run = "toggle_all --state=none"; desc = "Inverse selection of all files"; } # Operation - { on = "o"; run = "open"; desc = "Open selected files"; } - { on = "O"; run = "open --interactive"; desc = "Open selected files interactively"; } - { on = ""; run = "open"; desc = "Open selected files"; } - { on = ""; run = "open --interactive"; desc = "Open selected files interactively"; } - { on = "y"; run = "yank"; desc = "Yank selected files (copy)"; } - { on = "x"; run = "yank --cut"; desc = "Yank selected files (cut)"; } - { on = "p"; run = "paste"; desc = "Paste yanked "; } - { on = "P"; run = "paste --force"; desc = "Paste yanked (overwrite if exists)"; } - { on = "-"; run = "link"; desc = "Symlink the absolute path of yanked files"; } - { on = "_"; run = "link --relative"; desc = "Symlink the relative path of yanked files"; } - { on = ""; run = "hardlink"; desc = "Hardlink yanked files"; } - { on = "Y"; run = "unyank"; desc = "Cancel the yank status"; } - { on = "X"; run = "unyank"; desc = "Cancel the yank status"; } - { on = "d"; run = "remove"; desc = "Trash selected files"; } - { on = "D"; run = "remove --permanently"; desc = "Permanently delete selected files"; } - { on = "a"; run = "create"; desc = "Create a file (ends with / for directories)"; } - { on = "r"; run = "rename --cursor=before_ext"; desc = "Rename selected file(s)"; } - { on = ";"; run = "shell --interactive"; desc = "Run a shell command"; } - { on = ":"; run = "shell --block --interactive"; desc = "Run a shell command (block until finishes)"; } - { on = "."; run = "hidden toggle"; desc = "Toggle the visibility of hidden files"; } - { on = "s"; run = "search fd"; desc = "Search files by name using fd"; } - { on = "S"; run = "search rg"; desc = "Search files by content using ripgrep"; } - { on = ""; run = "escape --search"; desc = "Cancel the ongoing search"; } - { on = "z"; run = "plugin zoxide"; desc = "Jump to a directory using zoxide"; } + { on = "o"; run = "open"; desc = "Open selected files"; } + { on = "O"; run = "open --interactive"; desc = "Open selected files interactively"; } + { on = ""; run = "open"; desc = "Open selected files"; } + { on = ""; run = "open --interactive"; desc = "Open selected files interactively"; } + { on = "y"; run = "yank"; desc = "Yank selected files (copy)"; } + { on = "x"; run = "yank --cut"; desc = "Yank selected files (cut)"; } + { on = "p"; run = "paste"; desc = "Paste yanked "; } + { on = "P"; run = "paste --force"; desc = "Paste yanked (overwrite if exists)"; } + { on = "-"; run = "link"; desc = "Symlink the absolute path of yanked files"; } + { on = "_"; run = "link --relative"; desc = "Symlink the relative path of yanked files"; } + { on = ""; run = "hardlink"; desc = "Hardlink yanked files"; } + { on = "Y"; run = "unyank"; desc = "Cancel the yank status"; } + { on = "X"; run = "unyank"; desc = "Cancel the yank status"; } + { on = "d"; run = "remove"; desc = "Trash selected files"; } + { on = "D"; run = "remove --permanently"; desc = "Permanently delete selected files"; } + { on = "a"; run = "create"; desc = "Create a file (ends with / for directories)"; } + { on = "r"; run = "rename --cursor=before_ext"; desc = "Rename selected file(s)"; } + { on = ";"; run = "shell --interactive"; desc = "Run a shell command"; } + { on = ":"; run = "shell --block --interactive"; desc = "Run a shell command (block until finishes)"; } + { on = "."; run = "hidden toggle"; desc = "Toggle the visibility of hidden files"; } + { on = "s"; run = "search fd"; desc = "Search files by name using fd"; } + { on = "S"; run = "search rg"; desc = "Search files by content using ripgrep"; } + { on = ""; run = "escape --search"; desc = "Cancel the ongoing search"; } + { on = "z"; run = "plugin zoxide"; desc = "Jump to a directory using zoxide"; } { on = "Z"; run = "plugin fzf"; desc = "Jump to a directory or reveal a file using fzf"; } # Linemode - { on = [ "m" "s" ]; run = "linemode size"; desc = "Set linemode to size"; } - { on = [ "m" "p" ]; run = "linemode permissions"; desc = "Set linemode to permissions"; } - { on = [ "m" "c" ]; run = "linemode ctime"; desc = "Set linemode to ctime"; } - { on = [ "m" "m" ]; run = "linemode mtime"; desc = "Set linemode to mtime"; } - { on = [ "m" "o" ]; run = "linemode owner"; desc = "Set linemode to owner"; } - { on = [ "m" "n" ]; run = "linemode none"; desc = "Set linemode to none"; } + { on = [ "m" "s" ]; run = "linemode size"; desc = "Set linemode to size"; } + { on = [ "m" "p" ]; run = "linemode permissions"; desc = "Set linemode to permissions"; } + { on = [ "m" "c" ]; run = "linemode ctime"; desc = "Set linemode to ctime"; } + { on = [ "m" "m" ]; run = "linemode mtime"; desc = "Set linemode to mtime"; } + { on = [ "m" "o" ]; run = "linemode owner"; desc = "Set linemode to owner"; } + { on = [ "m" "n" ]; run = "linemode none"; desc = "Set linemode to none"; } # Copy - { on = [ "c" "c" ]; run = "copy path"; desc = "Copy the file path"; } - { on = [ "c" "d" ]; run = "copy dirname"; desc = "Copy the directory path"; } - { on = [ "c" "f" ]; run = "copy filename"; desc = "Copy the filename"; } - { on = [ "c" "n" ]; run = "copy name_without_ext"; desc = "Copy the filename without extension"; } + { on = [ "c" "c" ]; run = "copy path"; desc = "Copy the file path"; } + { on = [ "c" "d" ]; run = "copy dirname"; desc = "Copy the directory path"; } + { on = [ "c" "f" ]; run = "copy filename"; desc = "Copy the filename"; } + { on = [ "c" "n" ]; run = "copy name_without_ext"; desc = "Copy the filename without extension"; } # Filter { on = "f"; run = "filter --smart"; desc = "Filter files"; } # Find - { on = "/"; run = "find --smart"; desc = "Find next file"; } - { on = "?"; run = "find --previous --smart"; desc = "Find previous file"; } - { on = "n"; run = "find_arrow"; desc = "Go to the next found"; } + { on = "/"; run = "find --smart"; desc = "Find next file"; } + { on = "?"; run = "find --previous --smart"; desc = "Find previous file"; } + { on = "n"; run = "find_arrow"; desc = "Go to the next found"; } { on = "N"; run = "find_arrow --previous"; desc = "Go to the previous found"; } - # Sortin - { on = [ "," "m" ]; run = [ "sort modified --reverse=no" "linemode mtime" ]; desc = "Sort by modified time"; } + # Sorting + { on = [ "," "m" ]; run = [ "sort modified --reverse=no" "linemode mtime" ]; desc = "Sort by modified time"; } { on = [ "," "M" ]; run = [ "sort modified --reverse" "linemode mtime" ]; desc = "Sort by modified time (reverse)"; } - { on = [ "," "c" ]; run = [ "sort created --reverse=no" "linemode ctime" ]; desc = "Sort by created time"; } - { on = [ "," "C" ]; run = [ "sort created --reverse" "linemode ctime" ]; desc = "Sort by created time (reverse)"; } - { on = [ "," "e" ]; run = "sort extension --reverse=no"; desc = "Sort by extension"; } - { on = [ "," "E" ]; run = "sort extension --reverse"; desc = "Sort by extension (reverse)"; } - { on = [ "," "a" ]; run = "sort alphabetical --reverse=no"; desc = "Sort alphabetically"; } - { on = [ "," "A" ]; run = "sort alphabetical --reverse"; desc = "Sort alphabetically (reverse)"; } - { on = [ "," "n" ]; run = "sort natural --reverse=no"; desc = "Sort naturally"; } - { on = [ "," "N" ]; run = "sort natural --reverse"; desc = "Sort naturally (reverse)"; } - { on = [ "," "s" ]; run = [ "sort size --reverse=no" "linemode size" ]; desc = "Sort by size"; } - { on = [ "," "S" ]; run = [ "sort size --reverse" "linemode size" ]; desc = "Sort by size (reverse)"; } + { on = [ "," "c" ]; run = [ "sort created --reverse=no" "linemode ctime" ]; desc = "Sort by created time"; } + { on = [ "," "C" ]; run = [ "sort created --reverse" "linemode ctime" ]; desc = "Sort by created time (reverse)"; } + { on = [ "," "e" ]; run = "sort extension --reverse=no"; desc = "Sort by extension"; } + { on = [ "," "E" ]; run = "sort extension --reverse"; desc = "Sort by extension (reverse)"; } + { on = [ "," "a" ]; run = "sort alphabetical --reverse=no"; desc = "Sort alphabetically"; } + { on = [ "," "A" ]; run = "sort alphabetical --reverse"; desc = "Sort alphabetically (reverse)"; } + { on = [ "," "n" ]; run = "sort natural --reverse=no"; desc = "Sort naturally"; } + { on = [ "," "N" ]; run = "sort natural --reverse"; desc = "Sort naturally (reverse)"; } + { on = [ "," "s" ]; run = [ "sort size --reverse=no" "linemode size" ]; desc = "Sort by size"; } + { on = [ "," "S" ]; run = [ "sort size --reverse" "linemode size" ]; desc = "Sort by size (reverse)"; } # Tab - { on = "t"; run = "tab_create --current"; desc = "Create a new tab with CWD"; } - { on = ""; run = "close"; desc = "Close the current tab"; } - { on = "1"; run = "tab_switch 0"; desc = "Switch to the first tab"; } - { on = "2"; run = "tab_switch 1"; desc = "Switch to the second tab"; } - { on = "3"; run = "tab_switch 2"; desc = "Switch to the third tab"; } - { on = "4"; run = "tab_switch 3"; desc = "Switch to the fourth tab"; } - { on = "5"; run = "tab_switch 4"; desc = "Switch to the fifth tab"; } - { on = "6"; run = "tab_switch 5"; desc = "Switch to the sixth tab"; } - { on = "7"; run = "tab_switch 6"; desc = "Switch to the seventh tab"; } - { on = "8"; run = "tab_switch 7"; desc = "Switch to the eighth tab"; } - { on = "9"; run = "tab_switch 8"; desc = "Switch to the ninth tab"; } - { on = ""; run = "tab_swap 0"; desc = "Swap current tab with the first tab"; } - { on = ""; run = "tab_swap 1"; desc = "Swap current tab with the second tab"; } - { on = ""; run = "tab_swap 2"; desc = "Swap current tab with the third tab"; } - { on = ""; run = "tab_swap 3"; desc = "Swap current tab with the fourth tab"; } - { on = ""; run = "tab_swap 4"; desc = "Swap current tab with the fifth tab"; } - { on = ""; run = "tab_swap 4"; desc = "Swap current tab with "; } - { on = ""; run = "tab_swap 5"; desc = "Swap current tab with the sixth tab"; } - { on = ""; run = "tab_swap 5"; desc = "Swap current tab with "; } - { on = ""; run = "tab_swap 6"; desc = "Swap current tab with the seventh tab"; } - { on = ""; run = "tab_swap 6"; desc = "Swap current tab with tab"; } - { on = ""; run = "tab_swap 7"; desc = "Swap current tab with the eighth tab"; } - { on = ""; run = "tab_swap 7"; desc = "Swap current tab with b"; } - { on = ""; run = "tab_swap 8"; desc = "Swap current tab with the ninth tab"; } - { on = ""; run = "tab_swap 8"; desc = "Swap current tab with "; } - { on = "["; run = "tab_switch -1 --relative"; desc = "Switch to the previous tab"; } - { on = "["; run = "tab_switch -1 --relative"; desc = "Switch to thtab"; } - { on = "]"; run = "tab_switch 1 --relative"; desc = "Switch to the next tab"; } - { on = "]"; run = "tab_switch 1 --relative"; desc = "Switch ttab"; } - { on = "{"; run = "tab_swap -1"; desc = "Swap current tab with previous tab"; } - { on = "{"; run = "tab_swap -1"; desc = "Swap current tab wittab"; } - { on = "}"; run = "tab_swap 1"; desc = "Swap current tab with next tab"; } + { on = "t"; run = "tab_create --current"; desc = "Create a new tab with CWD"; } + { on = ""; run = "close"; desc = "Close the current tab"; } + { on = "1"; run = "tab_switch 0"; desc = "Switch to the first tab"; } + { on = "2"; run = "tab_switch 1"; desc = "Switch to the second tab"; } + { on = "3"; run = "tab_switch 2"; desc = "Switch to the third tab"; } + { on = "4"; run = "tab_switch 3"; desc = "Switch to the fourth tab"; } + { on = "5"; run = "tab_switch 4"; desc = "Switch to the fifth tab"; } + { on = "6"; run = "tab_switch 5"; desc = "Switch to the sixth tab"; } + { on = "7"; run = "tab_switch 6"; desc = "Switch to the seventh tab"; } + { on = "8"; run = "tab_switch 7"; desc = "Switch to the eighth tab"; } + { on = "9"; run = "tab_switch 8"; desc = "Switch to the ninth tab"; } + { on = ""; run = "tab_swap 0"; desc = "Swap current tab with the first tab"; } + { on = ""; run = "tab_swap 1"; desc = "Swap current tab with the second tab"; } + { on = ""; run = "tab_swap 2"; desc = "Swap current tab with the third tab"; } + { on = ""; run = "tab_swap 3"; desc = "Swap current tab with the fourth tab"; } + { on = ""; run = "tab_swap 4"; desc = "Swap current tab with the fifth tab"; } + { on = ""; run = "tab_swap 4"; desc = "Swap current tab with "; } + { on = ""; run = "tab_swap 5"; desc = "Swap current tab with the sixth tab"; } + { on = ""; run = "tab_swap 5"; desc = "Swap current tab with "; } + { on = ""; run = "tab_swap 6"; desc = "Swap current tab with the seventh tab"; } + { on = ""; run = "tab_swap 6"; desc = "Swap current tab with tab"; } + { on = ""; run = "tab_swap 7"; desc = "Swap current tab with the eighth tab"; } + { on = ""; run = "tab_swap 7"; desc = "Swap current tab with b"; } + { on = ""; run = "tab_swap 8"; desc = "Swap current tab with the ninth tab"; } + { on = ""; run = "tab_swap 8"; desc = "Swap current tab with "; } + { on = "["; run = "tab_switch -1 --relative"; desc = "Switch to the previous tab"; } + { on = "["; run = "tab_switch -1 --relative"; desc = "Switch to thtab"; } + { on = "]"; run = "tab_switch 1 --relative"; desc = "Switch to the next tab"; } + { on = "]"; run = "tab_switch 1 --relative"; desc = "Switch ttab"; } + { on = "{"; run = "tab_swap -1"; desc = "Swap current tab with previous tab"; } + { on = "{"; run = "tab_swap -1"; desc = "Swap current tab wittab"; } + { on = "}"; run = "tab_swap 1"; desc = "Swap current tab with next tab"; } # Tasks { on = "w"; run = "tasks_show"; desc = "Show task manager"; } ]; tasks.keymap = [ # Task - { on = "w"; run = "close"; desc = "Close Task View"; } - { on = "q"; run = "close"; desc = "Close Task View"; } - { on = ""; run = "close"; desc = "Close Task View"; } - { on = "c"; run = "cancel"; desc = "Cancel Task"; } - { on = "i"; run = "inspect"; desc = "Inspect Task"; } - { on = "j"; run = "arrow -1"; desc = "Up in list"; } - { on = "k"; run = "arrow 1"; desc = "Down in list"; } - { on = "u"; run = "arrow -5"; desc = "Up in list (fast)"; } - { on = "d"; run = "arrow 5"; desc = "Down in list (fast)"; } + { on = "w"; run = "close"; desc = "Close Task View"; } + { on = "q"; run = "close"; desc = "Close Task View"; } + { on = ""; run = "close"; desc = "Close Task View"; } + { on = "c"; run = "cancel"; desc = "Cancel Task"; } + { on = "i"; run = "inspect"; desc = "Inspect Task"; } + { on = "j"; run = "arrow -1"; desc = "Up in list"; } + { on = "k"; run = "arrow 1"; desc = "Down in list"; } + { on = "u"; run = "arrow -5"; desc = "Up in list (fast)"; } + { on = "d"; run = "arrow 5"; desc = "Down in list (fast)"; } ]; - help = [ + help.keymap = [ # Help - { on = "~"; run = "help"; desc = "Open help"; } - { on = "?"; run = "help"; desc = "Open help"; } + { on = "~"; run = "help"; desc = "Open help"; } + { on = "?"; run = "help"; desc = "Open help"; } { on = ""; run = "help"; desc = "Open help"; } ]; }; diff --git a/home.nix b/home.nix index 52a9bec..b77d179 100644 --- a/home.nix +++ b/home.nix @@ -108,6 +108,7 @@ spicetify-cli sssnake swww + systemctl-tui tldr w3m wev @@ -120,11 +121,11 @@ inputs.zen-browser.packages."${system}".default ] ++ (with pkgs-unstable; [ - obsidian firefox spotify ]) ++ (if host != "NxACE" then (with pkgs; [ signal-desktop + obsidian zoom-us inkscape ]) else (with pkgs-unstable; [ diff --git a/sops-secrets.yaml b/sops-secrets.yaml index d249be7..a90532c 100644 --- a/sops-secrets.yaml +++ b/sops-secrets.yaml @@ -23,6 +23,7 @@ nx2site: cloudflare: api-token-dns-edit: ENC[AES256_GCM,data:fR4fH6NqwtHI8aebEwjUn5JMoy3q3GXgu/dREe8JK7yRBIOhJ8BKuw==,iv:fQqLRYCN/7zhpHzYxMcn8q1aA7x4qd3qWGgrFWn2E/U=,tag:GJ1muJG755ch/84Sgcf2Vw==,type:str] global-api-key: ENC[AES256_GCM,data:7WBmyEYFG0jEkxeiF9H4isfrCrn7Uv21hEJgX5i2/fOu3+evZA==,iv:IicsZo7qMG3xOKVr8lHzsOu2pTaDKUSx+85SyehDe20=,tag:nQ+CWX2kEmk3vIH4pi6Vlw==,type:str] + global-api-key-env: ENC[AES256_GCM,data:eb+Lg4R39VBNKG+NpH4n51E9MwMcW0Qm8x9cQZ4o/MnggZrAAR6wVOhzq8fCb0hB7CrIkPBcIS78044=,iv:MmGpDBC6uDOQ3cF4H2SvWXceBLxPyk42udSwe5jboBc=,tag:GP02DUCyQevfryhrO6py0w==,type:str] sslCertificate.pem: ENC[AES256_GCM,data:kBbfaOGVpNWjmvSdGHgrZpCJR5zNLBO/n6drBmjlQKRAprNDZbzTtyQIARze1O8UqkSP9Ld83F3Dg8e99NSAgVYekh4nGTzJoxy9wFCzdgSoME9GMLqwtHeWwVbP+Xb7oJWl4umRFIwLyITX/6w3k74hCiIhG0/Yuc6BQtklAtLaCGCLNVH5ir4mEzVjQWkIOJt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19:08Z" - mac: ENC[AES256_GCM,data:RpbqXk0JclXNVcHs5jCHVaw59AwzCnfhGsxoQnOwNEYWnAxEC5b0fXtjIC6Od4ziPJkPzUtfHgBG9Ub+b+RL7LUMPmsPOZ8XxE16YTrr+athK1s07I8doON8UpIsGj+MP/quJgy9pb/AvReOce/5Qe8SZG4Lig68I3iqHYFsiJ4=,iv:Huc7dZQPkJ+aPBgfqxdhy+PRl+8520aZMmqBeNd/C2w=,tag:M897FVr8TfAx3zDaml69Ww==,type:str] + lastmodified: "2025-03-07T17:02:01Z" + mac: ENC[AES256_GCM,data:js375bjy8Z4ApUXbw4eIqNl5BBgeX2bwMFBCx63LNCsb56OlHyYobQGtL1CwcDGW/+hwVLJSxbEDwqzJiu5vQ/2Cp00nVwvumHrvqZi/Ka4r87uNd6psE4nMq6ROHP0kJm6STKqd6MDyuLRjfX5zrki7ZhYTWsYS90/d9SUHUj8=,iv:W3w1f7lkL3fuOWmNhLUsOTKG18+wLhWA04GjygDIUEc=,tag:AYy9O7OcsY2W4VbOzyM5oA==,type:str] pgp: - created_at: "2024-06-09T19:44:41Z" enc: |- @@ -103,4 +104,4 @@ sops: -----END PGP MESSAGE----- fp: 22FB2CC03DC5292AB81CF67D0AF27B383170E634 unencrypted_suffix: _unencrypted - version: 3.9.2 + version: 3.9.4 diff --git a/system-modules/boot.nix b/system-modules/boot.nix index ec5919d..fd5f90c 100644 --- a/system-modules/boot.nix +++ b/system-modules/boot.nix @@ -103,7 +103,7 @@ in ''; }; }; - kernelPackages = pkgs-unstable.linuxPackages_6_11; + kernelPackages = pkgs-unstable.linuxPackages_latest; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; kernelModules = [ "v4l2loopback" ]; extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS VCam" exclusive_caps=1''; @@ -118,7 +118,7 @@ in efiSupport = true; }; }; - kernelPackages = pkgs-unstable.linuxPackages_6_11; + kernelPackages = pkgs.linuxPackages; # default kernel of pkgs }; }; } diff --git a/system-modules/calendar-dicos.nix b/system-modules/calendar-dicos.nix index ac91913..2960bb4 100644 --- a/system-modules/calendar-dicos.nix +++ b/system-modules/calendar-dicos.nix @@ -56,7 +56,7 @@ def modify_event(event): global latest_week global deficit - if event.name and "DICOS" in event.name: + if event.name is not None and "DICOS" in event.name: length = (event.end - event.begin).seconds / 3600 money_made = divmod(length * NETTO_STUNDE, 1) @@ -78,9 +78,14 @@ def modify_event(event): latest_goal = goal latest_week = week - progress_line = f"({fraction_to_unicode(progress)}/{fraction_to_unicode(goal)})" + new_description = [event.description.split("\n")[0] or "::"] + new_description.append("") + new_description.append(f"Netto: {money_made[0]:.0f},{int(money_made[1] * 10):02d}€") + new_description.append(f"This weeks porgress: ({fraction_to_unicode(progress)}/{fraction_to_unicode(goal)})") + new_description.append(f"This weeks deficit: {fraction_to_unicode(deficit)}") + + event.description = "\n".join(new_description) - event.description = f"Netto: {money_made[0]:.0f},{int(money_made[1] * 10):02d}€\nThis weeks porgress: {progress_line}\nThis weeks deficit: {fraction_to_unicode(deficit)}" event.name = f"DICOS {fraction_to_unicode(length)}" return event @@ -92,7 +97,7 @@ def process_ics_file(filepath): modified = False for event in calendar.events: - if 'DICOS' in event.name: + if event.name is not None and 'DICOS' in event.name: event = modify_event(event) modified = True diff --git a/system-modules/calendar-lec.nix b/system-modules/calendar-lec.nix index 0fd5742..280c13a 100644 --- a/system-modules/calendar-lec.nix +++ b/system-modules/calendar-lec.nix @@ -21,18 +21,10 @@ ]; flakeIgnore = [ "E302" "E305" "E226" "E501" ]; } /*python */ '' -import hashlib from ics import Calendar import requests from datetime import timedelta -def get_event_hash(event): - """ - Generate a unique hash for an event based on its details. - """ - event_data = f"{event.name}{event.begin}{event.end}{event.description}" - return hashlib.md5(event_data.encode('utf-8')).hexdigest() - def adjust_events(events): """ Adjust overlapping events to ensure they do not conflict. diff --git a/system-modules/calendar-lr.nix b/system-modules/calendar-lr.nix new file mode 100644 index 0000000..d9678ed --- /dev/null +++ b/system-modules/calendar-lr.nix @@ -0,0 +1,74 @@ +{ config, pkgs, domain, ... }: +{ + systemd.timers."nx_cal_lr" = { + enable = true; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "41m"; + OnUnitActiveSec = "24h"; + Unit = "nx_cal_lr.service"; + }; + }; + + systemd.services."nx_cal_lr" = { + script = let + nx_cal_lr = (pkgs.writers.writePython3Bin "nx_cal_lr" { + libraries = with pkgs.python3Packages; [ + ics + requests + ]; + flakeIgnore = [ "E302" "E305" "E226" "E501" ]; + } /*python */ '' +from ics import Calendar +import requests + +def filter_events(events): + return [event for event in events if ("LR" in event.name) or ("TBD" in event.name)] + +def fetch_and_save_ical_events(ical_url, save_path): + """ + Fetch events from an iCal URL and save them as a single combined calendar. + """ + try: + # Fetch the iCal data + response = requests.get(ical_url) + response.raise_for_status() + + # Parse the iCal data + calendar = Calendar(response.text) + + # Adjust events + adjusted_events = filter_events(list(calendar.events)) + + # Create a new combined calendar + combined_calendar = Calendar() + for event in adjusted_events: + combined_calendar.events.add(event) + + # Save the combined calendar to a single .ics file + with open(save_path, 'w') as file: + file.writelines(combined_calendar.serialize_iter()) + + print(f"Saved combined calendar to {save_path}") + + except requests.exceptions.RequestException as e: + print(f"Error fetching iCal data: {e}") + except Exception as e: + print(f"Error processing iCal data: {e}") + +if __name__ == "__main__": + # Replace with your iCal URL and target file path + ICAL_URL = "https://zlypher.github.io/lol-events/cal/league-of-legends-nlc.ical" + SAVE_PATH = "${config.services.nginx.virtualHosts."${domain}".root}/lr.ics" + + fetch_and_save_ical_events(ICAL_URL, SAVE_PATH) +''); + in '' + ${nx_cal_lr}/bin/nx_cal_lr + ''; + serviceConfig = { + Type = "oneshot"; + User = "nx2"; + }; + }; +} diff --git a/system-modules/fcitx5.nix b/system-modules/fcitx5.nix index 48fe697..aba40d0 100644 --- a/system-modules/fcitx5.nix +++ b/system-modules/fcitx5.nix @@ -1,4 +1,4 @@ -{ pkgs, pkgs-unstable, ... }: +{ pkgs, ... }: { # i18n.inputMethod = { # type = "fcitx5"; @@ -10,7 +10,8 @@ # ]; # }; i18n.inputMethod = { - enabled = "fcitx5"; + enable = true; + type = "fcitx5"; fcitx5.waylandFrontend = true; fcitx5.addons = with pkgs; [ fcitx5-gtk # alternatively, kdePackages.fcitx5-qt diff --git a/system-modules/games.nix b/system-modules/games.nix index 1ee3d21..2a203b6 100644 --- a/system-modules/games.nix +++ b/system-modules/games.nix @@ -1,5 +1,6 @@ { lib, host, ... }: -lib.mkIf (host == "NxNORTH" || host == "NxACE") +# lib.mkIf (host == "NxNORTH" || host == "NxACE") +lib.mkIf (host == "NxNORTH") { programs = { steam = { diff --git a/system-modules/hugo.nix b/system-modules/hugo.nix new file mode 100644 index 0000000..713662a --- /dev/null +++ b/system-modules/hugo.nix @@ -0,0 +1,32 @@ +{ pkgs-unstable, user, ... }: +let p = pkgs-unstable; in +{ + environment.systemPackages = with p; [ + hugo + dart-sass + ]; + + users = { + groups = { + "hugo".name = "hugo"; + }; + users = { + "${user}".extraGroups = [ "hugo" ]; + "nginx".extraGroups = [ "hugo" ]; + "hugo" = { + isSystemUser = true; + group = "hugo"; + }; + }; + }; + + systemd.services."hugo" = { + script = with p; /* shell */ '' + ${hugo}/bin/hugo serve --port 8000 --bind 10.0.1.1 --baseURL http://10.0.1.1:8000 -s /var/lib/hugo/nx2site/ + ''; + serviceConfig = { + Type = "simple"; + User = "hugo"; + }; + }; +} diff --git a/system-modules/networking.nix b/system-modules/networking.nix index e872364..d922517 100644 --- a/system-modules/networking.nix +++ b/system-modules/networking.nix @@ -17,6 +17,8 @@ firewall.allowedTCPPorts = [ 80 443 + 8000 + 8080 ]; }; environment.etc = { diff --git a/system-modules/nx2site.nix b/system-modules/nx2site.nix index 193b5f1..7022dd4 100644 --- a/system-modules/nx2site.nix +++ b/system-modules/nx2site.nix @@ -24,7 +24,7 @@ let dns-user = "cloudflare"; in timers."dynamic-dns" = { wantedBy = [ "timers.target" ]; timerConfig = { - OnBootSec = "2m"; + OnBootSec = "1m"; OnUnitActiveSec = "10m"; Unit = "dynamic-dns.service"; }; @@ -49,11 +49,13 @@ let dns-user = "cloudflare"; in } /* python */ '' import requests import subprocess +from time import sleep def get_public_ip(ipv6: bool = False) -> str: return subprocess.run(['${pkgs.curl}/bin/curl', '-s', '-6' if ipv6 else '-4', 'https://ifconfig.me'], capture_output=True, text=True).stdout.strip() def update_record(record_id: str, record_name: str, ip: str, type: str, proxied: bool, pw: str) -> None: + sleep(5) return requests.patch( f'https://api.cloudflare.com/client/v4/zones/${zone_id}/dns_records/{record_id}', headers={ @@ -82,19 +84,13 @@ def main(): # Perform DNS updates # https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-update-dns-record - r = update_record(record_id="${record_id.base}", record_name="${domain}", ip=my_ip, type="A", proxied=True, pw=pw) - _ = update_record(record_id="${record_id.sub}", record_name="*.${domain}", ip=my_ip, type="A", proxied=True, pw=pw) - _ = update_record(record_id="${record_id.ssh}", record_name="ssh.${domain}", ip=my_ip, type="A", proxied=False, pw=pw) + print(f"${domain}: {update_record(record_id="${record_id.base}", record_name="${domain}", ip=my_ip, type="A", proxied=True, pw=pw).status_code}") + print(f"*.${domain}: {update_record(record_id="${record_id.sub}", record_name="*.${domain}", ip=my_ip, type="A", proxied=True, pw=pw).status_code}") + print(f"ssh.${domain}: {update_record(record_id="${record_id.ssh}", record_name="ssh.${domain}", ip=my_ip, type="A", proxied=False, pw=pw).status_code}") - if r.status_code != 200: - print(r.text) - - r = update_record(record_id="${record_id.base6}", record_name="${domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw) - _ = update_record(record_id="${record_id.sub6}", record_name="*.${domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw) - _ = update_record(record_id="${record_id.ssh6}", record_name="ssh.${domain}", ip=my_ip6, type="AAAA", proxied=False, pw=pw) - - if r.status_code != 200: - print(r.text) + print(f"${domain}: {update_record(record_id="${record_id.base6}", record_name="${domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw).status_code}") + print(f"*.${domain}: {update_record(record_id="${record_id.sub6}", record_name="*.${domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw).status_code}") + print(f"ssh.${domain}: {update_record(record_id="${record_id.ssh6}", record_name="ssh.${domain}", ip=my_ip6, type="AAAA", proxied=False, pw=pw).status_code}") if __name__ == "__main__": main() diff --git a/system-modules/nx2site/dyn_dns.nix b/system-modules/nx2site/dyn_dns.nix new file mode 100644 index 0000000..6663a22 --- /dev/null +++ b/system-modules/nx2site/dyn_dns.nix @@ -0,0 +1,22 @@ +{ config, pkgs, domain, ... }: +{ + sops.secrets = { + # "nx2site/namecheap.pw" = { }; + # "nx2site/cloudflare/api-token-dns-edit" = { }; + "nx2site/cloudflare/global-api-key-env" = { + owner = "root"; + }; + }; + services.cloudflare-dyndns = { + enable = true; + ipv4 = true; + ipv6 = config.networking.enableIPv6; + domains = [ + "${domain}" + "*.${domain}" + "ssh.${domain}" + ]; + proxied = true; + apiTokenFile = config.sops.secrets."nx2site/cloudflare/global-api-key-env".path; + }; +} diff --git a/system-modules/nx2site/proxy.nix b/system-modules/nx2site/proxy.nix index fe6b9cb..a8e85ec 100644 --- a/system-modules/nx2site/proxy.nix +++ b/system-modules/nx2site/proxy.nix @@ -14,7 +14,7 @@ }; certs = { "${domain}" = { - extraDomainNames = builtins.map (subd: "${subd}.${domain}") [ "sync" ]; + extraDomainNames = builtins.map (subd: "${subd}.${domain}") [ "sync" "dev" ]; }; }; }; @@ -145,10 +145,21 @@ # }; "abs.${domain}" = vh // { listen = dl; - locations = { "/" = { + locations."/" = { proxyPass = "http://127.0.0.1:${builtins.toString config.services.audiobookshelf.port}"; proxyWebsockets = true; - }; }; + }; + }; + "dev.${domain}" = vh // { + listen = dl ++ [ + # { addr = "0.0.0.0"; port = 8000; ssl = true; } + # { addr = "[::0]"; port = 8000; ssl = true; } + ]; + root = "/var/lib/hugo/nx2site/public"; + # locations."/" = { + # proxyPass = "http://127.0.0.1:8000"; + # proxyWebsockets = true; + # }; }; # is done atomatically # "cal.${domain}" = vh // { diff --git a/system-modules/ollama.nix b/system-modules/ollama.nix index 3927290..c642bc8 100644 --- a/system-modules/ollama.nix +++ b/system-modules/ollama.nix @@ -1,17 +1,6 @@ -{ pkgs, pkgs-unstable, pkgs-latest, lib, host, nvidia, ... }: +{ pkgs, lib, host, nvidia, ... }: let - p = pkgs-latest.ollama; - # p = pkgs-unstable.ollama.overrideAttrs (oldAttrs: rec { - # inherit (oldAttrs) pname; - # version = "0.3.0"; - # src = pkgs.fetchFromGitHub { - # owner = "ollama"; - # repo = "ollama"; - # rev = "v${version}"; - # hash = "sha256-69CpRAggx6a1NJq+CA9QliXuUbDgC1ERRuA3y17KVAM="; - # fetchSubmodules = true; - # }; - # }); + p = if nvidia.enable then pkgs.ollama-cuda else pkgs.ollama; in { environment.systemPackages = [ p ];