# My NixOS Configurations

![Forgejo Issues](https://img.shields.io/gitea/issues/open/kb01/nix-config?gitea_url=https%3A%2F%2Fgit.kb-one.de)
![Forgejo Last Commit](https://img.shields.io/gitea/last-commit/kb01/aux-config?gitea_url=https%3A%2F%2Fgit.kb-one.de)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

This repository contains my Flake based NixOS Configuration Files.

## Usage

### Setup
Clone this Repository somewhere you can edit it easily:
```bash
git clone https://git.kb-one.de/kb01/aux-config ~/Project/aux-config
```

Check if the Hostname of your System matches one of the [Systems](./systems/).
```bash
hostname
```
<details>
  <summary>Hostname does not Match (click to expand)</summary>

  Install NixOS on the current System with forced Hostname.

  ```bash
  cd ~/Project/aux-config
  sudo nixos-rebuild switch --flake .#LoyAdjo
  ```

  > **Warning**
  > 
  > This will change the Hostname of your System to LoyAdjo!

</details>

Install NixOS System with current Hostname.
```bash
cd ~/Project/aux-config
sudo nixos-rebuild switch --flake .
```

### Updating the Flake based NixOS installation
```bash
cd ~/Project/aux-config
sudo nix flake --update   # This Updates the flake.lock
sudo nixos-rebuild switch --flake .
```

### Modify NixOS installation
1. Edit the config in ~/Project/aux-config `vim system/x86_64-linux/$HOST/default.nix`
2. Stage the Changes if you created or deleted Files `git add .` (They will be ignored if you miss this step!)
3. Build your System to apply the changes `sudo nixos-rebuild switch --flake .`
4. Commit your Changes if satisfied `git commit -m "Added Software hello-world"`
5. Then Push your Changes to the Remote, so that other systems can update `git push`

## Used Work

[Server Icon](./assets/server-solid.svg) © [FontAwesome](https://fontawesome.com) under the [CC BY 4.0 License](https://creativecommons.org/licenses/by/4.0/) 

## License

[MIT © kB01](./LICENSE)