1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00
home-manager/home-manager
DDoSolitary 6e5b2d9e80
home-manager: support username with special chars (#5609)
The home manager script fails when $USER contains special characters.

For example, my work PC is managed by company's LDAP and username is <COMPANY>\<user>). When running home-manager switch I get the following error:
```
error: flake 'path:/home/<COMPANY>/<user>/.config/home-manager' does not provide attribute 'packages.x86_64-linux.homeConfigurations."<COMPANY>\<user>".activationPackage', 'legacyPackages.x86_64-linux.homeConfigurations."<COMPANY>\<user>".activationPackage' or 'homeConfigurations."<COMPANY>\<user>".activationPackage'
       Did you mean <COMPANY><user>?
```
There are two types of strings that need escaping:

    strings in Nix expressions (e.g. home.nix generated by home-manager init)
    they need backslashes before special chars
    flake URI (passed to nix build)
    they need URI's percent encoding, luckily jq supports that
2024-12-11 22:13:27 +01:00
..
po Translate using Weblate (Finnish) 2024-12-04 07:59:37 +00:00
build-news.nix home-manager: rework news command 2023-07-31 12:43:36 +02:00
completion.bash home-manager: fix some completions commands 2023-09-10 11:35:41 +02:00
completion.fish home-manager: pass --refresh to nix (#3624) 2023-02-05 11:14:03 +01:00
completion.zsh home-manager: fix some completions commands 2023-09-10 11:35:41 +02:00
default.nix home-manager: use hostname from GNU inetutils 2024-09-13 08:37:10 +02:00
home-manager home-manager: support username with special chars (#5609) 2024-12-11 22:13:27 +01:00
home-manager.nix home-manager: rework news command 2023-07-31 12:43:36 +02:00
install.nix home-manager: add init command to main tool 2023-03-15 22:47:04 +01:00