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 }:
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)
);
flakeUtil = import ../flake/util.nix { inherit lib; };
in
{
inherit collectNixFiles;
flakeUtil
// {
bridgeName = id: "br-vlan${toString id}";
deriveMac =
+1 -1
View File
@@ -6,7 +6,7 @@
system,
}:
let
util = import ../dotfiles/util.nix { inherit lib; };
util = import ./util.nix { inherit lib; };
dotfiles = import ../dotfiles {
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;
}