Reorganized the repo

This commit is contained in:
willifan 2024-07-06 21:33:59 +02:00
parent 5176e7cdf8
commit f1b559ba06
62 changed files with 182 additions and 45 deletions

View file

@ -0,0 +1,19 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
mergerfs
];
fileSystems."/storage" = {
fsType = "fuse.mergerfs";
device = "/mnt/disks/*";
options = ["cache.files=partial" "dropcacheonclose=true" "category.create=mfs"];
};
services.snapraid = {
enable = true;
};
}

View file

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
imports = [
./disko.nix
./hardware-configuration.nix
];
}

View file

@ -0,0 +1,52 @@
{
disko.devices = {
disk = {
root-drive = {
type = "disk";
device = "/dev/disk/by-id/wwn-0x5001b44ebc0b613a";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
# Subvolume name is different from mountpoint
"/rootfs" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/";
};
# Subvolume name is the same as the mountpoint
"/home" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/home";
};
# Parent is not mounted so the mountpoint must be set
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/nix";
};
};
};
};
};
};
};
};
};
}