This commit is contained in:
Elec3137 2026-02-04 12:17:42 -08:00
commit b4c9b055fb
20 changed files with 1540 additions and 0 deletions

33
system/nix.nix Normal file
View file

@ -0,0 +1,33 @@
{
pkgs,
lib,
config,
...
}:
let
name = "nix";
cfg = config.nixowos.system.${name};
in
{
options.nixowos.system.${name} = {
enable = lib.mkEnableOption name;
};
config = lib.mkIf cfg.enable {
# enable useful nix tools, and the flakes system
nix.settings.experimental-features = "nix-command flakes";
# you (should) never need this
nix.channel.enable = false;
# reduces disk usage of the nix store
# It does this by performing `nix store optimize` incrementally for each new path
# source: https://nix.dev/manual/nix/2.26/command-ref/new-cli/nix3-store-optimise
nix.settings.auto-optimise-store = true;
environment.systemPackages = with pkgs; [
nixd
nixfmt
];
};
}