feat: renamed computers to hosts
This commit is contained in:
parent
f6af310a18
commit
b03c70b486
34 changed files with 5 additions and 6 deletions
50
hosts/shared/xonsh.nix
Normal file
50
hosts/shared/xonsh.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.alqueva.xonsh;
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
in {
|
||||
options.alqueva.xonsh = {
|
||||
enable = lib.mkEnableOption "xonsh";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs = {
|
||||
xonsh = {
|
||||
config =
|
||||
"from xonsh.xontribs import get_xontribs\n"
|
||||
+ lib.concatStringsSep "\n" (builtins.attrValues (builtins.mapAttrs (n: v: "aliases['${n}'] = '${v}'\n") config.environment.shellAliases))
|
||||
+ ''
|
||||
for xontrib in get_xontribs():
|
||||
xontrib load @(xontrib)
|
||||
|
||||
execx($(zoxide init xonsh --cmd j), 'exec', __xonsh__.ctx, filename='zoxide')
|
||||
'';
|
||||
package = pkgs.xonsh.override {
|
||||
extraPackages = ps: [
|
||||
(let
|
||||
name = "xontrib-fish-completer";
|
||||
version = "0.0.1";
|
||||
in
|
||||
ps.buildPythonPackage {
|
||||
inherit name version;
|
||||
src = fetchFromGitHub {
|
||||
owner = "xonsh";
|
||||
repo = name;
|
||||
rev = version;
|
||||
hash = "sha256-PhhdZ3iLPDEIG9uDeR5ctJ9zz2+YORHBhbsiLrJckyA=";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
environment.systemPackages = [
|
||||
pkgs.zoxide
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue