build(xatu): add flake package #78

Closed
alexion wants to merge 8 commits from refs/pull/78/head into main
pull from: refs/pull/78/head
3 changed files with 26 additions and 20 deletions
Showing only changes of commit 3e0bcbc0ee - Show all commits

No files matched your search

+3 -19
View File
@@ -1,25 +1,9 @@
{ lib }: { lib }:
let let
collectNixFiles = flakeUtil = import ../flake/util.nix { inherit lib; };
dir:
lib.flatten (
lib.mapAttrsToList (
name: type:
let
path = dir + "/${name}";
in
if type == "directory" then
collectNixFiles path
else if type == "regular" && lib.hasSuffix ".nix" name then
[ path ]
else
[ ]
) (builtins.readDir dir)
);
in in
{ flakeUtil
inherit collectNixFiles; // {
bridgeName = id: "br-vlan${toString id}"; bridgeName = id: "br-vlan${toString id}";
deriveMac = deriveMac =
+1 -1
View File
@@ -6,7 +6,7 @@
system, system,
}: }:
let let
util = import ../dotfiles/util.nix { inherit lib; }; util = import ./util.nix { inherit lib; };
dotfiles = import ../dotfiles { dotfiles = import ../dotfiles {
inherit inherit
+22
View File
@@ -0,0 +1,22 @@
{ lib }:
let
collectNixFiles =
dir:
lib.flatten (
lib.mapAttrsToList (
name: type:
let
path = dir + "/${name}";
in
if type == "directory" then
collectNixFiles path
else if type == "regular" && lib.hasSuffix ".nix" name then
[ path ]
else
[ ]
) (builtins.readDir dir)
);
in
{
inherit collectNixFiles;
}