mount a share
This commit is contained in:
parent
be29f3167a
commit
a9e45d5b17
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -0,0 +1 @@
|
|||
smb-secrets
|
|
@ -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?
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue