Created
June 7, 2021 17:15
-
-
Save superherointj/b389fa9d4fdcbe1a5ce2150cf239e9f3 to your computer and use it in GitHub Desktop.
Flakes p/ Multiplos hosts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "superherointj NixOS configuration"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
home-manager = { | |
url = "github:nix-community/home-manager"; | |
inputs = { nixpkgs = { follows = "nixpkgs"; }; }; | |
}; | |
}; | |
outputs = | |
inputs@{ self, nixpkgs, home-manager, ... }: { | |
# Esquema para mapear automaticamente multiplos hosts. | |
nixosConfigurations = (builtins.mapAttrs (name: value: | |
(nixpkgs.lib.nixosSystem | |
(import (./. + "/hosts/${name}/default.nix") { | |
inherit home-manager; | |
}))) (builtins.readDir (./hosts))); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment