mirror of
https://github.com/divnix/digga.git
synced 2024-12-18 05:31:30 +03:00
40fe0972c6
recreates an impure representation of the current flake profile based on the systems current hostname.
21 lines
603 B
Nix
21 lines
603 B
Nix
# 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"
|
|
];
|
|
}
|