Update README
This commit is contained in:
parent
9b46f4181e
commit
51dba94745
29
README.md
29
README.md
|
|
@ -1,28 +1,37 @@
|
||||||
|
|
||||||
# Installing on a new machine
|
# Installing on a new machine
|
||||||
|
|
||||||
1) Install [NixOS](https://nixos.org/) from an ISO via USB
|
1) Install [NixOS](https://nixos.org/) from an ISO via USB
|
||||||
2) Reboot machine
|
2) Reboot machine
|
||||||
3) Edit `/etc/nixos/configuration` and add `git` to packages
|
3) Edit `/etc/nixos/configuration.nix` and add `git` to packages
|
||||||
4) Clone this repo
|
4) Clone this repo
|
||||||
5) Copy new `host/` configuration for the new machine
|
5) Create a new directory under `hosts/` for the new machine
|
||||||
6) Copy `/etc/nixos/hardware-configuration` to `host/<host>/hardware.nix`
|
6) Copy `/etc/nixos/hardware-configuration.nix` to `hosts/<host>/hardware.nix`
|
||||||
7) Edit `flake.nix` to point to the new `host`
|
7) Register the host in `flake.nix` via `mkHost`:
|
||||||
|
```nix
|
||||||
|
nixosConfigurations.<host> = mkHost { host = "<host>"; };
|
||||||
|
```
|
||||||
8) `git add .`
|
8) `git add .`
|
||||||
9) Run `sudo nixos-rebuild switch --flake .#nixos`
|
9) Run `sudo nixos-rebuild switch --flake .#<host>`
|
||||||
|
|
||||||
# Building NixOS VM
|
# Building NixOS VM
|
||||||
`nix build .#nixosConfigurations.nixosvm.config.system.build.vm`
|
`nix build .#nixosConfigurations.vm.config.system.build.vm`
|
||||||
|
|
||||||
|
or run `./build-vm.sh` (removes `./vm.qcow2` first)
|
||||||
|
|
||||||
https://gist.github.com/FlakM/0535b8aa7efec56906c5ab5e32580adf
|
https://gist.github.com/FlakM/0535b8aa7efec56906c5ab5e32580adf
|
||||||
|
|
||||||
# Building NixOS ISO
|
# Building NixOS ISO
|
||||||
`nix build .#nixosConfigurations.live.config.system.build.isoImage`
|
`nix build .#nixosConfigurations.live.config.system.build.isoImage`
|
||||||
|
|
||||||
|
or run `./build-iso.sh`
|
||||||
|
|
||||||
# Using Standalone Home Manager
|
# Using Standalone Home Manager
|
||||||
1) Install [Nix](https://nixos.org/) via:
|
1) Install [Nix](https://nixos.org/) via:
|
||||||
|
|
||||||
`
|
```
|
||||||
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
|
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
|
||||||
`
|
```
|
||||||
|
|
||||||
2) Create `~/.config/nix/nix.conf` file with the following contents to enable the use of flakes:
|
2) Create `~/.config/nix/nix.conf` file with the following contents to enable the use of flakes:
|
||||||
```
|
```
|
||||||
|
|
@ -31,14 +40,16 @@ experimental-features = nix-command flakes
|
||||||
3) Install `git`
|
3) Install `git`
|
||||||
4) Clone this repo
|
4) Clone this repo
|
||||||
5) Edit `flake.nix` variables as needed
|
5) Edit `flake.nix` variables as needed
|
||||||
6) `home-manager switch --flake .`
|
6) `home-manager switch --flake .#josh`
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
## Garbage collection
|
## Garbage collection
|
||||||
`nix-collect-garbage -d`
|
`nix-collect-garbage -d`
|
||||||
|
|
||||||
## Fonts
|
## Fonts
|
||||||
### Checking installed fonts
|
### Checking installed fonts
|
||||||
`fc-list`
|
`fc-list`
|
||||||
|
|
||||||
### Debugging kitty fonts
|
### Debugging kitty fonts
|
||||||
`kitty --debug-font-fallback`
|
`kitty --debug-font-fallback`
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue