Make program integrations conditional on shell
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -43,7 +43,10 @@
|
||||
username = "${username}";
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "25.11";
|
||||
shell.enableFishIntegration = true;
|
||||
shell.enableFishIntegration =
|
||||
if shell == "fish"
|
||||
then true
|
||||
else false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
@@ -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 [
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user