81 lines
2 KiB
Nix
81 lines
2 KiB
Nix
{ config
|
|
, pkgs
|
|
, lib
|
|
, ...
|
|
}:
|
|
|
|
{
|
|
nix.binaryCachePublicKeys = [
|
|
# "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
|
|
];
|
|
nix.binaryCaches = [
|
|
"https://cache.nixos.org"
|
|
# "https://hydra.nixos.org"
|
|
];
|
|
nix.trustedBinaryCaches = [
|
|
"https://cache.nixos.org"
|
|
# "https://hydra.nixos.org"
|
|
];
|
|
|
|
nix.daemonCPUSchedPolicy = "idle";
|
|
nix.daemonIOSchedClass = "idle";
|
|
nix.maxJobs = lib.mkDefault "auto";
|
|
nix.buildCores = lib.mkDefault 0;
|
|
nix.useSandbox = true;
|
|
nix.package = pkgs.nixUnstable;
|
|
|
|
environment.etc."lvm/lvm.conf".text = ''
|
|
devices {
|
|
issue_discards = 1
|
|
}
|
|
'';
|
|
|
|
environment.variables = {
|
|
NIX_PATH = lib.mkForce pkgs.nixPath;
|
|
};
|
|
|
|
# Fonts, I18N, Date ...
|
|
fonts.fonts = [
|
|
pkgs.corefonts
|
|
];
|
|
|
|
console.font = "lat9w-16";
|
|
|
|
i18n = {
|
|
defaultLocale = "en_US.UTF-8";
|
|
};
|
|
time.timeZone = "Europe/Berlin";
|
|
services.gpm.enable = true;
|
|
|
|
services.packagekit.enable = true;
|
|
services.openssh.enable = true;
|
|
networking.firewall.enable = true;
|
|
|
|
# Activation scripts for impure set up of paths in /
|
|
system.activationScripts.bin = ''
|
|
echo "setting up /bin..."
|
|
mkdir -p /bin
|
|
ln -sfT ${pkgs.bash}/bin/bash /bin/.bash
|
|
mv -Tf /bin/.bash /bin/bash
|
|
'';
|
|
|
|
# TODO: find out if this workaround is still required from nixos 20.03 onwards
|
|
# system.activationScripts.etcX11sessinos = ''
|
|
# echo "setting up /etc/X11/sessions..."
|
|
# mkdir -p /etc/X11
|
|
# ln -sfT ${config.services.xserver.displayManager.session.desktops} /etc/X11/.sessions
|
|
# mv -Tf /etc/X11/.sessions /etc/X11/sessions
|
|
# '';
|
|
|
|
system.activationScripts.lib64 = ''
|
|
echo "setting up /lib64..."
|
|
mkdir -p /lib64
|
|
ln -sfT ${pkgs.stdenv.glibc}/lib/ld-linux-x86-64.so.2 /lib64/.ld-linux-x86-64.so.2
|
|
mv -Tf /lib64/.ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
|
|
'';
|
|
|
|
programs.zsh.enable = true;
|
|
users.defaultUserShell = pkgs.zsh;
|
|
environment.pathsToLink = [ "/share/zsh" ];
|
|
programs.fuse.userAllowOther = true;
|
|
}
|