mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-10 17:34:05 -05:00
booklore up and running
This commit is contained in:
parent
6ce540f5aa
commit
213cc8c10a
4 changed files with 89 additions and 34 deletions
|
|
@ -1,18 +1,24 @@
|
|||
# FIXME(lib.custom): Add some stuff from hmajid2301/dotfiles/lib/module/default.nix, as simplifies option declaration
|
||||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
# use path relative to the root of the project
|
||||
relativeToRoot = lib.path.append ../.;
|
||||
scanPaths = path:
|
||||
scanPaths =
|
||||
path:
|
||||
builtins.map (f: (path + "/${f}")) (
|
||||
builtins.attrNames (
|
||||
lib.attrsets.filterAttrs (
|
||||
path: _type:
|
||||
(_type == "directory") # include directories
|
||||
|| (
|
||||
(path != "default.nix") # ignore default.nix
|
||||
&& (lib.strings.hasSuffix ".nix" path) # include .nix files
|
||||
)
|
||||
(_type == "directory") # include directories
|
||||
|| (
|
||||
(path != "default.nix") # ignore default.nix
|
||||
&& (lib.strings.hasSuffix ".nix" path) # include .nix files
|
||||
)
|
||||
) (builtins.readDir path)
|
||||
)
|
||||
);
|
||||
autoport =
|
||||
service-name:
|
||||
(builtins.fromTOML "v=0x${(builtins.substring 0 4 (builtins.hashString "md5" service-name))}").v
|
||||
+ 1023;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue