refactor: organizing some imports
This commit is contained in:
parent
c4f7a64329
commit
db319ed5af
8 changed files with 184 additions and 95 deletions
|
|
@ -1,33 +1,68 @@
|
|||
{...}: {
|
||||
fileSystems = {
|
||||
"/media" = {
|
||||
device = "192.168.10.2:/mnt/tank/media";
|
||||
fsType = "nfs";
|
||||
options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
|
||||
};
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
nfs.enable = lib.mkEnableOption "Enables NFS and sets up mounts";
|
||||
};
|
||||
|
||||
"/books" = {
|
||||
device = "192.168.10.2:/mnt/tank/books";
|
||||
fsType = "nfs";
|
||||
options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
|
||||
};
|
||||
config = lib.mkIf config.nfs.enable {
|
||||
fileSystems = {
|
||||
"/media" = {
|
||||
device = "192.168.10.2:/mnt/tank/media";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"x-systemd.after=network-online.target"
|
||||
"x-systemd.mount-timeout=90"
|
||||
];
|
||||
};
|
||||
|
||||
"/music" = {
|
||||
device = "192.168.10.2:/mnt/tank/music";
|
||||
fsType = "nfs";
|
||||
options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
|
||||
};
|
||||
"/books" = {
|
||||
device = "192.168.10.2:/mnt/tank/books";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"x-systemd.after=network-online.target"
|
||||
"x-systemd.mount-timeout=90"
|
||||
];
|
||||
};
|
||||
|
||||
"/projects" = {
|
||||
device = "192.168.10.2:/mnt/tank/projects";
|
||||
fsType = "nfs";
|
||||
options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
|
||||
};
|
||||
"/music" = {
|
||||
device = "192.168.10.2:/mnt/tank/music";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"x-systemd.after=network-online.target"
|
||||
"x-systemd.mount-timeout=90"
|
||||
];
|
||||
};
|
||||
|
||||
"/backups" = {
|
||||
device = "192.168.10.2:/mnt/tank/backups";
|
||||
fsType = "nfs";
|
||||
options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
|
||||
"/projects" = {
|
||||
device = "192.168.10.2:/mnt/tank/projects";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"x-systemd.after=network-online.target"
|
||||
"x-systemd.mount-timeout=90"
|
||||
];
|
||||
};
|
||||
|
||||
"/backups" = {
|
||||
device = "192.168.10.2:/mnt/tank/backups";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
"x-systemd.after=network-online.target"
|
||||
"x-systemd.mount-timeout=90"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue