nixos-config/common/nix-options.nix
Christoph Heiss 8ccbe9955c
common: nix-options: Set <nixpkgs> to used system packages
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-08-18 21:06:50 +02:00

28 lines
634 B
Nix

{ lib, pkgs, ... }:
{
documentation = {
doc.enable = false;
info.enable = false;
man.enable = lib.mkDefault true;
nixos.enable = lib.mkDefault false;
};
nix.gc = {
automatic = true;
options = "--delete-older-than 14d";
};
nix.package = pkgs.nixUnstable;
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" ];
}