{ lib, pkgs, config, ... }: let inherit (lib) mkEnableOption mkIf; cfg = config.host.nix; in { options.host.nix = { enable = mkEnableOption "Nix settings strfor host."; optimization.enable = mkEnableOption "Nix store optimization."; }; config = mkIf cfg.enable { nix = { package = pkgs.nix; settings = { warn-dirty = false; experimental-features = [ "flakes" "nix-command" "pipe-operators" ]; }; optimise = mkIf cfg.optimization.enable { automatic = true; }; }; }; }