Make program integrations conditional on shell

This commit is contained in:
2026-05-24 16:54:02 +02:00
parent 98069fa8d9
commit 83aa051d92
10 changed files with 82 additions and 39 deletions
+5 -2
View File
@@ -1,11 +1,14 @@
_: {
{shell, ...}: {
programs = {
nano.enable = true;
hyprland = {
enable = true;
withUWSM = false;
};
fish.enable = true;
fish.enable =
if shell == "fish"
then true
else false;
dconf.enable = true;
seahorse.enable = true;
fuse.userAllowOther = true;
+4 -1
View File
@@ -43,7 +43,10 @@
username = "${username}";
homeDirectory = "/home/${username}";
stateVersion = "25.11";
shell.enableFishIntegration = true;
shell.enableFishIntegration =
if shell == "fish"
then true
else false;
};
};
};
+9 -4
View File
@@ -1,10 +1,15 @@
# Eza is a ls replacement
{
{shell, ...}: {
programs.eza = {
enable = true;
icons = "auto";
enableFishIntegration = true;
enableBashIntegration = true;
enableFishIntegration =
if shell == "fish"
then true
else false;
enableBashIntegration =
if shell == "bash"
then true
else false;
git = true;
extraOptions = [
+15 -19
View File
@@ -122,29 +122,25 @@ _: {
{
type = "command";
key = " IN";
text =
#bash
''
birth_install=$(stat -c %W /)
if [ "$birth_install" -gt 0 ]; then
echo "Installed $(date -d @"$birth_install" +"%Y-%m-%d")"
else
echo "Installation date unknown"
fi
'';
text = ''
birth_install=$(stat -c %W /)
if [ "$birth_install" -gt 0 ]; then
echo "Installed $(date -d @"$birth_install" +"%Y-%m-%d")"
else
echo "Installation date unknown"
fi
'';
}
{
type = "command";
key = " ";
text =
#bash
''
birth_install=$(stat -c %W /)
current=$(date +%s)
delta=$((current - birth_install))
delta_days=$((delta / 86400))
echo $delta_days days
'';
text = ''
birth_install=$(stat -c %W /)
current=$(date +%s)
delta=$((current - birth_install))
delta_days=$((delta / 86400))
echo $delta_days days
'';
}
{
type = "uptime";
+4 -1
View File
@@ -20,7 +20,10 @@
nix-your-shell = {
enable = true;
package = pkgs.nix-your-shell;
enableFishIntegration = true;
enableFishIntegration =
if shell == "fish"
then true
else false;
nix-output-monitor = {
enable = true;
package = pkgs.nix-output-monitor;
+9 -3
View File
@@ -1,8 +1,14 @@
_: {
{shell, ...}: {
programs.fzf = {
enable = true;
enableFishIntegration = true;
enableBashIntegration = true;
enableFishIntegration =
if shell == "fish"
then true
else false;
enableBashIntegration =
if shell == "bash"
then true
else false;
defaultOptions = [
"--margin=1"
"--layout=reverse"
+9 -2
View File
@@ -1,8 +1,15 @@
{pkgs, ...}: {
{
pkgs,
shell,
...
}: {
programs.kitty = {
enable = true;
package = pkgs.kitty;
shellIntegration.enableFishIntegration = true;
shellIntegration.enableFishIntegration =
if shell == "fish"
then true
else false;
};
imports = [
+9 -2
View File
@@ -1,7 +1,14 @@
{lib, ...}: {
{
lib,
shell,
...
}: {
programs.starship = {
enable = true;
enableFishIntegration = true;
enableFishIntegration =
if shell == "fish"
then true
else false;
settings = {
add_newline = true;
format = lib.concatStrings [
+9 -2
View File
@@ -1,4 +1,8 @@
{host, ...}: {
{
host,
shell,
...
}: {
stylix.targets = {
librewolf.profileNames = ["${host}"];
@@ -27,7 +31,10 @@
};
fish = {
enable = true;
enable =
if shell == "fish"
then true
else false;
colors.enable = true;
inputs.enable = true;
};
+9 -3
View File
@@ -1,8 +1,14 @@
_: {
{shell, ...}: {
programs.zoxide = {
enable = true;
enableFishIntegration = true;
enableBashIntegration = true;
enableFishIntegration =
if shell == "fish"
then true
else false;
enableBashIntegration =
if shell == "bash"
then true
else false;
options = [
"--cmd cd"
];