Files
dotfiles/nixos/modules/system/nix.nix
T
Dmitry 17b0cdfbac feat: add comprehensive NixOS configuration documentation and structure
- Introduced `08-structure.md` detailing project structure, main files, and versioning.
- Created `README.md` for documentation overview and quick start guide.
- Added user-specific configurations for Alacritty, Vim, Micro, Git, Zsh, Tmux, and tools.
- Implemented system modules for desktop environment (KDE Plasma), audio (PipeWire), networking, and services (OpenSSH, GnuPG).
- Configured Nix settings with flakes support and garbage collection.
- Established user management for `ada` with necessary groups and shell settings.
- Enabled VirtualBox guest additions for improved VM experience.
2026-03-10 13:10:52 +03:00

61 lines
1.9 KiB
Nix

{ pkgs, ... }:
{
# Конфигурация Nix с flakes и оптимизациями
nix = {
package = pkgs.nixVersions.latest;
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
# Substituters для более быстрой загрузки
substituters = [
"https://cache.nixos.org/"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
# Автоматическая сборка мусора
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
# Разрешить проприетарные пакеты
nixpkgs.config.allowUnfree = true;
# Системные пакеты для удобства работы с Nix
environment.systemPackages = with pkgs; [
# Утилиты Nix
nix-output-monitor # Красивый вывод Nix
nvd # Инструмент сравнения версий Nix
nix-tree # Просмотр зависимостей Nix store
nix-index # База данных файлов для nixpkgs
comma # Запуск без установки
nh # Ещё один помощник для Nix
nix-du # Визуализация использования диска
nixfmt-classic # Форматтер Nix кода
];
# nix-ld для запуска непропатченных бинарников
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
stdenv.cc.cc
zlib
fuse3
icu
nss
openssl
curl
expat
];
}