Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rshohruh/nix-minimal


https://github.com/rshohruh/nix-minimal

Last synced: 13 days ago
JSON representation

Awesome Lists containing this project

README

        

# 🌟 My NixOS Configuration minimal config
## πŸ“‚ Directory Structure
This repository contains my NixOS configuration files structured for use with flakes and Home Manager. The directory structure is as follows:
```
.
β”œβ”€β”€ flake.nix
β”œβ”€β”€ flake.lock
β”œβ”€β”€ home-manager
β”‚ └── home.nix # Main Home Manager configuration file
└── nixos
β”œβ”€β”€ configuration.nix # Main NixOS system configuration file
└── hardware-configuration.nix # Hardware-specific configurations
```
## πŸ“„ Important Files
- `flake.nix`: The entry point for managing the configuration and its dependencies.
- `home.nix`: The main Home Manager configuration file, where user-specific packages and settings are managed.
- `configuration.nix`: The main NixOS system configuration file for managing system-wide settings.
- `hardware-configuration.nix`: Contains hardware-specific configurations generated during installation.

## πŸ› οΈ Managing Packages with Home Manager

### βž• Adding Packages
All user-specific packages are installed through Home Manager. To add a new package, you can update the `home.nix` file.

For example, to install `htop`, follow these steps:

1. Open the `home.nix` file.
2. Add the desired package to the `home.packages` list. Here’s how to include htop:

```nix
# home-manager/home.nix

{
...
home.packages = with pkgs; [
# Existing user packages
...
htop # Add your desired package here
];
...
}
```
3. After making changes, run the following command to apply them:
```bash
home-manager switch --flake .#rshohruh@nixos
```
## πŸ’‘ Tips
- **Installing New Packages**: Whenever you want to install a new package, just add it to the `home.packages` list in your Home Manager configuration file.
- **Modular Configuration**: Feel free to create additional configuration files to keep your setup organized. Import these files in `home.nix` to include their settings.
- **Be Aware**: Always ensure that any hardware-specific settings are defined in the `hardware-configuration.nix` file and referenced correctly in your NixOS configuration.

- πŸ™ Thanks
Special thanks to the owner of the [Nix Starter Configs](https://github.com/Misterio77/nix-starter-configs/tree/main) repository for providing a great template that helped in setting up this configuration! πŸŽ‰

## πŸ“œ License
This repository is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more information.