Configurare Sistem de operare

Slackware Linux guide

Slackware deliberately keeps the operating system relatively simple and transparent. Its installer is primarily text-based, package management does not automatically resolve dependencies, and system configuration is generally performed through straightforward configuration files and scripts.

That gives you considerable control, but it also means that you should understand what you’re doing rather than expecting the installer to make every decision for you.

A typical installation looks roughly like this:

Firmware
├── UEFI
Slackware installer
├── Partition disk
├── Create swap
├── Install packages
├── Configure network
├── Configure bootloader
└── Create users
First boot
├── Configure networking
├── Configure package management
├── Install updates
├── Configure X/Wayland
├── Configure desktop
├── Configure services
└── Harden system

The official Slackware documentation is worth keeping nearby throughout the installation.

2. Decide what you’re installing

For a modern Intel or AMD computer, you almost certainly want:

Slackware64 15.0

rather than 32-bit Slackware.

For a normal desktop:

  • UEFI firmware
  • GPT partition table
  • Slackware64
  • EFI System Partition
  • swap
  • root filesystem
  • optionally a separate /home

For a server, you might instead use:

  • EFI System Partition
  • swap
  • /
  • perhaps separate /var, /home, or storage partitions depending on the workload.

Recommended beginner layout

For a computer with a 500 GB SSD:

/dev/nvme0n1
├── /dev/nvme0n1p1 EFI System Partition 512 MB
├── /dev/nvme0n1p2 swap 8 GB
├── /dev/nvme0n1p3 / 80 GB
└── /dev/nvme0n1p4 /home remainder

You don’t have to use this layout.

A single root filesystem is perfectly reasonable for a first Slackware installation:

EFI 512 MB
swap 4–16 GB
/ remainder

In fact, I’d recommend keeping your first installation simple.

3. Back up your existing data

This is the most important step.

If you are installing Slackware onto a disk containing Windows, another Linux distribution, or personal data, partitioning can destroy the existing installation.

Before touching the installer:

  1. Back up important files.
  2. Verify that the backup actually works.
  3. Make sure you have Windows recovery media if Windows is staying on the machine.
  4. Record your existing partition layout.
  5. If you’re replacing the entire disk, verify once more that you have everything you need.

If you don’t need anything currently on the disk, the installation is considerably simpler.

4. Download Slackware

Use an official Slackware mirror to obtain the installation media. The official mirror tree contains the Slackware 15.0 installation files, README files, kernels, packages, patches, and USB/PXE installation material.

Official Slackware mirror

  • Look for the appropriate Slackware64 15.0 installation media.
  • You will generally want the ISO and its associated checksum/signature information.
  • After downloading the ISO, verify it rather than blindly trusting a corrupted download.
  • On another Linux system you can use something along the lines of:
sha256sum slackware64-15.0-install-dvd.iso

Compare the result against the checksum supplied by Slackware.

5. Create a bootable USB

On Linux, you can write the ISO directly to a USB drive.

Be extremely careful with /dev/sdX.

For example:

lsblk

Identify the USB device.

Suppose it is /dev/sdb.

Unmount its partitions:

sudo umount /dev/sdb1

Then write the image:

sudo dd if=slackware64-15.0-install-dvd.iso \
of=/dev/sdb \
bs=4M \
status=progress \
oflag=sync

Then:

sync

Do not accidentally use:

/dev/sda

if /dev/sda is your operating-system disk.

6. Boot the Slackware installer

Insert the USB and reboot.

Enter your firmware’s boot menu. Common keys include:

F12
F11
F8
Esc
Delete
  • The exact key depends on the motherboard.
  • Select the USB device.
  • On a modern machine, prefer the UEFI boot entry.

Slackware supports UEFI installations. For a UEFI installation, an EFI System Partition is required, and Slackware’s documentation recommends using the ELILO option rather than LILO during the installation process.

7. The Slackware installer

The installer initially gives you a console prompt.

You may see something similar to:

boot:

For a normal installation, simply press:

Enter

The installer will boot.

You will eventually reach the keyboard selection. If you’re using a standard US keyboard, you can usually accept the default. For other layouts, select the appropriate keymap.

8. Partition the disk

This is the first genuinely important part of the installation.

You can use:

cfdisk

or:

fdisk

For a modern UEFI system, I recommend:

cfdisk /dev/nvme0n1

Your disk might instead be:

/dev/sda

or something else.

Check first:

lsblk

GPT partition table

For a new UEFI installation, use GPT.

Your final layout might look like:

Device Size Type
————————————————
/dev/nvme0n1p1 512M EFI System
/dev/nvme0n1p2 8G Linux swap
/dev/nvme0n1p3 80G Linux filesystem
/dev/nvme0n1p4 remainder Linux filesystem

EFI System Partition

Create approximately:

512 MB

and mark it as:

EFI System

It should be formatted FAT32.

Swap

A reasonable desktop value is:

4–16 GB

If you intend to use hibernation, swap sizing becomes more important because the system needs enough swap to hold the relevant memory state.

Root

For /, I would give a desktop installation at least:

40–60 GB

I’d personally choose around:

80 GB

if disk space isn’t a concern.

/home

A separate /home is optional.

It can be useful because reinstalling the operating system doesn’t necessarily require destroying your personal data.

9. Activate swap

After partitioning, return to the Slackware installer menu.

Choose:

ADDSWAP

The installer should find your swap partition.

Allow it to activate the partition and add the appropriate entry to /etc/fstab.

The traditional Slackware installation sequence starts with ADDSWAP and then proceeds through TARGET, SOURCE, SELECT, INSTALL, and CONFIGURE.

10. Select the target partitions

Choose:

TARGET

Select your root partition.

For example:

/dev/nvme0n1p3

The installer will ask how it should be formatted.

For a straightforward installation:

ext4

is an excellent choice. You could also use other filesystems, but there’s no compelling reason to complicate your first Slackware installation.

If you created a separate /home, assign that partition as well.

For example:

/dev/nvme0n1p3 → /
/dev/nvme0n1p4 → /home

Choose:

SOURCE

For a USB/DVD installation, select the appropriate local media.

The installer will locate the Slackware package tree.

You can also install through other methods, including network-based approaches. Slackware’s installation documentation describes USB and PXE installation material as well.

For your first installation, local installation media is easiest.

12. Choose the package sets

Slackware packages are organized into series.

You’ll encounter things such as:

A Base system
AP Applications
D Development
E Emacs
F FAQ/documentation
K Kernel
KDE KDE Plasma
KDEI KDE internationalization
L Libraries
N Networking
T TeX
TCL Tcl
X X Window System
XAP X applications
XFCE Xfce
Y Games

The exact package organization can vary somewhat by release.

Full installation

For a first installation, I strongly recommend installing essentially everything except things you have a specific reason to exclude. Slackware itself recommends a full installation when you have sufficient disk space, and this is particularly useful because Slackware’s package system does not automatically resolve dependencies.

This is one of the biggest differences between Slackware and distributions such as Debian or Fedora.

Suppose application A requires library B.

Slackware generally won’t automatically say:

“A requires B, so I’ll install B for you.”

You are expected to understand the relationship.

Consequently, a full installation avoids many dependency headaches.

13. Start the installation

Select:

INSTALL

For a first installation:

Full

is the easiest option.

The installer will copy the packages to the hard drive.

Depending on the machine and installation media, this may take some time.

14. Configure the kernel

After package installation, Slackware will ask about the kernel. For a modern 64-bit system, the generic kernel is generally the better long-term choice. Slackware traditionally provides both generic and huge kernels.

The “huge” kernel contains a very broad collection of drivers and is useful for bootstrapping. The generic kernel is more minimal.

