cleanup programs

This commit is contained in:
Adithya 2023-04-07 19:09:05 +05:30
parent 8dc92ee27b
commit 3fedbec02a
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
17 changed files with 189 additions and 178 deletions

12
home/programs/aria2.nix Normal file
View file

@ -0,0 +1,12 @@
{ ... }: {
programs.aria2 = {
enable = true;
settings = {
bt-tracker = "udp://tracker.opentrackr.org:1337/announce";
continue = true;
max-connection-per-server = 8;
split = 8;
min-split-size = "1M";
};
};
}

8
home/programs/bat.nix Normal file
View file

@ -0,0 +1,8 @@
{ ... }: {
programs.bat = {
enable = true;
config = {
theme = "Dracula";
};
};
}

17
home/programs/btop.nix Normal file
View file

@ -0,0 +1,17 @@
{ ... }: {
xdg.desktopEntries."btop" = {
name = "btop++";
exec = "btop";
noDisplay = true;
};
programs.btop = {
enable = true;
settings = {
color_theme = "dracula";
vim_keys = true;
update_ms = 1000;
};
};
}

View file

@ -1,27 +1,38 @@
{ pkgs, ... }: {
imports = [
./dev.nix
./downloader.nix
./aria2.nix
./bat.nix
./btop.nix
./direnv.nix
./exa.nix
./firefox.nix
./git.nix
./github-cli.nix
./gnupg.nix
./kitty.nix
./media.nix
./mpv.nix
./nixvim.nix
./starship.nix
./tmux.nix
./tui.nix
./virt-manager.nix
./yt-dlp.nix
./zsh.nix
];
home.packages = with pkgs; [
_1password-gui
brightnessctl
celluloid
discord
evince
git-crypt
gnome.eog
gnome.gnome-system-monitor
gnome3.gnome-disk-utility
libsecret
lazydocker
pantheon.elementary-files
pavucontrol
ripgrep
spotify-tui
xdg-utils
yubioath-flutter
yubikey-manager
@ -31,18 +42,9 @@
];
programs = {
gpg = {
enable = true;
settings = {
keyserver = "hkps://keys.openpgp.org";
};
scdaemonSettings = {
disable-ccid = true;
};
};
ssh = {
enable = true;
};
fzf.enable = true;
lazygit.enable = true;
ssh.enable = true;
zoxide.enable = true;
};
}

View file

@ -1,42 +0,0 @@
{ pkgs, ... }:
let
user = import ../../users/user.nix;
in
{
imports = [
./nixvim.nix
];
home.packages = with pkgs; [
git-crypt
lazydocker
ripgrep
];
programs = {
gh = {
enable = true;
settings.git_protocol = "ssh";
extensions = [ pkgs.gh-dash ];
};
git = {
enable = true;
diff-so-fancy = {
enable = true;
};
userEmail = user.primary.emailAddress;
userName = user.primary.realName;
signing = {
key = user.primary.signingKey;
signByDefault = true;
};
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
ignores = [ "/.nix" "/.direnv" ];
};
lazygit = {
enable = true;
};
};
}

6
home/programs/direnv.nix Normal file
View file

