Skip to content

Instantly share code, notes, and snippets.

@superherointj
Created May 22, 2021 23:10
Show Gist options
  • Save superherointj/52c346ec97a321da89dda8f2d6be3a25 to your computer and use it in GitHub Desktop.
Save superherointj/52c346ec97a321da89dda8f2d6be3a25 to your computer and use it in GitHub Desktop.
{
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, ... }: {
nixosConfigurations = (builtins.mapAttrs (name: value:
(nixpkgs.lib.nixosSystem
(import (./. + "/hosts/${name}/default.nix") {
inherit home-manager;
}))) (builtins.readDir (./hosts)));
};
}
# hosts/h1/default.nix
{ home-manager, ... }: {
system = "aarch64-linux";
modules = [ ./configuration.nix home-manager.nixosModules.home-manager ];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment