Home

infra @7dbb0dae660bf459ec03d433723a772df59e723c - refs - log -
-
https://git.jolheiser.com/infra.git
dragonwell flake
infra / jasmine / services / cifs.nix
- raw -
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  pkgs,
  lib,
  config,
  ...
}:
let
  enable = true;
in
lib.mkIf enable {
  age.secrets.cifs.file = ../../secrets/cifs.age;
  environment.systemPackages = [ pkgs.cifs-utils ];
  fileSystems."/mnt/slideshow" = {
    device = "//192.168.40.244/slideshow";
    fsType = "cifs";
    options =
      let
        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=${config.age.secrets.cifs.path}" ];
  };
}