From 1eb200a050486485ee116d9accff813520a49483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 16 Sep 2019 10:51:13 +0100 Subject: README.md: comment install-to-hd by default out otherwise people might accidentally loose data. --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 439ecd5..19ae9b0 100644 --- a/README.md +++ b/README.md @@ -26,19 +26,6 @@ in { (pkgs.writeScriptBin "tsp-create" (disko.mount 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) @@ -63,6 +50,19 @@ tsp-disk.json (TODO: find the correct disk) ] } } + ## 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"; + # }; + #}; } ``` -- cgit v1.2.3 From 7ed3b9ad795e187b86e7250c943b38f40c561933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 16 Sep 2019 10:52:23 +0100 Subject: README.md: put tsp-disk.json before configuration.nix This is imho the more important configuration of this tool. The configuration.nix is just necessary boiler code. --- README.md | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 19ae9b0..c28b40a 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 @@ -26,30 +51,6 @@ in { (pkgs.writeScriptBin "tsp-create" (disko.mount cfg)) (pkgs.writeScriptBin "tsp-mount" (disko.mount cfg)) ]; -} -``` -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; -- cgit v1.2.3 From ca433fdaffcb49295a1822e2f9736a6b754202fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 16 Sep 2019 10:56:41 +0100 Subject: README: fix incorrect example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c28b40a..3681cde 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ in { ]; 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 -- cgit v1.2.3 From 9385bfb16f7e6b1688debfed469fd17330178c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 16 Sep 2019 10:56:55 +0100 Subject: README.md: explain tsp-create/tsp-mount commands. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 3681cde..27cd3f1 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,12 @@ in { } ``` +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/` -- cgit v1.2.3