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

bug: unexpected '@' #5279

Open
2 tasks done
MAHDTech opened this issue Apr 16, 2024 · 1 comment
Open
2 tasks done

bug: unexpected '@' #5279

MAHDTech opened this issue Apr 16, 2024 · 1 comment
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@MAHDTech
Copy link

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

Hi,

How can I escape the '@' symbol in the home directory? I've tried single quote and backslash already, is there another character to use?

I'm using home-manager in an environment where the home directories are like this

/home/<username>@<domain>

The error I receive is this

error: syntax error, unexpected '@', expecting end of file

       at «string»:1:14:

            1| /home/<username>@<domain>

The only location I see to have it configured with the '@' is the homeDirectory field.

    configHomeManager = {
      system,
      username,
      ...
    }:
      home-manager.lib.homeManagerConfiguration {
        pkgs = pkgsImportSystem system;

        extraSpecialArgs = {
          inherit inputs;
          inherit system;
        };

        modules = [
          ./home/<username>
          {
            home = {
              homeDirectory = "/home/<username>@<domain>";
              stateVersion = "23.11";
            };
          }
        ];
      };

Maintainer CC

No response

System information

nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.00 MiB download, 0.00 MiB unpacked):
  /nix/store/88hr9j7a1r9qrvv7xnfyjmd1ww459krl-nix-info
copying path '/nix/store/88hr9j7a1r9qrvv7xnfyjmd1ww459krl-nix-info' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.5.0-27-generic, Ubuntu, 22.04.4 LTS (Jammy Jellyfish), nobuild`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixpkgs"`
 - channels(mduncan): `"nixos-23.05-23.05, nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs
@MAHDTech MAHDTech added bug triage Issues or feature request that have not been triaged yet labels Apr 16, 2024
@IldenH
Copy link
Contributor

IldenH commented Apr 26, 2024

Try adding lib.literalExpression?
homeDirectory = lib.literalExpression "/home/<username>@<domain>"
It might be preferable to do:
homeDirectory = ''/home/<username>@<domain>''
but I don't know if that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

5 participants