For a normal modern system, I would generally choose the generic kernel and create/initiate the necessary initrd configuration if required.

15. Configure the network

You’ll be asked about networking. For a normal wired Ethernet connection, Slackware can generally configure the interface automatically through DHCP.

You might see something like:

eth0

or:

enp3s0

Modern Linux naming may produce names such as:

enp2s0
eno1
wlp3s0

For DHCP:

DHCP

is usually what you want.

If you’re configuring a server with a static IP, you’ll need something like:

IP address: 192.168.1.50
Netmask: 255.255.255.0
Gateway: 192.168.1.1
DNS: 192.168.1.1

The exact values obviously depend on your network.

16. Configure your hostname

Choose something meaningful.

For example:

Hostname:
slackbox

or:

server01

For a home computer:

desktop

is fine.

You can later change it in:

/etc/HOSTNAME

For example:

desktop.example.local

17. Configure the timezone

Select:

Europe/Bucharest

if your system is physically in Bucharest and that is your desired timezone.

For a generic machine, choose the timezone appropriate to its actual location.

You can verify it later with:

date

18. Configure the mouse

For a normal USB mouse:

USB

is usually appropriate.

19. Configure the hardware clock

If the computer is primarily running Linux, using local time for the hardware clock can work, but UTC is generally preferable.

If Windows is dual-booting on the same machine, be aware that Windows and Linux traditionally make different assumptions about the hardware clock.

A common modern configuration is:

Hardware clock → UTC

20. Configure the bootloader

This is especially important on UEFI systems.

For a legacy BIOS installation, Slackware traditionally uses:

LILO

For UEFI, Slackware’s installation documentation recommends bypassing the LILO installation and selecting ELILO.

If you’re installing Slackware64 15.0 in UEFI mode:

UEFI
EFI System Partition
ELILO
Slackware kernel

Make sure the EFI System Partition exists before reaching this stage.

21. Set the root password

The installer will ask you to establish the root password.

Use a strong password.

Do not make it something like:

root or:
password

Use a long, unique password.Slackware will initially leave you with the root account, which is the administrative account.

22. Reboot

When the installation is complete:

reboot

Remove the USB installation media when appropriate.Your system should now boot from the internal disk.

You should eventually see a login prompt similar to:

darkstar login:

Log in as:

root

using the password you created.

23. First things to do after booting

First inspect the system:

uname -a

Then:

cat /etc/slackware-version

And:

lsblk

Check networking:

ip addr

and:

ping -c 4 1.1.1.1

Then:

ping -c 4 slackware.com

If the first works but the second doesn’t, you probably have a DNS configuration problem.

24. Create your normal user account

Do not use root for ordinary desktop work.

Slackware provides:

adduser

Run:

adduser

You’ll be asked for a username.

For example:

Login name: john

Then provide the requested information.

Afterward:

passwd john

Set a strong password.

Your system should now have:

root
└── administrative account
john
└── normal user
[mai mult...]

Workaround pentru optimizarea spatiului pe un server windows

Identificarea problemei, unde se duce spatiul.

In powershell ca admin:

Vedere rapidă — top foldere mari (PowerShell)

# Top 20 foldere pe C:\ sortate dupa dimensiune
Get-ChildItem C:\ -Recurse -ErrorAction SilentlyContinue |
  Where-Object { -not $_.PSIsContainer } |
  Group-Object DirectoryName |
  Select-Object Name, @{N='MB';E={[math]::Round(($_.Group | Measure-Object Length -Sum).Sum/1MB,1)}} |
  Sort-Object MB -Descending |
  Select-Object -First 20 |
  Format-Table -AutoSize

