From eab128ce2ee69cc2b216e1ad645d8fb0c3f0e5b4 Mon Sep 17 00:00:00 2001
From: Jens Nolte <jens@nightmarestudio.de>
Date: Sat, 2 May 2020 01:40:45 +0200
Subject: [PATCH] Add nixos-option alias that provides a dummy
 configuration.nix

---
 configuration.nix | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/configuration.nix b/configuration.nix
index 1326590..f824f93 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -20,6 +20,11 @@ in
   # Pin channel in nix path
   nix.nixPath = [ "nixpkgs=${channel}" ];
 
+  environment.shellAliases = {
+    # nixos-option won't run without a configuration. With an empty config it does not show configured values, but can at least be used to search options and show default values.
+    nixos-option = "nixos-option -I nixos-config=${pkgs.writeText "empty-configuration.nix" "{...}:{}"}";
+  };
+
   # Default hostname ist machine directory name
   networking.hostName = lib.mkDefault name;
 
-- 
GitLab