feat: disable cache-apt because it causes lag
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
9a24d7308b
commit
2c00932803
8 changed files with 8 additions and 60 deletions
|
@ -87,7 +87,6 @@ in {
|
|||
"Immich" = mkPublicReverseProxy "photos" "${nosIP}:2283" {};
|
||||
|
||||
"Binary Cache" = mkPublicReverseProxy "cache" "${serviviIP}:5000" {};
|
||||
"Apt Binary Cache" = mkPublicReverseProxy "cache-apt" "${homieIP}:5000" {};
|
||||
|
||||
# Private
|
||||
"nelim.org" = {
|
||||
|
|
|
@ -9,7 +9,6 @@ in {
|
|||
|
||||
services.pcsd = {
|
||||
enable = true;
|
||||
enableBinaryCache = true;
|
||||
enableWebUI = true;
|
||||
|
||||
clusterName = "thingies";
|
||||
|
|
|
@ -49,7 +49,7 @@ in {
|
|||
publicApps = remove "nelim.org" (mapAttrsToList (n: v: v.hostName) config.services.caddy.virtualHosts);
|
||||
in
|
||||
mergeAttrsList (
|
||||
[(mkLocalEntry "cache-apt.nelim.org" "100.64.0.10")]
|
||||
[]
|
||||
++ (map forceResolveEntry publicApps)
|
||||
++ [
|
||||
(mkMinecraftEntry "mc.nelim.org" 25569)
|
||||
|
|
|
@ -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];
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./binary-cache.nix
|
||||
./home-assistant
|
||||
./music
|
||||
];
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) elem foldl isList mergeAttrsWithFunc mkIf optionals unique;
|
||||
inherit (lib) foldl isList mergeAttrsWithFunc mkIf optionals unique;
|
||||
|
||||
cfg = config.roles.base;
|
||||
|
||||
|
@ -45,9 +45,6 @@ in {
|
|||
]
|
||||
++ optionals (config.networking.hostName != "servivi") [
|
||||
(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=")
|
||||
]);
|
||||
};
|
||||
};
|
||||
|
|
|
@ -7,20 +7,12 @@
|
|||
}: let
|
||||
inherit (self.lib.attrs) recursiveUpdateList;
|
||||
|
||||
aptDevices = perSystem (pkgs:
|
||||
import ./devices {
|
||||
onlyApt = true;
|
||||
inherit pkgs self;
|
||||
});
|
||||
|
||||
apps = perSystem (pkgs: import ./apps {inherit pkgs self;});
|
||||
devices = perSystem (pkgs: import ./devices {inherit pkgs self;});
|
||||
devShells = perSystem (pkgs: import ./devShells {inherit pkgs self;});
|
||||
packages = perSystem (pkgs: import ./packages {inherit pkgs self;});
|
||||
in {
|
||||
# Allow homie to serve a binary cache for the devices away from servivi
|
||||
aptDevices = recursiveUpdateList [aptDevices devShells];
|
||||
inherit apps devices devShells packages;
|
||||
|
||||
all = recursiveUpdateList [apps devices devShells packages];
|
||||
inherit apps devices devShells packages;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,13 @@
|
|||
{
|
||||
pkgs,
|
||||
self,
|
||||
onlyApt ? false,
|
||||
}: let
|
||||
inherit (pkgs.lib) elem filterAttrs mapAttrs' nameValuePair;
|
||||
inherit (pkgs.lib) filterAttrs mapAttrs' nameValuePair;
|
||||
|
||||
devices = filterAttrs (n: config: let
|
||||
isSameSystem = config.pkgs.system == pkgs.system;
|
||||
in
|
||||
if onlyApt
|
||||
then isSameSystem && elem n ["bbsteamie" "binto" "homie" "wim"]
|
||||
else isSameSystem)
|
||||
self.nixosConfigurations;
|
||||
devices =
|
||||
filterAttrs
|
||||
(n: config: config.pkgs.system == pkgs.system)
|
||||
self.nixosConfigurations;
|
||||
in
|
||||
mapAttrs'
|
||||
(name: config:
|
||||
|
|
Loading…
Reference in a new issue