Verifică rapid fișierele sistem mari ascunse
# Fisiere sistem mari: pagefile, hiberfil, swapfile
Get-Item -Path C:\pagefile.sys, C:\hiberfil.sys, C:\swapfile.sys `
  -Force -ErrorAction SilentlyContinue |
  Select-Object Name, @{N='GB';E={[math]::Round($_.Length/1GB,2)}}

# Dimensiune WinSxS (raportata — include hardlink-uri, nu e exacta)
"{0:N2} GB" -f ((Get-ChildItem C:\Windows\WinSxS -Recurse -Force `
  -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum / 1GB)
Foldere de loguri și alte spatii cunoscute ca mari

1C:\Windows\Logs\CBS\ — loguri Component-Based Servicing (update-uri)

2C:\ProgramData\Microsoft\Windows\WER\ReportQueue\ — crash reports în așteptare

3C:\ProgramData\Microsoft\Windows\WER\ReportArchive\ — rapoarte arhivate

4C:\Windows\SoftwareDistribution\Download\ — update-uri descărcate de Windows Update

5C:\Windows\Temp\ și %TEMP% — fișiere temporare sistem și utilizator

6C:\inetpub\logs\LogFiles\ — loguri IIS (pot ajunge la zeci de GB pe servere web)

7C:\Windows\memory.dmp — kernel memory dump complet (egal cu RAM-ul serverului)

Pagefile tipic
8–64 GB
Hiberfil.sys
= RAM
WinSxS tipic
5–25 GB
Kernel dump
= RAM

 [mai mult...]		

How to install Puppy Linux

Puppy Linux is a lightweight Linux distribution designed to run efficiently on both modern and older computers. Unlike many Linux distributions, Puppy is designed to be fast, portable, and capable of running entirely from RAM, resulting in quick boot times and responsive performance.

Some notable features include:

  • Extremely small download size
  • Low memory usage
  • Runs entirely from RAM (on systems with sufficient memory)
  • Can operate without a traditional installation
  • Excellent support for older hardware
  • Easy backup through save files or save folders
  • Includes a large collection of built-in applications
Part 1 – Choosing a Puppy Linux Version

Several Puppy Linux variants are available, each built on different package ecosystems.

Popular choices include:

  • Ubuntu-based Puppy (compatible with Ubuntu packages)
  • Debian-based Puppy (compatible with Debian repositories)
  • Slackware-based Puppy
  • Official Puppy Linux community releases

When selecting a version, consider:

  • Hardware age
  • Required software compatibility
  • Available RAM
  • Processor architecture (64-bit or 32-bit)

For most modern systems, a recent 64-bit release is recommended.

Part 2 – Preparing Installation Media

Requirements

  • USB flash drive (4 GB or larger)
  • Internet connection
  • ISO image
  • USB writing utility

Download the desired Puppy Linux ISO. Verify the checksum if one is provided. Create a bootable USB using your preferred imaging utility.

Part 3 – Booting Puppy Linux
  1. Insert the USB drive
  2. Enter the computer’s boot menu
  3. Select the USB device
  4. Boot Puppy Linux.

Most versions present a boot menu with default options.Choose the default entry unless you require special hardware options.

Part 4 – First Boot

Puppy usually starts directly into the desktop. Unlike many Linux distributions, you are often logged in automatically.

The desktop typically includes:

  • File manager
  • Terminal
  • Browser
  • Package Manager
  • Setup Wizard
  • System utilities
Part 5 – Initial Setup Wizard

Run the setup wizard if it does not start automatically.

Configure:

  • Keyboard layout
  • Display resolution
  • Time zone
  • Language
  • Locale
  • Hostname (if applicable)

Apply the settings.

Part 6 – Configure Networking

Wired Ethernet

Most wired connections are configured automatically.Verify connectivity by opening a browser or using:

ping puppylinux.com

Wi-Fi

Open the Network Wizard.

Select:

  • Wireless adapter
  • Available network
  • Enter Wi-Fi password
  • Connect

Save the profile for automatic reconnection.

Part 7 – Install to Internal Drive

Puppy Linux can operate in several ways:

Live USB

Runs directly from the USB drive.

