From 433307c055b0eb08c4ba4bb826e7e954ebbe39b7 Mon Sep 17 00:00:00 2001 From: Adrian Gunnar Lauterer Date: Sun, 19 May 2024 00:15:13 +0200 Subject: [PATCH] rss + cleanups --- flake.lock | 42 ++++++++++++++-------------- machines/elrond/routes.nix | 16 +++++------ machines/galadriel/configuration.nix | 2 +- profiles/ai.nix | 4 +-- services/freshrrs.nix | 10 ------- services/rss.nix | 24 ++++++++++++++++ services/whisper.nix | 20 ++----------- 7 files changed, 58 insertions(+), 60 deletions(-) delete mode 100644 services/freshrrs.nix create mode 100644 services/rss.nix diff --git a/flake.lock b/flake.lock index 049bfaf..3aab97d 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ ] }, "locked": { - "lastModified": 1710888565, - "narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=", + "lastModified": 1715381426, + "narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=", "owner": "nix-community", "repo": "home-manager", - "rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce", + "rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4", "type": "github" }, "original": { @@ -80,11 +80,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1711761232, - "narHash": "sha256-3Lv+rfgD2uTMGe2fu3lojPxlspRrkA+RQCHdAPoO0sc=", + "lastModified": 1715995260, + "narHash": "sha256-3ASn2z6I9RL4ws4D6paZdVv1Z2UVBa0hxx+BhRON9/Q=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "02437b1efb9aac284c03692f8c3336a1e886446b", + "rev": "0e7e9e6919e4082f7add31892d1864e9d8fd6e8d", "type": "github" }, "original": { @@ -110,11 +110,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1711233294, - "narHash": "sha256-eEu5y4J145BYDw9o/YEmeJyqh8blgnZwuz9k234zuWc=", + "lastModified": 1715458492, + "narHash": "sha256-q0OFeZqKQaik2U8wwGDsELEkgoZMK7gvfF6tTXkpsqE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ac6bdf6181666ebb4f90dd20f31e2fa66ede6b68", + "rev": "8e47858badee5594292921c2668c11004c3b0142", "type": "github" }, "original": { @@ -126,11 +126,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1698318101, - "narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=", + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "63678e9f3d3afecfeafa0acead6239cdb447574c", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", "type": "github" }, "original": { @@ -142,11 +142,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1711668574, - "narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=", + "lastModified": 1715948915, + "narHash": "sha256-dxMrggEogQuJQr6f02VAFtsSNtjEPkgxczeiyW7WOQc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659", + "rev": "bacb8503d3a51d9e9b52e52a1ba45e2c380ad07d", "type": "github" }, "original": { @@ -174,11 +174,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1711249319, - "narHash": "sha256-N+Pp3/8H+rd7cO71VNV/ovV/Kwt+XNeUHNhsmyTabdM=", + "lastModified": 1715482972, + "narHash": "sha256-y1uMzXNlrVOWYj1YNcsGYLm4TOC2aJrwoUY1NjQs9fM=", "owner": "Mic92", "repo": "sops-nix", - "rev": "405987a66cce9a4a82f321f11b205982a7127c88", + "rev": "b6cb5de2ce57acb10ecdaaf9bbd62a5ff24fa02e", "type": "github" }, "original": { @@ -204,11 +204,11 @@ }, "unstable": { "locked": { - "lastModified": 1711703276, - "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", + "lastModified": 1715961556, + "narHash": "sha256-+NpbZRCRisUHKQJZF3CT+xn14ZZQO+KjxIIanH3Pvn4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", + "rev": "4a6b83b05df1a8bd7d99095ec4b4d271f2956b64", "type": "github" }, "original": { diff --git a/machines/elrond/routes.nix b/machines/elrond/routes.nix index 22586b2..37bfa1f 100644 --- a/machines/elrond/routes.nix +++ b/machines/elrond/routes.nix @@ -6,7 +6,7 @@ useACMEHost = config.networking.domain; locations."/" = { proxyWebsockets = true; - proxyPass = "https://100.104.182.48"; + proxyPass = "https://100.104.182.48:443"; }; basicAuthFile = config.sops.secrets."nginx/defaultpass".path; }; @@ -32,7 +32,7 @@ #basicAuthFile = config.sops.secrets."nginx/defaultpass".path; }; - virtualHosts."jellyfin.lauterer.it" = { + virtualHosts."jellyfin.lauterer.it" = { forceSSL = true; useACMEHost = config.networking.domain; locations."/" = { @@ -65,12 +65,12 @@ locations."/" = { proxyWebsockets = true; proxyPass = "100.84.215.84:25565"; - extraConfig = '' - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - ''; + # extraConfig = '' + # proxy_set_header Host $host; + # proxy_set_header X-Real-IP $remote_addr; + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # proxy_set_header X-Forwarded-Proto $scheme; + # ''; }; }; diff --git a/machines/galadriel/configuration.nix b/machines/galadriel/configuration.nix index 56d426f..a517d59 100644 --- a/machines/galadriel/configuration.nix +++ b/machines/galadriel/configuration.nix @@ -22,7 +22,7 @@ ../../services/torrent.nix ../../services/mc.nix #../../services/stableDiffusion.nix - ../../services/freshrrs.nix + ../../services/rss.nix ]; # Bootloader. diff --git a/profiles/ai.nix b/profiles/ai.nix index ff4e917..32f2bf0 100644 --- a/profiles/ai.nix +++ b/profiles/ai.nix @@ -5,8 +5,8 @@ ./base.nix ../services/podman.nix ../services/ollama.nix - ../services/ollama-webui.nix - ../services/whisper.nix + #../services/ollama-webui.nix + #../services/whisper.nix ]; environment.systemPackages = with pkgs.unstable; [ diff --git a/services/freshrrs.nix b/services/freshrrs.nix deleted file mode 100644 index 419263f..0000000 --- a/services/freshrrs.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, pkgs, lib, ... }: -{ - environment.systemPackages = [ - pkgs.freshrss - ]; - services.freshrss.enable = true; - services.freshrss.baseUrl = "http://0.0.0.1"; - services.freshrss.passwordFile = config.sops.secrets."freshrss".path; #"/run/secrets/freshrss"; - -} \ No newline at end of file diff --git a/services/rss.nix b/services/rss.nix new file mode 100644 index 0000000..b854924 --- /dev/null +++ b/services/rss.nix @@ -0,0 +1,24 @@ +{ config, pkgs, lib, ... }: +{ +# environment.systemPackages = [ +# pkgs.freshrss +# ]; +# services.freshrss = { +# enable = true; +# baseUrl = "http://0.0.0.0"; +# passwordFile = config.sops.secrets."freshrss/passwordFile".path; #"/run/secrets/freshrss"; +# }; +# + sops.secrets."miniflux/adminCredentialsFile" = { + restartUnits = [ "miniflux.service" ]; +# owner = "miniflux"; + mode = "0755"; + }; + + + + services.miniflux.enable = true; + services.miniflux.config.LISTEN_ADDR = "localhost:8081"; + services.miniflux.adminCredentialsFile = config.sops.secrets."miniflux/adminCredentialsFile".path; + +} diff --git a/services/whisper.nix b/services/whisper.nix index deadbec..929fed7 100644 --- a/services/whisper.nix +++ b/services/whisper.nix @@ -13,26 +13,10 @@ servers = { fast = { - enable = true; - model = "tiny-int8"; - uri = "tcp://0.0.0.0:10300"; - device = "cuda"; - language = "en"; - beamSize = 1; - }; - fast-no = { - enable = true; - model = "tiny-int8"; - uri = "tcp://0.0.0.0:10301"; - device = "cuda"; - language = "no"; - beamSize = 1; - }; - fast-auto = { enable = true; model = "tiny-int8"; uri = "tcp://0.0.0.0:10302"; - device = "cuda"; + device = "auto"; language = "auto"; beamSize = 1; }; @@ -64,4 +48,4 @@ }; basicAuthFile = config.sops.secrets."nginx/defaultpass".path; }; -} \ No newline at end of file +}