aboutsummaryrefslogtreecommitdiff
path: root/nixos/.flake/home/programs
diff options
context:
space:
mode:
authorJacob Janzen <jacob.a.s.janzen@gmail.com>2024-09-26 17:59:09 -0500
committerJacob Janzen <jacob.a.s.janzen@gmail.com>2024-09-26 17:59:44 -0500
commit5eb63082b564c2b44ff1858a7894d055e006043a (patch)
treedc68167e7b0bc52c75243c8298929498eea5f423 /nixos/.flake/home/programs
parent178ef69d9d606fe6c7500a328a822845e73a53b2 (diff)
modularize config
Diffstat (limited to 'nixos/.flake/home/programs')
-rw-r--r--nixos/.flake/home/programs/core.nix31
-rw-r--r--nixos/.flake/home/programs/fastfetch.nix79
-rw-r--r--nixos/.flake/home/programs/foot.nix37
-rw-r--r--nixos/.flake/home/programs/git.nix9
-rw-r--r--nixos/.flake/home/programs/hyprlock.nix37
-rw-r--r--nixos/.flake/home/programs/ncmpcpp.nix23
-rw-r--r--nixos/.flake/home/programs/ssh.nix8
-rw-r--r--nixos/.flake/home/programs/waybar.nix146
-rw-r--r--nixos/.flake/home/programs/zsh.nix47
9 files changed, 417 insertions, 0 deletions
diff --git a/nixos/.flake/home/programs/core.nix b/nixos/.flake/home/programs/core.nix
new file mode 100644
index 0000000..1477274
--- /dev/null
+++ b/nixos/.flake/home/programs/core.nix
@@ -0,0 +1,31 @@
+{ config, pkgs, ... }:
+
+{
+ imports = [
+ ./fastfetch.nix
+ ./foot.nix
+ ./git.nix
+ ./hyprlock.nix
+ ./ncmpcpp.nix
+ ./ssh.nix
+ ./waybar.nix
+ ./zsh.nix
+ ];
+
+ home.packages = with pkgs; [
+ discord # not FOSS
+ emacs # TODO
+ fuzzel # TODO
+ htop
+ hyfetch
+ hyprshot
+ mpc-cli
+ networkmanagerapplet
+ obs-studio
+ pavucontrol
+ prismlauncher # minecraft
+ python3
+ swaybg # TODO
+ texliveFull
+ ];
+}
diff --git a/nixos/.flake/home/programs/fastfetch.nix b/nixos/.flake/home/programs/fastfetch.nix
new file mode 100644
index 0000000..f143bd6
--- /dev/null
+++ b/nixos/.flake/home/programs/fastfetch.nix
@@ -0,0 +1,79 @@
+{ config, pkgs, ... }:
+
+{
+ programs.fastfetch = {
+ enable = true;
+ settings = {
+ logo = {
+ type = "raw";
+ source = "~/.config/fastfetch/logo.sixel";
+ width = 40;
+ height = 19;
+ };
+ display = {
+ separator = " ";
+ };
+ modules = [
+ "title"
+ {
+ type = "custom";
+ format = "──────────────────────────────────";
+ }
+ {
+ type = "os";
+ key = "";
+ }
+ {
+ type = "kernel";
+ key = "󰞸";
+ }
+ {
+ type = "uptime";
+ key = "";
+ }
+ {
+ type = "packages";
+ key = "";
+ }
+ {
+ type = "shell";
+ key = "";
+ }
+ {
+ type = "display";
+ key = "󰍹";
+ }
+ {
+ type = "wm";
+ key = "";
+ }
+ {
+ type = "terminal";
+ key = "";
+ }
+ {
+ type = "cpu";
+ key = "";
+ }
+ {
+ type = "gpu";
+ key = "";
+ }
+ {
+ type = "memory";
+ key = "";
+ }
+ {
+ type = "disk";
+ key = "";
+ }
+ {
+ type = "locale";
+ key = "";
+ }
+ "break"
+ "colors"
+ ];
+ };
+ };
+}
diff --git a/nixos/.flake/home/programs/foot.nix b/nixos/.flake/home/programs/foot.nix
new file mode 100644
index 0000000..18d7263
--- /dev/null
+++ b/nixos/.flake/home/programs/foot.nix
@@ -0,0 +1,37 @@
+{ config, pkgs, ... }:
+
+{
+ programs.foot = {
+ enable = true;
+ settings = {
+ main = {
+ font = "SauceCodePro Nerd Font:size=10";
+ pad = "6x6";
+ };
+ mouse = {
+ hide-when-typing = "yes";
+ };
+ colors = {
+ alpha = "0.9";
+ background = "ece0c9";
+ foreground = "191916";
+ regular0 = "191916";
+ regular1 = "ac4438";
+ regular2 = "354d52";
+ regular3 = "ba9151";
+ regular4 = "465b91";
+ regular5 = "5b5489";
+ regular6 = "4e6062";
+ regular7 = "c9ad7a";
+ bright0 = "293c3c";
+ bright1 = "d8611c";
+ bright2 = "4b7b53";
+ bright3 = "d8974b";
+ bright4 = "2f3d91";
+ bright5 = "735e82";
+ bright6 = "6b8f92";
+ bright7 = "ece0c9";
+ };
+ };
+ };
+}
diff --git a/nixos/.flake/home/programs/git.nix b/nixos/.flake/home/programs/git.nix
new file mode 100644
index 0000000..d9c126a
--- /dev/null
+++ b/nixos/.flake/home/programs/git.nix
@@ -0,0 +1,9 @@
+{ config, pkgs, ... }:
+
+{
+ programs.git = {
+ enable = true;
+ userName = "Jacob Janzen";
+ userEmail = "jacob.a.s.janzen@gmail.com";
+ };
+}
diff --git a/nixos/.flake/home/programs/hyprlock.nix b/nixos/.flake/home/programs/hyprlock.nix
new file mode 100644
index 0000000..175331d
--- /dev/null
+++ b/nixos/.flake/home/programs/hyprlock.nix
@@ -0,0 +1,37 @@
+{ config, pkgs, ... }:
+
+{
+ programs.hyprlock = {
+ enable = true;
+ settings = {
+ general = {
+ disable_loading_bar = true;
+ grace = 0;
+ hide_cursor = true;
+ no_fade_in = false;
+ };
+ background = [
+ {
+ path = "~/.wallpaper";
+ blur_passes = 3;
+ blur_size = 8;
+ }
+ ];
+ input-field = [
+ {
+ size = "200, 50";
+ position = "0, -80";
+ monitor = "";
+ dots_center = true;
+ fade_on_empty = false;
+ font_color = "rgb(202, 211, 245)";
+ inner_color = "rgb(91, 96, 120)";
+ outer_color = "rgb(24, 25, 38)";
+ outline_thickness = 5;
+ placeholder_text = "<span foreground=\"##cad3f5\">Password...</span>";
+ shadow_passes = 2;
+ }
+ ];
+ };
+ };
+}
diff --git a/nixos/.flake/home/programs/ncmpcpp.nix b/nixos/.flake/home/programs/ncmpcpp.nix
new file mode 100644
index 0000000..f9ab2b9
--- /dev/null
+++ b/nixos/.flake/home/programs/ncmpcpp.nix
@@ -0,0 +1,23 @@
+{ config, pkgs, ... }:
+
+{
+ programs.ncmpcpp = {
+ enable = true;
+ bindings = [
+ { key = "j"; command = "scroll_down"; }
+ { key = "k"; command = "scroll_up"; }
+ { key = "h"; command = "previous_column"; }
+ { key = "l"; command = "next_column"; }
+ { key = "g"; command = "move_home"; }
+ { key = "G"; command = "move_end"; }
+ { key = "n"; command = "next_found_item"; }
+ { key = "N"; command = "previous_found_item"; }
+ ];
+ mpdMusicDir = "~/Music";
+ settings = {
+ ncmpcpp_directory = "~/.config/nmcpcpp";
+ mpd_host = "localhost";
+ mpd_port = "6600";
+ };
+ };
+}
diff --git a/nixos/.flake/home/programs/ssh.nix b/nixos/.flake/home/programs/ssh.nix
new file mode 100644
index 0000000..960a5cd
--- /dev/null
+++ b/nixos/.flake/home/programs/ssh.nix
@@ -0,0 +1,8 @@
+{ config, pkgs, ... }:
+
+{
+ programs.ssh = {
+ enable = true;
+ addKeysToAgent = "yes";
+ };
+}
diff --git a/nixos/.flake/home/programs/waybar.nix b/nixos/.flake/home/programs/waybar.nix
new file mode 100644
index 0000000..eb0f135
--- /dev/null
+++ b/nixos/.flake/home/programs/waybar.nix
@@ -0,0 +1,146 @@
+{ config, pkgs, ... }:
+
+{
+ programs.waybar = {
+ enable = true;
+ settings = {
+ mainBar = {
+ height = 30;
+ spacing = 4;
+ modules-left = [ "hyprland/workspaces" ];
+ modules-center = [ "hyprland/window" ];
+ modules-right = [ "mpd" "pulseaudio" "cpu" "memory" "clock" "tray" ];
+ mpd = {
+ format = "{stateIcon} {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) [{songPosition}|{queueLength}] 🎵";
+ format-disconnected = "Disconnected 🎵";
+ format-stopped = "{consumeIcon}Stopped 🎵";
+ unknown-tag = "N/A";
+ interval = 2;
+ state-icons = {
+ paused = "";
+ playing = "";
+ };
+ tooltip-format = "MPD (connected)";
+ tooltip-format-disconnected = "MPD (disconnected)";
+ on-click = "foot -e ncmpcpp";
+ };
+ tray = {
+ icon-size = 21;
+ spacing = 10;
+ show-passive-items = true;
+ };
+ clock = {
+ format = "{:%H:%M\t%Y-%m-%d}";
+ tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
+ };
+ cpu = {
+ format = "{usage}% ";
+ tooltip = false;
+ };
+ memory = {
+ format = "{}% ";
+ };
+ network = {
+ format-wifi = "";
+ tooltip = false;
+ format-ethernet = "";
+ format-linked = "";
+ format-disconnected = "⚠";
+ on-click = "kcmshell5 kcm_networkmanagement";
+ };
+ pulseaudio = {
+ format = "{volume}% {icon}";
+ format-bluetooth = "{volume}% {icon}";
+ format-bluetooth-muted = " {icon}";
+ format-muted = " ";
+ format-source = "{volume}% ";
+ format-source-muted = "";
+ format-icons = {
+ headphone = "";
+ hands-free = "";
+ headset = "";
+ phone = "";
+ portable = "";
+ car = "";
+ default = ["" "" ""];
+ };
+ on-click = "pavucontrol";
+ };
+ };
+ };
+ style = ''
+ window#waybar {
+ font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ background: transparent;
+ color: #ffffff;
+ text-shadow: 1px 1px #64727D;
+ transition-property: background-color;
+ transition-duration: .5s;
+ }
+ button {
+ border: none;
+ border-radius: 0;
+ }
+ button:hover {
+ background: inherit;
+ box-shadow: inset 0 -3px #ffffff;
+ }
+ #workspaces button {
+ padding: 0 5px;
+ text-shadow: 1px 1px #64727D;
+ background-color: transparent;
+ color: #ffffff;
+ }
+ #workspaces button:hover {
+ background: rgba(0, 0, 0, 0.2);
+ }
+ #workspaces button.focused {
+ background: transparent;
+ box-shadow: inset 0 -3px #ffffff;
+ }
+ #workspaces button.urgent {
+ background-color: #eb4d4b;
+ }
+ #clock,
+ #cpu,
+ #memory,
+ #disk,
+ #network,
+ #pulseaudio,
+ #wireplumber,
+ #custom-media,
+ #tray,
+ #mode,
+ #scratchpad,
+ #mpd {
+ padding: 0 10px;
+ }
+ #window,
+ #workspaces {
+ margin: 0 4px;
+ }
+ .modules-left > widget:first-child > #workspaces {
+ margin-left: 0;
+ }
+
+ /* If workspaces is the rightmost module, omit right margin */
+ .modules-right > widget:last-child > #workspaces {
+ margin-right: 0;
+ }
+ #tray > .passive {
+ -gtk-icon-effect: dim;
+ }
+ #tray > .needs-attention {
+ -gtk-icon-effect: highlight;
+ }
+ #scratchpad {
+ background: rgba(0, 0, 0, 0.2);
+ }
+
+ #scratchpad.empty {
+ background-color: transparent;
+ }
+ '';
+ };
+}
diff --git a/nixos/.flake/home/programs/zsh.nix b/nixos/.flake/home/programs/zsh.nix
new file mode 100644
index 0000000..8b8bfad
--- /dev/null
+++ b/nixos/.flake/home/programs/zsh.nix
@@ -0,0 +1,47 @@
+{ config, pkgs, ... }:
+
+{
+ programs.zsh = {
+ enable = true;
+ autocd = true;
+ autosuggestion = {
+ enable = true;
+ };
+ defaultKeymap = "viins";
+ history = {
+ append = true;
+ ignoreAllDups = true;
+ };
+ shellAliases = {
+ "ll" = "ls -alF";
+ "la" = "ls -a";
+ "l" = "ls -F";
+ "sl" = "ls";
+ };
+ syntaxHighlighting.enable = true;
+ initExtra = ''
+ which lesspipe.sh &> /dev/null && export LESSOPEN="|lesspipe.sh %s"
+ which eza &> /dev/null && alias ls=eza
+ which nvim &> /dev/null && alias vi=nvim && alias vim=nvim
+ parse_git_dirty() {
+ git_status="$(git status 2> /dev/null)"
+ [[ "$git_status" =~ "use \"git push\" to publish your local commits" ]] && echo -n " %F{green}%f"
+ [[ "$git_status" =~ "Changes to be committed:" ]] && echo -n " %F{magenta}%f"
+ [[ "$git_status" =~ "Changes not staged for commit:" ]] && echo -n " %F{yellow}%f"
+ [[ "$git_status" =~ "Untracked files:" ]] && echo -n " %F{red}%f"
+ }
+ setopt prompt_subst
+ autoload -Uz vcs_info
+ precmd () { vcs_info }
+ zstyle ':vcs_info:*' formats ' %F{blue}%b%f' # git(main)
+ PS1='%(?..%B%F{red}[%?%\]%f%b )%F{green}%20<...<%~%<<%f$vcs_info_msg_0_$(parse_git_dirty) $ '
+ '';
+ profileExtra = ''
+ if [ ! -S ~/.ssh/ssh_auth_sock ]; then
+ eval `ssh-agent` > /dev/null
+ ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
+ fi
+ export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
+ '';
+ };
+}