nixos-config/common.nix

80 lines
1.9 KiB
Nix
Raw Normal View History

2015-05-21 14:13:47 +00:00
{ config, pkgs, ... }:
{
imports =
[
/etc/nixos/hardware-configuration.nix
2015-05-27 16:52:02 +00:00
./i3.nix
./basic-tools.nix
./common-sw.nix
2015-05-21 14:13:47 +00:00
];
boot.kernelPackages = pkgs.linuxPackages_latest;
2015-05-21 14:13:47 +00:00
2016-06-02 18:55:12 +00:00
nix.useSandbox = true;
2016-04-24 14:57:21 +00:00
nix.binaryCaches = [ https://cache.nixos.org ];
nix.trustedBinaryCaches = [ https://cache.nixos.org ];
nix.extraOptions = ''
auto-optimise-store = true
binary-caches-parallel-connections = 10
'';
2015-05-21 14:13:47 +00:00
networking.networkmanager.enable = true;
networking.firewall.enable = true;
time.timeZone = "Europe/Vienna";
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
programs.ssh.startAgent = false;
# Enable CUPS to print documents.
services.avahi.enable = true; # cups browsing support
2015-12-24 12:06:29 +00:00
services.printing = {
enable = true;
2017-05-24 12:51:51 +00:00
browsing = true;
2015-12-24 12:06:29 +00:00
drivers = [ pkgs.hplip ];
};
2015-06-02 14:39:37 +00:00
# services.colord.enable = true;
2015-05-21 14:13:47 +00:00
2016-09-21 13:11:24 +00:00
boot.kernel.sysctl = {
"kernel.perf_event_paranoid" = "0";
"kernel.kptr_restrict" = pkgs.lib.mkForce "0";
2016-09-21 13:11:24 +00:00
# IntelliJ
"fs.inotify.max_user_watches" = 524288;
};
2015-05-21 14:13:47 +00:00
2015-06-02 10:38:56 +00:00
# gapt: `ulimit -n` was 256
security.pam.loginLimits = [
{ domain = "*"; type = "-"; item = "nofile"; value = "4096"; }
];
2015-05-21 14:13:47 +00:00
fileSystems."/mnt/vaccaria" = {
device = "//vaccaria.mtlaa.gebner.org/export";
fsType = "cifs";
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/vaccaria" ];
2015-05-21 14:13:47 +00:00
};
fileSystems."/mnt/aruanus" = {
device = "//aruanus.htdf.gebner.org/export";
fsType = "cifs";
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aruanus" ];
2015-05-21 14:13:47 +00:00
};
users.extraUsers.gebner = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
2015-09-20 08:45:13 +00:00
# shell = "${pkgs.zsh}/bin/zsh";
2015-09-01 12:16:20 +00:00
password = if config.virtualisation != null then "" else null;
2015-05-21 14:13:47 +00:00
};
2015-08-09 17:35:31 +00:00
system.fsPackages = [ pkgs.ntfs3g ];
2015-05-21 14:13:47 +00:00
}