From a9e45d5b175aee9e73c62867a13688c2b4e9d9df Mon Sep 17 00:00:00 2001 From: able Date: Wed, 4 Oct 2023 04:52:32 -0500 Subject: [PATCH] mount a share --- .gitignore | 1 + configuration.nix | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e69de29..ac07250 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +smb-secrets \ No newline at end of file diff --git a/configuration.nix b/configuration.nix index f0055ee..39e3778 100644 --- a/configuration.nix +++ b/configuration.nix @@ -388,6 +388,21 @@ "inode/directory" = [ "nemo.desktop" "code.desktop" ]; }; + services.gvfs.enable = true; + environment.systemPackages = [ pkgs.cifs-utils ]; + fileSystems."/home/able/Documents/media" = { + device = "//10.0.0.28/media/"; + fsType = "cifs"; + options = + let + # this line prevents hanging on network split + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; + + in + [ + "${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100" + ]; + }; # Enable the OpenSSH daemon. # services.openssh.enable = true; @@ -403,5 +418,9 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "22.11"; # Did you read the comment? + system.stateVersion = " + 22.11 + "; # Did you read the comment? } + +