switch to the rfc nixfmt version and reformatted repository
This commit is contained in:
parent
f4f53659bd
commit
c6a31bb751
22 changed files with 402 additions and 266 deletions
178
nixos/shell.nix
178
nixos/shell.nix
|
@ -1,17 +1,16 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
#TODO: Submit a PR to nixpkgs to add xonsh support to the Starship module
|
||||
# After that, we can remove this import and the disabledModules line
|
||||
disabledModules = [ "programs/starship.nix" ];
|
||||
imports =
|
||||
[ /bulk/home/cswimr/Projects/nixpkgs/nixos/modules/programs/starship.nix ];
|
||||
imports = [ /bulk/home/cswimr/Projects/nixpkgs/nixos/modules/programs/starship.nix ];
|
||||
|
||||
# starship - a customizable prompt for any shell
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
# custom settings
|
||||
settings = {
|
||||
format =
|
||||
"[](bg:#1e1e2e fg:#a6e3a1)$username$hostname[](fg:#a6e3a1 bg:#89b4fa)$directory[](fg:#89b4fa bg:#cba6f7)$direnv[](fg:#cba6f7 bg:#f9e2af)$git_branch$git_status[](fg:#f9e2af bg:#1e1e2e)$character";
|
||||
format = "[](bg:#1e1e2e fg:#a6e3a1)$username$hostname[](fg:#a6e3a1 bg:#89b4fa)$directory[](fg:#89b4fa bg:#cba6f7)$direnv[](fg:#cba6f7 bg:#f9e2af)$git_branch$git_status[](fg:#f9e2af bg:#1e1e2e)$character";
|
||||
username = {
|
||||
show_always = true;
|
||||
format = "[ $user@]($style)";
|
||||
|
@ -69,97 +68,98 @@
|
|||
programs.bash.completion.enable = true;
|
||||
|
||||
users.defaultUserShell = pkgs.xonsh;
|
||||
programs.xonsh = let bashcfg = config.programs.bash;
|
||||
in {
|
||||
enable = true;
|
||||
config = ''
|
||||
$BASH_COMPLETIONS = ('${bashcfg.completion.package}/etc/profile.d/bash_completion.sh')
|
||||
$UPDATE_OS_ENVIRON = True
|
||||
$XONTRIB_CLP_ALIAS = 'shutil'
|
||||
#xontrib load cd
|
||||
xontrib load clp
|
||||
xontrib load direnv
|
||||
xontrib load sh
|
||||
'';
|
||||
package = pkgs.xonsh.override {
|
||||
extraPackages = ps: [
|
||||
pkgs.python311Packages.rich
|
||||
# (ps.buildPythonPackage rec {
|
||||
# name = "xontrib-cd";
|
||||
# version = "0.3.1";
|
||||
programs.xonsh =
|
||||
let
|
||||
bashcfg = config.programs.bash;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
config = ''
|
||||
$BASH_COMPLETIONS = ('${bashcfg.completion.package}/etc/profile.d/bash_completion.sh')
|
||||
$UPDATE_OS_ENVIRON = True
|
||||
$XONTRIB_CLP_ALIAS = 'shutil'
|
||||
#xontrib load cd
|
||||
xontrib load clp
|
||||
xontrib load direnv
|
||||
xontrib load sh
|
||||
'';
|
||||
package = pkgs.xonsh.override {
|
||||
extraPackages = ps: [
|
||||
pkgs.python311Packages.rich
|
||||
# (ps.buildPythonPackage rec {
|
||||
# name = "xontrib-cd";
|
||||
# version = "0.3.1";
|
||||
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "eugenesvk";
|
||||
# repo = name;
|
||||
# rev = version;
|
||||
# sha256 = "XxSxjyCg7PeX1v3e2KKicvAPmNeq+qVqbW4fXTwAiic=";
|
||||
# };
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "eugenesvk";
|
||||
# repo = name;
|
||||
# rev = version;
|
||||
# sha256 = "XxSxjyCg7PeX1v3e2KKicvAPmNeq+qVqbW4fXTwAiic=";
|
||||
# };
|
||||
|
||||
# meta = {
|
||||
# homepage = "https://github.com/eugenesvk/xontrib-cd";
|
||||
# description =
|
||||
# "`cd` to any path without escaping in xonsh shell: `cd ~/[te] st`";
|
||||
# license = pkgs.lib.licenses.mit;
|
||||
# maintainers = [ "cswimr" ];
|
||||
# };
|
||||
# })
|
||||
(ps.buildPythonPackage rec {
|
||||
name = "xontrib-clp";
|
||||
version = "0.1.7";
|
||||
# meta = {
|
||||
# homepage = "https://github.com/eugenesvk/xontrib-cd";
|
||||
# description =
|
||||
# "`cd` to any path without escaping in xonsh shell: `cd ~/[te] st`";
|
||||
# license = pkgs.lib.licenses.mit;
|
||||
# maintainers = [ "cswimr" ];
|
||||
# };
|
||||
# })
|
||||
(ps.buildPythonPackage rec {
|
||||
name = "xontrib-clp";
|
||||
version = "0.1.7";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "anki-code";
|
||||
repo = name;
|
||||
rev = version;
|
||||
sha256 = "1ewWlwG8KY9s6qydErurvP2x+4DIPTFcjSGP1c5y83M=";
|
||||
};
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "anki-code";
|
||||
repo = name;
|
||||
rev = version;
|
||||
sha256 = "1ewWlwG8KY9s6qydErurvP2x+4DIPTFcjSGP1c5y83M=";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/anki-code/xontrib-clp";
|
||||
description =
|
||||
"Copy output to clipboard. Cross-platform.";
|
||||
license = pkgs.lib.licenses.mit;
|
||||
maintainers = [ "cswimr" ];
|
||||
};
|
||||
})
|
||||
(ps.buildPythonPackage rec {
|
||||
name = "xonsh-direnv";
|
||||
version = "1.6.5";
|
||||
meta = {
|
||||
homepage = "https://github.com/anki-code/xontrib-clp";
|
||||
description = "Copy output to clipboard. Cross-platform.";
|
||||
license = pkgs.lib.licenses.mit;
|
||||
maintainers = [ "cswimr" ];
|
||||
};
|
||||
})
|
||||
(ps.buildPythonPackage rec {
|
||||
name = "xonsh-direnv";
|
||||
version = "1.6.5";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "74th";
|
||||
repo = name;
|
||||
rev = version;
|
||||
sha256 = "huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU=";
|
||||
};
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "74th";
|
||||
repo = name;
|
||||
rev = version;
|
||||
sha256 = "huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU=";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/74th/xonsh-direnv";
|
||||
description = "xonsh extension for using direnv";
|
||||
license = pkgs.lib.licenses.mit;
|
||||
maintainers = [ "cswimr" ];
|
||||
};
|
||||
})
|
||||
(ps.buildPythonPackage rec {
|
||||
name = "xontrib-sh";
|
||||
version = "0.3.1";
|
||||
meta = {
|
||||
homepage = "https://github.com/74th/xonsh-direnv";
|
||||
description = "xonsh extension for using direnv";
|
||||
license = pkgs.lib.licenses.mit;
|
||||
maintainers = [ "cswimr" ];
|
||||
};
|
||||
})
|
||||
(ps.buildPythonPackage rec {
|
||||
name = "xontrib-sh";
|
||||
version = "0.3.1";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "anki-code";
|
||||
repo = name;
|
||||
rev = version;
|
||||
sha256 = "KL/AxcsvjxqxvjDlf1axitgME3T+iyuW6OFb1foRzN8=";
|
||||
};
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "anki-code";
|
||||
repo = name;
|
||||
rev = version;
|
||||
sha256 = "KL/AxcsvjxqxvjDlf1axitgME3T+iyuW6OFb1foRzN8=";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/anki-code/xontrib-sh";
|
||||
description =
|
||||
"Paste and run commands from bash, zsh, fish, tcsh in xonsh shell.";
|
||||
license = pkgs.lib.licenses.mit;
|
||||
maintainers = [ "cswimr" ];
|
||||
};
|
||||
})
|
||||
];
|
||||
meta = {
|
||||
homepage = "https://github.com/anki-code/xontrib-sh";
|
||||
description = "Paste and run commands from bash, zsh, fish, tcsh in xonsh shell.";
|
||||
license = pkgs.lib.licenses.mit;
|
||||
maintainers = [ "cswimr" ];
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue