Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rshohruh/nix-minimal
https://github.com/rshohruh/nix-minimal
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rshohruh/nix-minimal
- Owner: rshohruh
- License: mit
- Created: 2024-10-16T02:51:31.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T17:55:07.000Z (3 months ago)
- Last Synced: 2024-11-11T15:43:50.580Z (2 months ago)
- Language: Nix
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.