Skip to content

Commit

Permalink
reorganise dotfiles structure (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
2giosangmitom authored May 30, 2024
1 parent d17c7d7 commit e19c7b8
Show file tree
Hide file tree
Showing 54 changed files with 869 additions and 1,078 deletions.
13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
rebuild:
sudo nixos-rebuild switch

update:
nix flake update

gc:
sudo nix-collect-garbage -d

Expand Down
211 changes: 94 additions & 117 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,152 +1,129 @@
<h1 align="center">❄️ Dotfiles ❄️</h1>
<p align="center">A Flake-powered NixOS setup for Developers with Hyprland</p>

<div align="center">
<a href="https://github.com/2giosangmitom/dotfiles/stargazers">
<img src="https://img.shields.io/github/stars/2giosangmitom/dotfiles?style=for-the-badge&logo=starship&color=C9CBFF&logoColor=D9E0EE&labelColor=302D41" />
</a>
<a href="https://github.com/2giosangmitom/dotfiles/pulse">
<img src="https://img.shields.io/github/last-commit/2giosangmitom/dotfiles?style=for-the-badge&logo=github&color=7dc4e4&logoColor=D9E0EE&labelColor=302D41" />
</a>
<a href="https://github.com/2giosangmitom/dotfiles/forks">
<img src="https://img.shields.io/github/forks/2giosangmitom/dotfiles.svg?style=for-the-badge&logo=starship&color=8bd5ca&logoColor=D9E0EE&labelColor=302D41" />
</a>
<a>
<img src="https://img.shields.io/github/repo-size/2giosangmitom/dotfiles?color=%23DDB6F2&label=SIZE&logo=codesandbox&style=for-the-badge&logoColor=D9E0EE&labelColor=302D41" />
</a>
<a href="https://github.com/2giosangmitom/dotfiles/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/2giosangmitom/dotfiles?style=for-the-badge&logo=starship&color=ee999f&logoColor=D9E0EE&labelColor=302D41" />
</a>
</div>
# NixOS Dotfiles ❄️

## Table of Contents

- [Introduction](#introduction)
- [What Awaits You?](#what-awaits-you)
- [Getting Started](#getting-started)
- [Essential NixOS Commands](#essential-nixos-commands)
- [Screenshots](#screenshots)
- [Nix Community Resources](#nix-community-resources)
- [Contributing](#contributing)
- [Acknowledgements](#acknowledgements)

## Introduction

Welcome to my haven of personalized NixOS bliss, featuring the sleek Hyprland window manager and meticulously configured CLI tools! This repository crafts a delightful system experience using the power of flakes and home-manager. With this configuration, you can easily replicate my personalized development environment on any NixOS machine.

## What Awaits You?

- **Flake Repository:** Leverage flakes for a future-proof, modular, and collaborative configuration.
- **Modular Design:** Configuration is organized into modules for easier management and customization.
- **CLI Command Central:** Enjoy a meticulously configured suite of command-line tools for a productive workflow.
- **Home-Manager Integration:** Manage user-specific packages and configurations with ease.
- **Hyprland WM:** Embrace the efficient and aesthetically pleasing Hyprland window manager.
- **Performance Optimization:** Optimized resource utilization, finely tuned configurations, and streamlined workflows ensure that your NixOS environment delivers unparalleled performance, enabling you to accomplish more with less, without compromising on speed, responsiveness, or stability.
![](https://img.shields.io/github/stars/2giosangmitom/dotfiles?style=for-the-badge&logo=starship&color=C9CBFF&logoColor=D9E0EE&labelColor=302D41)
![](https://img.shields.io/github/last-commit/2giosangmitom/dotfiles?style=for-the-badge&logo=github&color=7dc4e4&logoColor=D9E0EE&labelColor=302D41)
![](https://img.shields.io/github/forks/2giosangmitom/dotfiles.svg?style=for-the-badge&logo=starship&color=8bd5ca&logoColor=D9E0EE&labelColor=302D41)
![](https://img.shields.io/github/repo-size/2giosangmitom/dotfiles?color=%23DDB6F2&label=SIZE&logo=codesandbox&style=for-the-badge&logoColor=D9E0EE&labelColor=302D41)

## Getting Started
Welcome to my personal NixOS configuration! This setup is tailored for my daily use with the Sway window manager and includes the management of home configurations using Home-Manager. Additionally, this configuration leverages Nix flakes for improved reproducibility and ease of use. This README will guide you through the structure, components, and instructions to deploy this configuration.

This guide outlines the steps to set up your personalized NixOS environment using this dotfiles repository.
## Table of Contents

**Prerequisites:**
1. [Overview](#overview)
2. [Prerequisites](#prerequisites)
3. [Deployment Steps](#deployment-steps)
4. [Configuration Structure](#configuration-structure)
5. [Key Components](#key-components)
6. [Community Resources](#community-resources)
7. [Contributing](#contributing)

- **Nix Installed**: Ensure you have Nix installed on your system. Refer to the official documentation for installation instructions: [https://nixos.org/download/](https://nixos.org/download/)
- **Git Installed**: You'll need Git to clone the repository.
- **Flakes Enabled**: NixOS uses flakes as an experimental feature, you should enable it manually.
- For a more in-depth explanation of enabling flakes in NixOS, refer to this excellent resource: [https://thiscute.world/en/posts/nixos-and-flake-basics/](https://thiscute.world/en/posts/nixos-and-flake-basics/)
## Overview

**Deployment steps:**
This repository contains my customized NixOS configuration files aimed at providing a robust and efficient environment for daily tasks. The configuration utilizes the Sway window manager, offering a seamless and dynamic tiling experience. Additionally, Home-Manager is used to manage user-specific configurations and dotfiles, and Nix flakes are used for better reproducibility.

1. **Taking ownership**
## Prerequisites

Before cloning the repository, ensure your user has ownership of the /etc/nixos directory. Run the following command, replacing `username` with your actual username:
Before you begin, ensure you have met the following requirements:
- A basic understanding of NixOS and its configuration system.
- A machine ready to install NixOS.
- Nix with flakes enabled. If flakes are not enabled, you can do so by adding `experimental-features = nix-command flakes` to your `~/.config/nix/nix.conf`.

<pre>
sudo chown <i>username</i>:users /etc/nixos
</pre>
## Deployment Steps

2. **Clone the repository**
1. **Taking Ownership 🛠️**

Get started by cloning this repository into the `/etc/nixos` directory. This command pulls down the configuration files:
Before cloning the repository, ensure your user has ownership of the `/etc/nixos` directory. Run the following command, replacing `username` with your actual username:

```
git clone https://github.com/2giosangmitom/dotfiles.git /etc/nixos
```

3. **Unleash Your Customization Power!**
```bash
sudo chown <username>:users /etc/nixos/**
```

This configuration lays a robust groundwork for your customized NixOS environment. Dive in and tailor it to suit your unique requirements! With an array of customization options at your disposal, you have the power to shape this configuration into a dynamic and personalized NixOS environment that aligns perfectly with your workflow and preferences. Embrace experimentation and unleash your creativity to make it truly your own!
2. **Clone the Repository 📥**

**Configuration Breakdown:**
Get started by cloning this repository into the `/etc/nixos` directory. This command pulls down the configuration files:

- **Home Manager**:
```bash
git clone https://github.com/2giosangmitom/dotfiles.git /etc/nixos
```

- User-specific packages and configurations reside within the `./home` directory. This includes Hyprland, CLI tools configuration files for a seamless setup.
- `./home/default.nix`: This file acts as the entry point for your home manager configuration.
3. **Unleash Your Customization Power! 🎨**

- **Modules**:
This configuration lays a robust groundwork for your customized NixOS environment. Dive in and tailor it to suit your unique requirements! With an array of customization options at your disposal, you have the power to shape this configuration into a dynamic and personalized NixOS environment that aligns perfectly with your workflow and preferences. Embrace experimentation and unleash your creativity to make it truly your own!

- Shared NixOS configurations that multiple configurations rely on are organized within the `./modules` directory. This promotes reusability and reduces redundancy.
4. **Rebuild (Applying Changes) 🔧**

- **Multi-Machine Management**:
After making customizations to your configuration, run the following command to rebuild your NixOS system and apply the changes:

- Manage configurations across different hardware setups using the `./hosts` directory.
- To generate the `hardware-configuration.nix` file for a specific machine, simply run the following command in your terminal:
```bash
nixos-generate-config
sudo nixos-rebuild switch --flake .#yourhostname
```

4. **Rebuild (Applying Changes)**

After making customizations to your configuration, run the following command to rebuild your NixOS system and apply the changes:
## Configuration Structure 🗂️

The repository is organized as follows:
```
sudo nixos-rebuild switch
dotfiles/
├── backgrounds # Directory containing background images
│ ├── uwp4227671.jpeg
│ ├── uwp4227673.jpeg
│ └── ...
├── flake.lock # Nix flake lock file
├── flake.nix # Starting point for NixOS configuration
├── hosts # Directory for host-specific configurations
│ └── nixos
│ └── default.nix # Host-specific configuration for NixOS
├── Makefile # Simplify some command
├── modules # Directory containing Nix modules
│ ├── home-manager # Home-Manager configurations
│ │ ├── alacritty.nix
│ │ ├── default.nix
│ │ ├── dunst.nix
│ │ ├── fastfetch.nix
│ │ ├── git.nix
│ │ ├── lazygit.nix
│ │ ├── rofi # Rofi configurations
│ │ │ ├── confirm.rasi
│ │ │ ├── launcher.rasi
│ │ │ ├── launch.sh
│ │ │ └── powermenu.rasi
│ │ ├── scripts # Useful scripts
│ │ │ ├── input_method.sh
│ │ │ ├── random_bg.sh
│ │ │ └── uptime.sh
│ │ ├── shell.nix # Shell configuration (includes fish, starship)
│ │ ├── sway.nix # Sway configuration
│ │ └── yazi.nix
│ └── nixos
│ └── default.nix # Shared NixOS configuration
├── overlays # Directory for package overlays
│ └── bob-nvim.nix
└── pkgs # Custom packages
└── bob-nvim.nix
```

## Essential NixOS Commands
This table summarizes some helpful NixOS commands you can run from the root directory of your terminal:
| Command | Description |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `make up` | Updates the system by installing new packages. |
| `make gc` | Collects Nix garbage, which removes unused Nix expressions and old generations of your NixOS system. This helps to free up disk space. |
| `make history` | Displays a history of your NixOS generations, allowing you to view and potentially roll back to previous configurations. |
| `make rebuild` | Rebuilds your entire NixOS system based on your current configuration. This is necessary after making changes to your configuration files. |
## Key Components 🔑

## Screenshots
- **Sway Window Manager**: A tiling window manager inspired by i3, but built for Wayland.
- **Waybar**: A customizable status bar for Sway.
- **Nixpkgs**: Custom packages and overlays.
- **Home-Manager**: Manages user-specific configurations and dotfiles.
- **Alacritty**: A fast, cross-platform, OpenGL terminal emulator.
- **fish**: A friendly interactive shell, managed through Home-Manager.
- **Nix Flakes**: For reproducible and manageable configurations.

<details>
<summary>Hyprland</summary>
<div align="center">
<img src="./screenshots/hyprland.png" />
</div>
</details>
## Community Resources 📚

<details>
<summary>Rofi</summary>
<div align="center">
<img src="./screenshots/rofi_launcher.png" />
<img src="./screenshots/rofi_powermenu.png" />
</div>
</details>
- **NixOS & Flakes Book**: [https://nixos-and-flakes.thiscute.world/](https://nixos-and-flakes.thiscute.world/)
- **Flakes Docs**: [https://nixos.wiki/wiki/Flakes](https://nixos.wiki/wiki/Flakes)
- **Nix Reference Manual**: [https://nix.dev/manual/nix/2.18/introduction](https://nix.dev/manual/nix/2.18/introduction)
- **Zero to Nix**: [https://zero-to-nix.com/](https://zero-to-nix.com/)

## Community Resources
## Contributing 🤝

- NixOS Discourse: [https://discourse.nixos.org/](https://discourse.nixos.org/)
- NixOS & Flakes Book: [https://nixos-and-flakes.thiscute.world/](https://nixos-and-flakes.thiscute.world/)
- Hyprland Docs: [https://wiki.hyprland.org/](https://wiki.hyprland.org/)
- Flakes Docs: [https://nixos.wiki/wiki/Flakes](https://nixos.wiki/wiki/Flakes)
- Nix Reference Manual: [https://nix.dev/manual/nix/2.18/introduction](https://nix.dev/manual/nix/2.18/introduction)
## Contributing
Contributions are welcome! If you have any suggestions, improvements, or new features to add, feel free to open an issue or pull request.
## Acknowledgements
Special thanks to the NixOS community for their excellent tools and resources, without which this configuration wouldn't be possible.
Contributions are welcome! If you have any suggestions, feel free to fork the repository and create a pull request. For major changes, please open an issue first to discuss what you would like to change.

---

Happy hacking! 🚀
Thank you for checking out my NixOS configuration! If you encounter any issues or have any questions, please open an issue in this repository.

Happy hacking! 🎉
Binary file removed backgrounds/luffy.png
Binary file not shown.
Binary file added backgrounds/uwp4227671.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backgrounds/uwp4227673.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 33 additions & 20 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e19c7b8

Please sign in to comment.