47 lines
No EOL
1.3 KiB
Markdown
47 lines
No EOL
1.3 KiB
Markdown
# NixOS Dotfiles
|
|
|
|
The package manager Nix, and the OS built around it; [NixOS](https://nixos.org/), work by focusing the whole of the system's configuration on just a few, functionally-programmed files that'll reproduce the exact system you want.
|
|
|
|
This offers immutability and testability, which is a great strength for workstations.
|
|
|
|
These are those files.
|
|
|
|
## NOTICE
|
|
If you wish to use this, ***CHANGE `nixos/hardware-configuration*** FOR YOUR OWN.*** It contains hard drive GUID labels, which you do not have. This can bork your install.
|
|
|
|
## Install
|
|
|
|
1. Clone the repo and `cd` into it:
|
|
```bash
|
|
git clone [repo url] ~/.dotfiles && cd ./dotfiles
|
|
```
|
|
|
|
2. Generate hardware configuration:
|
|
```bash
|
|
sudo nixos-generate-config
|
|
```
|
|
|
|
3. Copy it to the `nixos` directory:
|
|
```bash
|
|
cp /etc/nixos/hardware-configuration.nix ./nixos/hardware-configuration.nix
|
|
```
|
|
|
|
TODO: Add more.
|
|
|
|
4. *Change settings across `nixos/configuration.nix`, `shared_config.nix`, `home.nix` and `shared_home.nix` to your preferences* (Username, etc)
|
|
|
|
5. Test it out
|
|
> NixOS
|
|
> ```bash
|
|
> sudo nixos-rebuild test --flake .#[hostname]
|
|
> ```
|
|
> Home
|
|
> ```bash
|
|
> home-manager switch
|
|
> ```
|
|
Default hostnames are `blackstar` (desktop) and `rogue` (laptop)
|
|
|
|
6. Set as default
|
|
```bash
|
|
sudo nixos-rebuild switch --flake .#[hostname]
|
|
``` |