batman nix

This commit is contained in:
Kulvir Singh
2025-01-05 03:15:23 +05:30
parent 149fd7ac90
commit c5cb34ac1c
88 changed files with 838 additions and 1946 deletions

31
hosts/mba/nix.nix Normal file
View File

@@ -0,0 +1,31 @@
# This file seems like generic nix config options could be moved to common in future
{
pkgs,
lib,
system,
...
}: {
nixpkgs.config.allowUnfree = true;
# Cross-compile GNU/Linux binaries, or even full GNU/Linux system images
# from someone's config, could be useful but idk
# nix.linux-builder.enable = true;
nix.settings.experimental-features = "nix-command flakes";
nixpkgs.hostPlatform = "${system}";
services.nix-daemon.enable = true;
nix.gc = {
user = "root";
automatic = lib.mkDefault true;
options = lib.mkDefault "--delete-older-than 7d";
};
# Disable auto-optimise-store because of this issue:
# https://github.com/NixOS/nix/issues/7273
# nix.settings = {
# auto-optimise-store = false;
# };
}