Added system3
This commit is contained in:
@@ -12,20 +12,22 @@ in {
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }:
|
||||
let
|
||||
hosts-path = ./config/hosts;
|
||||
lib = nixpkgs.lib;
|
||||
is-nix-file = filename: type: (builtins.match ".+.nix$" filename) != null;
|
||||
is-regular-file = filename: type: type == "regular" || type == "link";
|
||||
hostname-from-file = filename:
|
||||
builtins.replaceStrings [ ".nix" ] [ "" ] filename;
|
||||
hosts = map hostname-from-file (lib.attrNames (lib.filterAttrs is-nix-file
|
||||
(lib.filterAttrs is-regular-file (builtins.readDir ./config/hosts))));
|
||||
(lib.filterAttrs is-regular-file (builtins.readDir hosts-path))));
|
||||
|
||||
pkgs = import nixpkgs { };
|
||||
|
||||
in {
|
||||
nixConfigurations = lib.mapAttrs (hostname: hostOpts:
|
||||
lib.nixosSystem {
|
||||
system = hostOpts.architecture;
|
||||
nixConfigurations = lib.mapAttrs (hostname:
|
||||
let hostOpts = import hosts-path + "/${hostname}.nix";
|
||||
in lib.nixosSystem {
|
||||
system = hostOpts.platform;
|
||||
modules = [
|
||||
(import ./initialize.nix {
|
||||
hostname = hostname;
|
||||
|
||||
Reference in New Issue
Block a user