From 24afb851945e99f4d14d79b5a0aa1f8a54bd1b9f Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Fri, 28 Feb 2025 16:05:00 +0100 Subject: [PATCH 1/3] daily backup: wait until nix-gc has finished --- hosts/yodaHedgehog/host-specific.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hosts/yodaHedgehog/host-specific.nix b/hosts/yodaHedgehog/host-specific.nix index a86e085..7f6e889 100644 --- a/hosts/yodaHedgehog/host-specific.nix +++ b/hosts/yodaHedgehog/host-specific.nix @@ -127,6 +127,16 @@ in sleep 60s done + # Wait until no nix garbage collection service is running. + while :; do + running_services="$(systemctl list-units --type=service --plain --quiet | awk '{ print $1 }')" + if ! printf '%s' "''${running_services}" | grep '^nix-gc.service$'; then + break; + fi + printf '%s\n' 'Delaying suspend due to running nix garbage collection service.' + sleep 60s + done + # Send filtered journal by email. systemctl start journalwatch.service ||: # Send notification by email. From a53052d0a48eb40cf35cb8fe9c4c51e488b69cd1 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Fri, 28 Feb 2025 16:07:40 +0100 Subject: [PATCH 2/3] docs: local-llm --- modules/local-llm.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/local-llm.nix b/modules/local-llm.nix index 6f3d388..ee7c63a 100644 --- a/modules/local-llm.nix +++ b/modules/local-llm.nix @@ -12,6 +12,7 @@ in # # https://ollama.com/library/deepseek-r1 # "deepseek-r1:32b" # "deepseek-r1:14b" + # "deepseek-r1:7b" #]; }; @@ -36,7 +37,18 @@ in # # https://docs.openwebui.com/getting-started/quick-start # Admin Creation: The first account created on Open WebUI gains Administrator privileges, controlling user management and system settings. -# services.open-webui.enable = true; + # + #services.open-webui = { + #enable = true; + #package = pkgs.unstable.open-webui; # TODO back to stable nixpkgs + #port = 8080; + + # Share via LAN + # + # Temporarily open firewall + # sudo nixos-firewall-tool open tcp 8080 && ip addr | grep 192 + #host = "0.0.0.0"; # Also listen to connections from other hosts + #}; # Web-UI # services.nextjs-ollama-llm-ui = { From e6629532002b39e8d88510f8f7b18c5a75cc52f4 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Fri, 28 Feb 2025 16:10:17 +0100 Subject: [PATCH 3/3] chore --- nix/sources.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index 90af9b7..23e9264 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -5,10 +5,10 @@ "homepage": "https://nur.nix-community.org/", "owner": "nix-community", "repo": "NUR", - "rev": "8fa0d624799c0f18bf123e10cf597d523aebcca8", - "sha256": "1xy8h30yabsdwjki883n9s6cbm3i18k3v07jd8ym0n936h5hjb5c", + "rev": "3b265947efc7c05a5a31618e166edd632b45e699", + "sha256": "1wxcdjb05izxqaqlh2m5gk9fxzb1kv1lg7g9yfhbs9fh9iz2jh6f", "type": "tarball", - "url": "https://github.com/nix-community/NUR/archive/8fa0d624799c0f18bf123e10cf597d523aebcca8.tar.gz", + "url": "https://github.com/nix-community/NUR/archive/3b265947efc7c05a5a31618e166edd632b45e699.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "home-manager": { @@ -41,10 +41,10 @@ "homepage": null, "owner": "NixOS", "repo": "nixpkgs", - "rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195", - "sha256": "0lc189m0s912qyzhqrd08rn7gvlxv9xlp8pfkr2wg18h93ng1fki", + "rev": "f44bd8ca21e026135061a0a57dcf3d0775b67a49", + "sha256": "1bi5ikc0h83rh163qs19hr2b2p53f8kxlrrbz206q0fh31m5mrdp", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/04ef94c4c1582fd485bbfdb8c4a8ba250e359195.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/f44bd8ca21e026135061a0a57dcf3d0775b67a49.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "rust-overlay": { @@ -53,10 +53,10 @@ "homepage": "", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7c5892ad87b90d72668964975eebd4e174ff6204", - "sha256": "0s3jyjiqiymk57spg327c5v82wfqshh0w6sfv36xa4kfdx7jv4az", + "rev": "b4270835bf43c6f80285adac6f66a26d83f0f277", + "sha256": "1pdfrl47nijxj0plr81iisci9f7dmcr5hn890fzpcpn8qpw7xlg1", "type": "tarball", - "url": "https://github.com/oxalica/rust-overlay/archive/7c5892ad87b90d72668964975eebd4e174ff6204.tar.gz", + "url": "https://github.com/oxalica/rust-overlay/archive/b4270835bf43c6f80285adac6f66a26d83f0f277.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "unstable": { @@ -65,10 +65,10 @@ "homepage": "", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2d068ae5c6516b2d04562de50a58c682540de9bf", - "sha256": "0hz6rhk36sggqq1r60xgh1hycaqa0afl1jijqh69k311n5c65isx", + "rev": "3a05eebede89661660945da1f151959900903b6a", + "sha256": "0n56l6v5k3lmrr4vjnp6xk1s46shkwdkvai05dzcbcabpl29yb9g", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/2d068ae5c6516b2d04562de50a58c682540de9bf.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/3a05eebede89661660945da1f151959900903b6a.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } }