Files
nix-config/modules/hosts/nixxx/configuration.nix
T

112 lines
3.8 KiB
Nix
Raw Normal View History

2026-05-07 20:48:42 +07:00
/*
системный конфиг
*/
2026-04-12 10:04:23 +05:00
{ self, ... }:
2026-03-22 21:30:03 +05:00
{
2026-05-07 20:48:42 +07:00
flake.nixosModules.nixxx = { pkgs, ... }: {
2026-03-22 21:30:03 +05:00
2026-05-07 20:48:42 +07:00
/*
импорт модулей с програмками
*/
2026-03-22 21:30:03 +05:00
imports = [
2026-05-07 20:48:42 +07:00
self.nixosModules.nixxxHardware
2026-03-23 14:51:59 +05:00
2026-05-07 20:48:42 +07:00
# тут программки
2026-04-15 19:15:43 +05:00
self.nixosModules.base
2026-05-07 19:42:20 +07:00
2026-05-07 20:48:42 +07:00
# тут описанные через flakes
2026-04-15 19:15:43 +05:00
self.nixosModules.fastfetch
2026-03-22 21:30:03 +05:00
self.nixosModules.home-manager
2026-05-07 20:48:42 +07:00
self.nixosModules.vscode
2026-04-15 19:15:43 +05:00
2026-05-07 20:48:42 +07:00
# тут графические окружения
2026-04-25 23:34:21 +05:00
self.nixosModules.niri
2026-05-07 19:42:20 +07:00
self.nixosModules.xfcerdp
2026-03-22 21:30:03 +05:00
];
2026-05-07 20:48:42 +07:00
/*
GRUB
*/
2026-05-07 19:42:20 +07:00
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
2026-03-22 21:30:03 +05:00
# Enable flakes.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Enable store optimization on every rebuild.
nix.settings.auto-optimise-store = true;
# Enable automatic garbace collection.
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
networking.hostName = "nixos"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
# Set your time zone.
2026-05-07 19:42:20 +07:00
time.timeZone = "Asia/Krasnoyarsk";
2026-03-22 21:30:03 +05:00
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable bluetooth.
hardware.bluetooth.enable = true;
# Enable sound.
services.pipewire = {
enable = true;
pulse.enable = true;
};
2026-05-07 19:42:20 +07:00
# Локализация
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";
};
2026-03-22 21:30:03 +05:00
# Enable TLP.
services.tlp = {
enable = true;
settings = {
# Improve performance on battery.
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_performance";
PLATFORM_PROFILE_ON_BAT = "performance";
};
};
# Define a user account. Don't forget to set a password with passwd.
2026-04-15 19:15:43 +05:00
users.users.${self.user} = {
2026-03-22 21:30:03 +05:00
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
tree
];
};
2026-04-15 19:15:43 +05:00
# Allow unfree packages.
2026-03-22 21:30:03 +05:00
nixpkgs.config.allowUnfree = true;
system.stateVersion = "25.11"; # Did you read the comment?
};
}