- system: Module describes core Linux system configuration parameters, and NixOS system parameters. - networking: Basic networking config for metal hosts. - sops: Configures sops-nix to decrypt secrets as appropriate, and provides a useful shell helper. - smb: Reusable module that returns one smb mount. - iscsi: Autoconnect and auto-mount iscsi target. - git: Basic Git config. - docker: Configure Docker. - hardware: Set of modules for physical hardware devices and their related configurations.
54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
{ pkgs, sys, ... }: {
|
|
|
|
sops.secrets."smb" = {
|
|
sopsFile = ./smb.secrets;
|
|
format = "binary";
|
|
key = "";
|
|
mode = "0440";
|
|
owner = sys.username;
|
|
};
|
|
environment.systemPackages = with pkgs; [ cifs-utils ];
|
|
fileSystems =
|
|
let
|
|
fsType = "cifs";
|
|
options = [
|
|
"x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=20s,x-systemd.mount-timeout=20s"
|
|
"credentials=/run/secrets/smb,uid=1000,gid=1000"
|
|
];
|
|
in {
|
|
"${sys.dataDirs.library.av}" = {
|
|
device = "//192.168.1.12/AV";
|
|
inherit fsType options;
|
|
};
|
|
"${sys.dataDirs.library.digitalModels}" = {
|
|
device = "//192.168.1.12/3DPrinting";
|
|
inherit fsType options;
|
|
};
|
|
"${sys.dataDirs.library.movies}" = {
|
|
device = "//192.168.1.12/Movies";
|
|
inherit fsType options;
|
|
};
|
|
"${sys.dataDirs.library.music}" = {
|
|
device = "//192.168.1.12/Music";
|
|
inherit fsType options;
|
|
};
|
|
"${sys.dataDirs.library.shows}" = {
|
|
device = "//192.168.1.12/Shows";
|
|
inherit fsType options;
|
|
};
|
|
"${sys.dataDirs.library.books}" = {
|
|
device = "//192.168.1.12/Text";
|
|
inherit fsType options;
|
|
};
|
|
"${sys.dataDirs.library.torrenting}" = {
|
|
device = "//192.168.1.12/Torrenting";
|
|
inherit fsType options;
|
|
};
|
|
"/mnt/archive" = {
|
|
device = "//192.168.1.12/Archive";
|
|
inherit fsType options;
|
|
};
|
|
|
|
};
|
|
}
|