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.
This commit is contained in:
Dmitry
2026-03-10 13:10:52 +03:00
parent a7ba016de4
commit 17b0cdfbac
31 changed files with 3327 additions and 164 deletions
+28 -159
View File
@@ -1,168 +1,37 @@
{
config,
pkgs,
lib,
...
}:
{ config, pkgs, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
imports = [
# Конфигурация железа
./hardware-configuration.nix
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
# Системные модули
./modules/system/boot.nix
./modules/system/nix.nix
./modules/system/locale.nix
boot.kernelParams = [ "quiet" ];
boot.extraModulePackages = [ config.boot.kernelPackages.amneziawg ];
boot.kernelModules = [ "amneziawg" ];
# Окружение рабочего стола
./modules/desktop/plasma.nix
./modules/desktop/pipewire.nix
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
stdenv.cc.cc
zlib
fuse3
icu
nss
openssl
curl
expat
# Сеть
./modules/networking/default.nix
# Сервисы
./modules/services/default.nix
# Виртуализация
./modules/virtualisation/virtualbox.nix
# Пользователи
./modules/users/ada.nix
];
networking.hostName = "nixos-vm";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Moscow";
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";
};
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.sddm.wayland.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.ada = {
isNormalUser = true;
description = "ada";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
vim
neovim
code
jetbrains.idea-community
tmux
zsh
oh-my-zsh
fzf
ripgrep
fd
bat
eza
lsd
git
gh
lazygit
curl
wget
jq
nix-output-monitor
nvd
nix-tree
comma
htop
btop
tree
];
};
environment.systemPackages = with pkgs; [
vim
wget
git
curl
amneziawg-tools
nix-output-monitor
nvd
nix-tree
comma
htop
neofetch
];
nix = {
package = pkgs.nix;
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
nixpkgs.config.allowUnfree = true;
programs.firefox.enable = true;
programs.amnezia-vpn.enable = true;
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PubkeyAuthentication = true;
};
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 ];
virtualisation.virtualbox.guest.enable = true;
virtualisation.virtualbox.guest.dragAndDrop = true;
virtualisation.virtualbox.guest.clipboard = true;
# Версия релиза NixOS
# Это значение определяет релиз NixOS, из которого были взяты настройки по умолчанию
# для stateful данных, таких как расположение файлов и версии баз данных в вашей системе.
# Рекомендуется оставить это значение таким, каким оно было при первой установке системы.
# Перед изменением этого значения прочитайте документацию для этой опции
# (например, man configuration.nix или https://nixos.org/nixos/options.html).
system.stateVersion = "25.05";
}