refactor into modules
This commit is contained in:
27
nixos/modules/filesystems.nix
Normal file
27
nixos/modules/filesystems.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
fileSystems."/" = {
|
||||
options = [ "subvol=@" "compress=zstd" "space_cache=v2" "noatime" "lazytime" "ssd" "discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
options = [ "subvol=@home" "compress=zstd" "space_cache=v2" "noatime" "lazytime" "ssd" "discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" = {
|
||||
options = [ "subvol=@log" "compress=zstd" "space_cache=v2" "noatime" "lazytime" "ssd" "discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/swap" = {
|
||||
options = [ "subvol=@swap" "noatime" "ssd" "discard=async" ];
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/swap/swapfile"; }];
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
"vm.dirty_ratio" = 10;
|
||||
"vm.dirty_background_ratio" = 5;
|
||||
"vm.swappiness" = 10;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user