storage: add snapraid
Plex Update / update (push) Successful in 1m53s Details
Lint / lint (push) Failing after 1m37s Details

reboot
Vivian 2023-12-29 02:23:21 +01:00
parent f59148622e
commit 0d56d1674c
4 changed files with 44 additions and 36 deletions

View File

@ -234,11 +234,11 @@
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1703781671,
"narHash": "sha256-sldUCqfp0E3AV82jJ2YLi0tbOajn9fg4+ms9naeAYKA=",
"lastModified": 1703800106,
"narHash": "sha256-PceYQ8qL0GsOMl22FBzJON1aZeFfj+HJqptGKEdT1EM=",
"owner": "jdonszelmann",
"repo": "essentials",
"rev": "6b10889113e4356e0b5d050874effb9b9f3d8903",
"rev": "49d5ed74bca121b9fb750f43e53c815dff61e223",
"type": "github"
},
"original": {

View File

@ -41,6 +41,8 @@ in {
fsType = "nfs";
};
systemd.services.rtorrent.after = [ "nfs-client.target" ];
services.flood = {
enable = true;
host = "0.0.0.0";

View File

@ -1,32 +1,13 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{ ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./fs.nix
];
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
./fs.nix
];
boot.loader.systemd-boot.enable = true;
networking.hostName = "storage"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Define a user account. Don't forget to set a password with passwd.
users.users.vivian = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
@ -36,12 +17,44 @@
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
services.nfs.server = {
enable = true;
exports = ''
/mnt/storage *(rw,async,no_subtree_check,fsid=0,all_squash,anonuid=0,anongid=0)
'';
};
services.snapraid = {
enable = true;
parityFiles =
[ "/mnt/parity1/snapraid.parity" "/mnt/parity2/snapraid.parity-2" ];
dataDisks = {
d1 = "/mnt/disk1";
d2 = "/mnt/disk2";
d3 = "/mnt/disk3";
d4 = "/mnt/disk4";
d5 = "/mnt/disk5";
d6 = "/mnt/disk6";
};
contentFiles = [
"/var/lib/snapraid/snapraid.content"
"/mnt/disk1/snapraid.content"
"/mnt/disk2/snapraid.content"
"/mnt/disk3/snapraid.content"
"/mnt/disk5/snapraid.content"
];
exclude = [
"/lost+found/"
"*.tmp"
"/tmp/"
"*.unrecoverable"
"/.Trash-1000/"
"/rancher/"
"/torrents/"
"/exclusion-zone/"
"/roms/"
"/roms/"
];
};
}

View File

@ -1,6 +1,6 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [ mergerfs ];
environment.systemPackages = with pkgs; [ mergerfs mergerfs-tools ];
fileSystems."/mnt/disk1" = {
fsType = "ext4";
@ -57,11 +57,4 @@
"category.create=mfs"
];
};
services.nfs.server = {
enable = true;
exports = ''
/mnt/storage *(rw,async,no_subtree_check,fsid=0,all_squash,anonuid=0,anongid=0)
'';
};
}