2023-06-28 10:23:57 +02:00
|
|
|
# Yandex work laptop
|
|
|
|
#
|
|
|
|
# Some of the configuration for this machine is not public.
|
|
|
|
{ depot, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
config:
|
|
|
|
let
|
|
|
|
mod = name: depot.path.origSrc + ("/ops/modules/" + name);
|
|
|
|
usermod = name: depot.path.origSrc + ("/users/tazjin/nixos/modules/" + name);
|
2023-08-29 16:24:57 +02:00
|
|
|
private = /arc/junk/tazjin;
|
2023-06-28 10:23:57 +02:00
|
|
|
|
|
|
|
zdevice = device: {
|
|
|
|
inherit device;
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
(usermod "chromium.nix")
|
|
|
|
(usermod "desktop.nix")
|
|
|
|
(usermod "fonts.nix")
|
|
|
|
(usermod "home-config.nix")
|
|
|
|
(usermod "laptop.nix")
|
|
|
|
(usermod "physical.nix")
|
|
|
|
(pkgs.home-manager.src + "/nixos")
|
2023-08-29 16:24:57 +02:00
|
|
|
] ++ (if (builtins.pathExists private) then [
|
|
|
|
(private + "/nixos/yandex.nix")
|
|
|
|
(private + "/emacs/module.nix")
|
|
|
|
] else [ ]);
|
2023-06-28 10:23:57 +02:00
|
|
|
|
|
|
|
# from hardware-configuration.nix
|
|
|
|
boot = {
|
|
|
|
initrd.luks.devices."luks-9c3cd590-a648-450d-ae42-ed3859d4c717".device =
|
|
|
|
"/dev/disk/by-uuid/9c3cd590-a648-450d-ae42-ed3859d4c717";
|
|
|
|
|
|
|
|
initrd.availableKernelModules = [
|
|
|
|
"xhci_pci"
|
|
|
|
"thunderbolt"
|
|
|
|
"ahci"
|
|
|
|
"nvme"
|
|
|
|
"usb_storage"
|
|
|
|
"sd_mod"
|
|
|
|
"rtsx_pci_sdmmc"
|
|
|
|
];
|
|
|
|
kernelModules = [ "kvm-intel" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-uuid/1f783029-c4f9-4192-b893-84f4f0c2a493";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/DD01-2B3E";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [{
|
|
|
|
device = "/dev/disk/by-uuid/9b9049c5-5975-441d-9ac6-2f9150775fd6";
|
|
|
|
}];
|
|
|
|
|
|
|
|
tvl.cache.enable = true;
|
|
|
|
|
|
|
|
networking.hostName = "khamovnik";
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
2024-02-11 20:12:48 +01:00
|
|
|
hardware.opengl.extraPackages = with pkgs; [
|
|
|
|
intel-compute-runtime
|
|
|
|
intel-media-driver
|
2024-04-11 13:35:27 +02:00
|
|
|
intel-vaapi-driver
|
2024-02-11 20:12:48 +01:00
|
|
|
];
|
2023-06-28 10:23:57 +02:00
|
|
|
|
|
|
|
# from generated configuration.nix
|
|
|
|
# Bootloader.
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
# Setup keyfile
|
|
|
|
boot.initrd.secrets = {
|
|
|
|
"/crypto_keyfile.bin" = null;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable swap on luks
|
|
|
|
boot.initrd.luks.devices."luks-e9a4b4dc-ade2-45bf-8ed0-0ed5c4c392c9".device = "/dev/disk/by-uuid/e9a4b4dc-ade2-45bf-8ed0-0ed5c4c392c9";
|
|
|
|
boot.initrd.luks.devices."luks-e9a4b4dc-ade2-45bf-8ed0-0ed5c4c392c9".keyFile = "/crypto_keyfile.bin";
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
i18n.extraLocaleSettings = {
|
|
|
|
LC_ADDRESS = "ru_RU.UTF-8";
|
|
|
|
LC_IDENTIFICATION = "ru_RU.UTF-8";
|
|
|
|
LC_MEASUREMENT = "ru_RU.UTF-8";
|
|
|
|
LC_MONETARY = "ru_RU.UTF-8";
|
|
|
|
LC_NAME = "ru_RU.UTF-8";
|
|
|
|
LC_NUMERIC = "ru_RU.UTF-8";
|
|
|
|
LC_PAPER = "ru_RU.UTF-8";
|
|
|
|
LC_TELEPHONE = "ru_RU.UTF-8";
|
|
|
|
LC_TIME = "ru_RU.UTF-8";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable sound with pipewire.
|
|
|
|
sound.enable = true;
|
|
|
|
hardware.pulseaudio.enable = false;
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
};
|
|
|
|
|
2023-11-02 09:40:46 +01:00
|
|
|
# Try to work around Intel CPU throttling bugs
|
|
|
|
services.throttled.enable = true;
|
|
|
|
|
2024-04-05 17:49:36 +02:00
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
|
2023-06-28 10:23:57 +02:00
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
users.users.tazjin.extraGroups = [ "tss" ];
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
tdesktop
|
2023-11-02 15:12:33 +01:00
|
|
|
linuxPackages.perf
|
|
|
|
hotspot
|
|
|
|
protobuf
|
2023-06-28 10:23:57 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
system.stateVersion = "23.05"; # Did you read the comment?
|
|
|
|
}
|