From 68e384a77f654ed3007bba11c799a850c807bedd Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 26 May 2020 00:17:55 +0000 Subject: ffeat(ops/nixos): Add a dummy to make depot available in modules Because modules are not called via the default depot setup (for now ...), this introduces a dummy module that stores the depot tree itself in the module configurations. This makes it possible to write modules that use packages from the depot. --- ops/nixos/camden/default.nix | 5 +++++ ops/nixos/modules/depot.nix | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ops/nixos/modules/depot.nix diff --git a/ops/nixos/camden/default.nix b/ops/nixos/camden/default.nix index 57cc696e4f..9d80059615 100644 --- a/ops/nixos/camden/default.nix +++ b/ops/nixos/camden/default.nix @@ -6,6 +6,11 @@ config: let config.allowUnfree = true; }; in lib.fix(self: { + imports = [ + ../modules/depot.nix + ]; + depot = depot; + # camden is intended to boot unattended, despite having an encrypted # root partition. # diff --git a/ops/nixos/modules/depot.nix b/ops/nixos/modules/depot.nix new file mode 100644 index 0000000000..20220e9f57 --- /dev/null +++ b/ops/nixos/modules/depot.nix @@ -0,0 +1,16 @@ +# This module makes it possible to get at the depot from "proper" +# NixOS modules. +# +# It needs to be included and configured in each system like this: +# +# { +# imports = [ ../modules/depot.nix ]; +# inherit depot; +# } +{ lib, ... }: + +{ + options.depot = with lib; mkOption { + description = "tazjin's imported monorepo"; + }; +} -- cgit 1.4.1