add den pattern
This commit is contained in:
6
modules/work/default.nix
Normal file
6
modules/work/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ lib, ... }: {
|
||||
imports = lib.mapAttrsToList
|
||||
(file: _: ./. + "/${file}")
|
||||
(lib.filterAttrs (file: _: lib.hasSuffix ".nix" file && file != "default.nix")
|
||||
(builtins.readDir ./.));
|
||||
}
|
||||
20
modules/work/enova.nix
Normal file
20
modules/work/enova.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.work or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.enova.enable or true)) {
|
||||
services.dnsmasq = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
server = [
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
];
|
||||
address = [ "/.enova.local/127.0.0.1" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user