feat: disable cache-apt because it causes lag
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2025-01-11 17:08:38 -05:00
parent 9a24d7308b
commit 2c00932803
8 changed files with 8 additions and 60 deletions

View file

@ -87,7 +87,6 @@ in {
"Immich" = mkPublicReverseProxy "photos" "${nosIP}:2283" {}; "Immich" = mkPublicReverseProxy "photos" "${nosIP}:2283" {};
"Binary Cache" = mkPublicReverseProxy "cache" "${serviviIP}:5000" {}; "Binary Cache" = mkPublicReverseProxy "cache" "${serviviIP}:5000" {};
"Apt Binary Cache" = mkPublicReverseProxy "cache-apt" "${homieIP}:5000" {};
# Private # Private
"nelim.org" = { "nelim.org" = {

View file

@ -9,7 +9,6 @@ in {
services.pcsd = { services.pcsd = {
enable = true; enable = true;
enableBinaryCache = true;
enableWebUI = true; enableWebUI = true;
clusterName = "thingies"; clusterName = "thingies";

View file

@ -49,7 +49,7 @@ in {
publicApps = remove "nelim.org" (mapAttrsToList (n: v: v.hostName) config.services.caddy.virtualHosts); publicApps = remove "nelim.org" (mapAttrsToList (n: v: v.hostName) config.services.caddy.virtualHosts);
in in
mergeAttrsList ( mergeAttrsList (
[(mkLocalEntry "cache-apt.nelim.org" "100.64.0.10")] []
++ (map forceResolveEntry publicApps) ++ (map forceResolveEntry publicApps)
++ [ ++ [
(mkMinecraftEntry "mc.nelim.org" 25569) (mkMinecraftEntry "mc.nelim.org" 25569)

View file

@ -1,34 +0,0 @@
{
config,
pkgs,
...
}: let
inherit (builtins) attrValues;
inherit (config.sops) secrets;
nixFastBuild = pkgs.writeShellApplication {
name = "nixFastBuild";
runtimeInputs = attrValues {
inherit
(pkgs)
gnugrep
nix-fast-build
nix-output-monitor
;
};
text = ''
cd "$FLAKE/results" || return
nix-fast-build -f ..#nixFastChecks.aptDevices "$@"
'';
};
in {
services.nix-serve = {
enable = true;
secretKeyFile = secrets.apt-binary-cache-key.path;
};
environment.systemPackages = [pkgs.nix-fast-build nixFastBuild];
}

View file

@ -1,6 +1,5 @@
{...}: { {...}: {
imports = [ imports = [
./binary-cache.nix
./home-assistant ./home-assistant
./music ./music
]; ];

View file

@ -4,7 +4,7 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) elem foldl isList mergeAttrsWithFunc mkIf optionals unique; inherit (lib) foldl isList mergeAttrsWithFunc mkIf optionals unique;
cfg = config.roles.base; cfg = config.roles.base;
@ -45,9 +45,6 @@ in {
] ]
++ optionals (config.networking.hostName != "servivi") [ ++ optionals (config.networking.hostName != "servivi") [
(mkSubstituterConf 100 "https://cache.nelim.org" "cache.nelim.org:JmFqkUdH11EA9EZOFAGVHuRYp7EbsdJDHvTQzG2pPyY=") (mkSubstituterConf 100 "https://cache.nelim.org" "cache.nelim.org:JmFqkUdH11EA9EZOFAGVHuRYp7EbsdJDHvTQzG2pPyY=")
]
++ optionals (elem config.networking.hostName ["bbsteamie" "binto" "wim"]) [
(mkSubstituterConf 10 "https://cache-apt.nelim.org" "cache-apt.nelim.org:NLAsWxa2Qbm4b+hHimjCpZfm48a4oN4O/GPZY9qpjNw=")
]); ]);
}; };
}; };

View file

@ -7,20 +7,12 @@
}: let }: let
inherit (self.lib.attrs) recursiveUpdateList; inherit (self.lib.attrs) recursiveUpdateList;
aptDevices = perSystem (pkgs:
import ./devices {
onlyApt = true;
inherit pkgs self;
});
apps = perSystem (pkgs: import ./apps {inherit pkgs self;}); apps = perSystem (pkgs: import ./apps {inherit pkgs self;});
devices = perSystem (pkgs: import ./devices {inherit pkgs self;}); devices = perSystem (pkgs: import ./devices {inherit pkgs self;});
devShells = perSystem (pkgs: import ./devShells {inherit pkgs self;}); devShells = perSystem (pkgs: import ./devShells {inherit pkgs self;});
packages = perSystem (pkgs: import ./packages {inherit pkgs self;}); packages = perSystem (pkgs: import ./packages {inherit pkgs self;});
in { in {
# Allow homie to serve a binary cache for the devices away from servivi inherit apps devices devShells packages;
aptDevices = recursiveUpdateList [aptDevices devShells];
all = recursiveUpdateList [apps devices devShells packages]; all = recursiveUpdateList [apps devices devShells packages];
inherit apps devices devShells packages;
} }

View file

@ -1,16 +1,12 @@
{ {
pkgs, pkgs,
self, self,
onlyApt ? false,
}: let }: let
inherit (pkgs.lib) elem filterAttrs mapAttrs' nameValuePair; inherit (pkgs.lib) filterAttrs mapAttrs' nameValuePair;
devices = filterAttrs (n: config: let devices =
isSameSystem = config.pkgs.system == pkgs.system; filterAttrs
in (n: config: config.pkgs.system == pkgs.system)
if onlyApt
then isSameSystem && elem n ["bbsteamie" "binto" "homie" "wim"]
else isSameSystem)
self.nixosConfigurations; self.nixosConfigurations;
in in
mapAttrs' mapAttrs'