100 lines
2.6 KiB
Nix
Executable File
100 lines
2.6 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";
|
|
};
|
|
|
|
astal = {
|
|
url = "github:aylur/astal";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
ags = {
|
|
url = "github:aylur/ags";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.astal.follows = "astal";
|
|
};
|
|
};
|
|
|
|
outputs = inputs:
|
|
let
|
|
lib = inputs.nixpkgs.lib;
|
|
gen = import ./generator.nix { inherit inputs; };
|
|
systemsDir = ./systems;
|
|
isIgnoredSystemDir = name: lib.hasPrefix "_" name || lib.hasPrefix "." name;
|
|
systemNames = lib.attrNames (lib.filterAttrs
|
|
(name: type:
|
|
type == "directory"
|
|
&& !isIgnoredSystemDir name
|
|
&& 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:
|
|
lib.genAttrs
|
|
(hostsByType systemType)
|
|
(host: gen.generate { inherit host; });
|
|
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 - ?
|
|
|
|
}
|