Files
dotfiles/nixos/flake.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

86 lines
2.7 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
description = "Модульная конфигурация NixOS 25.11 на Flake с Home Manager для виртуальной машины";
inputs = {
# Nixpkgs - главный репозиторий пакетов
# Используем nixos-25.11 для стабильности вместо unstable
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
# Hardware profiles для различных машин
nixos-hardware.url = "github:nixos/nixos-hardware";
# Home Manager для управления конфигурацией пользователя
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixos-hardware, home-manager }:
let
# Переменные для переиспользования
system = "x86_64-linux";
version = "25.11";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in
{
# Главная конфигурация NixOS
nixosConfigurations.nixos-vm = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit pkgs;
};
modules = [
./configuration.nix
# Модуль Home Manager для управления конфигурацией пользователя
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.ada = import ./home/ada/default.nix;
}
];
};
# Окружение для разработки конфигурации
devShells.${system}.default = pkgs.mkShell {
description = "Development environment для NixOS конфигурации";
buildInputs = with pkgs; [
# Инструменты Nix
nix-output-monitor
nvd
nix-tree
nixfmt-classic
# Редакторы
vim
nano
# Утилиты для работы
git
ripgrep
fd
];
shellHook = ''
echo "🚀 Development environment loaded"
echo "📚 Доступные утилиты:"
echo " - nixfmt: Форматирование Nix кода"
echo " - nvd: Сравнение версий"
echo " - nix-tree: Дерево зависимостей"
echo "💡 Совет: запусти 'nh os switch' для применения конфигурации"
'';
};
# Форматеры кода
formatter.${system} = pkgs.nixfmt-classic;
};
}