## Nix Systems

Thanks for taking a look at my Nix* flake!
While this is primarily organized for my own use, you may find each individual service or config useful to read, reference, learn from, and adapt for your own systems.

### Installation
Installing this flake is best done from an existing system. A minimal install is fastest, but is up to you. After installing NixOS, backup your hardware-config.nix file, and adapt it to fit the format of ``/hosts``, adjusting for your specific system.

An initial install will can be done with ``nixos-rebuild switch --flake /etc/nixos/.#host``, where ``host`` is a hostname defined in this flake. You may also have to enable "experimental" features with a flag, such as nix-command and flakes.

Home-Manager is handled with the system, but can be used on other systems with Nix without root. A rebuild of a user's home is done with ``home-manager switch --flake /etc/nixos/.#user``, as defined under ``homeConfigurations`` in the flake.

### Usage
My config uses these tools:  
``Sway`` - Window manager / Desktop  
``ZSH`` - Primary shell  
``Foot`` - Terminal emulator  
``Rofi`` - App launcher and menu system  

Shell aliases are defined in the home manager config to rebuild the Nix system, they are as follows:  
`flakedate` - Update the flake.lock, which renews the sources of nixpkgs. This is needed to update the system.  
`nhs` - An alias for nh to switch the system profile.  

My server's config heavily references a git-crypt protected secrets file. These will have to be adapted and rewritten if anyone is to use my config directly.  
For my use, unlocking secrets can be done with this command:  
``gpg --pinentry-mode loopback --decrypt local.key.asc | git-crypt unlock -``

### Credits
Without the help of heavy inspiration, I would not have been able to learn and get up and running nearly as quickly. My most heavily borrowed configs are as follows:  
[CloudyChris' nix-starter-configs fork](https://github.com/CloudyChris/NixOsConfig), the very initial base of my conversion to flakes.  
[WillPower3309's personal flake](https://github.com/WillPower3309/nixos-config) for being a pleasure in the SwayFX Discord and having a really nice flake.nix file I borrowed from.  
[Jules Sommer's flake rewrite](https://github.com/jules-sommer/nix_config_rewrite) for giving me a good basis for writing individual files and repeatedly helping me throughout the entire process.  

Made with love ❤️
