NixOS-Config/README.md

35 lines
2.1 KiB
Markdown
Raw Normal View History

2024-09-10 22:03:52 -04:00
## My Nix files, now organized in a flake.
2024-08-24 22:16:51 -04:00
2024-09-10 21:57:34 -04:00
Thanks for taking a look at my Nix* configs!
While this is primarily organized for my use only, you may find each individual service file or user config to be a good starting point, or something to take and adapt into your own config.
2024-07-30 08:49:49 -04:00
2024-09-10 22:03:52 -04:00
### Installation
2024-09-10 21:57:34 -04:00
Installing any of my flakes onto a system should be done after any initial install. I would opt to do a minimal install, but this is up to you.
After installing NixOS, backup your hardware-config.nix file, so you can adapt it to fit the format of ``nixos/hardware/machines``, then adjusting the other referenced files in the flake.nix file to reference your specific computer.
2024-09-10 22:05:26 -04:00
An initial install will have to be ran as ``nixos-rebuild switch --flake /etc/nixos/.#HOSTNAME``, where HOSTNAME is a hostname defined in your flake. You may also have to enable "experimental" features with a flag, such as nix-command and flakes.
2024-09-10 21:57:34 -04:00
Home-Manager is handled separately, despite being in the same folder. A rebuild of a user's home would have to be done with ``home-manager switch --flake /etc/nixos``. This will pull the config as defined in the flake as ``USER@HOSTNAME``, where USER is the user running the ``home-manager`` command.
2024-09-10 22:03:52 -04:00
### Usage
My config uses these tools:
2024-09-10 22:06:16 -04:00
Sway - Window manager / Desktop
Foot - Terminal emulator
Rofi - App launcher and menu system
ZSH - Primary shell
2024-09-10 21:57:34 -04:00
2024-09-10 22:03:52 -04:00
I have made shell aliases in ZSH for rebuilding the system. They are as follows:
`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.
`nixswitch` = Switch to new config for both user and system.
`nixdate` = Same as before, but updating flake.nix before doing so. This is essentially a full system update.
My config heavily references a gnupg-protected secrets file. These will have to be adapted and rewritten if anyone is to use my config for themselves.
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-07-30 08:51:17 -04:00
Made with love ❤️
2024-08-24 22:16:51 -04:00
![image](./preview.png)