nixos-config/nixos/system/all/defaults.nix
2022-09-11 10:13:30 +02:00

60 lines
1.7 KiB
Nix

{ config, lib, pkgs, ... }:
{
imports = [ ./packages.nix ];
# provide overlays
# -----------------
nixpkgs.overlays = [ (import ../../pkgs) ];
# allow un-free
# -------------
nixpkgs.config.allowUnfree = true;
environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
# some system stuff
# -----------------
time.timeZone = lib.mkDefault "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.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}" ];
# how much configurations should be kept?
boot.loader.systemd-boot.configurationLimit = lib.mkDefault 3;
boot.loader.generic-extlinux-compatible.configurationLimit = lib.mkDefault 3;
boot.loader.grub.configurationLimit = lib.mkDefault 3;
# Machines should be fast by default
# ----------------------------------
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
# set vim to the default editor
# -----------------------------
programs.vim.defaultEditor = true;
# extra hosts
# /etc/hosts
networking.extraHosts = ''
${config.module.cluster.services.tinc.private.hosts.robi.tincIp} transmission.robi.private
${config.module.cluster.services.tinc.private.hosts.robi.tincIp} transmission2.robi.private
'';
}