Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanoid Template variable not functioning #181561

Closed
djohnson1865 opened this issue Jul 15, 2022 · 1 comment · Fixed by #187905
Closed

Sanoid Template variable not functioning #181561

djohnson1865 opened this issue Jul 15, 2022 · 1 comment · Fixed by #187905

Comments

@djohnson1865
Copy link

Describe the bug

services.sanoid.datasets..useTemplate does not work as expected.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Within configuration.nix set something along the lines of
services.sanoid = {
  enable = true;
  templates.backup = {
    autoprune = true;
    autosnap = false;
    hourly = 24;
    daily = 30;
    monthly = 6;
  };
  datasets.tank = {
    useTemplate = ["backup"];
  };
};
  1. Build config and check the built sanoid.conf file in the nix store. Within the config file use_template is not set on the appropriate directories.

Expected behavior

use_template in sanoid.conf should be set using the useTemplate variable for datasets in question (or the alias should be removed from the package/documentation)

Additional context

services.sanoid.datasets..use_template works as expected.

Tried on multiple machines with different zfs datasets just to sanity check and got the same result. Fairly new to nix, so definitely let me know if I'm just missing something. Couldn't tell what the issue was looking at the service derivation for sanoid.

Notify maintainers

@lopsided98

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.53, NixOS, 22.05 (Quokka), 22.05.1627.4aceab3cadf`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.10.1`
 - channels(root): `"nixos-22.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@lopsided98
Copy link
Contributor

I think this is either a bug mkAliasDefinitions or in the way it is used. Sanoid is the only user of this function in the entirety of nixpkgs, so I can't check other examples.

cc @ju1m

ju1m added a commit to ju1m/nixpkgs that referenced this issue Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants