add garage server (not functional)

This commit is contained in:
2026-08-07 14:50:18 +02:00
parent 015a78fe35
commit ad700aa00f
9 changed files with 47 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
{
imports = [
./garage.nix
./smb.nix
./nfs.nix
];
}
+29
View File
@@ -0,0 +1,29 @@
{ pkgs, ... }:
{
services.garage = {
enable = false;
package = pkgs.garage;
environmentFile = "/home/user/garage_secrets";
settings = {
db_engine = "sqlite";
rpc_bind_addr = "0.0.0.0:3901";
# rpc_public_addr = "garage.example.com:3901";
replication_factor = 1;
s3_api = {
s3_region = "garage";
api_bind_addr = "0.0.0.0:3900";
};
# s3_web = {
# bind_addr = "0.0.0.0:3902";
# };
admin = {
api_bind_addr = "0.0.0.0:3903";
};
};
};
}
+15
View File
@@ -0,0 +1,15 @@
{
services.nfs.server = {
enable = true;
exports = {
"/media/music" = {
"192.168.132.0/24" = [
"rw"
"async"
"no_subtree_check"
"fsid=1"
];
};
};
};
}
+24
View File
@@ -0,0 +1,24 @@
{
services.samba = {
enable = true;
openFirewall = true;
settings = {
global = {
"workgroup" = "WORKGROUP";
"server string" = "smbnix";
"security" = "user";
"interfaces" = "lo eno1 tailscale0";
"hosts allow" = "192.168.132.0/24 100.64.0.0/10 127.0.0.1 localhost";
"hosts deny" = "0.0.0.0/0";
"guest account" = "nobody";
};
"Music" = {
"path" = "/media/music";
"browseable" = "yes";
"read only" = "no";
"guest ok" = "no";
"valid users" = "user";
};
};
};
}