Here lies my NixOS configuration.
To access my neovim configuration on a system that has Nix installed, use this:
nix run git+https://git.doceys.computer/NixOS#neovim.
├── dotfiles
├── flake.lock
├── flake.nix
├── hosts
│ ├── laptop
│ ├── pc
│ └── servarr
├── keys
├── lib
├── modules
│ └── nvim
└── secretsdotfilesA directory for all shared non-nix dotfiles.hostsAll subdirectories ofhostsare all files specific to one host.dotfilesNon-nix dotfiles that are specific to that host.
keysMy SSH and GPG public keys.libNix functions used throughout the config.modulesSomewhat coherently organized files that many systems use.secretsAgenix secrets mostly used for my home server.
-
Before running
nixos-install- If needed generate the system SSH Key
sudo mkdir -p /mnt/etc/ssh sudo ssh-keygen -t ed25519 -N "" -f /mnt/etc/ssh/ssh_host_ed25519_key
- If needed generate the system SSH Key
-
Copy my SSH Keys to
~/.ssh
(I hope that's all)
After cloning this repo to your home directory just run this command:
sudo nixos-rebuild switch --flake /home/<USER>/NixOS#<HOST>Replace <USER> and <HOST> with something that makes sense.
Options for <HOST>: pc laptop servarr
- Add an entry to
secrets/secrets.nixwith its keys. - Write whatever it is in the file using
agenix -e <SECRET_NAME>.age. (to getagenixusenix develop .#<HOST>) - To use that secret add it in the
hosts/<HOST>/secrets.nixfile. - Then in the configuration use
config.age.secrets.<SECRET_NAME>.pathto get the path of the file.
- Create the repo directory with
sudo -u git mkdir -p /home/git/<repository>.git - Initialize the bare repository with
git-sys init --bare /home/git/<repository>.git
sudo -u git touch /home/git/<repository>.git/git-daemon-export-okAnd to make it private again remove that file.