@@ -4,36 +4,28 @@ Versioning `$HOME`. Contains nix configs, dotfiles, scripts.
4
4
5
5
Config for NixOS only.
6
6
7
- ## Fresh install, wat do
7
+ ## Fresh install, NixOS
8
8
9
+ 1 . Do the whole NixOS install thing, and in another machine put together a basic config in the ` flake.nix `
9
10
1 . Clone this repo in the home folder: ` git clone https://github.com/f-f/home.git ~ `
11
+ 1 . Copy out all the content: ` cd home && find . -maxdepth 1 -exec mv {} .. \; `
10
12
1 . Fetch everything: ` cd ~ && git submodule update --init --recursive --remote `
13
+ 1 . Integrate into the config for this hostname the autogenerated ` hardware-configuration.nix ` and ` configuration.nix ` files, then ` nixos-switch `
14
+
15
+ At this point is should be possible to ssh from another machine, so the rest can be done remotely:
11
16
1 . Add the fzf module:
12
17
``` bash
13
18
mkdir -p .zprezto/contrib && cd $_
14
19
git clone https://github.com/gpanders/fzf-prezto.git fzf
15
20
cd fzf
16
21
git submodule update --init
17
22
```
18
- 1. Write down the config for the new machine, start from the example: `cd ~/nixos-config && cp local-example.nix $(hostname).nix`, and integrate with what' s in ` /etc/nixos/configuration.nix`
19
- 1. Import it as a local configuration: ` echo " import ./$( hostname) .nix" > local.nix`
20
- 1. ` mv /etc/nixos/hardware-configuration.nix ~ `
21
- 1. Add channels:
22
- ` ` `
23
- sudo nix-channel --add http://nixos.org/channels/nixos-21.05 nixos
24
- sudo nix-channel --add http://nixos.org/channels/nixos-unstable nixos-unstable
25
- sudo nix-channel --update
26
- ` ` `
27
-
28
- Then: ` nixos-switch`
29
-
30
- Next:
31
23
1. Make a new ssh key for github: ` ssh-keygen -t ed25519 -C " $USER +github@$( hostname) " -f github` , add it as deploy key here
32
- 2 . Replace this repo remote from http to git: ` git remote set-url origin git@github.com:f-f/home.git`
24
+ 1 . Replace this repo remote from http to git: ` git remote set-url origin git@github.com:f-f/home.git`
33
25
34
26
# ## On macOS
35
27
36
- It' s a little harder to bootstrap Nix on macOS, but it can be done. After cloning the stuff:
28
+ It' s a little more involved to bootstrap Nix on macOS, but it can be done. After cloning the stuff:
37
29
```bash
38
30
# In case of M1
39
31
softwareupdate --install-rosetta
@@ -61,7 +53,3 @@ Useful reads:
61
53
- https://gist.github.com/jmatsushita/5c50ef14b4b96cb24ae5268dab613050
62
54
- https://github.com/srstrong/nix-env
63
55
- https://daiderd.com/nix-darwin/manual/index.html
64
-
65
-
66
- TODO: refactor readme. With the flakes it' s not quite the right approach
67
- Reference this link: https://colinramsay.co.uk/2021/10/19/migrating-a-nixos-install-to-flakes.html
0 commit comments