28 lines
602 B
Nix
28 lines
602 B
Nix
|
{ 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";
|
||
|
};
|
||
|
};
|
||
|
}
|