this post was submitted on 29 Jul 2023
3 points (100.0% liked)

Nix

10 readers
1 users here now

founded 1 year ago
MODERATORS
 

When I tried to add aliases to my configuration.nix file with bash options I got syntax errors but typing them into a shell like local bash aliases, they persist over reboots and refreshes, can some one help me make sense of that & how do I configure the aliases in NixOs?

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 1 year ago (1 children)

Hmm, which option were you setting? Can you share your configuration.nix (relevant parts)?

[–] [email protected] 1 points 1 year ago (1 children)

I was using the programs.bash.shellAliases option with aliases in between the curly brackets

[–] [email protected] 1 points 1 year ago (1 children)

That should work, unless there is something wrong with the values themselves, you can also check the bash profile files nix generates.

Cant say much without seeing the code.

[–] [email protected] 1 points 1 year ago

Thanks for chiming in you were right about the values,the solution was my indentation and syntax errors I had to reread the docs and look up some other configs but I got it figured out