diff --git a/home/programs/aria2.nix b/home/programs/aria2.nix new file mode 100644 index 0000000..c31b841 --- /dev/null +++ b/home/programs/aria2.nix @@ -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"; + }; + }; +} diff --git a/home/programs/bat.nix b/home/programs/bat.nix new file mode 100644 index 0000000..68bf4f7 --- /dev/null +++ b/home/programs/bat.nix @@ -0,0 +1,8 @@ +{ ... }: { + programs.bat = { + enable = true; + config = { + theme = "Dracula"; + }; + }; +} diff --git a/home/programs/btop.nix b/home/programs/btop.nix new file mode 100644 index 0000000..caa8551 --- /dev/null +++ b/home/programs/btop.nix @@ -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; + }; + }; +} diff --git a/home/programs/default.nix b/home/programs/default.nix index 9fb0f67..00d01ad 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -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; }; - } diff --git a/home/programs/dev.nix b/home/programs/dev.nix deleted file mode 100644 index e0f442b..0000000 --- a/home/programs/dev.nix +++ /dev/null @@ -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; - }; - }; -} diff --git a/home/programs/direnv.nix b/home/programs/direnv.nix new file mode 100644 index 0000000..37f267d --- /dev/null +++ b/home/programs/direnv.nix @@ -0,0 +1,6 @@ +{ ... }: { + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; +} diff --git a/home/programs/downloader.nix b/home/programs/downloader.nix deleted file mode 100644 index f1eb38d..0000000 --- a/home/programs/downloader.nix +++ /dev/null @@ -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"; - }; - }; - }; -} diff --git a/home/programs/exa.nix b/home/programs/exa.nix new file mode 100644 index 0000000..74bf1f8 --- /dev/null +++ b/home/programs/exa.nix @@ -0,0 +1,9 @@ +{ ... }: { + programs.exa = { + enable = true; + enableAliases = true; + extraOptions = [ "--group-directories-first" "--group" ]; + git = true; + icons = true; + }; +} diff --git a/home/programs/git.nix b/home/programs/git.nix new file mode 100644 index 0000000..30d9a12 --- /dev/null +++ b/home/programs/git.nix @@ -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" ]; + }; +} diff --git a/home/programs/github-cli.nix b/home/programs/github-cli.nix new file mode 100644 index 0000000..8188f76 --- /dev/null +++ b/home/programs/github-cli.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: { + programs.gh = { + enable = true; + settings.git_protocol = "ssh"; + extensions = [ pkgs.gh-dash ]; + }; +} diff --git a/home/programs/gnupg.nix b/home/programs/gnupg.nix new file mode 100644 index 0000000..1bde89a --- /dev/null +++ b/home/programs/gnupg.nix @@ -0,0 +1,11 @@ +{ ... }: { + programs.gpg = { + enable = true; + settings = { + keyserver = "hkps://keys.openpgp.org"; + }; + scdaemonSettings = { + disable-ccid = true; + }; + }; +} diff --git a/home/programs/media.nix b/home/programs/media.nix deleted file mode 100644 index 407c004..0000000 --- a/home/programs/media.nix +++ /dev/null @@ -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 ]; - }; -} diff --git a/home/programs/mpv.nix b/home/programs/mpv.nix new file mode 100644 index 0000000..3ae22f0 --- /dev/null +++ b/home/programs/mpv.nix @@ -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; + }; + }; +} diff --git a/home/programs/starship.nix b/home/programs/starship.nix new file mode 100644 index 0000000..e00b675 --- /dev/null +++ b/home/programs/starship.nix @@ -0,0 +1,10 @@ +{ ... }: { + + programs.starship = { + enable = true; + settings = { + add_newline = false; + git_metrics.disabled = false; + }; + }; +} diff --git a/home/programs/tui.nix b/home/programs/tui.nix deleted file mode 100644 index dbbea46..0000000 --- a/home/programs/tui.nix +++ /dev/null @@ -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"; - }; - }; - }; -} diff --git a/home/programs/yt-dlp.nix b/home/programs/yt-dlp.nix new file mode 100644 index 0000000..3f9f5ee --- /dev/null +++ b/home/programs/yt-dlp.nix @@ -0,0 +1,8 @@ +{ ... }: { + programs.yt-dlp = { + enable = true; + settings = { + downloader = "aria2c"; + }; + }; +} diff --git a/home/programs/zsh.nix b/home/programs/zsh.nix new file mode 100644 index 0000000..fae32f2 --- /dev/null +++ b/home/programs/zsh.nix @@ -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"; + }; + }; +}