25 lines
473 B
Nix
25 lines
473 B
Nix
{ ... }:
|
|
|
|
let
|
|
mkSysRole = role:
|
|
let
|
|
path = ../roles + "/${role}.nix";
|
|
in
|
|
if builtins.pathExists path then
|
|
import path
|
|
else
|
|
throw "System role '${role}' not found at ${toString path}";
|
|
|
|
mkHomeRole = role:
|
|
let
|
|
path = ../roles/home + "/${role}.nix";
|
|
in
|
|
if builtins.pathExists path then
|
|
import path
|
|
else
|
|
throw "Home role '${role}' not found at ${toString path}";
|
|
in
|
|
{
|
|
inherit mkSysRole mkHomeRole;
|
|
}
|