feat: add binary cache at apartment
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
1fd44269a2
commit
f4c78791ea
6 changed files with 45 additions and 7 deletions
|
@ -86,6 +86,7 @@ in {
|
|||
"Immich" = mkPublicReverseProxy "photos" "${nosIP}:2283" {};
|
||||
|
||||
"Binary Cache" = mkPublicReverseProxy "cache" "${serviviIP}:5000" {};
|
||||
"Apt Binary Cache" = mkPublicReverseProxy "cache-apt" "${homieIP}:5000" {};
|
||||
|
||||
# Private
|
||||
"nelim.org" = {
|
||||
|
|
34
devices/homie/modules/binary-cache.nix
Normal file
34
devices/homie/modules/binary-cache.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
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.${pkgs.system}.aptDevices "$@"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = secrets.apt-binary-cache-key.path;
|
||||
};
|
||||
|
||||
environment.systemPackages = [pkgs.nix-fast-build nixFastBuild];
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./binary-cache.nix
|
||||
./home-assistant
|
||||
./music
|
||||
];
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
# FIXME: add binary cache at apartment
|
||||
inherit (builtins) attrValues;
|
||||
inherit (config.sops) secrets;
|
||||
|
||||
|
|
8
flake.lock
generated
8
flake.lock
generated
|
@ -1751,11 +1751,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732334065,
|
||||
"narHash": "sha256-aY2cEb6lk3a9f2oyRMapL2blMhhGYsXFugkcfdwQD1Y=",
|
||||
"lastModified": 1733937508,
|
||||
"narHash": "sha256-ofy6Hm/cBDtUndoGxWaQIkemrV4eRiCzcNDDkTQdcb0=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "f195d607723059bf3ca20080455366bfdd4e5aa8",
|
||||
"revCount": 83,
|
||||
"rev": "55f7f1baed171e6f3967c281ac81cf089b02176f",
|
||||
"revCount": 84,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.nelim.org/matt1432/nixos-secrets"
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) foldl isList mergeAttrsWithFunc mkIf optionals unique;
|
||||
inherit (lib) elem foldl isList mergeAttrsWithFunc mkIf optionals unique;
|
||||
|
||||
cfg = config.roles.base;
|
||||
|
||||
|
@ -42,8 +42,11 @@ in
|
|||
(mkSubstituterConf "https://viperml.cachix.org" "viperml.cachix.org-1:qZhKBMTfmcLL+OG6fj/hzsMEedgKvZVFRRAhq7j8Vh8=")
|
||||
(mkSubstituterConf "https://cuda-maintainers.cachix.org" "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=")
|
||||
]
|
||||
++ optionals (!config.services.nix-serve.enable) [
|
||||
++ optionals (config.networking.hostName != "servivi") [
|
||||
(mkSubstituterConf "https://cache.nelim.org" "cache.nelim.org:JmFqkUdH11EA9EZOFAGVHuRYp7EbsdJDHvTQzG2pPyY=")
|
||||
]
|
||||
++ optionals (elem config.networking.hostName ["bbsteamie" "binto" "wim"]) [
|
||||
(mkSubstituterConf "https://cache-apt.nelim.org" "cache-apt.nelim.org:NLAsWxa2Qbm4b+hHimjCpZfm48a4oN4O/GPZY9qpjNw=")
|
||||
]);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue