nixos-config-priv/systems/common/core/default.nix

48 lines
1.2 KiB
Nix
Raw Normal View History

2024-06-07 11:37:13 +00:00
# This file (and the global directory) holds config that i use on all hosts
2024-06-09 15:53:08 +00:00
{ inputs, outputs, configLib, ... }: {
imports = (configLib.scanPaths ./.)
++ [ inputs.home-manager.nixosModules.home-manager ]
2024-06-07 11:37:13 +00:00
++ (builtins.attrValues outputs.nixosModules);
home-manager.extraSpecialArgs = {
inherit inputs outputs;
};
nixpkgs = {
2024-06-09 15:53:08 +00:00
# you can add global overlays here
2024-06-07 11:37:13 +00:00
overlays = builtins.attrValues outputs.overlays;
2024-06-09 15:53:08 +00:00
config.allowUnfree = true;
2024-06-07 11:37:13 +00:00
};
# Fix for qt6 plugins
# TODO: maybe upstream this?
environment.profileRelativeSessionVariables = {
QT_PLUGIN_PATH = ["/lib/qt-6/plugins"];
};
hardware.enableRedistributableFirmware = true;
2024-06-09 15:53:08 +00:00
networking.domain = "mattmor.in";
security.sudo.extraConfig = ''
Defaults timestamp_timeout=120 # only ask for password every 2h
# Keep SSH_AUTH_SOCK so that pam_ssh_agent_auth.so can do its magic.
# Defaults env_keep + =SSH_AUTH_SOCK
'';
2024-06-07 11:37:13 +00:00
# Increase open file limit for sudoers
security.pam.loginLimits = [
{
domain = "@wheel";
item = "nofile";
type = "soft";
value = "524288";
}
{
domain = "@wheel";
item = "nofile";
type = "hard";
value = "1048576";
}
];
}