diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index ecf4b2d..b05dde6 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -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" ]; }; diff --git a/hosts/jupiter/default.nix b/hosts/jupiter/default.nix index 83d5271..a82bc42 100644 --- a/hosts/jupiter/default.nix +++ b/hosts/jupiter/default.nix @@ -58,7 +58,7 @@ }; services = { - #auto-cpufreq.enable = true; + qemuGuest.enable = true; avahi = { # Needed to find wireless printer enable = true; nssmdns = true; diff --git a/hosts/jupiter/hardware-configuration.nix b/hosts/jupiter/hardware-configuration.nix index 440f54d..9df0bae 100644 --- a/hosts/jupiter/hardware-configuration.nix +++ b/hosts/jupiter/hardware-configuration.nix @@ -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 + ''; }; } diff --git a/modules/services/nas/nfs.nix b/modules/services/nas/nfs.nix index 882e067..19a1550 100644 --- a/modules/services/nas/nfs.nix +++ b/modules/services/nas/nfs.nix @@ -11,7 +11,7 @@ }; # open the firewall networking.firewall = { - interfaces.lo1 = { + interfaces.enp6s18 = { allowedTCPPorts = [ 2049 ]; }; };