feat: added new configuration for enabling fish shell
This commit is contained in:
parent
51c7913ad5
commit
8bdd51e77a
7 changed files with 73 additions and 12 deletions
|
@ -65,6 +65,33 @@
|
||||||
zed-editor
|
zed-editor
|
||||||
rhythmbox
|
rhythmbox
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
settings = [
|
||||||
|
{
|
||||||
|
mainBar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 30;
|
||||||
|
output = ["eDP-1" "HDMI-A-1"];
|
||||||
|
modules-left = ["hyprland/workspaces" "hyprland/mode" "wlr/taskbar"];
|
||||||
|
modules-center = ["hyprland/window" "custom/hello-from-waybar"];
|
||||||
|
modules-right = ["mpd" "temperature"];
|
||||||
|
"hyprland/workspaces" = {
|
||||||
|
disable-scroll = true;
|
||||||
|
all-outputs = true;
|
||||||
|
};
|
||||||
|
"custom/hello-from-waybar" = {
|
||||||
|
format = "hello {}";
|
||||||
|
max-length = 40;
|
||||||
|
interval = "once";
|
||||||
|
exec = pkgs.writeShellScript "hello-from-waybar" ''echo "from within waybar"'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitFull;
|
package = pkgs.gitFull;
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
# firefox quickstart
|
# firefox quickstart
|
||||||
"$mod, F, exec, ${pkgs.firefox}/bin/firefox"
|
"$mod, F, exec, ${pkgs.firefox}/bin/firefox"
|
||||||
# foot terminal
|
# foot terminal
|
||||||
"$mod, Return, exec, ${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=16' -o colors.alpha=0.85 zsh"
|
"$mod, Return, exec, ${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=16' -o colors.alpha=0.85 ${config.myShells.defaultShell}"
|
||||||
]
|
]
|
||||||
++ (
|
++ (
|
||||||
# workspaces
|
# workspaces
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{pkgs}: {
|
{pkgs}: {
|
||||||
cd = "z";
|
#cd = "z";
|
||||||
cdi = "zi";
|
#cdi = "zi";
|
||||||
ls = "${pkgs.eza}/bin/exa";
|
ls = "${pkgs.eza}/bin/exa";
|
||||||
cat = "${pkgs.bat}/bin/bat";
|
cat = "${pkgs.bat}/bin/bat";
|
||||||
ll = "ls -l";
|
ll = "ls -l";
|
||||||
|
|
|
@ -9,19 +9,20 @@ in
|
||||||
with lib; {
|
with lib; {
|
||||||
imports = [
|
imports = [
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
|
./fish.nix
|
||||||
./direnv.nix
|
./direnv.nix
|
||||||
./starship
|
./starship
|
||||||
];
|
];
|
||||||
|
|
||||||
options.myShells = {
|
options.myShells = {
|
||||||
|
defaultShell = with types; mkOption {type = str;};
|
||||||
enable = mkEnableOption "Enables the shell customisation module.";
|
enable = mkEnableOption "Enables the shell customisation module.";
|
||||||
useZsh = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = true;
|
|
||||||
};
|
};
|
||||||
};
|
config = {
|
||||||
config = mkIf cfg.enable {
|
|
||||||
myShells = {
|
myShells = {
|
||||||
zsh.enable = cfg.useZsh;
|
zsh.enable = false;
|
||||||
|
fish.enable = true;
|
||||||
|
defaultShell = "fish";
|
||||||
prompts.starship.enable = true;
|
prompts.starship.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
32
home-manager/stvnliu/shells/fish.nix
Normal file
32
home-manager/stvnliu/shells/fish.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.myShells.fish;
|
||||||
|
in
|
||||||
|
with lib; {
|
||||||
|
options = {
|
||||||
|
myShells.fish = {
|
||||||
|
enable = mkEnableOption "Enables fish and components.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
shellAliases = import ./aliases {inherit pkgs;};
|
||||||
|
plugins = [
|
||||||
|
#{
|
||||||
|
# name = "z";
|
||||||
|
# src = pkgs.fetchFromGitHub {
|
||||||
|
# owner = "jethrokuan";
|
||||||
|
# repo = "z";
|
||||||
|
# rev = "ddeb28a7b6a1f0ec6dae40c636e5ca4908ad160a";
|
||||||
|
# sha256 = "0c5i7sdrsp0q3vbziqzdyqn4fmp235ax4mn4zslrswvn8g3fvdyh";
|
||||||
|
# };
|
||||||
|
#}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -17,7 +17,8 @@ in
|
||||||
config = {
|
config = {
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = config.myShells.zsh.enable;
|
||||||
|
enableFishIntegration = config.myShells.fish.enable;
|
||||||
settings = builtins.fromTOML (builtins.readFile cfg.confPath);
|
settings = builtins.fromTOML (builtins.readFile cfg.confPath);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
./services/laptop.preset.nix
|
./services/laptop.preset.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
boot.supportedFilesystems = ["ntfs"];
|
boot.supportedFilesystems = ["ntfs"];
|
||||||
security.pam.services.hyprlock = {};
|
security.pam.services.hyprlock = {};
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
nh
|
nh
|
||||||
];
|
];
|
||||||
extraGroups = ["wheel"];
|
extraGroups = ["wheel" "input"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue