86 lines
2.2 KiB
Nix
Executable File
86 lines
2.2 KiB
Nix
Executable File
{
|
|
description = "SoraFlake";
|
|
inputs = {
|
|
# Trick renovate into working: "github:NixOS/nixpkgs/nixpkgs-unstable"
|
|
nixUnstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
|
hardware.url = "github:nixos/nixos-hardware";
|
|
nur = {
|
|
url = "github:nix-community/nur";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-26.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
darwin = {
|
|
url = "github:lnl7/nix-darwin/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nix-colors.url = "github:misterio77/nix-colors";
|
|
nixos-wsl = {
|
|
url = "github:nix-community/nixos-wsl";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
vscode-server = {
|
|
url = "github:nix-community/nixos-vscode-server";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
};
|
|
|
|
outputs = inputs:
|
|
let
|
|
lib = inputs.nixpkgs.lib;
|
|
gen = import ./generator.nix { inherit inputs; };
|
|
systemsDir = ./systems;
|
|
systemNames = lib.attrNames (lib.filterAttrs
|
|
(name: type: type == "directory" && builtins.pathExists (systemsDir + "/${name}/cfg.nix"))
|
|
(builtins.readDir systemsDir));
|
|
hostsByType = systemType:
|
|
lib.filter
|
|
(host: (import (systemsDir + "/${host}/cfg.nix")).syscfg.type == systemType)
|
|
systemNames;
|
|
generateHosts = systemType:
|
|
builtins.listToAttrs (map
|
|
(host: lib.nameValuePair host (gen.generate { inherit host; }))
|
|
(hostsByType systemType));
|
|
in {
|
|
devShells = import ./shells { inherit inputs; };
|
|
|
|
nixosConfigurations = generateHosts "nixos";
|
|
darwinConfigurations = generateHosts "macos";
|
|
homeConfigurations = generateHosts "home";
|
|
};
|
|
|
|
# ===== Unsupported/NotImplemented ======
|
|
# menel - PI/ARM64
|
|
# ilduma - PI/ARM64
|
|
# daimoth - PI/ARM64
|
|
# gimle - ....
|
|
|
|
# ===== Unused ======
|
|
#
|
|
# naraka - ?
|
|
# diyu - ?
|
|
# tirnanog - ?
|
|
# valhalla - ?
|
|
# arcadia - ?
|
|
# elysium - ?
|
|
# empyrean - ?
|
|
# duat - ?
|
|
# sheol - ?
|
|
# adlivun - ?
|
|
# araf - ?
|
|
# aman/araman - ?
|
|
|
|
}
|