properly assigns the custom shell
This commit is contained in:
parent
5ebd696c23
commit
19b83baf88
6 changed files with 49 additions and 31 deletions
19
flake.nix
19
flake.nix
|
|
@ -19,23 +19,34 @@
|
|||
outputs = { self, nixpkgs, home-manager, nixvim, nix-gaming, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
customPkgsOverlay = final: prev: import ./pkgs {
|
||||
pkgs = prev;
|
||||
lib = prev.lib;
|
||||
};
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [ customPkgsOverlay ];
|
||||
};
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nixos = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
inherit system;
|
||||
};
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ customPkgsOverlay ]; }
|
||||
./hosts/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
"cobray" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [ ./home-manager/cobray.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
fish-rust
|
||||
starship
|
||||
fzf
|
||||
bat
|
||||
|
|
@ -10,7 +11,4 @@
|
|||
ripgrep
|
||||
];
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
./boot.nix
|
||||
./docker.nix
|
||||
./env.nix
|
||||
./fish.nix
|
||||
./fonts.nix
|
||||
./home-manager.nix
|
||||
./i3-xfce.nix
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
fish-rust = pkgs.callPackage ../pkgs/fish-rust { };
|
||||
in
|
||||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
package = fish-rust;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
starship
|
||||
fzf
|
||||
bat
|
||||
eza
|
||||
fd
|
||||
ripgrep
|
||||
];
|
||||
}
|
||||
|
|
@ -1,12 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
fish-rust = pkgs.callPackage ../pkgs/fish-rust { };
|
||||
in
|
||||
|
||||
{
|
||||
# Define a user account. Don't forget to set a password with 'passwd'.
|
||||
users.users.cobray = {
|
||||
isNormalUser = true;
|
||||
description = "Mon Aie";
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" "video" ];
|
||||
shell = pkgs.fish;
|
||||
shell = fish-rust;
|
||||
packages = with pkgs; [
|
||||
# User-specific packages can be defined here
|
||||
# or through home-manager
|
||||
|
|
@ -17,4 +21,9 @@
|
|||
enable = true;
|
||||
wheelNeedsPassword = true;
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
package = fish-rust;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
{ lib, rustPlatform, fetchgit, ncurses, sphinx, python3 }:
|
||||
{ lib, rustPlatform, fetchgit, ncurses, python3Packages, gettext }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "fish";
|
||||
version = "4.1-2025-03-14-rust";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/fish-shell/fish-shell.git";
|
||||
rev = "refs/heads/master";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "18zpwa3yddic6wdwj7g51w6n4apwsixfvl179yddk2nwfpxhv4hq";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
outputHashes = {
|
||||
|
|
@ -15,26 +18,41 @@ rustPlatform.buildRustPackage rec {
|
|||
"pcre2-sys-0.2.9" = "0mhjw7fvrzxb3fd0c534a17qgy6svz0z8269d2fs6q8aw11610mr";
|
||||
};
|
||||
};
|
||||
buildInputs = [ ncurses ];
|
||||
nativeBuildInputs = [ sphinx python3 ];
|
||||
|
||||
buildInputs = [ ncurses gettext ];
|
||||
nativeBuildInputs = with python3Packages; [
|
||||
sphinx
|
||||
sphinx_rtd_theme
|
||||
gettext
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
export FISH_BUILD_VERSION="${version}"
|
||||
export FISH_BUILD_DOCS=1
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
export HOME=$(mktemp -d)
|
||||
mkdir -p $HOME/.local/share/fish/install
|
||||
$out/bin/fish --install
|
||||
|
||||
if [ ! -f $HOME/.config/fish/config.fish ]; then
|
||||
$out/bin/fish --install
|
||||
fi
|
||||
|
||||
mkdir -p $out/share/fish
|
||||
cp -r $HOME/.local/share/fish/install/* $out/share/fish/ 2>/dev/null || true
|
||||
|
||||
mkdir -p $out/share/fish/tools
|
||||
cp $src/share/tools/create_manpage_completions.py $out/share/fish/tools/
|
||||
cp $src/share/tools/deroff.py $out/share/fish/tools/
|
||||
chmod +x $out/share/fish/tools/create_manpage_completions.py
|
||||
chmod +x $out/share/fish/tools/deroff.py
|
||||
|
||||
rm -rf $HOME
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "The user-friendly command line shell (Rust version)";
|
||||
homepage = "https://fishshell.com/";
|
||||
|
|
@ -42,5 +60,6 @@ rustPlatform.buildRustPackage rec {
|
|||
platforms = platforms.unix;
|
||||
mainProgram = "fish";
|
||||
};
|
||||
|
||||
passthru.shellPath = "/bin/fish";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue