summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLassulus <github@lassul.us>2019-09-16 12:51:00 +0200
committerGitHub <noreply@github.com>2019-09-16 12:51:00 +0200
commit1af856886eca80ce39b61fd97816e4b3be07b236 (patch)
treed5c330333f6f96b2ffb4dd97681ea033b9910788
parentbeda422c5fa830f0ae8d4aa34a305a10166590f8 (diff)
parent9385bfb16f7e6b1688debfed469fd17330178c0b (diff)
Merge pull request #4 from Mic92/docs
Improve documentation
-rw-r--r--README.md83
1 files changed, 45 insertions, 38 deletions
diff --git a/README.md b/README.md
index 439ecd5..27cd3f1 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,31 @@ Master Boot Record
------------------
This is how your iso configuation may look like
+/etc/nixos/tsp-disk.json (TODO: find the correct disk)
+```json
+{
+ "type": "devices",
+ "content": {
+ "sda": {
+ "type": "table",
+ "format": "msdos",
+ "partitions": [{
+ "type": "partition",
+ "start": "1M",
+ "end": "100%",
+ "bootable": true,
+ "content": {
+ "type": "filesystem",
+ "format": "ext4",
+ "mountpoint": "/"
+ }
+ }]
+ }
+ }
+}
+```
+
+/etc/nixos/configuration.nix
```nix
{ pkgs, ... }:
let
@@ -23,49 +48,31 @@ in {
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
];
environment.systemPackages = with pkgs;[
- (pkgs.writeScriptBin "tsp-create" (disko.mount cfg))
+ (pkgs.writeScriptBin "tsp-create" (disko.create cfg))
(pkgs.writeScriptBin "tsp-mount" (disko.mount cfg))
];
- # Optional: Automatically creates a service which runs at startup to perform the partitioning
- systemd.services.install-to-hd = {
- enable = true;
- wantedBy = ["multi-user.target"];
- after = ["getty@tty1.service" ];
- serviceConfig = {
- Type = "oneshot";
- ExecStart = [ (disko.create cfg) (disk.mount cfg) ];
- StandardInput = "null";
- StandardOutput = "journal+console";
- StandardError = "inherit";
- };
- };
-}
-```
-tsp-disk.json (TODO: find the correct disk)
-```json
-{
- "type": "devices",
- "content": {
- "sda": {
- "type": "table",
- "format": "msdos",
- "partitions": [
- { "type": "partition",
- "start": "1M",
- "end": "100%",
- "bootable": true,
- "content": {
- "type": "filesystem",
- "format": "ext4",
- "mountpoint": "/"
- }
- }
- ]
- }
- }
+ ## Optional: Automatically creates a service which runs at startup to perform the partitioning
+ #systemd.services.install-to-hd = {
+ # enable = true;
+ # wantedBy = ["multi-user.target"];
+ # after = ["getty@tty1.service" ];
+ # serviceConfig = {
+ # Type = "oneshot";
+ # ExecStart = [ (disko.create cfg) (disk.mount cfg) ];
+ # StandardInput = "null";
+ # StandardOutput = "journal+console";
+ # StandardError = "inherit";
+ # };
+ #};
}
```
+After `nixos-rebuild switch` this will add a `tsp-create` and a `tsp-mount`
+command:
+
+- **tsp-create**: creates & formats the partitions according to `tsp-disk.json`
+- **tsp-mount**: mounts the partitions to `/mnt`
+
GUID Partition Table, LVM and dm-crypt
--------------------------------------
See `examples/`