Skip to content

add cache substituter to flake#273

Merged
srid merged 1 commit intosrid:masterfrom
edrex:flake-add-substituter
Mar 31, 2022
Merged

add cache substituter to flake#273
srid merged 1 commit intosrid:masterfrom
edrex:flake-add-substituter

Conversation

@edrex
Copy link
Copy Markdown
Contributor

@edrex edrex commented Mar 31, 2022

Continued from srid/emanote-template#4

Tested with direnv on NixOS system with nix.settings.trusted-users = [ '@wheel' ];

@srid
Copy link
Copy Markdown
Owner

srid commented Mar 31, 2022

What happens if the current user is not trusted?

@edrex
Copy link
Copy Markdown
Contributor Author

edrex commented Mar 31, 2022

What happens if the current user is not trusted?

There's a warning message and the cache is skipped.

CA store paths will enable non-trusted users to add paths to the store, including substituters (as @balsoft explained to me)

@srid
Copy link
Copy Markdown
Owner

srid commented Mar 31, 2022

Could you paste the console output showing those warnings?

@srid
Copy link
Copy Markdown
Owner

srid commented Mar 31, 2022

Also, as I understand this works only for nix develop and nix build, but not nix run: NixOS/nix#6170

What about nix-env -if or when using Emante as flake input? Does the cache gets used?

@edrex
Copy link
Copy Markdown
Contributor Author

edrex commented Mar 31, 2022

Could you paste the console output showing those warnings?

I'd have to set up an untrusted user to reproduce the warning, but here's the source line: nix/src/libstore/daemon.cc#L225.

Hopefully support for nix run will be added soon.

What about nix-env -if or when using Emante as flake input? Does the cache gets used?
For nix-env -if, I haven't tested as I live in a post-flakes world. As an input, the settings don't apply, see NixOS/nix#4189 (comment)

@srid srid merged commit e91e3df into srid:master Mar 31, 2022
@srid
Copy link
Copy Markdown
Owner

srid commented Mar 31, 2022

Looks like this is currently only useful for caching development shell. Better than nothing, I guess.

@edrex edrex deleted the flake-add-substituter branch March 31, 2022 19:26
@srid
Copy link
Copy Markdown
Owner

srid commented Apr 3, 2022

I wonder how 96c0033 impacts this.

@edrex edrex mentioned this pull request Apr 4, 2022
shivaraj-bh pushed a commit to shivaraj-bh/emanote that referenced this pull request Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants