NixOS/nix-settings.nix

35 lines
815 B
Nix

# ======================================================
# _ _ _
# | \ | (_)_ __
# | \| | \ \/ /
# | |\ | |> <
# |_| \_|_/_/\_\
#
# Configuration for nix
{ config, pkgs, lib, ... }:
let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
in
{
# cleanup nix store after every build
nix.settings.auto-optimise-store = true;
# confgure garbage collector of nixos
# to run weekly
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
# enable unstable packages
nixpkgs.config = {
packageOverrides = pkgs: with pkgs; {
unstable = import unstableTarball {
config = config.nixpkgs.config;
};
};
};
}