ark/hosts/tkaronto/default.nix

134 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";
2022-11-27 01:04:43 +03:00
value = "16777216";
2022-07-18 19:34:54 +03:00
}
{
domain = "*";
type = "hard";
item = "nofile";
2022-11-27 01:04:43 +03:00
value = "16777216";
2022-07-18 19:34:54 +03:00
}
];
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-10-29 03:24:57 +03:00
hardware.pulseaudio = {
enable = false;
support32Bit = true;
};
2022-07-21 01:41:36 +03:00
services.xserver.videoDrivers = ["nvidia" "amdgpu"];
2022-07-18 19:34:54 +03:00
hardware = {
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
};
2022-10-29 03:24:57 +03:00
};
hardware = {
bluetooth.enable = true;
xpadneo.enable = true;
2022-07-18 19:34:54 +03:00
};
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"];
};
};
2022-10-29 03:24:57 +03:00
# for tailscale
2022-07-18 19:34:54 +03:00
networking.firewall.checkReversePath = "loose";
2022-10-29 23:50:53 +03:00
services.tailscale.enable = true;
2022-10-29 03:24:57 +03:00
2022-07-18 19:34:54 +03:00
services = {
earlyoom.enable = true;
2022-08-27 18:27:28 +03:00
gvfs.enable = true;
2022-07-18 19:34:54 +03:00
};
virtualisation = {
waydroid.enable = false;
podman.enable = false;
2022-11-05 23:10:31 +03:00
docker.enable = false;
2022-07-18 19:34:54 +03:00
libvirtd.enable = false;
};
system.stateVersion = "22.05";
}