nixos-config/nixos/system/all/default.nix

92 lines
2.3 KiB
Nix

{ lib, config, pkgs, ... }: {
imports = [
../../modules
# needed
#<home-manager/nixos>
# cross-compiling
#<cleverca22/qemu.nix>
./grub.nix
./networking-qos.nix
./nginx-landingpage.nix
./nginx.nix
./packages.nix
./borg-jobs.nix
./borg-scripts.nix
./sshd-known-hosts-bootup.nix
./sshd-known-hosts-private.nix
./sshd-known-hosts-public.nix
./sshd.nix
./syncthing.nix
./tinc.nix
./on-failure.nix
./hosts.nix
];
# how much configurations should be kept?
boot.loader.systemd-boot.configurationLimit = lib.mkDefault 5;
# default backup excludes
backup.exclude = [ ".git" ".stfolder" ".stversions" ];
# 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}" ];
# Shell configuration
# -------------------
programs.custom = {
bash.enable = true;
zsh.enable = true;
};
# Machines should be fast by default
# ----------------------------------
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
# set vim to the default editor
# -----------------------------
programs.vim.defaultEditor = true;
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "19.03"; # Did you read the comment?
}