feat(nixosModules/server): add smb shares

This commit is contained in:
Mohammad Rafiq 2025-06-06 22:43:32 +08:00
parent 3dd00fedf0
commit 2b15a62f54
No known key found for this signature in database
3 changed files with 30 additions and 2 deletions

View file

@ -68,6 +68,26 @@
"x-systemd.mount-timeout=0"
];
};
fileSystems."/media/helios/rafiqcloud" = {
device = "//helios/rafiqcloud";
fsType = "cifs";
options = [
"x-systemd.automount"
"x-systemd.requires=tailscaled.service"
"x-systemd.mount-timeout=0"
"credentials=${config.sops.templates."smb-credentials".path}"
];
};
fileSystems."/media/helios/rafiqmedia" = {
device = "//helios/rafiqmedia";
fsType = "cifs";
options = [
"x-systemd.automount"
"x-systemd.requires=tailscaled.service"
"x-systemd.mount-timeout=0"
"credentials=${config.sops.templates."smb-credentials".path}"
];
};
})
];
}

View file

@ -13,12 +13,19 @@
"rafiq/hashedPassword".neededForUsers = true;
"rafiq/personalEmailPassword" = { };
"rafiq/workEmailPassword" = { };
"rafiq/oldSMBCredentials" = { };
"librechat/creds_key" = { };
"librechat/creds_iv" = { };
"librechat/jwt_secret" = { };
"librechat/jwt_refresh_secret" = { };
"librechat/meili_master_key" = { };
};
templates = {
"smb-credentials".content = ''
username=rafiq
password=${config.sops.placeholder."rafiq/oldSMBCredentials"}
'';
};
};
environment.shellInit = # sh
''

View file

@ -2,6 +2,7 @@ rafiq:
hashedPassword: ENC[AES256_GCM,data:SzzSPg5Ze4H+fVl6ZvAULO9FDfRehusmP6uldT4Ok2/9ZeOp9r4LgjKajoiw2A1DWD1zQ1GQwMCHKpeZjCC4rBUNWW5DMcBUJA==,iv:KktKuqr0JNhjeJIlIgkoAv6mP2dQlfQrXiIOASLPkbw=,tag:g9LarkT6EjDrH+dXSjMwPg==,type:str]
personalEmailPassword: ENC[AES256_GCM,data:TGJtDO++QcWqU1AbLe4=,iv:RjLRmq7fdbVRbv0M8ZQHyCK5l95JW3TRjN5w9Ci92zs=,tag:JibrH863smajCXESwhAR4g==,type:str]
workEmailPassword: ENC[AES256_GCM,data:++Gm9dIhmqEQz3+Ej9c=,iv:dAvyyLZvsHcjudU4gdU0iyWYDjjhe49UC2swHh++ldc=,tag:6o1DyJk5WOFO/Hfr0uMKSw==,type:str]
oldSMBCredentials: ENC[AES256_GCM,data:aY41trUJcvGa584H0A==,iv:3h9AZ33HXWT4D/vGMyy/o+TXyGg75Ixcj3+h2EskvIQ=,tag:dDo55h1ljOYLZBHn9bK7ew==,type:str]
keys:
tailscale: ENC[AES256_GCM,data:sW64TZY/GtWD+8KOQDHYvnwzWiqOlsJ5782utaxVwUaiWa18hU+Ppd3gp/8f0R3rK6gskaPC22iuCuzvuA==,iv:TN2zWKgU6eXH3uaL7Ci2JKmo8Ql4DUSWS3Lxfnag7j4=,tag:s5of4wLdCp6b5VMGWLLxvw==,type:str]
gemini: ENC[AES256_GCM,data:t4XTzJLMbHBG7LNaWMwO0YyYHREYOp4Zn95Kwshunnpwq9ezVv+0,iv:ZHq1ytak7Qy5a/zHghwEIWRinDWAkk2Vxw4iu/Q/UPk=,tag:Wyk0FqLTOWelznWHg/anxg==,type:str]
@ -27,7 +28,7 @@ sops:
WXFKbjNMWDF0LzNyekJJMGFva2diemcKQTc8ODuK6IWqRhulHiCF92aU+3p23riY
M94Nzh+VT6QTFOgb3J7bBJMLhRH/fkQb6L6ia2n9QrVXFyYYMJ0oBw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-06-05T10:02:05Z"
mac: ENC[AES256_GCM,data:V0mLHIKpivYFCLwdaFE5+z2fq6EsvuYw6GAk4CWRDxfdLz+TBRdZTf3qCICK6ArxL0Cy6U/yspCEWyDObKdLQdZ3DUgcW/I3jZWvTeJwubQpQx+wP0GYRFjYHYH16gj3iCLUekYhjXZXQz1x3ANyZExtynP7zu+sWHoQpeQfNv8=,iv:Iid240sxUSRfzwUIQeZfnspN1GqI0e410wQnlCH5xkk=,tag:Fs2+fZUjvLDqjJ5xgPFRwQ==,type:str]
lastmodified: "2025-06-06T13:37:24Z"
mac: ENC[AES256_GCM,data:WkWsBTMQcJlvTPjAVDP24CEvE68KJj9s762ks+xtQHLvtepq0upQrGkJ8li5JZfnwSBHJikgZCEZD/PIbthx5u6Z5LjGsHjYGzRMIuRh0vjloHBCc5awdl1B6v5ebTtM6eA+YgHeHT4BcyRReM4fpKBk4SedR84mnBnX/WxfGfE=,iv:DRABRFDYbOpqL7ZzJK/xJTbA9hsbE3iEvAx/Ugc7I10=,tag:mwN17/+gr6e7y53PxaJl8Q==,type:str]
unencrypted_suffix: _unencrypted
version: 3.10.2