From 9f355eff0d412862fbb13f606ae3e2a0e777077e Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 2 Apr 2024 00:26:16 +0200 Subject: [PATCH] WIP: modules/debug-locations --- base.nix | 1 + modules/debug-locations.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 modules/debug-locations.nix diff --git a/base.nix b/base.nix index a47e021..8e6cf6a 100644 --- a/base.nix +++ b/base.nix @@ -4,6 +4,7 @@ imports = [ ./users ./modules/snakeoil-certs.nix + ./modules/debug-locations.nix ]; networking.domain = "pvv.ntnu.no"; diff --git a/modules/debug-locations.nix b/modules/debug-locations.nix new file mode 100644 index 0000000..8e10c27 --- /dev/null +++ b/modules/debug-locations.nix @@ -0,0 +1,13 @@ +{ config, lib, ... }: +let + cfg = config.environment.debug-locations; +in +{ + options.environment.debug-locations = lib.mkOption { + description = "Paths and derivations to symlink in `/etc/debug`"; + type = with lib.types; attrsOf path; + default = { }; + }; + + config.environment.etc = lib.mapAttrs' (k: v: lib.nameValuePair "debug/${k}" { source = v; }) cfg; +}