{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/5331","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/5331/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/5331/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/5331/events","html_url":"https://github.com/NixOS/nixpkgs/issues/5331","id":51920503,"number":5331,"title":"Make fish easily configurable as a default shell","user":{"login":"rushmorem","id":4958190,"avatar_url":"https://avatars.githubusercontent.com/u/4958190?v=3","gravatar_id":"","url":"https://api.github.com/users/rushmorem","html_url":"https://github.com/rushmorem","followers_url":"https://api.github.com/users/rushmorem/followers","following_url":"https://api.github.com/users/rushmorem/following{/other_user}","gists_url":"https://api.github.com/users/rushmorem/gists{/gist_id}","starred_url":"https://api.github.com/users/rushmorem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rushmorem/subscriptions","organizations_url":"https://api.github.com/users/rushmorem/orgs","repos_url":"https://api.github.com/users/rushmorem/repos","events_url":"https://api.github.com/users/rushmorem/events{/privacy}","received_events_url":"https://api.github.com/users/rushmorem/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/0.kind:%20enhancement","name":"0.kind: enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20nixos","name":"6.topic: nixos","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-12-14T14:21:31Z","updated_at":"2015-12-03T06:13:05Z","closed_at":null,"body":"This is a feature request. May you please make `fish` shell easily configurable as a default shell. With `zsh`, for example, I can simply enable it like so `programs.zsh.enable = true;` and set `users.defaultUserShell = \"/run/current-system/sw/bin/zsh\";`.\r\n\r\ncc @ocharles"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/161527936","html_url":"https://github.com/NixOS/nixpkgs/issues/5331#issuecomment-161527936","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/5331","id":161527936,"user":{"login":"therealpxc","id":3180910,"avatar_url":"https://avatars.githubusercontent.com/u/3180910?v=3","gravatar_id":"","url":"https://api.github.com/users/therealpxc","html_url":"https://github.com/therealpxc","followers_url":"https://api.github.com/users/therealpxc/followers","following_url":"https://api.github.com/users/therealpxc/following{/other_user}","gists_url":"https://api.github.com/users/therealpxc/gists{/gist_id}","starred_url":"https://api.github.com/users/therealpxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/therealpxc/subscriptions","organizations_url":"https://api.github.com/users/therealpxc/orgs","repos_url":"https://api.github.com/users/therealpxc/repos","events_url":"https://api.github.com/users/therealpxc/events{/privacy}","received_events_url":"https://api.github.com/users/therealpxc/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T06:13:05Z","updated_at":"2015-12-03T06:13:05Z","body":"One hacky, but possibly easy way to do this is with 'fenv', a fish function defined in the plugin-foreign-env package for Oh My Fish: https://github.com/oh-my-fish/plugin-foreign-env\r\n\r\nThe fenv function takes a bash command or a path to a bash script, runs it under bash, and then modifies the fish environment appropriately to match any environment variables that were set in the bash environment.\r\n\r\nFish also automatically escapes the output of subcommands in the appropriate way, so if we want to use the output of a command, as we would with ssh-agent, for example, without modifying anything to get fish code, we can do\r\n\r\n``eval fenv (ssh-agent)``\r\n\r\nor\r\n\r\n``fenv 'eval $(ssh-agent)'``\r\n\r\nor\r\n\r\n``fenv eval `ssh-agent` ``\r\n\r\nand so on. I think leveraging this function would be a good idea, but what's the best way to go about it? Should we arrange things so that \"programs.fish.enable = true;\" also installs oh-my-fish as well as the plugin for omf in a nixy way? Should we rip out the code from the package? Or maybe, should we just write a nix expression that installs the files for the functions, ripping them directly from git but arranging them in a different location (maybe globally)?"}}