blob: ba6481553191438c8011eaf403a9003364d67e5f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Installing
My NixOS configuration is modular by design. In practice, this means that you can build a NixOS configuration for your own machine by selecting any combination of these 3 variables:
---
`$HOST` -> this refers to the host-specific configuration (packages, services, etc). This loads the host-specific configuration from `/hosts/$HOST/default.nix`
`$HARDWARE` -> this refers to the hardware-specific configuration (disks, kernel, boot, etc). This loads the hardware-specific configuration from `/hosts/$HARDWARE/default.nix`
`$ARCH` -> this refers to the architecture of the configuration (x86_64-linux, aarch64-darwin, etc). This sets the architecture to use for the packages.
---
An example complete configuration could be: `phobos-laptop-x86_64-linux` [This is my personal laptop configuration :)]
All these variables are declared in the `flake.nix` and can be added/removed to fit your needs.
# Installation Steps
Make sure you're in the `nixos-config` folder and have followed (if necessary) the [partitioning steps](PARTITIONING.md) :)
## NixOS-Based Intallation
### Installing
```
$ nixos-install --flake .#$HOST-$HARDWARE-$ARCH
```
### Updating
```
$ nix flake update
$ nixos-rebuild switch --flake .#$HOST-$HARDWARE-$ARCH
```
## Non-Nixos-Based Installation
### Installing
```
$ nix build .#homeManagerConfigurations.$HOST-$HARDWARE-$ARCH.activationPackage
$ ./result/activate
```
### Updating
```
$ nix flake update
$ home-manager switch --flake .#$HOST-$HARDWARE-$ARCH
```
## ISO
### Building
```
$ nix build .#isoConfigurations.$HOST-$HARDWARE-$ARCH.config.system.build.isoImage
```
## Deploying
```
# deploy -s .#$HOST-$HARDWARE-$ARCH --hostname $TARGET_IP
```
## Testing
```
$ nix eval .#tests
```
|