From 40fe0972c67424c7f13b816d2215c5c819ed2e9f Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Tue, 17 Dec 2019 17:29:20 -0700 Subject: [PATCH] add configuration.nix for compatibility recreates an impure representation of the current flake profile based on the systems current hostname. --- configuration.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 configuration.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..6ceaef6 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,20 @@ +# this file is an impure recreation of the flake profile currently deployed +# based on the systems hostname. The purpose is so tools which do not yet have +# flake support (e.g `nixos-option`), can work as expected. +{ lib, ... }: +let + host = lib.fileContents /etc/hostname; +in +{ + imports = [ + "${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos" + /etc/nixos/profiles/core.nix + "/etc/nixos/configurations/${host}.nix" + ]; + + networking.hostName = host; + nix.nixPath = [ + "nixpkgs=${}" + "nixos-config=/etc/nixos/configuration.nix" + ]; +}