nixos-config/common/nix-options.nix
Christoph Heiss 0d21925895
system: headless: enable man pages
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2024-01-07 02:51:46 +01:00

33 lines
858 B
Nix

{ lib, pkgs, ... }:
{
documentation = {
doc.enable = false;
info.enable = false;
man.enable = true;
nixos.enable = lib.mkDefault false;
};
nix.gc = {
automatic = true;
options = "--delete-older-than 14d";
};
# Nix >= 2.18 is kind of broken, see:
# https://github.com/NixOS/nix/issues/9052
# https://github.com/NixOS/nix/pull/9081
# https://github.com/NixOS/nixpkgs/pull/258432
# So for now, just pin it to a known-good version
nix.package = pkgs.nixVersions.nix_2_17;
nix.settings = {
auto-optimise-store = true;
experimental-features = "nix-command flakes";
trusted-users = [ "root" "@wheel" ];
};
# Let <nixpkgs> be the used system packages, such that `nix-shell` can pick them up
environment.etc.nixpkgs.source = lib.cleanSource pkgs.path;
nix.nixPath = [ "nixpkgs=/etc/nixpkgs" ];
}