Reorganise hardware vs host config, tidy settings and services
This commit is contained in:
parent
effc4da3a6
commit
93ea194da4
13 changed files with 185 additions and 195 deletions
|
|
@ -1,41 +1,6 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
||||
# Individual Data Disks
|
||||
fileSystems."/mnt/disk1" = {
|
||||
device = "/dev/disk/by-uuid/90ae3493-38c1-4473-b409-e9d99c3b315e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/disk2" = {
|
||||
device = "/dev/disk/by-uuid/7145223e-f285-424a-a114-cb0b1b64e068";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/disk3" = {
|
||||
device = "/dev/disk/by-uuid/58cecfd5-2fd7-4c4b-b3a1-0bf5e9d0beab";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/disk4" = {
|
||||
device = "/dev/disk/by-uuid/317660ef-bd75-4fa4-bd20-f96a3926bf7b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
# The Combined MergerFS Pool
|
||||
fileSystems."/mnt/storage" = {
|
||||
device = "/mnt/disk1:/mnt/disk2:/mnt/disk3:/mnt/disk4";
|
||||
fsType = "fuse.mergerfs";
|
||||
options = [
|
||||
"defaults"
|
||||
"allow_other"
|
||||
"use_ino"
|
||||
"cache.files=partial"
|
||||
"dropcacheonclose=true"
|
||||
"category.create=mfs"
|
||||
];
|
||||
};
|
||||
|
||||
# Create symlink from home to storage
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /home/fred/storage - - - - /mnt/storage"
|
||||
|
|
@ -57,7 +22,7 @@
|
|||
|
||||
# Enable Docker
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
|
||||
# Basic networking
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
|
|
@ -67,13 +32,5 @@
|
|||
enable = true;
|
||||
settings.PermitRootLogin = "no";
|
||||
};
|
||||
|
||||
# Boot loader
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
# Includes all 4 physical disks for redundancy
|
||||
devices = [ "/dev/sda" "/dev/sdb" "/dev/sdc" "/dev/sdd" "/dev/sde" ];
|
||||
useOSProber = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue