add mechanism to include local (not in git) config
and an example of how you'd use it to add eculocate
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
local_config = if (builtins.pathExists ./local/module.nix)
|
||||
then ./local/module.nix
|
||||
else null;
|
||||
saturn = pkgs.callPackage ./pkgs/saturn {};
|
||||
|
||||
drm-framebuffer = pkgs.stdenv.mkDerivation {
|
||||
@@ -26,7 +29,8 @@ let
|
||||
in {
|
||||
imports = [
|
||||
(import ../mobile-nixos/lib/configuration.nix { device = "motorola-harpia"; })
|
||||
];
|
||||
] ++ lib.optional (local_config != null) local_config;
|
||||
|
||||
|
||||
config = {
|
||||
nixpkgs.overlays = [
|
||||
|
||||
24
local-module-eculocate.nix
Normal file
24
local-module-eculocate.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
# this isn't really part of biscuit, because "eculocate" is a lot more
|
||||
# niche than the rest of it. But it serves as an example of the kind of
|
||||
# thing you could put in local/module.nix
|
||||
|
||||
let
|
||||
eculocate = pkgs.callPackage <eculocate/client> {};
|
||||
in {
|
||||
imports = [ <eculocate/client/module.nix> ];
|
||||
config = {
|
||||
programs.eculocate = {
|
||||
enable = true;
|
||||
otaPrivateKeyFile = "/etc/secrets/eculocate/ota.key";
|
||||
blePrivateKeyFile = "/etc/secrets/eculocate/client.key";
|
||||
blePeerKeyFile = "/etc/secrets/eculocate/device.pub";
|
||||
outputPath = "/tmp/eculocate";
|
||||
};
|
||||
services.avahi = {
|
||||
nssmdns4 = true;
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user