Added samba mount

This commit is contained in:
Jan-Bulthuis 2025-06-07 23:36:21 +02:00
parent 936d654877
commit f3abb6d2f3
2 changed files with 15 additions and 6 deletions

8
flake.lock generated
View File

@ -161,11 +161,11 @@
}, },
"secrets": { "secrets": {
"locked": { "locked": {
"lastModified": 1749133396, "lastModified": 1749332102,
"narHash": "sha256-St9GzTMi/Bx9Zs84LfNbcH7Qbs825UTg9hvzNg1ZI3A=", "narHash": "sha256-64n0gavIbrMXF4OJJMCLQ9YIZh14Nk95nXd8dz0Hb9I=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "51679f68977cb3246a02791a59841fa31659136e", "rev": "2f57d921b9fd90a6807102ad305844a6402131ac",
"revCount": 8, "revCount": 10,
"type": "git", "type": "git",
"url": "ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets" "url": "ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets"
}, },

View File

@ -1,4 +1,5 @@
{ {
inputs,
lib, lib,
pkgs, pkgs,
config, config,
@ -17,6 +18,14 @@
profiles.vm.enable = true; profiles.vm.enable = true;
}; };
# Setup NAS Backup Job # Setup NAS backups
environment.systemPackages = with pkgs; [ cifs-utils ];
sops.secrets."smb-credentials" = {
sopsFile = "${inputs.secrets}/secrets/vm-oddjob.enc.yaml";
};
fileSystems."/mnt/nas" = {
device = "//${inputs.secrets.lab.nas.host}/Backup";
fsType = "cifs";
options = [ "credentials=${config.sops.secrets."smb-credentials".path}" ];
};
} }