Compare commits

..

No commits in common. "41de261af01e04fe98151697f96a850c7881b989" and "60797335fe75aae3f587cadf7f3ffc65ad54132e" have entirely different histories.

5 changed files with 113 additions and 135 deletions

View file

@ -16,11 +16,9 @@
./modules/navidrome.nix ./modules/navidrome.nix
./modules/feishin.nix ./modules/feishin.nix
./modules/tvproxy.nix ./modules/tvproxy.nix
#./modules/calibre-web.nix ./modules/calibre-web.nix
./modules/borg.nix ./modules/borg.nix
./modules/nctest.nix ./modules/nctest.nix
./modules/encode
./modules/lancache.nix
]; ];
system.autoUpgrade = { system.autoUpgrade = {
@ -30,15 +28,13 @@
sops.secrets."authentik/proxy/nasty" = {}; sops.secrets."authentik/proxy/nasty" = {};
services.authentik-proxy.token = builtins.readFile config.sops.secrets."authentik/proxy/nasty".path; services.authentik-proxy.token = builtins.readFile config.sops.secrets."authentik/proxy/nasty".path;
services.nginx.defaultListen = [ { addr = "192.168.178.2"; } ]; # to not occupy the port for the lancache ip
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
mediainfo mediainfo
mergerfs mergerfs
mergerfs-tools mergerfs-tools
filezilla filezilla
firefox firefox
ffmpeg_7-full ffmpeg_6-full
_7zz _7zz
]; ];
@ -46,7 +42,7 @@
users.users.mc-fucker.extraGroups = [ "render" ]; users.users.mc-fucker.extraGroups = [ "render" ];
zramSwap.memoryPercent = 100; zramSwap.memoryPercent = 50;
programs.atop.netatop.enable = false; programs.atop.netatop.enable = false;
programs.java.enable = true; programs.java.enable = true;

View file