Advantages:

  • No changes to internal disks
  • Portable
  • Easy testing
Frugal Installation

The recommended installation method.

Characteristics:

  • Uses only a few files
  • Shares partitions with other operating systems
  • Easy upgrades
  • Supports save files
  • Fast booting
Full Installation

A traditional Linux installation. Generally recommended only for specific use cases such as systems with very limited RAM or specialized requirements.

Part 8 – Frugal Installation

Launch the Puppy Installer.

Select:

  • Internal drive
  • Target partition

Copy:

  • vmlinuz
  • initrd
  • Main Puppy SFS file
  • Additional SFS modules if required

Install a bootloader.

Most recent systems use GRUB.Legacy BIOS systems may use GRUB Legacy or GRUB4DOS depending on the Puppy version.Reboot.

Part 9 – Save Files and Save Folders

One unique Puppy Linux feature is persistent storage.When shutting down for the first time, Puppy asks whether to save your session.Options include:

Advantages:

  • Portable
  • Easy backup
  • Fixed size

Typical sizes:

  • 512 MB
  • 1 GB
  • 2 GB
  • Larger as needed
Save Folder

Advantages:

  • Dynamic size
  • Better for large storage devices
  • No predefined size limit

Generally preferred on Linux-native filesystems.

Part 10 – Understanding the Filesystem

Important directories include:

/root

Default home directory.

/mnt

Mounted drives.

/etc

System configuration.

/usr

Applications.

/var

Logs and runtime data.

Part 11 – Updating Puppy Linux

Unlike rolling distributions, Puppy updates vary depending on the specific release.

Recommended approach:

  • Update package repositories
  • Install security updates when available
  • Upgrade individual applications as needed
  • Consider upgrading to a newer Puppy release periodically.
Part 12 – Package Management

Open Puppy Package Manager.

Features include:

  • Search packages
  • Install software
  • Remove packages
  • Manage repositories
  • View dependencies

Depending on the Puppy variant, packages may originate from:

  • Ubuntu
  • Debian
  • Slackware
  • Puppy repositories
Part 13 – Installing Additional Software

Examples include:

Development:

  • GCC
  • Make
  • CMake

Office:

  • LibreOffice

Graphics:

  • GIMP
  • Inkscape

Media:

  • VLC
  • Audacity

Development tools:

  • Git
  • Python
  • Node.js
Part 14 – Browser Installation

Many Puppy releases include a lightweight browser.

Alternatives include:

  • Firefox
  • Chromium
  • Pale Moon (where available)
  • Other compatible browsers

Install using the Puppy Package Manager or the package format supported by your Puppy variant.

Part 15 – Configure Audio

Open:

Setup → Sound Wizard

Verify:

  • Audio output
  • Microphone
  • Volume levels

Use the mixer utility to adjust sound levels.

Part 16 – Configure Printing

Open:

Printer Setup

Typical workflow:

  1. Detect printer.
  2. Install drivers if necessary.
  3. Configure the printer.
  4. Print a test page.

Many network printers are automatically detected.

Part 17 – Configure Display

Open the display configuration utility.

Adjust:

  • Resolution
  • Refresh rate
  • Multi-monitor settings (if supported)
  • Screen orientation

Apply and test changes.

Part 18 – Installing Drivers

Most hardware drivers are included in the Linux kernel.For proprietary graphics or wireless hardware, consult the documentation for your Puppy Linux variant to determine whether additional drivers are available.After installation, reboot if prompted.

Part 19 – Installing Development Tools

For software development, install:

  • GCC
  • G++
  • Make
  • Git
  • CMake
  • Python
  • OpenJDK (if needed)

Many Puppy releases also provide a “devx” SFS module containing compilers and development libraries that can be loaded without permanently installing every development package.

Part 20 – Automatic Startup

Applications can be started automatically during login.

Common startup items include:

  • Cloud synchronization
  • Clipboard managers
  • Custom scripts
  • Monitoring tools

Review the startup configuration provided by your Puppy version before adding applications.

Part 21 – Backups

Recommended backup strategy:

  • Backup the save file or save folder regularly
  • Backup personal files separately
  • Keep copies on an external drive
  • Test restoring backups occasionally.

Because most personal changes are stored in the save file/folder, copying it is often sufficient to preserve your environment.

Part 22 – Performance Optimization
  • Reduce startup applications
  • Remove unused packages
  • Use lightweight applications
  • Clear browser caches periodically.
  • Unload unnecessary services.

Puppy Linux is already highly optimized, so these steps generally yield modest improvements.

Part 23 – Security

Recommendations:

  • Use strong passwords where applicable.
  • Enable the firewall if your Puppy version provides one.
  • Install software only from trusted repositories.
  • Keep applications updated.
  • Avoid running unknown software with elevated privileges.
Part 24 – Useful Applications

Recommended software:

Productivity

  • LibreOffice
  • AbiWord

Internet

  • Firefox
  • Chromium

Media

  • VLC
  • MPV

Graphics

  • GIMP
  • Inkscape

Utilities

  • GParted
  • htop
  • rsync

Development

  • Git
  • Python
  • GCC.
[mai mult...]

NixOS installation guide

NixOS is a Linux distribution built around the Nix package manager, where the entire operating system is described as code. Instead of manually installing software and editing configuration files, you define your desired system state in configuration files.

Advantages include:

  • Fully reproducible systems
  • Atomic upgrades and rollbacks
  • Declarative package management
  • Reliable dependency isolation
  • Easy migration between machines
  • Excellent development environments

Part 1 – Preparation

Requirements

  • 8 GB RAM minimum (16 GB recommended)
  • 30+ GB storage
  • USB flash drive (4 GB or larger)
  • Internet connection
  • UEFI firmware (recommended)

Download the latest NixOS ISO and verify its checksum before writing it to a USB drive.

Part 2 – Booting
  1. Boot from the installation USB.
  2. Select the graphical installer or minimal installer.
  3. Open a terminal.

Become root if necessary:

sudo -i

Confirm networking:

ping nixos.org
Part 3 – Identify Storage

List disks:

lsblk

Example:

nvme0n1
├─nvme0n1p1
├─nvme0n1p2

Assume:

Disk:
/dev/nvme0n1
Part 4 – Partitioning

Using GPT:

parted /dev/nvme0n1 -- mklabel gpt

EFI partition:

parted /dev/nvme0n1 -- mkpart ESP fat32 1MiB 512MiB
parted /dev/nvme0n1 -- set 1 esp on

Root:

parted /dev/nvme0n1 -- mkpart primary 512MiB 100%
Part 5 – Filesystems

Format EFI:

mkfs.fat -F32 /dev/nvme0n1p1

Format root:

mkfs.ext4 /dev/nvme0n1p2
Part 6 – Mount
mount /dev/nvme0n1p2 /mnt

mkdir -p /mnt/boot

mount /dev/nvme0n1p1 /mnt/boot
Part 7 – Generate Configuration
nixos-generate-config --root /mnt

Files created:

/mnt/etc/nixos/configuration.nix

/mnt/etc/nixos/hardware-configuration.nix
Part 8 – Initial Configuration

Edit:

nano /mnt/etc/nixos/configuration.nix

Example:

{ config, pkgs, ... }:

{
  imports = [
    ./hardware-configuration.nix
  ];

  boot.loader.systemd-boot.enable = true;

  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "desktop";

  time.timeZone = "Europe/Bucharest";

  i18n.defaultLocale = "en_US.UTF-8";

  services.xserver.enable = true;

  services.displayManager.gdm.enable = true;

  services.desktopManager.gnome.enable = true;

  users.users.alex = {
    isNormalUser = true;
    extraGroups = [ "wheel" "networkmanager" ];
  };

  networking.networkmanager.enable = true;

  environment.systemPackages = with pkgs; [
    git
    vim
    wget
    curl
  ];

  system.stateVersion = "26.05";
}
Part 9 – Install
nixos-install

