From 591ad485d7de16467d1cb23a2922c7f9bc3ad406 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Wed, 1 Jan 2020 13:40:42 +0100 Subject: [PATCH] Add Laptops / Desktops to README --- README.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a58a217..777ad6b8 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,41 @@ nixos-rebuild switch -I nixos-config=./hosts/containers/$HOST/configuration.nix Add your gpg-id to the .gpg-id file in secrets and let somebody reencrypt it for you. Maybe this works for you, maybe not. I did it somehow: -```PASSWORD_STORE_DIR=`pwd` tr '\n' ' ' < .gpg-id | xargs -I{} pass init {}```` + +``` +PASSWORD_STORE_DIR=`pwd` tr '\n' ' ' < .gpg-id | xargs -I{} pass init {} +``` Your gpg key has to have the Authenticate flag set. If not update it and push it to a keyserver and wait. This is necessary, so you can login to any machine with your gpg key. + +# Laptops / Desktops + +This repository contains a NixOS module that can be used with personal machines +as well. This module appends `/etc/ssh/ssh_known_hosts` with the host keys of +registered HQ hosts, and optionally appends `/etc/hosts` with static IPv6 +addresses local to HQ. Simply import the `lib` directory to use the module. As +an example: + +```nix +# /etc/nixos/configuration.nix +{ config, pkgs, lib, ... }: +let + c3d2Config = + builtins.fetchGit { url = "https://gitea.c3d2.de/C3D2/nix-config.git"; }; +in { + imports = [ + # ... + "${c3d2Config}/lib" + ]; + + c3d2 = { + isInHq = false; # not in HQ, this is the default. + mapHqHosts = true; # Make entries in /etc/hosts for *.hq internal addresses. + enableMotd = true; # Set the login shell message to the <<> logo. + }; + + # ... +} + +```