@ -1,25 +1,20 @@
{ ... }: { ... }:
let
btrfsOpt = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=10m" ];
in
{ {
environment.etc.crypttab = { environment.etc.crypttab = {
text = '' text = ''
1EJZN6MZ UUID=da1abbcf-69ef-4bbf-847f-5df0c2a321f9 /var/lib/keyfiles/da1abbcf-69ef-4bbf-847f-5df0c2a321f9 nofail 1EJZN6MZ UUID=8264b529-17a9-4167-8e34-3774b5074a4e /var/lib/keyfiles/8264b529-17a9-4167-8e34-3774b5074a4e nofail
1EKR513Z UUID=9dfd833d-b79f-478b-9c07-e6730f88b02f /var/lib/keyfiles/9dfd833d-b79f-478b-9c07-e6730f88b02f nofail 1EKR513Z UUID=80483157-7aa4-42a4-af5d-bbd7474a29b3 /var/lib/keyfiles/80483157-7aa4-42a4-af5d-bbd7474a29b3 nofail
1EKVK21Z UUID=7d1b1146-a50e-405e-8d3e-df0d1fbc9451 /var/lib/keyfiles/7d1b1146-a50e-405e-8d3e-df0d1fbc9451 nofail 1EKVK21Z UUID=438e7e6b-4faa-4fc5-b7ba-3d7af0c9e184 /var/lib/keyfiles/438e7e6b-4faa-4fc5-b7ba-3d7af0c9e184 nofail
43P0A00AFJDH UUID=eff697b4-86bc-4a0e-833f-cc40e6aa001e /var/lib/keyfiles/eff697b4-86bc-4a0e-833f-cc40e6aa001e nofail 43P0A00AFJDH UUID=eff697b4-86bc-4a0e-833f-cc40e6aa001e /var/lib/keyfiles/eff697b4-86bc-4a0e-833f-cc40e6aa001e nofail
43P0A00FFJDH UUID=69dc9bb1-f180-43f1-9f98-48ca592278bf /var/lib/keyfiles/69dc9bb1-f180-43f1-9f98-48ca592278bf nofail 43P0A00FFJDH UUID=eae95261-2600-4935-93ba-6cd8e54773e0 /var/lib/keyfiles/eae95261-2600-4935-93ba-6cd8e54773e0 nofail
53F0A0SBFJDH UUID=d228e44f-fe1f-4eee-8415-289583ddec99 /var/lib/keyfiles/d228e44f-fe1f-4eee-8415-289583ddec99 nofail 53F0A0SBFJDH UUID=f443a535-ca5a-4093-9f29-6ab0699e3527 /var/lib/keyfiles/f443a535-ca5a-4093-9f29-6ab0699e3527 nofail
53G0A2AXFJDH UUID=dd66940c-aa6e-460a-9e55-7dd08247a792 /var/lib/keyfiles/dd66940c-aa6e-460a-9e55-7dd08247a792 nofail 53G0A2AXFJDH UUID=2fc7874c-ef0e-41d7-85f6-a8364041c51b /var/lib/keyfiles/2fc7874c-ef0e-41d7-85f6-a8364041c51b nofail
53J0A016FJDH UUID=95f84b21-d3d3-4241-8a9b-5ac46afea1e1 /var/lib/keyfiles/95f84b21-d3d3-4241-8a9b-5ac46afea1e1 nofail 53J0A016FJDH UUID=95f84b21-d3d3-4241-8a9b-5ac46afea1e1 /var/lib/keyfiles/95f84b21-d3d3-4241-8a9b-5ac46afea1e1 nofail
92F0A079FJDH UUID=9af505c3-69cc-4954-93fd-fe625a882b28 /var/lib/keyfiles/9af505c3-69cc-4954-93fd-fe625a882b28 nofail 92F0A079FJDH UUID=b915263e-082d-4954-845d-4bdf4fbf049a /var/lib/keyfiles/b915263e-082d-4954-845d-4bdf4fbf049a nofail
X2N0A0AXFJDH UUID=7b46d2e3-09da-4ef6-987f-6ffcabf79537 /var/lib/keyfiles/7b46d2e3-09da-4ef6-987f-6ffcabf79537 nofail X2N0A0AXFJDH UUID=60e3e109-d7e0-4587-ba08-ba69eb6cd957 /var/lib/keyfiles/60e3e109-d7e0-4587-ba08-ba69eb6cd957 nofail
X2N0A0AZFJDH UUID=db05ac12-2a2b-4baf-8bf0-94a3e5c9ba9e /var/lib/keyfiles/db05ac12-2a2b-4baf-8bf0-94a3e5c9ba9e nofail X2N0A0AZFJDH UUID=d57c6d8f-26cd-4387-8aaa-37dcedb1eadf /var/lib/keyfiles/d57c6d8f-26cd-4387-8aaa-37dcedb1eadf nofail
ZA1D9307 UUID=79f2d993-6862-4f9c-ba2d-88f49286e356 /var/lib/keyfiles/79f2d993-6862-4f9c-ba2d-88f49286e356 nofail ZA1D9307 UUID=4d4621d3-0b75-4779-8548-a4836e68469e /var/lib/keyfiles/4d4621d3-0b75-4779-8548-a4836e68469e nofail
ZVV0688G UUID=8a14aa76-5138-4cd0-8f31-0aafe63e870b /var/lib/keyfiles/8a14aa76-5138-4cd0-8f31-0aafe63e870b nofail
ZVV072JR UUID=416f1016-b849-4bc8-a078-4b1426788c6c /var/lib/keyfiles/416f1016-b849-4bc8-a078-4b1426788c6c nofail
''; '';
#unused #unused
}; };
@ -28,6 +23,7 @@ in
"/" = { "/" = {
device = "/dev/disk/by-uuid/ad716602-9e0d-4c07-9fb5-e15cb6df3004"; device = "/dev/disk/by-uuid/ad716602-9e0d-4c07-9fb5-e15cb6df3004";
fsType = "ext4"; fsType = "ext4";
#options = [ "compress-force=zstd" ];
}; };
"/boot/efi" = { "/boot/efi" = {
@ -39,92 +35,80 @@ in
"/mnt/drives/1EJZN6MZ" = { "/mnt/drives/1EJZN6MZ" = {
label = "1EJZN6MZ"; label = "1EJZN6MZ";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/1EKR513Z" = { "/mnt/drives/1EKR513Z" = {
label = "1EKR513Z"; label = "1EKR513Z";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/1EKVK21Z" = { "/mnt/drives/1EKVK21Z" = {
label = "1EKVK21Z"; label = "1EKVK21Z";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/53F0A0SBFJDH" = { "/mnt/drives/53F0A0SBFJDH" = {
label = "53F0A0SBFJDH"; label = "53F0A0SBFJDH";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/53G0A2AXFJDH" = { "/mnt/drives/53G0A2AXFJDH" = {
label = "53G0A2AXFJDH"; label = "53G0A2AXFJDH";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/53J0A016FJDH" = { "/mnt/drives/53J0A016FJDH" = {
label = "53J0A016FJDH"; label = "53J0A016FJDH";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/92F0A079FJDH" = { "/mnt/drives/92F0A079FJDH" = {
label = "92F0A079FJDH"; label = "92F0A079FJDH";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/43P0A00FFJDH" = { "/mnt/drives/43P0A00FFJDH" = {
label = "43P0A00FFJDH"; label = "43P0A00FFJDH";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/43P0A00AFJDH" = { "/mnt/drives/43P0A00AFJDH" = {
label = "43P0A00AFJDH"; label = "43P0A00AFJDH";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/X2N0A0AXFJDH" = { "/mnt/drives/X2N0A0AXFJDH" = {
label = "X2N0A0AXFJDH"; label = "X2N0A0AXFJDH";
fsType = "btrfs"; fsType = "ext4";
options = btrfsOpt; options = [ "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/X2N0A0AZFJDH" = { "/mnt/drives/X2N0A0AZFJDH" = {
label = "X2N0A0AZFJDH"; label = "X2N0A0AZFJDH";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
}; };
"/mnt/drives/ZA1D9307" = { "/mnt/drives/ZA1D9307" = {
label = "ZA1D9307"; label = "ZA1D9307";
fsType = "btrfs"; fsType = "btrfs";
options = btrfsOpt; options = [ "compress-force=zstd" "nofail" "x-systemd.mount-timeout=5m" ];
};
"/mnt/drives/ZVV0688G" = {
label = "ZVV0688G";
fsType = "btrfs";
options = btrfsOpt;
};
"/mnt/drives/ZVV072JR" = {
label = "ZVV072JR";
fsType = "btrfs";
options = btrfsOpt;
}; };
"/mnt/mergerfs" = { "/mnt/mergerfs" = {
device = "/mnt/drives/ZVV0688G:/mnt/drives/ZVV072JR:/mnt/drives/53F0A0SBFJDH:/mnt/drives/X2N0A0AZFJDH:/mnt/drives/53G0A2AXFJDH:/mnt/drives/92F0A079FJDH:/mnt/drives/X2N0A0AXFJDH:/mnt/drives/43P0A00FFJDH:/mnt/drives/ZA1D9307:/mnt/drives/1EJZN6MZ:/mnt/drives/1EKR513Z:/mnt/drives/1EKVK21Z"; device = "/mnt/drives/X2N0A0AXFJDH:/mnt/drives/92F0A079FJDH:/mnt/drives/43P0A00FFJDH:/mnt/drives/43P0A00AFJDH:/mnt/drives/53J0A016FJDH:/mnt/drives/53F0A0SBFJDH:/mnt/drives/53G0A2AXFJDH:/mnt/drives/1EKVK21Z:/mnt/drives/1EJZN6MZ:/mnt/drives/1EKR513Z";
fsType = "fuse.mergerfs"; fsType = "fuse.mergerfs";
options = [ "cache.files=full,,dropcacheonclose=true,category.create=mfs" "nofail" ]; options = [ "cache.files=full,,dropcacheonclose=true,category.create=mfs" "nofail" ];
depends = [ "/mnt/drives/ZVV0688G" "/mnt/drives/ZVV072JR" "/mnt/drives/53F0A0SBFJDH" "/mnt/drives/X2N0A0AZFJDH" "/mnt/drives/53G0A2AXFJDH" "/mnt/drives/92F0A079FJDH" "/mnt/drives/X2N0A0AXFJDH" "/mnt/drives/43P0A00FFJDH" "/mnt/drives/ZA1D9307" "/mnt/drives/1EJZN6MZ" "/mnt/drives/1EKR513Z" "/mnt/drives/1EKVK21Z" ]; depends = [ "/mnt/drives/X2N0A0AXFJDH" "/mnt/drives/92F0A079FJDH" "/mnt/drives/43P0A00FFJDH" "/mnt/drives/43P0A00AFJDH" "/mnt/drives/53J0A016FJDH" "/mnt/drives/53F0A0SBFJDH" "/mnt/drives/53G0A2AXFJDH" "/mnt/drives/1EKVK21Z" "/mnt/drives/1EJZN6MZ" "/mnt/drives/1EKR513Z" ];
}; };
#"/mnt/box" = { #"/mnt/box" = {
@ -139,7 +123,6 @@ in
enable = true; enable = true;
exports = '' exports = ''
/mnt/mergerfs 100.64.0.13(no_subtree_check,fsid=0) /mnt/mergerfs 100.64.0.13(no_subtree_check,fsid=0)
/mnt/mergerfs 100.64.0.7(no_subtree_check,fsid=0)
''; '';
}; };

View file

@ -19,9 +19,6 @@
boot.loader.efi.efiSysMountPoint = "/boot/efi"; boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernel.sysctl = {
"kernel.hung_task_timeout_secs" = 600;
};
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''
options usb-storage quirks=174c:1356:u options usb-storage quirks=174c:1356:u
@ -58,17 +55,9 @@
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
#networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp86s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp86s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true; # networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
networking.interfaces.enp86s0 = {
useDHCP = true;
ipv4.addresses = [
{ address = "192.168.178.53";
prefixLength = 24;
}
];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";

View file

@ -2,12 +2,14 @@
{ {
users.groups = { users.groups = {
dummesos = { gid = 1100; }; dummesos = { gid = 1100; };
juju = { gid = 1101; };
}; };
users.users = { users.users = {
dummesos = { uid = 1100; isSystemUser = true; group = "dummesos";}; dummesos = {
juju = { uid = 1101; isSystemUser = true; group = "juju";}; uid = 1100;
isSystemUser = true;
group = "dummesos";
};
}; };
services.samba-wsdd = { services.samba-wsdd = {
@ -44,6 +46,10 @@
path = "/mnt/mergerfs/media/Serien"; path = "/mnt/mergerfs/media/Serien";
"guest ok" = "yes"; "guest ok" = "yes";
}; };
#"software" = {
# path = "/mnt/mergerfs/media/software";
# "guest ok" = "yes";
#};
}; };
}; };

View file

@ -6,57 +6,7 @@ let
in in
{ {
#systemd.timers."snapraid-sync".enable = false; #temporarily #systemd.timers."snapraid-sync".enable = false; #temporarily
services.snapraid = { #services.snapraid = {
enable = true;
scrub.plan = 5;
parityFiles = [
"/mnt/drives/43P0A00AFJDH/snapraid1.parity"
"/mnt/drives/53J0A016FJDH/snapraid2.parity"
];
dataDisks = {
d1 = "/mnt/drives/ZVV0688G";
d2 = "/mnt/drives/ZVV072JR";
d3 = "/mnt/drives/53F0A0SBFJDH";
d4 = "/mnt/drives/X2N0A0AZFJDH";
d5 = "/mnt/drives/53G0A2AXFJDH";
d6 = "/mnt/drives/92F0A079FJDH";
d7 = "/mnt/drives/X2N0A0AXFJDH";
d8 = "/mnt/drives/43P0A00FFJDH";
d9 = "/mnt/drives/ZA1D9307";
d10 = "/mnt/drives/1EJZN6MZ";
d11 = "/mnt/drives/1EKR513Z";
d12 = "/mnt/drives/1EKVK21Z";
};
contentFiles = [
"/mnt/snapraid1.content"
"/mnt/drives/43P0A00AFJDH/snapraid2.content"
"/mnt/drives/53J0A016FJDH/snapraid3.content"
];
exclude = excludes;
};
#imports = [ ./modules/snapraid.nix ];
#services.snapraidnew = {
# "8tb" = {
# arrayName = "8tb";
# enable = true;
# scrub.plan = 5;
# parityFiles = [
# "/mnt/drives/ZA1D9307/snapraid-8tb.parity"
# ];
# dataDisks = {
# d1 = "/mnt/drives/1EJZN6MZ";
# d2 = "/mnt/drives/1EKR513Z";
# d3 = "/mnt/drives/1EKVK21Z";
# };
# contentFiles = [
# "/mnt/snapraid-8tb1.content"
# "/mnt/drives/X2N0A0AZFJDH/snapraid-8tb2.content"
# ];
# exclude = excludes;
# };
# "18tb" = {
# enable = true; # enable = true;
# scrub.plan = 5; # scrub.plan = 5;
# parityFiles = [ # parityFiles = [
@ -65,19 +15,73 @@ in
# dataDisks = { # dataDisks = {
# d1 = "/mnt/drives/43P0A00AFJDH"; # d1 = "/mnt/drives/43P0A00AFJDH";
# d2 = "/mnt/drives/43P0A00FFJDH"; # d2 = "/mnt/drives/43P0A00FFJDH";
# d3 = "/mnt/drives/92F0A079FJDH"; # d3 = "/mnt/drives/53F0A0SBFJDH";
# d4 = "/mnt/drives/X2N0A0AXFJDH"; # d4 = "/mnt/drives/53G0A2AXFJDH";
# d5 = "/mnt/drives/53J0A016FJDH"; # d5 = "/mnt/drives/53J0A016FJDH";
# d6 = "/mnt/drives/ZVV072JR"; # d6 = "/mnt/drives/92F0A079FJDH";
# d7 = "/mnt/drives/ZVV0688G"; # d7 = "/mnt/drives/X2N0A0AXFJDH";
# #d3 = "/mnt/drives/1EKVK21Z";
# }; # };
# contentFiles = [ # contentFiles = [
# "/mnt/snapraid-18tb1.content" # "/mnt/snapraid-18tb1.content"
# "/mnt/drives/ZA1D9307/snapraid-18tb2.content" # "/mnt/snapraid-18tb2.content"
# #"/mnt/drives/43P0A00AFJDH/snapraid.content"
# #"/mnt/drives/43P0A00FFJDH/snapraid.content"
# #"/mnt/drives/53F0A0SBFJDH/snapraid.content"
# #"/mnt/drives/53G0A2AXFJDH/snapraid.content"
# #"/mnt/drives/53J0A016FJDH/snapraid.content"
# #"/mnt/drives/92F0A079FJDH/snapraid.content"
# #"/mnt/drives/X2N0A0AXFJDH/snapraid.content"
# #"/mnt/drives/1EKVK21Z/snapraid.content"
# ];
# exclude = [
# "/media/usenet/incomplete/"
# ]; # ];
# exclude = excludes;
# };
#}; #};
imports = [ ./modules/snapraid.nix ];
services.snapraidnew = {
"8tb" = {
arrayName = "8tb";
enable = true;
scrub.plan = 5;
parityFiles = [
"/mnt/drives/ZA1D9307/snapraid-8tb.parity"
];
dataDisks = {
d1 = "/mnt/drives/1EJZN6MZ";
d2 = "/mnt/drives/1EKR513Z";
d3 = "/mnt/drives/1EKVK21Z";
};
contentFiles = [
"/mnt/snapraid-8tb1.content"
"/mnt/drives/X2N0A0AZFJDH/snapraid-8tb2.content"
];
exclude = excludes;
};
"18tb" = {
enable = true;
scrub.plan = 5;
parityFiles = [
"/mnt/drives/X2N0A0AZFJDH/snapraid.parity"
];
dataDisks = {
d1 = "/mnt/drives/43P0A00AFJDH";
d2 = "/mnt/drives/43P0A00FFJDH";
d3 = "/mnt/drives/53F0A0SBFJDH";
d4 = "/mnt/drives/53G0A2AXFJDH";
d5 = "/mnt/drives/53J0A016FJDH";
d6 = "/mnt/drives/92F0A079FJDH";
d7 = "/mnt/drives/X2N0A0AXFJDH";
};
contentFiles = [
"/mnt/snapraid-18tb1.content"
"/mnt/drives/ZA1D9307/snapraid-18tb2.content"
];
exclude = excludes;
};
};
} }
# vim: set et ts=2 sw=2 ai: # vim: set et ts=2 sw=2 ai: