summary refs log tree commit diff
path: root/compat/nixos
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-10-22 23:17:33 +0200
committerMel <einebeere@gmail.com>2024-10-22 23:40:59 +0200
commitbb0e4c7b5bbec7b8d8e3433a87683e9bb5ec307a (patch)
tree87e0cf82dc573f9000dfb998326e504fa2e2a0d6 /compat/nixos
parent42d23c55e924b5100d5c357458f20de640db2400 (diff)
downloadminerals-bb0e4c7b5bbec7b8d8e3433a87683e9bb5ec307a.tar.zst
minerals-bb0e4c7b5bbec7b8d8e3433a87683e9bb5ec307a.zip
Add compatibility scripts for nixos-option and other legacy nix tools
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'compat/nixos')
-rw-r--r--compat/nixos/default.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/compat/nixos/default.nix b/compat/nixos/default.nix
new file mode 100644
index 0000000..3d547c2
--- /dev/null
+++ b/compat/nixos/default.nix
@@ -0,0 +1,13 @@
+# this file provides the current nixos configuration
+# taken from the system flake.
+# see `../default.nix` for explanation.
+{ nixpkgs ? import <nixpkgs> {}, ... }:
+
+with builtins;
+let
+  me = with builtins;
+    nixpkgs.lib.toLower (head (split "\n" (readFile /etc/hostname)));
+
+  flake = import ../flake-compat.nix { src = ./../..; };
+in
+flake.defaultNix.nixosConfigurations.${me}