docs: agent server notes, README server link, TODO verify note, nixos readme
Made-with: Cursor
This commit is contained in:
parent
84a065a3df
commit
3dcbe2e827
4 changed files with 22 additions and 4 deletions
|
|
@ -18,11 +18,23 @@ sudo mv /tmp/dotfiles /etc/dotfiles
|
|||
# Enable flakes for this run (needed if the current system config does not)
|
||||
sudo nixos-rebuild switch --flake /etc/dotfiles/nixos#nixos-server --option accept-flake-config true
|
||||
```
|
||||
If that fails with "does not provide attribute ... nixos-rebuild", build and switch manually (NIX_CONFIG makes the daemon accept flakes for this run):
|
||||
If that fails with "does not provide attribute ... nixos-rebuild", enable flakes for the Nix daemon via the current config (on NixOS, `/etc/nix/nix.conf` is often read-only), then build and switch manually.
|
||||
|
||||
**From your Mac:** push a config that enables flakes, then on the server copy it and rebuild:
|
||||
```bash
|
||||
NIX_CONFIG="extra-experimental-features = nix-command flakes" sudo nix build /etc/dotfiles/nixos#nixosConfigurations.nixos-server.config.system.build.toplevel -o /tmp/nixos-result
|
||||
scp nixos/server-configuration-with-flakes.nix danny@<server>:/tmp/configuration.nix
|
||||
```
|
||||
**On the server:**
|
||||
```bash
|
||||
sudo cp /tmp/configuration.nix /etc/nixos/configuration.nix
|
||||
sudo nixos-rebuild switch
|
||||
```
|
||||
Then build and switch to the flake:
|
||||
```bash
|
||||
sudo nix build /etc/dotfiles/nixos#nixosConfigurations.nixos-server.config.system.build.toplevel -o /tmp/nixos-result
|
||||
sudo /tmp/nixos-result/bin/switch-to-configuration switch
|
||||
```
|
||||
|
||||
Use `git@github.com:DannyDannyDanny/dotfiles.git` if the repo is private (clone as danny then `sudo mv` and `sudo chown -R root:root /etc/dotfiles`).
|
||||
|
||||
SSH keys for danny (not in repo): from your machine `scp ~/.ssh/*.pub danny@server:/tmp/`, then on server `mkdir -p ~/.ssh; cat /tmp/*.pub >> ~/.ssh/authorized_keys`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue