mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 09:18:35 +02:00
chore: nix fmt
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
###################################################################################
|
||||
#
|
||||
# NixOS's core configuration suitable for all my machines
|
||||
@@ -28,20 +27,20 @@
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
# Enable in-memory compressed devices and swap space provided by the zram kernel module.
|
||||
# By enable this, we can store more data in memory instead of fallback to disk-based swap devices directly,
|
||||
# By enable this, we can store more data in memory instead of fallback to disk-based swap devices directly,
|
||||
# and thus improve I/O performance when we have a lot of memory.
|
||||
#
|
||||
#
|
||||
# https://www.kernel.org/doc/Documentation/blockdev/zram.txt
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
# one of "lzo", "lz4", "zstd"
|
||||
algorithm = "zstd";
|
||||
# Priority of the zram swap devices.
|
||||
# Priority of the zram swap devices.
|
||||
# It should be a number higher than the priority of your disk-based swap devices
|
||||
# (so that the system will fill the zram swap devices before falling back to disk swap).
|
||||
priority = 5;
|
||||
# Maximum total amount of memory that can be stored in the zram swap devices (as a percentage of your total memory).
|
||||
# Defaults to 1/2 of your total RAM. Run zramctl to check how good memory is compressed.
|
||||
# Maximum total amount of memory that can be stored in the zram swap devices (as a percentage of your total memory).
|
||||
# Defaults to 1/2 of your total RAM. Run zramctl to check how good memory is compressed.
|
||||
# This doesn’t define how much memory will be used by the zram swap devices.
|
||||
memoryPercent = 50;
|
||||
};
|
||||
|
||||
@@ -14,6 +14,4 @@
|
||||
};
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{username, config, ...}: {
|
||||
{
|
||||
username,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
# Don't allow mutation of users outside the config.
|
||||
users.mutableUsers = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user