mirror of
https://github.com/zoriya/flake.git
synced 2026-08-15 18:43:42 +00:00
Add snapraid
This commit is contained in:
@@ -99,7 +99,11 @@
|
||||
|
||||
saikai = mkSystem "saikai" "server" [];
|
||||
|
||||
kadan = mkSystem "kadan" "server" [];
|
||||
kadan = mkSystem "kadan" "server" [
|
||||
({pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [tmux];
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -36,27 +36,27 @@
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/media/a" = {
|
||||
fileSystems."/mnt/a" = {
|
||||
device = "/dev/disk/by-label/sda";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/media/c" = {
|
||||
fileSystems."/mnt/c" = {
|
||||
device = "/dev/disk/by-label/sdc";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/media/d" = {
|
||||
fileSystems."/mnt/d" = {
|
||||
device = "/dev/disk/by-label/sdd";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/media/parity" = {
|
||||
fileSystems."/mnt/parity" = {
|
||||
device = "/dev/disk/by-label/parity";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ mergerfs ];
|
||||
fileSystems."/media/kyoo" = {
|
||||
device = "/media/a:/media/c:/media/d";
|
||||
depends = ["/media/a" "/media/c" "/media/d"];
|
||||
environment.systemPackages = with pkgs; [mergerfs];
|
||||
fileSystems."/mnt/kyoo" = {
|
||||
device = "/mnt/a:/mnt/c:/mnt/d";
|
||||
depends = ["/mnt/a" "/mnt/c" "/mnt/d"];
|
||||
fsType = "fuse.mergerfs";
|
||||
options = [
|
||||
"func.getattr=newest" # For kyoo's scanner
|
||||
@@ -66,6 +66,29 @@
|
||||
];
|
||||
};
|
||||
|
||||
snapraid = {
|
||||
enable = true;
|
||||
exclude = [
|
||||
"*.unrecoverable"
|
||||
"/tmp/"
|
||||
"/lost+found/"
|
||||
];
|
||||
dataDisks = {
|
||||
a = "/mnt/a/";
|
||||
c = "/mnt/c/";
|
||||
d = "/mnt/d/";
|
||||
};
|
||||
contentFiles = [
|
||||
"/var/snapraid.content"
|
||||
"/mnt/a/snapraid.content"
|
||||
"/mnt/c/snapraid.content"
|
||||
"/mnt/d/snapraid.content"
|
||||
];
|
||||
parityFiles = [
|
||||
"/mnt/parity/snapraid.parity"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||
"/var/snapraid.content"
|
||||
];
|
||||
users.zoriya = {
|
||||
directories = [
|
||||
|
||||
Reference in New Issue
Block a user