@ -0,0 +1,6 @@
{ ... }: {
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -1,20 +0,0 @@
{ ... }: {
programs = {
aria2 = {
enable = true;
settings = {
bt-tracker = "udp://tracker.opentrackr.org:1337/announce";
continue = true;
max-connection-per-server = 8;
split = 8;
min-split-size = "1M";
};
};
yt-dlp = {
enable = true;
settings = {
downloader = "aria2c";
};
};
};
}

9
home/programs/exa.nix Normal file
View file

@ -0,0 +1,9 @@
{ ... }: {
programs.exa = {
enable = true;
enableAliases = true;
extraOptions = [ "--group-directories-first" "--group" ];
git = true;
icons = true;
};
}

23
home/programs/git.nix Normal file
View file

@ -0,0 +1,23 @@
{ ... }:
let
user = import ../../users/user.nix;
in
{
programs.git = {
enable = true;
diff-so-fancy = {
enable = true;
};
userEmail = user.primary.emailAddress;
userName = user.primary.realName;
signing = {
key = user.primary.signingKey;
signByDefault = true;
};
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
ignores = [ "/.nix" "/.direnv" ];
};
}

View file

@ -0,0 +1,7 @@
{ pkgs, ... }: {
programs.gh = {
enable = true;
settings.git_protocol = "ssh";
extensions = [ pkgs.gh-dash ];
};
}

11
home/programs/gnupg.nix Normal file
View file

@ -0,0 +1,11 @@
{ ... }: {
programs.gpg = {
enable = true;
settings = {
keyserver = "hkps://keys.openpgp.org";
};
scdaemonSettings = {
disable-ccid = true;
};
};
}

View file

@ -1,25 +0,0 @@
{ pkgs, ... }: {
xdg.desktopEntries."mpv".name = "mpv Media Player";
xdg.desktopEntries."mpv".exec = "mpv --player-operation-mode=pseudo-gui -- %U";
xdg.desktopEntries."mpv".noDisplay = true;
xdg.desktopEntries."umpv".name = "umpv Media Player";
xdg.desktopEntries."umpv".exec = "umpv --player-operation-mode=pseudo-gui -- %U";
xdg.desktopEntries."umpv".noDisplay = true;
home.packages = with pkgs; [
celluloid
spotify-tui
playerctl
];
programs.mpv = {
enable = true;
package = pkgs.mpv.override { youtubeSupport = true; };
config = {
hwdec = "auto-safe";
gpu-context = "wayland";
};
defaultProfiles = [ "gpu-hq" ];
scripts = with pkgs.mpvScripts; [ mpris ];
};
}

26
home/programs/mpv.nix Normal file
View file

@ -0,0 +1,26 @@
{ pkgs, ... }: {
programs.mpv = {
enable = true;
package = pkgs.mpv.override { youtubeSupport = true; };
config = {
hwdec = "auto-safe";
gpu-context = "wayland";
};
defaultProfiles = [ "gpu-hq" ];
scripts = with pkgs.mpvScripts; [ mpris ];
};
xdg.desktopEntries = {
"mpv" = {
name = "mpv Media Player";
exec = "mpv --player-operation-mode=pseudo-gui -- %U";
noDisplay = true;
};
"umpv" = {
name = "umpv Media Player";
exec = "umpv --player-operation-mode=pseudo-gui -- %U";
noDisplay = true;
};
};
}

View file

@ -0,0 +1,10 @@
{ ... }: {
programs.starship = {
enable = true;
settings = {
add_newline = false;
git_metrics.disabled = false;
};
};
}

View file

@ -1,72 +0,0 @@
{ config, pkgs, ... }: {
xdg.desktopEntries."btop".name = "btop++";
xdg.desktopEntries."btop".exec = "btop";
xdg.desktopEntries."btop".noDisplay = true;
programs = {
bat = {
enable = true;
config = {
theme = "Dracula";
};
};
btop = {
enable = true;
settings = {
color_theme = "dracula";
vim_keys = true;
update_ms = 1000;
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
exa = {
enable = true;
enableAliases = true;
extraOptions = [ "--group-directories-first" "--group" ];
git = true;
icons = true;
};
fzf.enable = true;
starship = {
enable = true;
settings = {
add_newline = false;
git_metrics.disabled = false;
};
};
zoxide.enable = true;
zsh = {
enable = true;
defaultKeymap = "viins";
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
history = {
expireDuplicatesFirst = true;
extended = true;
path = "${config.xdg.dataHome}/zsh/zsh_history";
};
initExtra = ''
bindkey -v '^?' backward-delete-char
'';
profileExtra = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then
exec ${config.wayland.windowManager.hyprland.package}/bin/Hyprland
fi
'';
shellAliases = {
cat = "bat";
cd = "z";
cp = "cp -v";
grep = "grep --color=auto";
ln = "ln -v";
mv = "mv -v";
rebuild_system = "sudo nixos-rebuild --flake /persist/home/.nixos-config# --cores 0 --max-jobs 8";
};
};
};
}

8
home/programs/yt-dlp.nix Normal file
View file

@ -0,0 +1,8 @@
{ ... }: {
programs.yt-dlp = {
enable = true;
settings = {
downloader = "aria2c";
};
};
}

31
home/programs/zsh.nix Normal file
View file

@ -0,0 +1,31 @@
{ config, pkgs, ... }: {
programs.zsh = {
enable = true;
defaultKeymap = "viins";
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
history = {
expireDuplicatesFirst = true;
extended = true;
path = "${config.xdg.dataHome}/zsh/zsh_history";
};
initExtra = ''
bindkey -v '^?' backward-delete-char
'';
profileExtra = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then
exec ${config.wayland.windowManager.hyprland.package}/bin/Hyprland
fi
'';
shellAliases = {
cat = "bat";
cd = "z";
cp = "cp -v";
grep = "grep --color=auto";
ln = "ln -v";
mv = "mv -v";
rebuild_system = "sudo nixos-rebuild --flake /persist/home/.nixos-config# --cores 0 --max-jobs 8";
};
};
}