From f3abb6d2f39e921fa58cebd341677c139c34de1a Mon Sep 17 00:00:00 2001 From: Jan-Bulthuis Date: Sat, 7 Jun 2025 23:36:21 +0200 Subject: [PATCH] Added samba mount --- flake.lock | 8 ++++---- hosts/vm-oddjob/configuration.nix | 13 +++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 0c06948..74c1b8f 100644 --- a/flake.lock +++ b/flake.lock @@ -161,11 +161,11 @@ }, "secrets": { "locked": { - "lastModified": 1749133396, - "narHash": "sha256-St9GzTMi/Bx9Zs84LfNbcH7Qbs825UTg9hvzNg1ZI3A=", + "lastModified": 1749332102, + "narHash": "sha256-64n0gavIbrMXF4OJJMCLQ9YIZh14Nk95nXd8dz0Hb9I=", "ref": "refs/heads/main", - "rev": "51679f68977cb3246a02791a59841fa31659136e", - "revCount": 8, + "rev": "2f57d921b9fd90a6807102ad305844a6402131ac", + "revCount": 10, "type": "git", "url": "ssh://gitea@git.bulthuis.dev/Jan/nixos-secrets" }, diff --git a/hosts/vm-oddjob/configuration.nix b/hosts/vm-oddjob/configuration.nix index e49b92d..adf9df9 100644 --- a/hosts/vm-oddjob/configuration.nix +++ b/hosts/vm-oddjob/configuration.nix @@ -1,4 +1,5 @@ { + inputs, lib, pkgs, config, @@ -17,6 +18,14 @@ 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}" ]; + }; }