rearrange common nix config, add optimising and garbage collecting

This commit is contained in:
2025-11-07 04:18:09 -06:00
parent cdf8403991
commit 5813db8160
2 changed files with 81 additions and 56 deletions

View File

@@ -5,11 +5,48 @@
inputs,
...
}: {
imports = [
inputs.autoaspm.nixosModules.default
];
# set timezone
time.timeZone = "America/Chicago";
nix = {
# garbage collect & remove builds older then 14 days
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 14d";
persistent = true;
};
# optimise nix store, dedupe and such
optimise = {
automatic = true;
dates = [ "daily" ];
};
# the goats
settings.experimental-features = lib.mkDefault [
"nix-command"
"flakes"
];
};
# allow proprietary packages
nixpkgs = {
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
# power management
services.autoaspm.enable = true;
powerManagement.powertop.enable = true;
# things are better this way
users.defaultUserShell = pkgs.zsh;
# base system package install list
environment.systemPackages = with pkgs; [
wget
@@ -32,21 +69,7 @@
lm_sensors
];
# set timezone
time.timeZone = "America/Chicago";
# allow proprietary packages
nixpkgs.config.allowUnfree = true;
# power management
services.autoaspm.enable = true;
powerManagement.powertop.enable = true;
# enable flakes
nix.settings.experimental-features = lib.mkDefault ["nix-command" "flakes"];
users.defaultUserShell = pkgs.zsh;
# passwordless rebuild
# nice to have passwordless sudo
security.sudo = {
extraRules = [
{