Reorganized the repo
This commit is contained in:
parent
5176e7cdf8
commit
f1b559ba06
62 changed files with 182 additions and 45 deletions
19
hosts/server/Anton/data.nix
Normal file
19
hosts/server/Anton/data.nix
Normal 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;
|
||||
|
||||
};
|
||||
|
||||
}
|
11
hosts/server/Anton/default.nix
Normal file
11
hosts/server/Anton/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
|
||||
./disko.nix
|
||||
./hardware-configuration.nix
|
||||
|
||||
];
|
||||
|
||||
}
|
52
hosts/server/Anton/disko.nix
Normal file
52
hosts/server/Anton/disko.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue