2025-06-25 23:35:24 -07:00
|
|
|
{ lib, ... }:
|
2025-06-23 17:44:56 -07:00
|
|
|
{
|
|
|
|
|
# Nix package manager configuration
|
|
|
|
|
nix = {
|
|
|
|
|
settings = {
|
|
|
|
|
# Enable experimental features for modern Nix functionality
|
|
|
|
|
# - "nix-command": Enables the new unified 'nix' command interface
|
|
|
|
|
# - "flakes": Enables Nix flakes for reproducible and composable configurations
|
2025-06-25 23:35:24 -07:00
|
|
|
experimental-features = [ "nix-command" "flakes" ];
|
2025-06-23 17:44:56 -07:00
|
|
|
|
|
|
|
|
# Specify which users are allowed to run nix commands
|
2025-06-25 23:35:24 -07:00
|
|
|
allowed-users = lib.mkDefault [ "tb" ];
|
2025-06-23 17:44:56 -07:00
|
|
|
|
|
|
|
|
# Users who can act as trusted users (can override settings)
|
|
|
|
|
# Trusted users can use --option flags and import from derivations
|
2025-06-25 23:35:24 -07:00
|
|
|
trusted-users = lib.mkDefault [ "root" "tb" ];
|
2025-06-23 17:44:56 -07:00
|
|
|
|
|
|
|
|
# Show more lines of build output on failure
|
|
|
|
|
log-lines = 50;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Automatic garbage collection configuration
|
|
|
|
|
# Helps manage disk space by cleaning up unused store paths
|
|
|
|
|
gc = {
|
|
|
|
|
# Enable automatic garbage collection
|
|
|
|
|
automatic = true;
|
|
|
|
|
|
|
|
|
|
# Delete store paths older than 30 days during garbage collection
|
|
|
|
|
options = "--delete-older-than 30d";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Automatic store optimization configuration
|
|
|
|
|
# Reduces disk usage by hard-linking identical files in the Nix store
|
|
|
|
|
optimise = {
|
|
|
|
|
# Enable automatic store optimization
|
|
|
|
|
# This deduplicates files to save disk space
|
|
|
|
|
automatic = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Nixpkgs package collection configuration
|
|
|
|
|
nixpkgs = {
|
|
|
|
|
config = {
|
|
|
|
|
# Allow installation of packages with non-free licenses
|
|
|
|
|
# This includes proprietary software like Discord, Slack, etc.
|
|
|
|
|
# Without this, only free/open-source packages can be installed
|
|
|
|
|
allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
# Allow packages marked as broken (use with caution)
|
|
|
|
|
#allowBroken = false;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|