playing with filesystems for remote mounts

This commit is contained in:
Matt Nish-Lapidus 2025-02-11 21:33:46 -05:00
parent b6c81fd346
commit 7685f865f8
4 changed files with 50 additions and 8 deletions

View file

@ -62,6 +62,32 @@
};
};
sops = {
age.keyFile = "/home/emenel/.config/sops/age/keys.txt"; # must have no password!
defaultSopsFile = ./secrets.yaml;
secrets = {
filez = {};
};
templates."smb-secrets".content = ''
username=admin
password=${config.sops.placeholder.filez}
'';
};
environment.etc = {
"nixos/smb-secrets".source = config.sops.templates."smb-secrets".path;
};
fileSystems."/mnt/media" = {
device = "//100.70.114.113";
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=/etc/nixos/smb-secrets"];
};
environment.systemPackages = with pkgs; [
wget
libGL
@ -630,12 +656,6 @@
];
};
# fileSystems."/mnt/media" = {
# device = "//filez.local/Media";
# type = "cifs";
# };
#do not change
system.stateVersion = "24.05";