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

Add -p to mkdir #191

Closed
wants to merge 1 commit into from
Closed

Add -p to mkdir #191

wants to merge 1 commit into from

Conversation

bystepii
Copy link

When using the impermanence module, the script will not create the /persist/system directory without -p flag:

environment.persistence."/persist/system" = {
  hideMounts = true;
  directories = [
    "/etc/nixos"
    "/var/log"
    "/var/lib/bluetooth"
    "/var/lib/nixos"
    "/var/lib/systemd/coredump"
    "/etc/NetworkManager/system-connections"
    {
      directory = "/var/lib/colord";
      user = "colord";
      group = "colord";
      mode = "u=rwx,g=rx,o=";
    }
  ];
  files = [
    "/etc/machine-id"
    {
      file = "/var/keys/secret_file";
      parentDirectory = {
        mode = "u=rwx,g=,o=";
      };
    }
  ];
};

Error output on nixos-install:

Warning: Source directory '/persist/system/etc' does not exist; it will be created for you with the following permissions: owner: 'root:root', mode: '0755'.
mkdir: cannot create directory ‘/persist/system/etc’: No such file or directory
Error when executing mkdir --mode="$mode" "$realSource" at line 51!

@talyz
Copy link
Collaborator

talyz commented Oct 16, 2024

Fixed by #193.

@talyz talyz closed this Oct 16, 2024
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