mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 02:18:12 +09:00
nix registory
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
imports = [
|
||||
./formatter.nix
|
||||
./git-hooks.nix
|
||||
./registry.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
dotfilesLib = import ../libs {
|
||||
inherit inputs lib;
|
||||
root = ../.;
|
||||
};
|
||||
hostSpecsPath = ../hosts/default.nix;
|
||||
hostSpecs =
|
||||
if builtins.pathExists hostSpecsPath then
|
||||
let
|
||||
value = import hostSpecsPath;
|
||||
in
|
||||
if builtins.isFunction value then
|
||||
value (
|
||||
builtins.intersectAttrs (builtins.functionArgs value) {
|
||||
inherit inputs lib;
|
||||
}
|
||||
)
|
||||
else
|
||||
value
|
||||
else
|
||||
{ };
|
||||
configurations = dotfilesLib.hosts.mkConfigurations hostSpecs;
|
||||
in
|
||||
{
|
||||
flake = {
|
||||
inherit (configurations) darwinConfigurations nixosConfigurations;
|
||||
lib = dotfilesLib;
|
||||
};
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
checks.registry = import ../tests/registry.nix {
|
||||
inherit inputs lib pkgs;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user