nixos-config

❄️ NixOS configuration ❄️

built with garnix License Build Status: Flake GitGuardian scan Written in Nix NixOS Unstable GitHub release GitHub release date GitHub last commit Free

:star: Star us on GitHub — it motivates us a lot!

🚀 About

My personal NixOS configuration file.

It contains hardware/software configurations for setting up my personal/work machines.

[!IMPORTANT] As of this moment, I haven’t yet reached the point of deploying VMs using Nix, meaning that this configuration IS INTENDED TO BE USED FOR PERSONAL USE ONLY.

Please don’t try to copy-paste the configuration on your own machine and try to understand it first for the following reasons:

  1. It simply won’t work, due to the difference in hardware configuration between my machines and yours (for example gpu drivers, device IDs)
  2. You won’t learn much doing that, and later when you want to change something in your config it’ll be harder for you to achieve that
  3. This config structure is made by my personal taste, not yours … and if some certain functionalities are either missing or badly implemented - then you would need to fork my repo and make your desired change in your version. Nevertheless, I’m more than open to suggestions for improvements, so please feel free to open an issue!

🎉 Getting started

To get started, first run make setup for the script to label your nixos partition devices and enable secure boot. Follow the prompts when asked in the process.

🧐 How-to: Create new user

  1. Go to config.nix and add your user in the user attribute set (you can copy ikostov2 attrset and replace it with your desired one)
  2. Generate a hashed password for the user by executing mkpasswd --method=sha-512 and put it in the initialHashedPassword)
  3. Create a directory with name of your user at home/{username} and under that, create default.nix (you can copy default.nix content from ikostov2 and enable/disable the programs you need for your user)
  4. Build your system (e.g make sys-update-wl/pd)
  5. Finally build your user config for the new user (e.g make home-update DEFAULT_USER=new-username)
  6. You are all set!

🏝️ Environment

Environment screenshot 1 Environment screenshot 2

Structure details | Type | Program | | :------------- | :----------: | | Editor | [NeoVim](https://neovim.io/) | | Launcher | [Rofi](https://github.com/davatorium/rofi) | | Shell | [Zsh](https://ohmyz.sh/) | | Status Bar | [i3status-rust](https://github.com/greshake/i3status-rust) | | Terminal | [Alacritty](https://alacritty.org/) | | Window Manager | [I3WM](https://i3wm.org/) | | File Manager | [PcmanFM](https://en.wikipedia.org/wiki/PCMan_File_Manager) | | GTK Theme | [Adwaita](https://en.wikipedia.org/wiki/Adwaita_(design_language)) | | GTK Icon Theme | [Rose-pine](https://github.com/rose-pine/gtk) | | Terminal Font | [OxProto Nerd Font](https://www.nerdfonts.com/font-downloads) |

🧪 Used Nix features

  1. home-manager
  2. flakes

🏗️ Structure

.
├── archive
├── assets
├── config.nix
├── flake.lock
├── flake.nix
├── flakes
├── home
├── hosts
├── LICENSE
├── Makefile
├── programs
├── README.md
├── TODO.md
└── wallpaper.jpg

🧑‍💻 Commands

[!WARNING] Before starting to execute make commands, make sure to change the value of DEFAULT_USER to your preffered username, located in Makefile.

Command Description
make help Show available commands with their description
make home-update Build your home configuration
make sys-update-wl Build your system configuration for work laptop (Thinkpad p53)
make sys-update-pd Build your system configuration for personal desktop (AMD)
make flake-upgrade Upgrade flake dependencies
make flake-check Validate flake.nix
make flake-meta Output the flake input dependencies in a tree format
make clean Remove user generations
make clean-su Remove system generations
make show-gen Show all user generations
make deduplicate Optimize system libraries

🌱 Setup

[!CAUTION] The hardware specific configuration is most likely not going to properly work on your system, so please make sure after you install my configuration and immediately change the bootloader and file system values (located at config.nix) with your appropriate values!

Show instructions Install for work laptop (Thinkpad p53) or desktop PC (AMD). 1. Work laptop nixos-rebuild switch --flake github:iliyan-kostov9/nixos-config#hosts-work-laptop 2. Desktop PC nixos-rebuild switch --flake github:iliyan-kostov9/nixos-config#hosts-personal-desktop Afterwards enter `config.nix` and change the values of the file system and bootloader to the ones you currently have. You can also change the default username to your preferred one.

🤝 Acknowledgments

This configuration structure was inspired by contributions from the Nix community:

🔍️ References

This section helped me better understand Nix package manager and Nix language. Please have a read on them!

📚 Docs

:art: Assets

📃 License

This product is licensed under GNU General Public License