This commit is contained in:
m3tam3re 2024-09-03 18:01:56 +02:00
parent d20945d5f3
commit 1f6e2b3a64
6 changed files with 83 additions and 2 deletions

View File

@ -0,0 +1,31 @@
{pkgs, ...}: {
imports = [
./fish.nix
];
programs.zoxide = {
enable = true;
enableFishIntegration = true;
};
programs.eza = {
enable = true;
enableFishIntegration = true;
enableBashIntegration = true;
extraOptions = ["-l" "--icons" "--git" "-a"];
};
programs.bat = {enable = true;};
home.packages = with pkgs; [
coreutils
fd
htop
httpie
jq
procs
ripgrep
tldr
zip
];
}

View File

@ -0,0 +1,32 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.features.cli.fish;
in {
options.features.cli.fish.enable = mkEnableOption "enable extended fish configuration";
config = mkIf cfg.enable {
programs.fish = {
enable = true;
loginShellInit = ''
set -x NIX_PATH nixpkgs=channel:nixos-unstable
set -x NIX_LOG info
set -x TERMINAL kitty
if test (tty) = "/dev/tty1"
exec Hyprland &> /dev/null
end
'';
shellAbbrs = {
".." = "cd ..";
"..." = "cd ../..";
ls = "eza";
grep = "rg";
ps = "procs";
};
};
};
}

View File

@ -24,7 +24,8 @@
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
cowsay
kitty
wofi
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello

View File

@ -1 +1,13 @@
{ config, ... }: { imports = [ ./home.nix ../common ]; }
{config, ...}: {
imports = [
../common
../features/cli
./home.nix
];
features = {
cli = {
fish.enable = false;
};
};
}

View File

@ -1,5 +1,6 @@
# Common configuration for all hosts
{
pkgs,
lib,
inputs,
outputs,
@ -56,4 +57,5 @@
((lib.filterAttrs (_: lib.isType "flake")) inputs);
nixPath = ["/etc/nix/path"];
};
users.defaultUserShell = pkgs.fish;
}

View File

@ -79,6 +79,9 @@
enable = true;
xwayland.enable = true;
};
programs.fish.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];