ark/hosts/tkaronto/default.nix

132 lines
2.6 KiB
Nix
Raw Normal View History

2022-07-18 19:34:54 +03:00
{
config,
lib,
2022-08-14 10:45:17 +03:00
tlib,
2022-07-18 19:34:54 +03:00
pkgs,
inputs,
...
2022-08-14 10:45:17 +03:00
}: {
2022-07-18 19:34:54 +03:00
imports = with inputs;
2022-08-23 08:18:37 +03:00
with nixos-hardware.nixosModules;
[
nixpkgs.nixosModules.notDetected
nixos-persistence.nixosModule
common-pc-ssd
common-pc-laptop
common-gpu-nvidia
common-gpu-amd
common-cpu-amd
../../users/root
../../users/patriot
]
++ (tlib.importFolder (toString ./modules));
2022-07-18 19:34:54 +03:00
system.persistDir = "/persist";
2022-07-21 01:41:36 +03:00
nix.settings.max-jobs = lib.mkForce 16;
2022-07-18 19:34:54 +03:00
security = {
pam.loginLimits = [
{
domain = "*";
type = "soft";
item = "nofile";
value = "524288";
}
{
domain = "*";
type = "hard";
item = "nofile";
value = "524288";
}
];
allowSimultaneousMultithreading = true;
# Deleting root subvolume makes sudo show lecture every boot
sudo.extraConfig = ''
Defaults lecture = never
'';
rtkit.enable = true;
};
sound.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
2022-07-21 01:41:36 +03:00
services.xserver.videoDrivers = ["nvidia" "amdgpu"];
2022-07-18 19:34:54 +03:00
hardware = {
2022-08-10 05:25:52 +03:00
bluetooth.enable = true;
xpadneo.enable = true;
2022-07-21 01:41:36 +03:00
nvidia.prime = {
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
2022-07-18 19:34:54 +03:00
opengl = {
driSupport = true;
driSupport32Bit = true;
enable = true;
extraPackages = with pkgs; [
libvdpau-va-gl
vaapiVdpau
libva
vulkan-loader
];
2022-07-30 03:04:32 +03:00
extraPackages32 = with pkgs.pkgsi686Linux; [
libvdpau-va-gl
vaapiVdpau
libva
vulkan-loader
];
2022-07-18 19:34:54 +03:00
};
pulseaudio = {
enable = false;
support32Bit = true;
};
};
2022-07-30 03:04:32 +03:00
2022-07-21 01:41:36 +03:00
programs.light.enable = true;
2022-07-18 19:34:54 +03:00
fonts = {
enableDefaultFonts = true;
fontconfig.enable = true;
fonts = [pkgs.dejavu_fonts];
};
environment = {
systemPackages = [pkgs.ntfs3g];
pathsToLink = ["/share/zsh"];
persistence."${config.system.persistDir}" = {
2022-07-30 03:04:32 +03:00
directories = lib.flatten [
"/etc/nixos"
(
lib.optional
config.virtualisation.docker.enable
["/var/lib/docker" "/var/lib/containers"]
)
];
2022-07-18 19:34:54 +03:00
files = ["/etc/machine-id"];
};
};
networking.firewall.checkReversePath = "loose";
services = {
earlyoom.enable = true;
tailscale.enable = false;
ipfs = {
enable = false;
enableGC = true;
autoMount = true;
};
};
virtualisation = {
waydroid.enable = false;
podman.enable = false;
2022-07-30 03:04:32 +03:00
docker.enable = true;
2022-07-18 19:34:54 +03:00
libvirtd.enable = false;
};
system.stateVersion = "22.05";
}