This repository contains the configuration files for a NixOS system using Flakes. It provides a fully declarative system configuration for a Cinnamon-based desktop environment with essential tools, development utilities, and virtual machine support.
- Flake-Based Configuration: Ensures reproducible system builds.
- Cinnamon Desktop Environment: Lightweight and user-friendly.
- Essential Tools: Includes utilities, browsers, and development tools.
- VM Integration: Clipboard sharing via
spice-vdagent
.
- sudo nano /etc/nixos/configuration.nix
- Un-# services.openssh.enable = true;
- sudo nixos-rebuild switch --flake /etc/nixos#nixosvm
The entry point for the NixOS flake. It defines:
- The
nixpkgs
input. - The
outputs
section that points to theconfiguration.nix
file. - System architecture (
x86_64-linux
).
The main system configuration file. It includes:
- Flakes Enablement: Allows
nix-command
andflakes
features. - Display and Desktop: Configures X11, LightDM, and Cinnamon.
- Networking: Uses
NetworkManager
for network management. - Package Management: Declares system-wide packages, including:
- Basic tools:
git
,curl
,wget
,htop
- Browsers:
firefox
,brave
- Development:
python3
,gcc
,cmake
- Utilities:
vlc
,neofetch
,spice-vdagent
- Basic tools:
- User Management: Adds a user (
pi
) with passwordlesssudo
.
Ensure you have:
- A NixOS installation.
- The
nix-command
andflakes
features enabled.
git clone https://github.com/your-username/nixos-config.git
cd nixos-config
-
Copy the files to
/etc/nixos
:sudo cp flake.nix configuration.nix /etc/nixos/
-
Remove any existing
flake.lock
file:sudo rm /etc/nixos/flake.lock
-
Rebuild the system:
sudo nixos-rebuild switch --flake /etc/nixos
- Add Packages: Edit the
environment.systemPackages
section inconfiguration.nix
to include additional software. - Change Desktop Environment: Replace
cinnamon
with another desktop manager if needed. - Enable Services: Modify the
services
section to add or configure additional system services.
If you encounter errors about missing packages during the build process:
- Check if the package exists in your Nix channel:
nix search nixpkgs <package-name>
- Add or remove packages in
configuration.nix
.
Ensure flakes
and nix-command
are enabled in your NixOS configuration:
nix.settings.experimental-features = [ "nix-command" "flakes" ];
Contributions are welcome! Feel free to submit pull requests or open issues to improve this configuration.
This repository is licensed under the MIT License.
Let me know if you want to adjust any details or add additional sections! 🚀