My Nix Configuration

[modules.nixos] Fixup dn42-pingfinder module

Changed files
+6 -4
modules
nixos
services
dn42-pingfinder
+6 -4
modules/nixos/services/dn42-pingfinder/default.nix
···
{
config,
-
options,
pkgs,
lib,
...
}:
+
let
+
cfg = config.py.services.dn42-pingfinder;
+
in
{
-
options.services."dn42-pingfinder" = {
+
options.py.services.dn42-pingfinder = {
uuidFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
···
};
};
-
config = lib.mkIf (config.services."dn42-pingfinder".uuidFile != null) {
+
config = lib.mkIf (cfg.uuidFile != null) {
systemd.services.dn42-pingfinder = {
path = with pkgs; [
curl
···
which
];
script = ''
-
export UUID=$(cat ${config.services."dn42-pingfinder".uuidFile})
+
export UUID=$(cat ${cfg.uuidFile})
exec ${pkgs.nur.repos.xddxdd.dn42-pingfinder}/bin/dn42-pingfinder
'';
serviceConfig = {