mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
chore: init
This commit is contained in:
commit
1b2c1ea359
891 changed files with 37053 additions and 0 deletions
45
modules/config/devices/default.nix
Executable file
45
modules/config/devices/default.nix
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
{ moduleFunctions }:
|
||||
let
|
||||
|
||||
configPath = ./config;
|
||||
printerPath = configPath + /printers;
|
||||
|
||||
deviceswithFunctions = builtins.listToAttrs (
|
||||
map
|
||||
(name: {
|
||||
name = builtins.substring 0 (builtins.stringLength name - 4) name;
|
||||
value = import (configPath + "/${name}") {
|
||||
inherit
|
||||
moduleFunctions
|
||||
;
|
||||
};
|
||||
})
|
||||
(
|
||||
builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
|
||||
builtins.attrNames (builtins.readDir configPath)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
devicesPrinters = builtins.listToAttrs (
|
||||
map
|
||||
(name: {
|
||||
name = builtins.substring 0 (builtins.stringLength name - 4) name;
|
||||
value = import (printerPath + "/${name}") {
|
||||
inherit
|
||||
moduleFunctions
|
||||
;
|
||||
};
|
||||
})
|
||||
(
|
||||
builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
|
||||
builtins.attrNames (builtins.readDir printerPath)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
devices = deviceswithFunctions // devicesPrinters;
|
||||
in
|
||||
{
|
||||
devices = devices;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue