2023-07-31 00:21:32 -04:00
|
|
|
# iiogama's Personal NixOS/Home-Manager Configuration
|
|
|
|
|
|
|
|
## How to build existing system with flake
|
|
|
|
|
|
|
|
```
|
|
|
|
cd <build repo>
|
|
|
|
sudo nixos-rebuild switch --flake ".#<hostname>"
|
|
|
|
```
|
|
|
|
|
2023-09-28 21:28:33 -04:00
|
|
|
## How to update existing system's packages
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo nixos-rebuild switch --flake ".#<hostname>" --update-input nixpkgs --commit-lock-file
|
|
|
|
```
|
|
|
|
|
2023-07-31 00:21:32 -04:00
|
|
|
## How to install new system with flake
|
|
|
|
|
|
|
|
1. Boot into live NixOS disk and run the following commands:
|
|
|
|
```
|
|
|
|
sudo su
|
|
|
|
nix-env -iA nixos.git
|
|
|
|
git clone <repo url> /mnt/etc/nixos
|
|
|
|
nixos-install --flake ".#<host>"
|
|
|
|
```
|
|
|
|
2. Reboot machine, log in, and run the following commands:
|
|
|
|
```
|
|
|
|
sudo rm -r /etc/nixos/configuration.nix
|
|
|
|
```
|
|
|
|
3. Move build to desired location.
|
|
|
|
|
|
|
|
## Nix commands to remember
|
|
|
|
|
|
|
|
```
|
|
|
|
nix flake update
|
|
|
|
nix run nixpkgs#<package>
|
|
|
|
```
|
2023-08-02 10:10:29 -04:00
|
|
|
|
|
|
|
## Resources
|
|
|
|
|
|
|
|
- [Zero To Nix](https://zero-to-nix.com)
|
|
|
|
- [The Cute World's NixOS Guide](https://thiscute.world/en/posts/nixos-and-flake-basics/)
|
|
|
|
- [NixOS Wiki](https://nixos.wiki/)
|
|
|
|
- [The Nix Hour YouTube Playlist](https://www.youtube.com/playlist?list=PLyzwHTVJlRc8yjlx4VR4LU5A5O44og9in)
|
|
|
|
- [Nixology YouTube Playlist](https://www.youtube.com/playlist?list=PLRGI9KQ3_HP_OFRG6R-p4iFgMSK1t5BHs)
|
|
|
|
- [Nixcloud](https://nixcloud.io)
|
|
|
|
|
|
|
|
## Todo
|
|
|
|
|
|
|
|
- [ ] Create additional host configurations
|
|
|
|
- [ ] Implement the Impermanence module
|
|
|
|
- [ ] Implement [Agenix](https://nixos.wiki/wiki/Agenix) or Sopsnix
|
|
|
|
- [ ] Implement [Stylix](https://danth.github.io/stylix/)
|
|
|
|
- [ ] Implement [MicroVM.nix](https://github.com/astro/microvm.nix)
|
2023-11-21 21:24:59 -05:00
|
|
|
- [ ] Figure out urlview and yank conflict with tmux plugins
|