working fish shell

This commit is contained in:
Charlie Root 2024-11-01 15:54:20 +01:00
commit 8b92b025f3
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
17 changed files with 134 additions and 109 deletions

View file

@ -1,6 +1,5 @@
# This is 1:1 copied from https://github.com/sioodmy/homix.
# I simply put it here because it's not changing in any way anymore and i save myself a flake input this way.
{
config,
lib,

View file

@ -1,4 +1,9 @@
{config, ...}: let
{
config,
pkgs,
self,
...
}: let
inherit (config.meta.mainUser) username;
in {
users = {
@ -15,6 +20,7 @@ in {
"nix"
];
homix = true;
shell = self.packages.${pkgs.stdenv.system}.fish;
# hashedPasswordFile = "/etc/passwords/cr";
};
# root.hashedPasswordFile = "/persist/passwords/root";

View file

@ -18,7 +18,7 @@ in {
};
config = mkIf cfg.enable {
programs.fish.enable = true;
programs.fish.enable = false;
# homix.".config/fish/config.fish".source = fishinit;
# users.users.${username}.shell = pkgs.fish;

View file

@ -5,7 +5,7 @@
...
}: let
cfg = config.modules.system.programs.terminals.foot;
colours = config.modules.style.colorScheme.colors;
colours = config.modules.style.colorScheme.colors;
inherit (lib) mkIf;
foot-config = pkgs.writeText "foot.ini" (lib.generators.toINI {} {

View file

@ -11,7 +11,7 @@ in {
programs.steam = {
enable = true;
# package = pkgs.steam;
# .override {
# extraEnv = {
# MANGOHUD = true;

View file

@ -1,25 +0,0 @@
{
pkgs,
aliasesStr,
}:
pkgs.writeShellScriptBin "config.fish" ''
# source ${pkgs.fishPlugins.sponge}/share/zsh-defer/zsh-defer.plugin.zsh
${pkgs.atuin}/bin/atuin init fish | source
${pkgs.zoxide}/bin/zoxide init fish | source
source ${./starship.fish}
source ${./zoxide.fish}
source ${./config.fish}
# zsh-defer source ${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh
# zsh-defer source ${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh
# zsh-defer source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
# zsh-defer source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh
# zsh-defer source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# zsh-defer source ${pkgs.zsh-autopair}/share/zsh/zsh-autopair/autopair.zsh
${aliasesStr}
''

16
modules/user/default.nix Normal file
View file

@ -0,0 +1,16 @@
{pkgs, ...}: rec {
packages = {
fish = pkgs.callPackage ./shell {};
};
shell = pkgs.mkShell {
name = "bloxx-shell";
buildInputs = [packages.fish];
};
module = {
config = {
environment.systemPackages = [
shell
];
};
};
}

View file

@ -0,0 +1,26 @@
# This shell setup was inspired by sioodmy. Check out his setup!
{pkgs, ...}: let
toml = pkgs.formats.toml {};
starship-config = import ./starship.nix;
aliases = import ./aliases.nix {inherit pkgs;};
fishinit = import ./fishinit.nix {inherit pkgs aliasesStr;};
aliasesStr =
pkgs.lib.concatStringsSep "\n"
(pkgs.lib.mapAttrsToList (k: v: "alias ${k}=\"${v}\"") aliases);
packages = import ./packages.nix pkgs;
in
(pkgs.symlinkJoin {
name = "fish-wrapped";
paths = [pkgs.fish] ++ packages;
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
'';
})
.overrideAttrs (_: {
passthru = {
shellPath = "/bin/fish";
};
})

View file

@ -0,0 +1,16 @@
{
pkgs,
aliasesStr,
}:
pkgs.writeShellScriptBin "config.fish" ''
# source ${pkgs.fishPlugins.sponge}/share/zsh-defer/zsh-defer.plugin.zsh
${pkgs.atuin}/bin/atuin init fish | source
${pkgs.zoxide}/bin/zoxide init fish | source
source ${./config.fish}
${aliasesStr}
''

View file

@ -16,5 +16,6 @@ in (pkgs.symlinkJoin {
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
--init-command source ${fishinit}
'';
})

View file

@ -0,0 +1,2 @@
{
}