Set root password.

Reboot:

reboot

Remove the USB.

Part 10 – Enable Flakes

Edit:

/etc/nixos/configuration.nix

Add:

nix.settings.experimental-features = [
  "nix-command"
  "flakes"
];

Rebuild:

sudo nixos-rebuild switch
Part 11 – Convert to Flake

Directory:

/etc/nixos

Create:

flake.nix

Example:

{
  description = "Desktop";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  };

  outputs = { self, nixpkgs }:

  {
    nixosConfigurations.desktop =
      nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";

        modules = [
          ./configuration.nix
        ];
      };
  };
}

Rebuild:

sudo nixos-rebuild switch --flake /etc/nixos#desktop
Part 12 – Install Packages

Temporarily:

nix shell nixpkgs#ripgrep

Run once:

nix run nixpkgs#hello

Permanent:

environment.systemPackages = with pkgs; [
  firefox
  git
  neovim
  ripgrep
  fd
  htop
  tmux
];
Part 13 – Home Manager

Install Home Manager as a flake input.

Benefits:

  • User configuration as code
  • Dotfile management
  • Reproducible shell configuration
  • Declarative editor setup
  • Version-controlled user environment

Example modules:

  • Git
  • Zsh
  • Bash
  • Neovim
  • Alacritty
  • Kitty
  • VS Code
  • SSH
  • GPG
  • Starship
Part 14 – Garbage Collection

Delete old generations:

sudo nix-collect-garbage -d

Automatic cleanup:

nix.gc = {
  automatic = true;
  dates = "weekly";
  options = "--delete-older-than 30d";
};
Part 15 – Rollbacks

List generations:

sudo nix profile history

Rollback:

sudo nixos-rebuild switch --rollback

You can also select previous system generations directly from the bootloader if a rebuild prevents the system from booting.

Part 16 – System Upgrades

Update flake inputs:

nix flake update

Apply:

sudo nixos-rebuild switch --flake /etc/nixos
Part 17 – Useful Services

SSH:

services.openssh.enable = true;

Docker:

virtualisation.docker.enable = true;

PipeWire:

services.pipewire = {
  enable = true;
  pulse.enable = true;
};

Printing:

services.printing.enable = true;

Bluetooth:

hardware.bluetooth.enable = true;
Part 18 – Development

Example development shell:

{
  description = "Example dev shell";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

  outputs = { self, nixpkgs }:
  let
    pkgs = import nixpkgs {
      system = "x86_64-linux";
    };
  in {
    devShells.x86_64-linux.default =
      pkgs.mkShell {
        packages = with pkgs; [
          git
          gcc
          cmake
          python3
        ];
      };
}

Enter:

nix develop
Part 19 – Recommended Repository Layout
nixos/

├── flake.nix
├── flake.lock
├── hosts/
│   └── desktop
├── modules/
│   ├── networking.nix
│   ├── users.nix
│   ├── desktop.nix
│   ├── fonts.nix
│   └── services.nix
├── home/
│   ├── git.nix
│   ├── shell.nix
│   ├── nvim.nix
│   └── zsh.nix

Keeping configuration modular makes it easier to reuse components across multiple systems and simplifies maintenance.

Part 20 – Troubleshooting

Configuration errors

Validate before switching:

sudo nixos-rebuild test

Boot issues

  • Confirm the EFI partition is mounted at /boot.
  • Verify boot.loader.systemd-boot.enable = true;.
  • Ensure UEFI mode is enabled in firmware.

Network problems

Verify NetworkManager:

systemctl status NetworkManager

Flake errors

Refresh lock file:

nix flake update

Or remove flake.lock and regenerate it if dependency resolution becomes inconsistent.

[mai mult...]