NixOS-Config/README.md

40 lines
2.6 KiB
Markdown
Raw Normal View History

2024-10-20 20:10:51 -04:00
## Jimbo's Nix Systems
2024-08-24 22:16:51 -04:00
2024-10-20 20:10:51 -04:00
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.
2024-07-30 08:49:49 -04:00
2024-09-10 22:03:52 -04:00
### 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.
2024-09-10 21:57:34 -04:00
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.
2024-10-20 20:10:51 -04:00
Home-Manager is handled separately from the system, despite being in the same folder. A rebuild of a user's home is done with ``home-manager switch --flake /etc/nixos/.#user@host``, as defined under ``homeConfigurations`` in the flake.
2024-09-10 21:57:34 -04:00
2024-09-10 22:03:52 -04:00
### Usage
2024-09-10 22:08:17 -04:00
My config uses these tools:
2024-10-19 00:34:06 -04:00
``Sway`` - Window manager / Desktop
``ZSH`` - Primary shell
``Foot`` - Terminal emulator
``Rofi`` - App launcher and menu system
2024-09-10 21:57:34 -04:00
2024-10-21 04:00:41 -04:00
I have defined shell aliases in ZSH for rebuilding different parts of Nix, they are as follows:
2024-09-10 22:08:17 -04:00
`flakedate` - Update the flake.lock, which renews the sources of nixpkgs. This is needed to update the system.
`sysswitch` - Switch the system profile.
`homeswitch` = Switch the user's home-manager profile.
2024-10-21 04:00:41 -04:00
`nixswitch` = Switch both user and system profile.
2024-09-10 22:08:17 -04:00
`nixdate` = Same as before, but updating flake.nix before doing so. This is essentially a full system update.
2024-09-10 22:03:52 -04:00
2024-10-21 04:00:41 -04:00
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.
2024-09-10 22:07:09 -04:00
For my use, unlocking secrets can be done with this command:
2024-09-10 21:57:34 -04:00
``gpg --pinentry-mode loopback --decrypt local.key.asc | git-crypt unlock -``
2024-09-03 00:06:12 -04:00
2024-10-16 02:28:08 -04:00
### Credits
2024-10-16 02:29:00 -04:00
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.
2024-10-19 00:55:21 -04:00
[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.
2024-10-16 02:29:00 -04:00
[Jules Sommer's minimal flake](https://github.com/WillPower3309/swayfx) for giving me a good basis for writing individual files and repeatedly helping me throughout the entire process.
2024-10-16 02:28:08 -04:00
2024-07-30 08:51:17 -04:00
Made with love ❤️
2024-08-24 22:16:51 -04:00
![image](./preview.png)