move services
This commit is contained in:
parent
128005e354
commit
feb53bc5fc
23 changed files with 28 additions and 28 deletions
51
modules/nixos/services/attic.nix
Normal file
51
modules/nixos/services/attic.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
atticPort = 7080;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
osbmModules.enableAttic = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable Attic nix cache service";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf config.osbmModules.enableAttic {
|
||||
services.atticd = {
|
||||
enable = true;
|
||||
environmentFile = "/persist/attic.env";
|
||||
settings = {
|
||||
listen = "[::]:${toString atticPort}";
|
||||
compression = {
|
||||
type = "zstd";
|
||||
level = 9;
|
||||
};
|
||||
# jwt = { };
|
||||
# storage = {
|
||||
# type = "local";
|
||||
# # path = "/data/atreus/attic";
|
||||
# # there is an issue
|
||||
# };
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ atticPort ];
|
||||
services.cloudflared.tunnels = {
|
||||
"fa301a21-b259-4149-b3d0-b1438c7c81f8" = {
|
||||
default = "http_status:404";
|
||||
credentialsFile = "/home/osbm/.cloudflared/fa301a21-b259-4149-b3d0-b1438c7c81f8.json";
|
||||
ingress = {
|
||||
"cache.osbm.dev" = {
|
||||
service = "http://localhost:${toString atticPort}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue