Skip to content

Commit

Permalink
Change key type to include null
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Feb 17, 2025
1 parent 327c663 commit 2e086bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/nixos/services/hardware/beszel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
description = "The port for the beszel agent service";
};
key = lib.mkOption {
type = lib.types.str;
type = with lib.types; (nullOr string);
default = null;
description = "The raw value of the key";
};
keyFile = lib.mkOption {
type = lib.types.path or lib.types.str;
type = with lib.types; (nullOr path);
default = null;
description = "The file location where the key for the beszel agent service is located";
};
Expand Down Expand Up @@ -61,8 +61,8 @@
Environment = lib.lists.map (x: ''"${x}"'') [
"LOG_LEVEL=${cfg.logLevel}"
"PORT=${builtins.toString cfg.port}"
"KEY=${cfg.key}"
"KEY_FILE=${cfg.keyFile}"
"KEY=${builtins.toString cfg.key}"
"KEY_FILE=${builtins.toString cfg.keyFile}"
"GPU=${if cfg.gpu then "true" else "false"}"
"EXTRA_FILESYSTEMS=${lib.strings.concatStringsSep "," cfg.extraFilesystems}"
];
Expand Down
1 change: 1 addition & 0 deletions systems/madara/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ in
package = pkgs.unstable.beszel;
gpu = true;
# key = builtins.readFile config.sops.secrets."tokens/beszel-marvin".path;
key = "";
# keyFile = config.sops.secrets."tokens/beszel-marvin".path;
extraFilesystems = [
"nvme0n1p1"
Expand Down

0 comments on commit 2e086bc

Please sign in to comment.