small updates
This commit is contained in:
parent
b9155c99b9
commit
69f3a48313
3 changed files with 17 additions and 64 deletions
|
@ -71,6 +71,7 @@ in
|
||||||
nn = "nvim --headless '+SessionDelete' +qa > /dev/null 2>&1 && nvim";
|
nn = "nvim --headless '+SessionDelete' +qa > /dev/null 2>&1 && nvim";
|
||||||
bat = "bat --theme Coldark-Dark";
|
bat = "bat --theme Coldark-Dark";
|
||||||
cat = "bat --pager=never -p";
|
cat = "bat --pager=never -p";
|
||||||
|
# TODO this may not be needed now that I am using `nh` clean mode (see /hosts/_common/configuration.nix#programs.nh)
|
||||||
nix-boot-clean = "find '/boot/loader/entries' -type f ! -name 'windows.conf' | head -n -4 | xargs -I {} rm {}; nix store gc; nixos-rebuild boot; echo; df";
|
nix-boot-clean = "find '/boot/loader/entries' -type f ! -name 'windows.conf' | head -n -4 | xargs -I {} rm {}; nix store gc; nixos-rebuild boot; echo; df";
|
||||||
|
|
||||||
# general unix
|
# general unix
|
||||||
|
|
78
readme.md
78
readme.md
|
@ -15,79 +15,33 @@ export USERNAME=desired_username_for_admin_on_this_machine (josh)
|
||||||
- `cat /etc/ssh/ssh_host_ed25519_key.pub ~/.ssh/id_ed25519.pub`
|
- `cat /etc/ssh/ssh_host_ed25519_key.pub ~/.ssh/id_ed25519.pub`
|
||||||
- On an already onboarded computer copy these and add them to secrets/secrets.nix file
|
- On an already onboarded computer copy these and add them to secrets/secrets.nix file
|
||||||
- Rekey secrets: `nix run github:yaxitech/ragenix -- --rules ~/.config/nixos-config/secrets/secrets.nix -r`
|
- Rekey secrets: `nix run github:yaxitech/ragenix -- --rules ~/.config/nixos-config/secrets/secrets.nix -r`
|
||||||
|
- Maybe copy hardware/configs over and setup, otehrwise do it on the client machine
|
||||||
- git clone nixos-config `git clone https://github.com/RingOfStorms/dotfiles.git ~/.config/nixos-config`
|
- git clone nixos-config `git clone https://github.com/RingOfStorms/dotfiles.git ~/.config/nixos-config`
|
||||||
|
- Setup config as needed
|
||||||
|
- top level flake.nix additions
|
||||||
|
- add hosts dir and files needed
|
||||||
- `sudo nixos-rebuild switch --flake ~/.config/nixos-config`
|
- `sudo nixos-rebuild switch --flake ~/.config/nixos-config`
|
||||||
- Update remote, ssh should work now: `cd ~/.config/nixos-config && git remote remove origin && git remote add origin "git@github.com:RingOfStorms/dotfiles.git" && git pull origin master`
|
- Update remote, ssh should work now: `cd ~/.config/nixos-config && git remote remove origin && git remote add origin "git@github.com:RingOfStorms/dotfiles.git" && git pull origin master`
|
||||||
|
|
||||||
- TODO ONBOARD NEW MACHINE CONFIGS, secrets, etc
|
|
||||||
- use hostname to make new folders in the repo, copy hardware config, and create config from template. Update flake.nix with top level info needed for this system with ARCH detected.
|
|
||||||
- Copy public keys into secrets.nix file
|
|
||||||
- `cat /etc/ssh/ssh_host_ed25519_key.pub ~/.ssh/id_ed25519.pub`
|
|
||||||
- `git commit -a --author="Bot <bot@joshuabell.dev>" --email="bot@joshuabell.dev" -m "secrets update"`
|
|
||||||
|
|
||||||
- rekey system with another onboarded device... (make this offlinable?), push there, pull here
|
|
||||||
- `sudo nixos-rebuild switch --flake ~/.config/nixos-config`
|
|
||||||
- reboot? done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Darwin
|
## Darwin
|
||||||
- TODO
|
- TODO
|
||||||
|
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
Dual booting windows?
|
||||||
|
- If there is a new boot partition being used than the old windows one, copy over the /boot/EFI/Microsoft folder into the new boot partition, same place
|
||||||
|
- If the above auto probing for windows does not work, you can also manually add in a windows.conf in the loader entries: /boot/loader/entries/windows.conf:
|
||||||
|
```
|
||||||
|
title Windows 11
|
||||||
|
efi /EFI/Microsoft/Boot/bootmgfw.efi
|
||||||
|
```
|
||||||
|
|
||||||
###
|
###
|
||||||
###
|
###
|
||||||
###
|
|
||||||
###
|
|
||||||
###
|
|
||||||
|
|
||||||
|
|
||||||
# First Install on new Machine
|
|
||||||
|
|
||||||
- First follow nixos installation guide: https://nixos.wiki/wiki/NixOS_Installation_Guide
|
|
||||||
- Follow up to generate config command
|
|
||||||
- in hardware-configuration.nix
|
|
||||||
- change to use by-labels made in nixos installation guide (optional but nice for updating device in the future)
|
|
||||||
- in configuration.nix
|
|
||||||
- set networking.hostname to HOSTNAME
|
|
||||||
- enable networkmanager
|
|
||||||
- uncomment systemPackages and add: git curl
|
|
||||||
- add `nix.settings.experimental-features = [ "nix-command" "flakes" ];`
|
|
||||||
- Install nixos: `cd /mnt` `sudo nixos-install`
|
|
||||||
- `passwd` to change root password (if not already prompted to do so)
|
|
||||||
- `reboot`
|
|
||||||
|
|
||||||
-- TODO come up with a way to pregen keys so onboarding is less stupid with secrets?
|
|
||||||
|
|
||||||
- `cp -r /etc/nixos ~/nixos_bak` Backup configuration
|
|
||||||
- Checkout this repo into /etc/nixos: `rm -rf /etc/nixos` `git clone https://github.com/ringofstorms/dotfiles /etc/nixos`
|
|
||||||
- Copy the backup into the new /etc/nixos/hosts/HOSTNAME dir `mkdir /etc/nixos/hosts/HOSTNAME && cp -r ~/nixos_bak/* /etx/nixos/hosts/HOSTNAME`
|
|
||||||
- copy the existing configuration/other configuration nix of an existing system and edit it to desires state. [[ TODO make this step cleaner/easier... ]]
|
|
||||||
- switch into flake mode `nixos-rebuild switch --flake /etc/nixos[#HOSTNAME]` and switch to new system
|
|
||||||
- Add this host to the top level `flake.nix` myHosts section
|
|
||||||
- copy system ssh public key and create a key for user and copy those into the nixos secrets.nix file
|
|
||||||
- `cat /etc/ssh/ssh_host_ed25519_key.pub`
|
|
||||||
- `cat ~/.ssh/id_ed25519.pub`
|
|
||||||
- Push changes to remote using temp user password
|
|
||||||
- rekey secrets with any other onboarded system
|
|
||||||
- TODO
|
|
||||||
- copy over this host's ssh public key ( /etc/shh/*ed25519* ) into the ./secrets/secrets.nix file - push those up, using another computer re-key all the secrets, push up again
|
|
||||||
- pull new secrets down with new added keys and rebuild
|
|
||||||
|
|
||||||
- clone neovim setup...
|
- clone neovim setup...
|
||||||
|
|
||||||
# Later updates
|
|
||||||
|
|
||||||
- `nix flake update /etc/nixos`
|
|
||||||
- `nixos-rebuild switch --flake /etc/nixos`
|
|
||||||
|
|
||||||
# Cleanup boot
|
|
||||||
|
|
||||||
> TODO remove, no longer needed `nh` handles this
|
|
||||||
|
|
||||||
I used the existing windows 100MB boot partition and it fills up constantly. Have to purge old stuff a lot this is how:
|
|
||||||
|
|
||||||
- `find '/boot/loader/entries' -type f ! -name 'windows.conf' | head -n -4 | xargs -I {} rm {}; nix-collect-garbage -d; nixos-rebuild boot; echo; df`
|
|
||||||
|
|
||||||
# Settings references:
|
# Settings references:
|
||||||
|
|
||||||
- Flake docs: https://nixos.wiki/wiki/Flakes
|
- Flake docs: https://nixos.wiki/wiki/Flakes
|
||||||
|
@ -97,8 +51,6 @@ I used the existing windows 100MB boot partition and it fills up constantly. Hav
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
- Secret management?
|
|
||||||
- ssh keys for github/etc
|
|
||||||
- Use top level split out home manager configurations instead of the one built into the system config...
|
- Use top level split out home manager configurations instead of the one built into the system config...
|
||||||
- Make a flake for neovim and move out some system packages required for that into that flake, re-use for root and user rather than cloning each place?
|
- Make a flake for neovim and move out some system packages required for that into that flake, re-use for root and user rather than cloning each place?
|
||||||
- EDITOR env var set to neovim
|
- EDITOR env var set to neovim
|
||||||
|
|
|
@ -21,8 +21,8 @@ with lib.hm.gvariant;
|
||||||
favorite-apps = [
|
favorite-apps = [
|
||||||
# "vivaldi-stable.desktop"
|
# "vivaldi-stable.desktop"
|
||||||
"Alacritty.desktop"
|
"Alacritty.desktop"
|
||||||
"org.gnome.Nautilus.desktop"
|
|
||||||
"firefox-esr.desktop"
|
"firefox-esr.desktop"
|
||||||
|
"org.gnome.Nautilus.desktop"
|
||||||
"spotify.desktop"
|
"spotify.desktop"
|
||||||
"discord.desktop"
|
"discord.desktop"
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue