Working on modularizing stuff, again
This commit is contained in:
parent
b698ce3485
commit
9ba5f8fdf0
32 changed files with 1481 additions and 88 deletions
34
modules/options.nix
Normal file
34
modules/options.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (builtins) elem isList pathExists toString;
|
||||
inherit (lib.attrsets) mapAttrs mapAttrsToList;
|
||||
inherit (lib.lists) findFirst;
|
||||
inherit (lib.modules) mkAliasDefinitions;
|
||||
inherit (lib.strings) concatMapStringsSep concatStringsSep;
|
||||
inherit (lib.my) mkOpt mkOpt';
|
||||
in
|
||||
{
|
||||
options = let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) attrs attrsOf either listOf oneOf path str;
|
||||
in
|
||||
{
|
||||
user = mkOpt attrs {};
|
||||
|
||||
kaas = {
|
||||
dir = mkOpt path (findFirst pathExists (toString ../.) [
|
||||
"${config.user.home}/Workspace/public/kaas"
|
||||
"/etc/kaas"
|
||||
]);
|
||||
hostDir = mkOpt path "${config.kaas.dir}/hosts/${config.networking.hostName}";
|
||||
binDir = mkOpt path "${config.kaas.dir}/bin";
|
||||
configDir = mkOpt path "${config.kaas.dir}/config";
|
||||
modulesDir = mkOpt path "${config.kaas.dir}/modules";
|
||||
themesDir = mkOpt path "${config.kaas.modulesDir}/themes";
|
||||
};
|
||||
|
||||
home = {
|
||||
# HIER BEN IK GEBLEVEN!!!
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue