Browse Source

Add Laptops / Desktops to README

storage-ng
Emery Hemingway 1 month ago
parent
commit
591ad485d7
1 changed files with 35 additions and 1 deletions
  1. 35
    1
      README.md

+ 35
- 1
README.md View File

@@ -45,7 +45,41 @@ nixos-rebuild switch -I nixos-config=./hosts/containers/$HOST/configuration.nix
45 45
 
46 46
 Add your gpg-id to the .gpg-id file in secrets and let somebody reencrypt it for you.
47 47
 Maybe this works for you, maybe not. I did it somehow:
48
-```PASSWORD_STORE_DIR=`pwd` tr '\n' ' ' < .gpg-id | xargs -I{} pass init {}````
48
+
49
+```
50
+PASSWORD_STORE_DIR=`pwd` tr '\n' ' ' < .gpg-id | xargs -I{} pass init {}
51
+```
49 52
 
50 53
 Your gpg key has to have the Authenticate flag set. If not update it and push it to a keyserver and wait.
51 54
 This is necessary, so you can login to any machine with your gpg key.
55
+
56
+# Laptops / Desktops
57
+
58
+This repository contains a NixOS module that can be used with personal machines 
59
+as well. This module appends `/etc/ssh/ssh_known_hosts` with the host keys of 
60
+registered HQ hosts, and optionally appends `/etc/hosts` with static IPv6 
61
+addresses local to HQ. Simply import the `lib` directory to use the module. As 
62
+an example:
63
+
64
+```nix
65
+# /etc/nixos/configuration.nix
66
+{ config, pkgs, lib, ... }:
67
+let
68
+  c3d2Config =
69
+    builtins.fetchGit { url = "https://gitea.c3d2.de/C3D2/nix-config.git"; };
70
+in {
71
+  imports = [
72
+    # ...
73
+    "${c3d2Config}/lib"
74
+  ];
75
+
76
+  c3d2 = {
77
+    isInHq = false; # not in HQ, this is the default.
78
+    mapHqHosts = true; # Make entries in /etc/hosts for *.hq internal addresses.
79
+    enableMotd = true; # Set the login shell message to the <<</>> logo.
80
+  };
81
+
82
+  # ...
83
+}
84
+
85
+```

Loading…
Cancel
Save