Skip to content

fix tmpfiles 0755 permissions conflict on split roots for subdirs - #21

Open
nazarewk wants to merge 1 commit into
nix-community:mainfrom
nazarewk-iac:fix/tmpfiles-permissions-conflict
Open

fix tmpfiles 0755 permissions conflict on split roots for subdirs#21
nazarewk wants to merge 1 commit into
nix-community:mainfrom
nazarewk-iac:fix/tmpfiles-permissions-conflict

Conversation

@nazarewk

@nazarewk nazarewk commented Sep 15, 2025

Copy link
Copy Markdown

fixes #20

This is MVP that works for me, not 100% sure it's "conceptually" correct.

The reasoning behind it can be found in the linked issue.

Turns

nix-repl> :p lib.pipe nixosConfigurations.brys.config.preservation.preserveAt [(lib.mapAttrsToList (k: e: e.users.kdn.directories)) lib.flatten (builtins.filter (e: e.directory == "/home/kdn/.local/share/bottles"))]
[
  {
    configureParent = false;
    directory = "/home/kdn/.local/share/bottles";
    group = "users";
    how = "_intermediate";
    inInitrd = false;
    mode = "0755";
    user = "kdn";
  }
  {
    configureParent = false;
    createLinkTarget = false;
    directory = "/home/kdn/.local/share/bottles";
    group = "users";
    how = "bindmount";
    inInitrd = false;
    mode = "0750";
    mountOptions = [
      {
        name = "bind";
        value = null;
      }
      {
        name = "X-fstrim.notrim";
        value = null;
      }
      {
        name = "x-gvfs-hide";
        value = null;
      }
      {
        name = "x-gdu.hide";
        value = null;
      }
    ];
    parent = {
      group = "users";
      mode = "0750";
      user = "kdn";
    };
    user = "kdn";
  }
]

into:

nix-repl> :p lib.pipe nixosConfigurations.brys.config.preservation.preserveAt [(lib.mapAttrsToList (k: e: e.users.kdn.directories)) lib.flatten (builtins.filter (e: e.directory == "/home/kdn/.local/share/bottles"))]
[
  {
    configureParent = {
      _type = "override";
      content = false;
      priority = 1000;
    };
    directory = "/home/kdn/.local/share/bottles";
    group = {
      _type = "override";
      content = "users";
      priority = 1000;
    };
    how = {
      _type = "override";
      content = "_intermediate";
      priority = 1000;
    };
    inInitrd = false;
    mode = {
      _type = "override";
      content = "0755";
      priority = 1000;
    };
    user = {
      _type = "override";
      content = "kdn";
      priority = 1000;
    };
  }
  {
    configureParent = false;
    createLinkTarget = false;
    directory = "/home/kdn/.local/share/bottles";
    group = "users";
    how = "bindmount";
    inInitrd = false;
    mode = "0750";
    mountOptions = [
      {
        name = "bind";
        value = null;
      }
      {
        name = "X-fstrim.notrim";
        value = null;
      }
      {
        name = "x-gvfs-hide";
        value = null;
      }
      {
        name = "x-gdu.hide";
        value = null;
      }
    ];
    parent = {
      group = "users";
      mode = "0750";
      user = "kdn";
    };
    user = "kdn";
  }
]

nazarewk added a commit to nazarewk-iac/nix-configs that referenced this pull request Sep 15, 2025
- disable spotifywm (outdated?)
- fix python tkinter
- patch preservation nix-community/preservation#21 / nix-community/preservation#20

Signed-off-by: Krzysztof Nazarewski <gpg@kdn.im>
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.

The option `systemd.tmpfiles.settings.preservation."...".d.mode' has conflicting definition values:

1 participant