working fish shell
This commit is contained in:
parent
2d5ee6c621
commit
8b92b025f3
17 changed files with 134 additions and 109 deletions
17
flake.lock
generated
17
flake.lock
generated
|
@ -670,22 +670,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730327045,
|
|
||||||
"narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-24.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729413321,
|
"lastModified": 1729413321,
|
||||||
|
@ -772,7 +756,6 @@
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
"lix-module": "lix-module",
|
"lix-module": "lix-module",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
|
||||||
"quickshell": "quickshell",
|
"quickshell": "quickshell",
|
||||||
"schizofox": "schizofox",
|
"schizofox": "schizofox",
|
||||||
"spicetify-nix": "spicetify-nix",
|
"spicetify-nix": "spicetify-nix",
|
||||||
|
|
|
@ -2,16 +2,18 @@
|
||||||
description = "My NixOS config flake";
|
description = "My NixOS config flake";
|
||||||
outputs = inputs: let
|
outputs = inputs: let
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
user = import ./modules/user {inherit pkgs;};
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = import ./hosts inputs;
|
nixosConfigurations = import ./hosts inputs;
|
||||||
formatter.x86_64-linux = pkgs.alejandra;
|
formatter.x86_64-linux = pkgs.alejandra;
|
||||||
devShells.x86_64-linux.default = pkgs.callPackage ./shell.nix {};
|
devShells.x86_64-linux.default = pkgs.callPackage ./shell.nix {};
|
||||||
|
packages.x86_64-linux = user.packages;
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
shell = import ./modules/shell;
|
user = user.module;
|
||||||
|
shell = import ./modules/shell {inherit pkgs;};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|
||||||
# Unstable nixpkgs baby!
|
# Unstable nixpkgs baby!
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
|
|
@ -1,62 +1,61 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
environment.systemPackages = with pkgs;
|
environment.systemPackages = with pkgs; [
|
||||||
[
|
alsa-utils
|
||||||
alsa-utils
|
anki
|
||||||
anki
|
asciinema
|
||||||
asciinema
|
cachix
|
||||||
cachix
|
calc
|
||||||
calc
|
calibre
|
||||||
calibre
|
difftastic
|
||||||
difftastic
|
element-desktop
|
||||||
element-desktop
|
evince
|
||||||
evince
|
eza
|
||||||
eza
|
gcc
|
||||||
gcc
|
gnumake
|
||||||
gnumake
|
halloy
|
||||||
halloy
|
helvum
|
||||||
helvum
|
httpie
|
||||||
httpie
|
imagemagick
|
||||||
imagemagick
|
img2pdf
|
||||||
img2pdf
|
impala
|
||||||
impala
|
imv
|
||||||
imv
|
inetutils
|
||||||
inetutils
|
jujutsu
|
||||||
jujutsu
|
keepassxc
|
||||||
keepassxc
|
lazygit
|
||||||
lazygit
|
libtool
|
||||||
libtool
|
nextcloud-client
|
||||||
nextcloud-client
|
nicotine-plus
|
||||||
nicotine-plus
|
swww
|
||||||
swww
|
microfetch
|
||||||
microfetch
|
nmap
|
||||||
nmap
|
nyxt
|
||||||
nyxt
|
# onlyoffice-bin
|
||||||
# onlyoffice-bin
|
pandoc
|
||||||
pandoc
|
pavucontrol
|
||||||
pavucontrol
|
pdfarranger
|
||||||
pdfarranger
|
polkit
|
||||||
polkit
|
pulsemixer
|
||||||
pulsemixer
|
python3
|
||||||
python3
|
pwvucontrol
|
||||||
pwvucontrol
|
qbittorrent
|
||||||
qbittorrent
|
r2modman
|
||||||
r2modman
|
ripgrep
|
||||||
ripgrep
|
signal-desktop-beta
|
||||||
signal-desktop-beta
|
strawberry
|
||||||
strawberry
|
telegram-desktop
|
||||||
telegram-desktop
|
texliveFull
|
||||||
texliveFull
|
thunderbird
|
||||||
thunderbird
|
tor-browser
|
||||||
tor-browser
|
trash-cli
|
||||||
trash-cli
|
tutanota-desktop
|
||||||
tutanota-desktop
|
typst
|
||||||
typst
|
ungoogled-chromium
|
||||||
ungoogled-chromium
|
wineWowPackages.waylandFull
|
||||||
wineWowPackages.waylandFull
|
wireguard-tools
|
||||||
wireguard-tools
|
xdg-utils
|
||||||
xdg-utils
|
xournalpp
|
||||||
xournalpp
|
zapzap
|
||||||
zapzap
|
zoxide
|
||||||
zoxide
|
];
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# This is 1:1 copied from https://github.com/sioodmy/homix.
|
# 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.
|
# I simply put it here because it's not changing in any way anymore and i save myself a flake input this way.
|
||||||
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
{config, ...}: let
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
inherit (config.meta.mainUser) username;
|
inherit (config.meta.mainUser) username;
|
||||||
in {
|
in {
|
||||||
users = {
|
users = {
|
||||||
|
@ -15,6 +20,7 @@ in {
|
||||||
"nix"
|
"nix"
|
||||||
];
|
];
|
||||||
homix = true;
|
homix = true;
|
||||||
|
shell = self.packages.${pkgs.stdenv.system}.fish;
|
||||||
# hashedPasswordFile = "/etc/passwords/cr";
|
# hashedPasswordFile = "/etc/passwords/cr";
|
||||||
};
|
};
|
||||||
# root.hashedPasswordFile = "/persist/passwords/root";
|
# root.hashedPasswordFile = "/persist/passwords/root";
|
||||||
|
|
|
@ -18,7 +18,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = false;
|
||||||
|
|
||||||
# homix.".config/fish/config.fish".source = fishinit;
|
# homix.".config/fish/config.fish".source = fishinit;
|
||||||
# users.users.${username}.shell = pkgs.fish;
|
# users.users.${username}.shell = pkgs.fish;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.modules.system.programs.terminals.foot;
|
cfg = config.modules.system.programs.terminals.foot;
|
||||||
colours = config.modules.style.colorScheme.colors;
|
colours = config.modules.style.colorScheme.colors;
|
||||||
|
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
foot-config = pkgs.writeText "foot.ini" (lib.generators.toINI {} {
|
foot-config = pkgs.writeText "foot.ini" (lib.generators.toINI {} {
|
||||||
|
|
|
@ -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
16
modules/user/default.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
26
modules/user/shell/default.nix
Normal file
26
modules/user/shell/default.nix
Normal 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";
|
||||||
|
};
|
||||||
|
})
|
16
modules/user/shell/fishinit.nix
Normal file
16
modules/user/shell/fishinit.nix
Normal 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}
|
||||||
|
''
|
|
@ -16,5 +16,6 @@ in (pkgs.symlinkJoin {
|
||||||
buildInputs = [pkgs.makeWrapper];
|
buildInputs = [pkgs.makeWrapper];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
|
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
|
||||||
|
--init-command source ${fishinit}
|
||||||
'';
|
'';
|
||||||
})
|
})
|
2
modules/user/shell/starship.nix
Normal file
2
modules/user/shell/starship.nix
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
{
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue