2024-04-17 22:28:27 +02:00
|
|
|
# My NixOS config
|
|
|
|
|
|
|
|
## File system structure
|
|
|
|
|
2024-04-22 22:03:23 +02:00
|
|
|
this is outdated
|
|
|
|
|
2024-04-17 22:28:27 +02:00
|
|
|
- `common`: stores all Nix files which are shared by all system configs
|
|
|
|
- `de`: Desktop environments and their parameters
|
|
|
|
- `hardware`: self-explenatory
|
|
|
|
- `locales`: localization options
|
|
|
|
- `packages`: services & packages with common configurations
|
2024-04-22 20:48:35 +02:00
|
|
|
- `base.nix`: The minimum configuration that a machine needs
|
2024-04-17 22:28:27 +02:00
|
|
|
- `full-install.nix`: if this machine has a DE or is going to be used by a human
|
|
|
|
- `tasia-packages.nix`: Collection of additional packages
|
2024-04-27 13:56:15 +02:00
|
|
|
- `common`: SSH keys, secrets, ...
|
|
|
|
- `dotfiles`: all my dotfiles
|
|
|
|
- `home`: user-specific settings.
|
2024-04-17 22:28:27 +02:00
|
|
|
- `hosts`: Machine-specific configurations
|
|
|
|
- `modules/nixos`: Custom NixOS modules
|
|
|
|
- `overlays`: Custom NixOS overlays
|
|
|
|
- `pkgs`: Custom NixOS packages
|
2024-04-27 13:56:15 +02:00
|
|
|
- `stuff`: Random stuff that doesn't belong anywhere else
|
2024-04-17 22:28:27 +02:00
|
|
|
|
|
|
|
## Memo
|
|
|
|
|
|
|
|
Update channels: `nix flake update`
|
|
|
|
|
2024-04-27 13:56:15 +02:00
|
|
|
Build a configuration: `sudo ixos-rebuild switch --flake .#$(cat /etc/hostname)`
|
2024-04-17 22:28:27 +02:00
|
|
|
|
|
|
|
Build enry and upload a generation: TODO
|
|
|
|
|
2024-04-27 13:56:15 +02:00
|
|
|
### To do on a new machine
|
|
|
|
|
|
|
|
- Install NixOS
|
|
|
|
|
|
|
|
- Clone this repo `git clone https://gitea.com/tasiaiso/nixos-config.git && cd nixos-onfig`
|
|
|
|
|
|
|
|
- `export HOSTNAME=<your-hostname> && mkdir hosts/$HOSTNAME && cd hosts/$HOSTNAME && touch configuration.nix`
|
|
|
|
|
|
|
|
- Fill out `configuration.nix`
|
|
|
|
|
|
|
|
- `sudo nixos-generate-config --show-hardware-config > hosts/$HOSTNAME/hardare-configuration.nix`
|
|
|
|
|
|
|
|
- `sudo nixos-rebuild switch --flake .#$HOSTNAME`
|
|
|
|
|
|
|
|
#### git
|
2024-04-22 04:57:27 +02:00
|
|
|
|
|
|
|
generate an ssh key: `ssh-keygen -t ed25519`
|
|
|
|
|
|
|
|
add to ssh-agent: `ssh-add .ssh/id_ed25519`
|
|
|
|
|
|
|
|
add to git: `git config --global user.signingkey ~/.ssh/id_ed25519`
|
|
|
|
|
2024-04-27 13:56:15 +02:00
|
|
|
#### google-authenticator
|
|
|
|
|
|
|
|
- `google-authenticator -td -r 5 -R 60 -w 2`
|
|
|
|
|
2024-04-17 22:28:27 +02:00
|
|
|
# Hosts
|
|
|
|
|
2024-04-18 21:10:13 +02:00
|
|
|
## theseus
|
2024-04-17 22:28:27 +02:00
|
|
|
|
|
|
|
My main PC. Mostly unused because of power constraints
|
|
|
|
|
2024-04-13 21:42:05 +02:00
|
|
|
## phoenix
|
|
|
|
|
2024-04-17 22:28:27 +02:00
|
|
|
My old laptop.
|
|
|
|
|
|
|
|
## stuff
|
|
|
|
|
|
|
|
Another person's laptop.
|
|
|
|
|
|
|
|
### enry
|
2024-04-13 21:42:05 +02:00
|
|
|
|
2024-04-22 04:16:10 +02:00
|
|
|
This is my Raspberry Pi 3B+ inside my electrical cabinet.
|
|
|
|
|
|
|
|
### new-new-phoenix
|
|
|
|
|
2024-04-22 04:21:07 +02:00
|
|
|
New laptop. Main driver. TODO: give it a name.
|