hosts: jupiter: move all nas to jupiter

This commit is contained in:
Kabbone 2023-10-01 20:24:46 +02:00
parent 405a67f440
commit a54f8fbbaa
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY
4 changed files with 60 additions and 65 deletions

View File

@ -101,7 +101,7 @@
};
fileSystems."/mnt/Pluto" =
{ device = "nas:/Pluto";
{ device = "jupiter:/Pluto";
fsType = "nfs";
options = [ "noauto,users,x-systemd.automount,x-systemd.device-timeout=10,soft,timeo=14,x-systemd.idle-timeout=1min,sec=sys,exec,nfsvers=4.2" ];
};

View File

@ -58,7 +58,7 @@
};
services = {
#auto-cpufreq.enable = true;
qemuGuest.enable = true;
avahi = { # Needed to find wireless printer
enable = true;
nssmdns = true;

View File

@ -19,20 +19,16 @@
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
# boot.initrd.secrets = {
# "/root/NASKeyfile" =
# /root/NASKeyfile;
# };
# boot.initrd.luks.devices = {
# NAS-RAID1 = {
# device = "/dev/disk/by-uuid/57e6446d-faca-4b67-9063-e8d9afb80088";
# keyFile = "/root/NASKeyfile";
# };
# NAS-RAID2 = {
# device = "/dev/disk/by-uuid/b9edc489-ac37-4b28-981d-442722df7ae2";
# keyFile = "/root/NASKeyfile";
# };
# };
boot.initrd.secrets = {
"/root/NASKeyfile" =
/root/NASKeyfile;
};
boot.initrd.luks.devices = {
NAS-RAID1 = {
device = "/dev/disk/by-uuid/57e6446d-faca-4b67-9063-e8d9afb80088";
keyFile = "/root/NASKeyfile";
};
};
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.tmp.useTmpfs = false;
@ -45,7 +41,7 @@
fileSystems = [
"/"
"/mnt/Mars"
# "/mnt/Pluto"
"/mnt/Pluto"
];
};
@ -81,33 +77,33 @@
};
};
};
# lf = {
# onCalendar = "daily";
# settings = {
# incremental = "yes";
# snapshot_create = "ondemand";
# snapshot_dir = "@snapshots";
# timestamp_format = "long";
#
# snapshot_preserve = "2m 2w 5d";
# snapshot_preserve_min = "latest";
#
# volume = {
# "/mnt/snapshots/Pluto" = {
# snapshot_create = "always";
# subvolume = {
# "@" = {};
# "@/Backups" = {};
# "@/Games" = {};
# "@/IT" = {};
# "@/Media" = {};
# "@/Pictures" = {};
# "@/Rest" = {};
# };
# };
# };
# };
# };
lf = {
onCalendar = "daily";
settings = {
incremental = "yes";
snapshot_create = "ondemand";
snapshot_dir = "@snapshots";
timestamp_format = "long";
snapshot_preserve = "2m 2w 5d";
snapshot_preserve_min = "latest";
volume = {
"/mnt/snapshots/Pluto" = {
snapshot_create = "always";
subvolume = {
"@" = {};
"@/Backups" = {};
"@/Games" = {};
"@/IT" = {};
"@/Media" = {};
"@/Pictures" = {};
"@/Rest" = {};
};
};
};
};
};
};
};
@ -153,18 +149,18 @@
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvolid=5,discard=async" ];
};
# fileSystems."/mnt/snapshots/Pluto" =
# { device = "/dev/disk/by-label/NAS-RAID";
# fsType = "btrfs";
# options = [ "compress=zstd,space_cache=v2,noatime,subvolid=5" ];
# };
#
# fileSystems."/mnt/Pluto" =
# { device = "/dev/disk/by-label/NAS-RAID";
# fsType = "btrfs";
# options = [ "compress=zstd,space_cache=v2,noatime,subvol=@" ];
# };
#
fileSystems."/mnt/snapshots/Pluto" =
{ device = "/dev/disk/by-label/NAS-RAID";
fsType = "btrfs";
options = [ "compress=zstd,space_cache=v2,noatime,subvolid=5" ];
};
fileSystems."/mnt/Pluto" =
{ device = "/dev/disk/by-label/NAS-RAID";
fsType = "btrfs";
options = [ "compress=zstd,space_cache=v2,noatime,subvol=@" ];
};
fileSystems."/mnt/Mars" =
{ device = "/dev/disk/by-label/MARS";
fsType = "btrfs";
@ -176,10 +172,10 @@
fsType = "vfat";
};
# fileSystems."/export/Pluto" =
# { device = "/mnt/Pluto";
# options = [ "bind" ];
# };
fileSystems."/export/Pluto" =
{ device = "/mnt/Pluto";
options = [ "bind" ];
};
fileSystems."/export/Mars" =
{ device = "/mnt/Mars";
@ -229,10 +225,9 @@
cpuFreqGovernor = lib.mkDefault "powersave";
powertop.enable = true;
scsiLinkPolicy = "med_power_with_dipm";
# powerUpCommands = ''
# ${pkgs.hdparm}/sbin/hdparm -S 150 /dev/disk/by-uuid/57e6446d-faca-4b67-9063-e8d9afb80088
# ${pkgs.hdparm}/sbin/hdparm -S 150 /dev/disk/by-uuid/b9edc489-ac37-4b28-981d-442722df7ae2
# '';
powerUpCommands = ''
${pkgs.hdparm}/sbin/hdparm -S 150 /dev/disk/by-uuid/57e6446d-faca-4b67-9063-e8d9afb80088
'';
};
}

View File

@ -11,7 +11,7 @@
};
# open the firewall
networking.firewall = {
interfaces.lo1 = {
interfaces.enp6s18 = {
allowedTCPPorts = [ 2049 ];
};
};