add configuration.nix for compatibility

recreates an impure representation of the current flake profile based
on the systems current hostname.
This commit is contained in:
Timothy DeHerrera 2019-12-17 17:29:20 -07:00
parent 7a7599fae3
commit 40fe0972c6
No known key found for this signature in database
GPG key ID: 8985725DB5B0C122

20
configuration.nix Normal file
View file

@ -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=${<nixpkgs>}"
"nixos-config=/etc/nixos/configuration.nix"
];
}