2017-07-23 14:09:52 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports =
|
|
|
|
[
|
|
|
|
./basic-tools.nix
|
|
|
|
./common-sw.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
|
2022-01-30 14:22:26 +00:00
|
|
|
nix.settings = {
|
|
|
|
sandbox = true;
|
|
|
|
substituters = [ "https://cache.nixos.org" ];
|
|
|
|
trusted-substituters = [ "https://cache.nixos.org" ];
|
|
|
|
};
|
2017-07-23 14:09:52 +00:00
|
|
|
nix.extraOptions = ''
|
|
|
|
auto-optimise-store = true
|
|
|
|
binary-caches-parallel-connections = 10
|
|
|
|
'';
|
|
|
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
networking.firewall.enable = true;
|
|
|
|
|
2020-08-20 18:02:06 +00:00
|
|
|
time.timeZone = "Europe/Amsterdam";
|
2017-07-23 14:09:52 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
services.printing = {
|
|
|
|
enable = true;
|
|
|
|
browsing = true;
|
|
|
|
drivers = [ pkgs.hplip ];
|
|
|
|
};
|
|
|
|
|
2020-07-24 19:23:06 +00:00
|
|
|
virtualisation.podman = {
|
|
|
|
enable = true;
|
|
|
|
dockerCompat = true;
|
|
|
|
};
|
|
|
|
|
2021-08-27 16:26:04 +00:00
|
|
|
virtualisation.containers = {
|
|
|
|
registries.search = [ "docker.io" ];
|
|
|
|
};
|
|
|
|
|
2020-11-21 10:30:36 +00:00
|
|
|
virtualisation.lxd.enable = true;
|
2020-11-21 10:50:32 +00:00
|
|
|
virtualisation.lxd.recommendedSysctlSettings = true;
|
2021-11-05 19:15:31 +00:00
|
|
|
virtualisation.lxd.package = pkgs.lxd;
|
2020-11-21 10:50:32 +00:00
|
|
|
virtualisation.lxc.lxcfs.enable = true;
|
2020-11-21 10:30:36 +00:00
|
|
|
|
2021-08-30 11:01:09 +00:00
|
|
|
systemd.enableUnifiedCgroupHierarchy = pkgs.lib.mkForce true;
|
|
|
|
|
2017-07-23 14:09:52 +00:00
|
|
|
boot.kernel.sysctl = {
|
|
|
|
"kernel.perf_event_paranoid" = "0";
|
|
|
|
"kernel.kptr_restrict" = pkgs.lib.mkForce "0";
|
|
|
|
|
|
|
|
# IntelliJ
|
2020-11-21 10:50:32 +00:00
|
|
|
"fs.inotify.max_user_watches" = pkgs.lib.mkDefault 524288;
|
2020-11-21 14:43:43 +00:00
|
|
|
|
|
|
|
# undo lxd "recommendedSysctlSettings"
|
|
|
|
"kernel.dmesg_restrict" = pkgs.lib.mkForce 0;
|
2017-07-23 14:09:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# gapt: `ulimit -n` was 256
|
|
|
|
security.pam.loginLimits = [
|
|
|
|
{ domain = "*"; type = "-"; item = "nofile"; value = "4096"; }
|
|
|
|
];
|
|
|
|
|
|
|
|
fileSystems."/mnt/vaccaria" = {
|
2019-10-14 09:03:14 +00:00
|
|
|
device = "//vaccaria.htdf.gebner.org/export";
|
2017-07-23 14:09:52 +00:00
|
|
|
fsType = "cifs";
|
2020-10-30 18:16:02 +00:00
|
|
|
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/vaccaria" "vers=1.0" ];
|
2017-07-23 14:09:52 +00:00
|
|
|
};
|
|
|
|
|
2017-08-05 08:29:53 +00:00
|
|
|
fileSystems."/mnt/aplysia" = {
|
2019-10-14 09:03:14 +00:00
|
|
|
device = "//aplysia.ams.gebner.org/export";
|
2017-08-05 08:29:53 +00:00
|
|
|
fsType = "cifs";
|
2020-10-30 18:16:02 +00:00
|
|
|
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aplysia" "vers=1.0" ];
|
2017-08-05 08:29:53 +00:00
|
|
|
};
|
|
|
|
|
2017-07-23 14:09:52 +00:00
|
|
|
fileSystems."/mnt/aruanus" = {
|
|
|
|
device = "//aruanus.htdf.gebner.org/export";
|
|
|
|
fsType = "cifs";
|
2020-10-30 18:16:02 +00:00
|
|
|
options = [ "noauto" "x-systemd.automount" "credentials=/etc/smbcredentials/aruanus" "vers=1.0" ];
|
2017-07-23 14:09:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
users.extraUsers.gebner = {
|
|
|
|
isNormalUser = true;
|
2020-11-21 10:28:14 +00:00
|
|
|
extraGroups = [
|
|
|
|
"wheel"
|
|
|
|
"networkmanager"
|
|
|
|
"audio"
|
|
|
|
"transmission"
|
|
|
|
"lxd"
|
|
|
|
"libvirtd"
|
|
|
|
"vboxusers"
|
|
|
|
"wireshark"
|
|
|
|
];
|
2017-07-23 14:09:52 +00:00
|
|
|
# shell = "${pkgs.zsh}/bin/zsh";
|
2018-10-09 11:29:33 +00:00
|
|
|
shell = "/run/current-system/sw/bin/fish";
|
2017-07-23 14:09:52 +00:00
|
|
|
|
|
|
|
password = if config.virtualisation != null then "" else null;
|
|
|
|
};
|
|
|
|
|
2021-03-11 18:10:47 +00:00
|
|
|
users.groups = {
|
|
|
|
transmission = {
|
|
|
|
gid = config.ids.gids.transmission;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2020-08-01 14:54:31 +00:00
|
|
|
i18n = {
|
|
|
|
defaultLocale = "en_US.UTF-8";
|
|
|
|
extraLocaleSettings = {
|
2020-08-22 10:51:09 +00:00
|
|
|
# LC_TIME = "en_GB.UTF-8";
|
2020-08-01 14:54:31 +00:00
|
|
|
LC_PAPER = "de_AT.UTF-8";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-06-10 13:07:20 +00:00
|
|
|
system.fsPackages = with pkgs; [
|
|
|
|
ntfs3g
|
2021-10-30 14:03:11 +00:00
|
|
|
exfatprogs
|
2018-06-10 13:07:20 +00:00
|
|
|
];
|
2017-07-23 14:09:52 +00:00
|
|
|
|
|
|
|
}
|