Files
nixos-config/host/modules/common.nix
T

42 lines
1.2 KiB
Nix
Raw Normal View History

2025-02-02 14:57:36 +03:00
{ lib, inputs, hostname }: {
imports = [
inputs.sops-nix.nixosModules.sops
../${hostname}/hardware-configuration.nix
../../modules/host.nix
./packages.nix
];
options = {
2026-04-21 17:48:52 +03:00
host = {
laptop = lib.mkEnableOption "laptop mode";
nvidia.prime = {
enable = lib.mkEnableOption "NVIDIA PRIME offload for hybrid graphics";
intelBusId = lib.mkOption {
type = lib.types.str;
default = "PCI:0:2:0";
description = "Intel/iGPU Bus ID used by NVIDIA PRIME.";
};
nvidiaBusId = lib.mkOption {
type = lib.types.str;
default = "PCI:1:0:0";
description = "NVIDIA dGPU Bus ID used by NVIDIA PRIME.";
};
};
};
2025-02-02 14:57:36 +03:00
};
config = {
2025-12-01 19:15:35 +03:00
nix.settings = {
keep-going = true;
2025-12-27 18:13:22 +03:00
extra-substituters = [ "https://nix.lair.moe/main" ];
2025-12-01 19:15:35 +03:00
extra-trusted-public-keys = [ "main:kpwMe+9BsGJ/IUb7i3iadaV38y5/Yuqoct0mf7wI9ds=" ];
experimental-features = [ "nix-command" "flakes" ];
};
2025-02-02 14:57:36 +03:00
networking.hostName = hostname;
time.timeZone = lib.mkDefault "Europe/Moscow";
i18n.defaultLocale = lib.mkDefault "ru_RU.UTF-8";
system.stateVersion = "23.05";
};
2026-04-21 17:48:52 +03:00
}