From 935de1a2a55d73b42b5f8960d0b931158d489fa9 Mon Sep 17 00:00:00 2001
From: Dustin Frisch <fooker@lab.sh>
Date: Thu, 24 Oct 2024 14:38:11 +0200
Subject: [PATCH] Shorten commands

---
 flake.nix | 7 +++++++
 readme.md | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/flake.nix b/flake.nix
index f95a83b..fca054a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -49,6 +49,13 @@
       ];
     };
 
+    packages = flake-utils.lib.eachDefaultSystemPassThrough (system: {
+      ${system} = {
+        default = self.nixosConfigurations.ldap.config.system.build.toplevel;
+        images = self.nixosConfigurations.ldap.config.system.build.diskoImages;
+      };
+    });
+
     devShells = flake-utils.lib.eachDefaultSystemPassThrough (system: {
       ${system}.default =
         let
diff --git a/readme.md b/readme.md
index c1078ec..6f9609f 100644
--- a/readme.md
+++ b/readme.md
@@ -2,7 +2,7 @@
 
 ## Build disk image
 ```bash
-nix build .#nixosConfigurations.ldap.config.system.build.diskoImages
+nix build .#images
 ```
 
 ## Updates
@@ -13,7 +13,7 @@ nix flake update
 
 ## Deploy
 ```bash
-nix build .#nixosConfigurations.ldap.config.system.build.toplevel
-nix copy --to ssh://root@<ip-of-target> .#nixosConfigurations.ldap.config.system.build.toplevel
-ssh root@<ip-of-target> "$(nix path-info .#nixosConfigurations.ldap.config.system.build.toplevel)/bin/switch-to-configuration switch"
+nix build .
+nix copy --to ssh://root@<ip-of-target> .
+ssh root@<ip-of-target> "$(nix path-info .)/bin/switch-to-configuration switch"
 ```
-- 
GitLab