This repository has been archived on 2025-10-08. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
nixos-config/options/host/nix.nix

36 lines
599 B
Nix

{
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;
};
};
};
}