nixos-config/system/all/defaults.nix
2024-07-20 22:54:24 +02:00

46 lines
1.2 KiB
Nix

{ config, lib, pkgs, ... }:
{
imports = [ ./packages.nix ];
# provide overlays
# -----------------
# nixpkgs.overlays = [ (import ../../pkgs) ];
# allow un-free
# -------------
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
# some system stuff
# -----------------
time.timeZone = "Europe/Berlin";
#time.timeZone = lib.mkDefault "Pacific/Auckland";
#time.timeZone = lib.mkDefault "Asia/Singapore";
#time.timeZone = lib.mkDefault "Asia/Makassar";
# keyboard fiddling
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
console.font = "Lat2-Terminus16";
console.keyMap = lib.mkDefault "us";
services.xserver.xkb.layout = lib.mkDefault "us";
# swappiness
# ----------
# 0 = only when running out of RAM
# 100 = always swapp
boot.kernel.sysctl."vm.swappiness" = 0;
# rewire NIX_PATH
# ---------------
#environment.variables.NIX_PATH = lib.mkForce "/var/src";
nix.nixPath = [ "nixpkgs=${pkgs.path}" ];
# Machines should be fast by default
# ----------------------------------
powerManagement.cpuFreqGovernor = lib.mkOverride 1001 "ondemand";
# set vim to the default editor
# -----------------------------
programs.vim.defaultEditor = true;
programs.vim.enable = true;
}