System/modules/common.nix

28 lines
602 B
Nix
Raw Normal View History

2021-12-20 13:37:26 -05:00
{ config, pkgs, ... }:
{
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Turn on flakes support (from within a flake, lamo)
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
# Turn on compressed memory swap
zramSwap = {
enable = true;
algorithm = "zstd";
memoryPercent = 25;
};
# Automatically optimize and garbage collect the store
nix = {
autoOptimiseStore = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
}