Commit cf3e31dc authored by Ameer Taweel's avatar Ameer Taweel
Browse files

nixos/prometheus: remove absolute path literals

parent d43a933f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -386,7 +386,7 @@ let
          after = [ "network.target" ];
          serviceConfig.Restart = mkDefault "always";
          serviceConfig.PrivateTmp = mkDefault true;
          serviceConfig.WorkingDirectory = mkDefault /tmp;
          serviceConfig.WorkingDirectory = mkDefault "/tmp";
          serviceConfig.DynamicUser = mkDefault enableDynamicUser;
          serviceConfig.User = mkDefault conf.user;
          serviceConfig.Group = conf.group;
+4 −7
Original line number Diff line number Diff line
@@ -23,13 +23,10 @@ let
    if (builtins.isPath file) || (lib.isStorePath file) then
      file
    else
      (
        lib.warn ''
      (lib.warn ''
        ${logPrefix}: configuration file "${file}" is being copied to the nix-store.
        If you would like to avoid that, please set enableConfigCheck to false.
        '' /.
        + file
      );
      '' (builtins.toFile (builtins.baseNameOf file) (builtins.readFile file)));
  checkConfigLocation =
    file:
    if lib.hasPrefix "/tmp/" file then
+6 −6
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ in
    };
    ecoflowAccessKeyFile = mkOption {
      type = types.path;
      default = /etc/ecoflow-access-key;
      default = "/etc/ecoflow-access-key";
      description = ''
        Path to the file with your personal api access string from the Ecoflow development website <https://developer-eu.ecoflow.com>.
        Do to share or commit your plaintext scecrets to a public repo use: agenix or soaps.
@@ -35,7 +35,7 @@ in
    };
    ecoflowSecretKeyFile = mkOption {
      type = types.path;
      default = /etc/ecoflow-secret-key;
      default = "/etc/ecoflow-secret-key";
      description = ''
        Path to the file with your personal api secret string from the Ecoflow development website <https://developer-eu.ecoflow.com>.
        Do to share or commit your plaintext scecrets to a public repo use: agenix or soaps.
@@ -43,7 +43,7 @@ in
    };
    ecoflowEmailFile = mkOption {
      type = types.path;
      default = /etc/ecoflow-email;
      default = "/etc/ecoflow-email";
      description = ''
        Path to the file with your personal ecoflow app login email address.
        Do to share or commit your plaintext scecrets to a public repo use: agenix or soaps.
@@ -51,7 +51,7 @@ in
    };
    ecoflowPasswordFile = mkOption {
      type = types.path;
      default = /etc/ecoflow-password;
      default = "/etc/ecoflow-password";
      description = ''
        Path to the file with your personal ecoflow app login email password.
        Do to share or commit your plaintext passwords to a public repo use: agenix or soaps here!
@@ -59,7 +59,7 @@ in
    };
    ecoflowDevicesFile = mkOption {
      type = types.path;
      default = /etc/ecoflow-devices;
      default = "/etc/ecoflow-devices";
      description = ''
        File must contain one line, example: R3300000,R3400000,NC430000,....
        The list of devices serial numbers separated by comma. For instance: SN1,SN2,SN3.
@@ -69,7 +69,7 @@ in
    };
    ecoflowDevicesPrettyNamesFile = mkOption {
      type = types.path;
      default = /etc/ecoflow-devices-pretty-names;
      default = "/etc/ecoflow-devices-pretty-names";
      description = ''
        File must contain one line, example: {"R3300000":"Delta 2","R3400000":"Delta Pro",...}
        The key/value map of custom names for your devices. Key is a serial number, value is a device name you want
+4 −7
Original line number Diff line number Diff line
@@ -24,13 +24,10 @@ let
    if (builtins.isPath file) || (lib.isStorePath file) then
      file
    else
      (
        lib.warn ''
      (lib.warn ''
        ${logPrefix}: configuration file "${file}" is being copied to the nix-store.
        If you would like to avoid that, please set enableConfigCheck to false.
        '' /.
        + file
      );
      '' (builtins.toFile (builtins.baseNameOf file) (builtins.readFile file)));

  checkConfig =
    file: