-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
WIP: Xonsh #5494
base: master
Are you sure you want to change the base?
WIP: Xonsh #5494
Conversation
modules/programs/xonsh.nix
Outdated
finalPackage = lib.mkOption { | ||
type = types.package; | ||
internal = true; | ||
description = "Package that will actually gat installed"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "Package that will actually gat installed"; | |
description = "Package that will actually get installed"; |
modules/programs/xonsh.nix
Outdated
home = { | ||
packages = [ cfg.finalPackage ]; | ||
file.".xonshrc" = { | ||
enable = cfg.xonshrc != ""; | ||
text = cfg.xonshrc; | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to respect XDG.
home = { | |
packages = [ cfg.finalPackage ]; | |
file.".xonshrc" = { | |
enable = cfg.xonshrc != ""; | |
text = cfg.xonshrc; | |
}; | |
}; | |
home.packages = [ cfg.finalPackage ]; | |
xdg.configFile."xonsh/rc.xsh" = { | |
enable = cfg.xonshrc != ""; | |
text = cfg.xonshrc; | |
}; |
Another option is how #5160 does it: split by files. It's directly supported by xonsh.
Which one is better? I don't know, but you and @inmaldrerah should probably join efforts.
Thanks both!
modules/programs/xonsh.nix
Outdated
cfg.package.override (old: { inherit (cfg) extraPackages; }); | ||
}; | ||
}; | ||
xdg.configFile."xonsh/rc.xsh" = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This xdg.configFile."xonsh/rc.xsh"
entry should be in the previous config
block.
f340f89
to
456cc84
Compare
5f24d60
to
00a4800
Compare
@pasqui23 -- I'm confused how this PR and NixOS/nixpkgs#241386 will interact. Are you and @greg-hellings communicating? Will these work together? I want this support in home-manager, but I feel like we need the xontribs to be in nixpkgs, not inline in the home-manager like this. FWIW, I'm trying to maintain a NUR of the xontribs I find that we can migrate to nixpkgs -- these should be in the PR referenced above |
On 20/07/24 19:14, drmikecrowe ***@***.***> wrote:
@pasqui23 <https://github.com/pasqui23> -- I'm confused how this PR and
NixOS/nixpkgs#241386 <NixOS/nixpkgs#241386> will
interact. Are you and @greg-hellings <https://github.com/greg-hellings>
communicating? Will these work together?
I want this support in home-manager, but I feel like we need the
xontribs to be in nixpkgs, not inline in the home-manager like this.
FWIW, I'm /trying/ to maintain a NUR of the xontribs I find that we can
migrate to nixpkgs -- these /should/ be in the PR referenced above
—
Reply to this email directly, view it on GitHub
<#5494 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABU4KH6PPRXULIR5KXAVJDTZNKLFXAVCNFSM6AAAAABIXMU72WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRGIZDSNJZHA>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
No I wasn't aware of @greg-hellings work. I will take a look at it later
|
modules/programs/broot.nix
Outdated
xonshrc = "xontrib load broot"; | ||
extraPackages = ps: | ||
[ | ||
(ps.buildPythonPackage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably not the way to do this. I don't know if home-manager allows it, but cramming it in here manually seems less than ideal.
On 23/08/24 20:38, Greg Hellings ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------------------------------------------------
In modules/programs/broot.nix <https://github.com/nix-community/home-
manager/pull/5494#discussion_r1729379160>:
> @@ -237,5 +245,27 @@ in {
programs.nushell.extraConfig =
mkIf cfg.enableNushellIntegration (shellInit "nushell");
+
+ programs.xonsh = mkIf cfg.enableXonshIntegration {
+ xonshrc = "xontrib load broot";
+ extraPackages = ps:
+ [
+ (ps.buildPythonPackage {
This is probably not the way to do this. I don't know if home-manager
allows it, but cramming it in here manually seems less than ideal.
—
Reply to this email directly, view it on GitHub <https://github.com/nix-
community/home-manager/pull/5494#pullrequestreview-2257867607>, or
unsubscribe <https://github.com/notifications/unsubscribe-auth/
ABU4KH75DYBWTXYWLZ2NRCTZS56TZAVCNFSM6AAAAABIXMU72WVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENJXHA3DONRQG4>.
You are receiving this because you were mentioned.Message ID: <nix-
***@***.***>
Why would it be suboptimal?
|
Wait now I see it. Yeah I can't seem to make it work unfortunately and NixOS/nixpkgs#241386 doesn't seem to add it in upstream either |
Put this as wip until NixOS/nixpkgs#241386 is merged and I can use xonsh-direnv from it |
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
I've made a new PR (shown above) that adds the xontribs. If you all can review it to try and get it merged, that would be appreciated. |
Description
Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
ornix develop --ignore-environment .#all
using Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC