mirror of
https://github.com/semere-meb/dotfiles-nix.git
synced 2026-08-03 10:24:36 +00:00
refactoring and minor config added
This commit is contained in:
parent
e9bdc40a28
commit
fa60f8c87e
11 changed files with 140 additions and 361 deletions
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
tealdeer
|
||||
p7zip
|
||||
btop
|
||||
opencode
|
||||
fd
|
||||
ripgrep
|
||||
];
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ allModules
|
|||
self.nixosModules.user
|
||||
self.nixosModules.desktop
|
||||
self.nixosModules.dev
|
||||
self.nixosModules.cli-tools
|
||||
self.nixosModules.starship
|
||||
self.nixosModules.git
|
||||
self.nixosModules.gpg
|
||||
self.nixosModules.zsh
|
||||
|
|
@ -28,7 +28,6 @@ allModules
|
|||
self.nixosModules.niri
|
||||
self.nixosModules.osd
|
||||
self.nixosModules.fnott
|
||||
self.nixosModules.greetd
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -36,7 +35,7 @@ allModules
|
|||
imports = [
|
||||
self.nixosModules.core
|
||||
self.nixosModules.user
|
||||
self.nixosModules.cli-tools
|
||||
self.nixosModules.starship
|
||||
self.nixosModules.git
|
||||
self.nixosModules.gpg
|
||||
self.nixosModules.zsh
|
||||
|
|
|
|||
|
|
@ -7,11 +7,6 @@
|
|||
}:
|
||||
|
||||
{
|
||||
programs.dwl.enable = true;
|
||||
programs.dwl.package = pkgs.dwl.override {
|
||||
configH = ../hosts/nabro/dwl-config.h;
|
||||
};
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
|
|
@ -54,7 +49,7 @@
|
|||
style = "adwaita-dark";
|
||||
};
|
||||
|
||||
# services.getty.autologinUser = "${userVars.username}";
|
||||
services.getty.autologinUser = "${userVars.username}";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pamixer
|
||||
|
|
@ -63,10 +58,6 @@
|
|||
fuzzel
|
||||
libnotify
|
||||
fnott
|
||||
foot
|
||||
tor-browser
|
||||
# grim
|
||||
# slurp
|
||||
wlopm
|
||||
];
|
||||
|
||||
|
|
@ -151,6 +142,5 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
tealdeer
|
||||
opencode
|
||||
gcc
|
||||
gnumake
|
||||
clang-tools
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
environment.systemPackages = with pkgs; [
|
||||
gnupg
|
||||
pass
|
||||
pinentry-qt
|
||||
pinentry-gnome3
|
||||
];
|
||||
|
||||
home-manager.users."${userVars.username}" = {
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
maxCacheTtl = 28800;
|
||||
maxCacheTtlSsh = 28800;
|
||||
enableSshSupport = true;
|
||||
pinentry.package = pkgs.pinentry-qt;
|
||||
pinentry.package = pkgs.pinentry-gnome3;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --cmd niri";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
|
||||
smart-tab = {
|
||||
enable = true;
|
||||
supersede-menu = true;
|
||||
supersede-menu = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -95,8 +95,9 @@
|
|||
Mod+Return { spawn "foot"; }
|
||||
Mod+D { spawn "fuzzel"; }
|
||||
Mod+B { spawn "zen-beta"; }
|
||||
Mod+E { spawn "foot" "yazi"; }
|
||||
Mod+Alt+L { spawn "swaylock"; }
|
||||
Mod+Shift+E { quit; }
|
||||
Mod+Shift+Q { quit; }
|
||||
|
||||
Mod+V { toggle-window-floating; }
|
||||
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
|
||||
|
|
|
|||
121
modules/starship.nix
Normal file
121
modules/starship.nix
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
userVars,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
home-manager.users."${userVars.username}".programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
|
||||
settings = {
|
||||
add_newline = false;
|
||||
command_timeout = 500;
|
||||
scan_timeout = 10;
|
||||
|
||||
format = lib.concatStrings [
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_status"
|
||||
"$nix_shell"
|
||||
"$python"
|
||||
"$c"
|
||||
"$rust"
|
||||
"$cmd_duration"
|
||||
"$jobs"
|
||||
"$line_break"
|
||||
"$character"
|
||||
];
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](bold green)";
|
||||
error_symbol = "[❯](bold red)";
|
||||
vimcmd_symbol = "[❮](bold yellow)";
|
||||
};
|
||||
|
||||
directory = {
|
||||
style = "bold cyan";
|
||||
truncation_length = 3;
|
||||
truncate_to_repo = true;
|
||||
truncation_symbol = "…/";
|
||||
read_only = " 🔒";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
style = "bold purple";
|
||||
format = "[$symbol$branch]($style) ";
|
||||
symbol = " ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
style = "bold red";
|
||||
format = "([$all_status$ahead_behind]($style)) ";
|
||||
conflicted = "=";
|
||||
ahead = "⇡\${count}";
|
||||
behind = "⇣\${count}";
|
||||
diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
|
||||
staged = "+\${count}";
|
||||
modified = "!\${count}";
|
||||
untracked = "?\${count}";
|
||||
stashed = "\$";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
style = "bold blue";
|
||||
format = "[$symbol$state( \($name\))]($style) ";
|
||||
symbol = "❄ ";
|
||||
impure_msg = "impure";
|
||||
pure_msg = "pure";
|
||||
};
|
||||
|
||||
python = {
|
||||
style = "bold yellow";
|
||||
format = "[$symbol( \($virtualenv\))]($style) ";
|
||||
symbol = " ";
|
||||
detect_extensions = [ "py" ];
|
||||
detect_files = [
|
||||
"pyproject.toml"
|
||||
"requirements.txt"
|
||||
"uv.lock"
|
||||
];
|
||||
};
|
||||
|
||||
c = {
|
||||
style = "bold dimmed white";
|
||||
format = "[$symbol($version(-$name))]($style) ";
|
||||
symbol = " ";
|
||||
detect_extensions = [
|
||||
"c"
|
||||
"h"
|
||||
];
|
||||
};
|
||||
|
||||
rust = {
|
||||
disabled = true;
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
style = "bold yellow";
|
||||
format = "[$duration]($style) ";
|
||||
min_time = 2000;
|
||||
show_notifications = false;
|
||||
};
|
||||
|
||||
jobs = {
|
||||
style = "bold blue";
|
||||
symbol = "✦";
|
||||
number_threshold = 1;
|
||||
};
|
||||
|
||||
aws.disabled = true;
|
||||
gcloud.disabled = true;
|
||||
docker_context.disabled = true;
|
||||
kubernetes.disabled = true;
|
||||
package.disabled = true;
|
||||
battery.disabled = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
125
modules/zsh.nix
125
modules/zsh.nix
|
|
@ -30,10 +30,10 @@
|
|||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY DBUS_SESSION_BUS_ADDRESS 2>/dev/null
|
||||
fi
|
||||
|
||||
# Automatically start dwl on TTY 1
|
||||
# if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
# exec dwl
|
||||
# fi
|
||||
# Automatically start niri on TTY 1
|
||||
if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec niri
|
||||
fi
|
||||
'';
|
||||
|
||||
history = {
|
||||
|
|
@ -86,118 +86,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
|
||||
settings = {
|
||||
add_newline = false;
|
||||
command_timeout = 500;
|
||||
scan_timeout = 10;
|
||||
|
||||
format = lib.concatStrings [
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_status"
|
||||
"$nix_shell"
|
||||
"$python"
|
||||
"$c"
|
||||
"$rust"
|
||||
"$cmd_duration"
|
||||
"$jobs"
|
||||
"$line_break"
|
||||
"$character"
|
||||
];
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](bold green)";
|
||||
error_symbol = "[❯](bold red)";
|
||||
vimcmd_symbol = "[❮](bold yellow)";
|
||||
};
|
||||
|
||||
directory = {
|
||||
style = "bold cyan";
|
||||
truncation_length = 3;
|
||||
truncate_to_repo = true;
|
||||
truncation_symbol = "…/";
|
||||
read_only = " 🔒";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
style = "bold purple";
|
||||
format = "[$symbol$branch]($style) ";
|
||||
symbol = " ";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
style = "bold red";
|
||||
format = "([$all_status$ahead_behind]($style)) ";
|
||||
conflicted = "=";
|
||||
ahead = "⇡\${count}";
|
||||
behind = "⇣\${count}";
|
||||
diverged = "⇕⇡\${ahead_count}⇣\${behind_count}";
|
||||
staged = "+\${count}";
|
||||
modified = "!\${count}";
|
||||
untracked = "?\${count}";
|
||||
stashed = "\$";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
style = "bold blue";
|
||||
format = "[$symbol$state( \($name\))]($style) ";
|
||||
symbol = "❄ ";
|
||||
impure_msg = "impure";
|
||||
pure_msg = "pure";
|
||||
};
|
||||
|
||||
python = {
|
||||
style = "bold yellow";
|
||||
format = "[$symbol( \($virtualenv\))]($style) ";
|
||||
symbol = " ";
|
||||
detect_extensions = [ "py" ];
|
||||
detect_files = [
|
||||
"pyproject.toml"
|
||||
"requirements.txt"
|
||||
"uv.lock"
|
||||
];
|
||||
};
|
||||
|
||||
c = {
|
||||
style = "bold dimmed white";
|
||||
format = "[$symbol($version(-$name))]($style) ";
|
||||
symbol = " ";
|
||||
detect_extensions = [
|
||||
"c"
|
||||
"h"
|
||||
];
|
||||
};
|
||||
|
||||
rust = {
|
||||
disabled = true;
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
style = "bold yellow";
|
||||
format = "[$duration]($style) ";
|
||||
min_time = 2000;
|
||||
show_notifications = false;
|
||||
};
|
||||
|
||||
jobs = {
|
||||
style = "bold blue";
|
||||
symbol = "✦";
|
||||
number_threshold = 1;
|
||||
};
|
||||
|
||||
aws.disabled = true;
|
||||
gcloud.disabled = true;
|
||||
docker_context.disabled = true;
|
||||
kubernetes.disabled = true;
|
||||
package.disabled = true;
|
||||
battery.disabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
|
|
@ -228,5 +116,10 @@
|
|||
enableZshIntegration = true;
|
||||
defaultCommand = "fd --type f --hidden --exclude .git";
|
||||
};
|
||||
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue