From d299b861b6696124bd679c023bb5d00074ccc025 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Tue, 26 Jul 2022 19:11:07 -0600 Subject: [PATCH] add generic server host --- README.md | 10 ++++++++++ hosts/server/default.nix | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 hosts/server/default.nix diff --git a/README.md b/README.md index 29bc7e7..7957149 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/hosts/server/default.nix b/hosts/server/default.nix new file mode 100644 index 0000000..fad1431 --- /dev/null +++ b/hosts/server/default.nix @@ -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 + ]; +}