Skip to content

feat: Support raw file paths for certain config values#209

Open
JustTemmie wants to merge 1 commit intomainfrom
feats/read-config-values-from-files
Open

feat: Support raw file paths for certain config values#209
JustTemmie wants to merge 1 commit intomainfrom
feats/read-config-values-from-files

Conversation

@JustTemmie
Copy link
Collaborator

This would allow config files to be able to link certain values to other text files, like this.

{
  "jellyfin": {
    "url": "http://192.168.1.22:8096",
    "api_key": "/etc/nixos/private/jellyfin-api-key",
    "username": "Temmie"
  },
  "discord": {
    "buttons": [{
        "name": "dynamic",
        "url": "dynamic"
    }]
  },
  "imgur": {
    "client_id": "/etc/nixos/private/imgur-client-id"
  },
  "images": {
    "enable_images": true,
    "imgur_images": true
  }
}

this is extremely useful for NixOS and similar deployments, where i want the config file to be publicly available, but i obviously don't want to share my api keys.

@JustTemmie JustTemmie requested a review from JustRadical July 23, 2025 03:55
@JustTemmie JustTemmie added the enhancement New feature or request label Jul 23, 2025
JustTemmie added a commit to JustTemmie/NixOS-Dotfiles that referenced this pull request Jul 23, 2025
@JustTemmie
Copy link
Collaborator Author

why the fuck does github reference a random ass commit in another repo unrelated to this one wtf

@JustRadical
Copy link
Owner

I'm not exactly sure what this does

@JustTemmie
Copy link
Collaborator Author

I'm not exactly sure what this does

it tries loading a file from the given value, if it's not a file it just uses the cofig value

@JustRadical
Copy link
Owner

I dont really see why this would matter for a nix setup, i thought it could generate json files from nix files and if so then you could store the secret in another nix file that doesnt get included or use something like agenix (not sure if this usecase is appropriate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants