35 lines
783 B
Nix
35 lines
783 B
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
imports = with lib.nixosModules; [secrets];
|
|
|
|
sops = {
|
|
secrets = {
|
|
sb1-username.sopsFile = lib.secrets.sb1;
|
|
sb1-password.sopsFile = lib.secrets.sb1;
|
|
};
|
|
templates.sb1-credentials.content = ''
|
|
username=${config.sops.placeholder.sb1-username}
|
|
password=${config.sops.placeholder.sb1-password}
|
|
'';
|
|
};
|
|
|
|
fileSystems."/mnt/sb1" = {
|
|
device = "//u424050.your-storagebox.de/backup";
|
|
fsType = "cifs";
|
|
options = [
|
|
"x-systemd.automount"
|
|
"noauto"
|
|
"x-systemd.idle-timeout=60"
|
|
"x-systemd.device-timeout=5s"
|
|
"x-systemd.mount-timeout=5s"
|
|
"credentials=${config.sops.templates.sb1-credentials.path}"
|
|
];
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [cifs-utils];
|
|
}
|