add generic server host

This commit is contained in:
Noah Masur 2022-07-26 19:11:07 -06:00
parent 7edfcd9743
commit d299b861b6
2 changed files with 30 additions and 0 deletions

View File

@ -60,6 +60,16 @@ Then switch to the macOS configuration:
darwin-rebuild switch --flake .#macbook
```
### Dealing with corporate MITM SSL certificates:
```bash
# Get the certificates
openssl s_client -showcerts -verify 5 -connect cache.nixos.org:443 < /dev/null
# Paste them in here
sudo nvim $NIX_SSL_CERT_FILE
```
## Flake Templates
You can also use the templates as flakes for starting new projects:

20
hosts/server/default.nix Normal file
View File

@ -0,0 +1,20 @@
{ nixpkgs, home-manager, globals, ... }:
# System configuration for a generic server
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { };
modules = [
globals
home-manager.nixosModules.home-manager
{
networking.hostName = "sheep";
gui.enable = false;
colorscheme = (import ../../modules/colorscheme/gruvbox);
passwordHash =
"$6$PZYiMGmJIIHAepTM$Wx5EqTQ5GApzXx58nvi8azh16pdxrN6Qrv1wunDlzveOgawitWzcIxuj76X9V868fsPi/NOIEO8yVXqwzS9UF.";
}
../common.nix
../../modules/nixos
];
}