nixconfig/modules/nixos/common/base.nix
2026-02-11 05:09:07 -08:00

56 lines
1.4 KiB
Nix

# ~/nixconfig/modules.new/nixos/common/base.nix
{
config,
lib,
pkgs,
inputs,
...
}:
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
powerManagement.cpuFreqGovernor = "ondemand"; # hopefully fix low cpu freq
# hardware.cpu.amd.updateMicrocode = true; # same
nixpkgs.config.allowUnfree = true;
time.timeZone = "America/Los_Angeles";
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.substituters = lib.mkForce [
"https://cache.nixos.org/"
"https://hyprland.cachix.org"
"https://cache.flox.dev"
"https://nix-community.cachix.org"
"https://attic.xuyh0120.win/lantian"
"https://cache.garnix.io"
];
nix.settings.trusted-public-keys = lib.mkForce [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
nix.settings.trusted-users = [ "root" "death916" ];
zramSwap.enable = true;
swapDevices = [
{
device = "/swapfile";
size = 16 * 1024;
priority = -1;
}
];
networking.networkmanager.enable = true;
}