Move state directories to ZFS pool
This commit is contained in:
parent
0b1ee5c886
commit
8ea60d90df
|
@ -4,69 +4,129 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" =
|
||||||
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" =
|
||||||
device = "/dev/disk/by-uuid/2178-694E";
|
{ device = "/dev/disk/by-uuid/2178-694E";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/vault" = {
|
fileSystems."/var/lib/containers/storage/overlay" =
|
||||||
device = "vault";
|
{ device = "/var/lib/containers/storage/overlay";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib/containers/storage/overlay-containers/dba1864ff1473b3ba5fddd103f9cfff67334fbcc5c99c42b619e8a6d88776061/userdata/shm" =
|
||||||
|
{ device = "shm";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib/containers/storage/overlay/1990fed1fbfbe8dc75ded251c84e8d82700fef0f01e8ead81916cadc5ec2cac1/merged" =
|
||||||
|
{ device = "overlay";
|
||||||
|
fsType = "overlay";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/vault" =
|
||||||
|
{ device = "vault";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/vault/git" = {
|
fileSystems."/vault/radicale" =
|
||||||
device = "vault/git";
|
{ device = "vault/radicale";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/vault/nextcloud" = {
|
fileSystems."/vault/syncthing" =
|
||||||
device = "vault/nextcloud";
|
{ device = "vault/syncthing";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/vault/syncthing" = {
|
fileSystems."/vault/backups" =
|
||||||
device = "vault/syncthing";
|
{ device = "vault/backups";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/vault/backups" = {
|
fileSystems."/vault/git" =
|
||||||
device = "vault/backups";
|
{ device = "vault/git";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/vault/backups/zion" = {
|
fileSystems."/vault/nextcloud" =
|
||||||
device = "vault/backups/zion";
|
{ device = "vault/nextcloud";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/vault/backups/zion/databases" = {
|
fileSystems."/vault/backups/monolith" =
|
||||||
device = "vault/backups/zion/databases";
|
{ device = "vault/backups/monolith";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/vault/backups/monolith" = {
|
fileSystems."/vault/backups/zion" =
|
||||||
device = "vault/backups/monolith";
|
{ device = "vault/backups/zion";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/vault/radicale" = {
|
fileSystems."/vault/backups/zion/databases" =
|
||||||
device = "vault/radicale";
|
{ device = "vault/backups/zion/databases";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib/wallabag" =
|
||||||
|
{ device = "vault/state_directories/wallabag";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib/gitea" =
|
||||||
|
{ device = "vault/state_directories/gitea";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib/signald" =
|
||||||
|
{ device = "vault/state_directories/signald";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib/matrix-as-signal" =
|
||||||
|
{ device = "vault/state_directories/matrix-as-signal";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib/matrix-as-facebook" =
|
||||||
|
{ device = "vault/state_directories/matrix-as-facebook";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib/matrix-as-telegram" =
|
||||||
|
{ device = "vault/state_directories/matrix-as-telegram";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (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
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.cni-podman0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.veth65ee03c8.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wg0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue