diff --git a/home-manager/becky-dingleberry.nix b/home-manager/becky-dingleberry.nix index 9b7be32..6e838cc 100644 --- a/home-manager/becky-dingleberry.nix +++ b/home-manager/becky-dingleberry.nix @@ -1,5 +1,6 @@ { config, + lib, pkgs, ... }: @@ -67,6 +68,8 @@ in # awscli2 # k9s # kubectl + # Terminal image viewer + viu ]; programs.direnv = { @@ -116,6 +119,131 @@ in }; }; + programs.htop = { + enable = true; + }; + + programs.jq = { + enable = true; + }; + + programs.k9s = { + enable = true; + settings = { + k9s = { + refreshRate = 2; + ui = { + logoless = true; + headless = true; + }; + logger = { + tail = 1000; + sinceSeconds = 60 * 30; + fullScreen = true; + showtime = true; + }; + }; + }; + }; + + programs.lsd = { + enable = true; + enableAliases = true; + settings = { + blocks = [ + "permission" + "user" + "group" + "size" + "date" + "git" + "name" + ]; + sorting = { + dir-grouping = "first"; + }; + }; + }; + + programs.mcfly = { + enable = true; + enableZshIntegration = true; + keyScheme = "vim"; + # TODO: Test + fuzzySearchFactor = 2; + + settings = { + colors = { + menubar = { + bg = "black"; + fg = "red"; + }; + darkmode = { + prompt = "cyan"; + timing = "yellow"; + }; + }; + }; + }; + + programs.pay-respects = { + enable = true; + enableZshIntegration = true; + }; + + # programs.spotify-player = { + # enable = true; + # package = config.lib.nixGL.wrap pkgs.spotify-player; + # }; + + # TODO: Configure + # programs.ssh = { + # enable = true; + # }; + + programs.starship = { + enable = true; + enableZshIntegration = true; + + settings = { + format = lib.concatStrings [ + "$username" + "$hostname" + "$directory" + "$character" + ]; + right_format = lib.concatStrings [ + "$git_branch" + "$git_commit" + "$git_state" + "$git_metrics" + "$git_status" + "($cmd_duration)" + ]; + scan_timeout = 25; + add_newline = false; + continuation_prompt = "[▸▹ ](dimmed white)"; + follow_symlinks = false; + directory = { + truncate_to_repo = false; + truncation_length = 20; + truncation_symbol = "…/"; + }; + + cmd_duration = { + min_time = 100; + show_milliseconds = true; + format = "took [$duration]($style) "; + style = "bold yellow"; + }; + + character = { + success_symbol = "✓"; + error_symbol = "⚠"; + }; + }; + }; + programs.zsh = { enable = true; @@ -166,6 +294,32 @@ in ''; }; + systemd.user.services.keepass-sync = { + Unit.Description = "Sync KeePass database"; + + Service = { + Type = "oneshot"; + ExecStart = toString ( + pkgs.writeShellScript "keepass-sync" '' + ${pkgs.coreutils}/bin/cp "/mnt/storage/.circuitry/.secret/default.kdbx" "/mnt/storage/.macshare/.secret/arnie.kdbx" + '' + ); + }; + + Install.WantedBy = [ "default.target" ]; + }; + + systemd.user.timers.keepass-sync = { + Unit.Description = "Timer for KeePass sync"; + + Timer = { + OnBootSec = "1m"; + OnUnitActiveSec = "10m"; + }; + + Install.WantedBy = [ "timers.target" ]; + }; + home.sessionVariables = { EDITOR = "vim"; GO111MODULE = "on"; diff --git a/home-manager/lcech-mac-veracode.nix b/home-manager/lcech-mac-veracode.nix index 614b0f2..66a08d6 100644 --- a/home-manager/lcech-mac-veracode.nix +++ b/home-manager/lcech-mac-veracode.nix @@ -1,4 +1,5 @@ { + lib, pkgs, ... }: @@ -65,6 +66,120 @@ in }; }; + programs.htop = { + enable = true; + }; + + programs.jq = { + enable = true; + }; + + programs.k9s = { + enable = true; + settings = { + k9s = { + refreshRate = 2; + ui = { + logoless = true; + headless = true; + }; + logger = { + tail = 1000; + sinceSeconds = 60 * 30; + fullScreen = true; + showtime = true; + }; + }; + }; + }; + + programs.lsd = { + enable = true; + enableAliases = true; + settings = { + blocks = [ + "permission" + "user" + "group" + "size" + "date" + "git" + "name" + ]; + sorting = { + dir-grouping = "first"; + }; + }; + }; + + programs.mcfly = { + enable = true; + enableZshIntegration = true; + keyScheme = "vim"; + # TODO: Test + fuzzySearchFactor = 2; + + settings = { + colors = { + menubar = { + bg = "black"; + fg = "red"; + }; + darkmode = { + prompt = "cyan"; + timing = "yellow"; + }; + }; + }; + }; + + programs.pay-respects = { + enable = true; + enableZshIntegration = true; + }; + + programs.starship = { + enable = true; + enableZshIntegration = true; + + settings = { + format = lib.concatStrings [ + "$username" + "$hostname" + "$directory" + "$character" + ]; + right_format = lib.concatStrings [ + "$git_branch" + "$git_commit" + "$git_state" + "$git_metrics" + "$git_status" + "($cmd_duration)" + ]; + scan_timeout = 25; + add_newline = false; + continuation_prompt = "[▸▹ ](dimmed white)"; + follow_symlinks = false; + directory = { + truncate_to_repo = false; + truncation_length = 20; + truncation_symbol = "…/"; + }; + + cmd_duration = { + min_time = 100; + show_milliseconds = true; + format = "took [$duration]($style) "; + style = "bold yellow"; + }; + + character = { + success_symbol = "✓"; + error_symbol = "⚠"; + }; + }; + }; programs.zsh = { enable = true; @@ -94,58 +209,18 @@ in GO111MODULE = "on"; TERMINAL = "ghostty"; }; + + launchd.agents.keepass-sync = { + enable = true; + config = { + Program = /bin/cp; + ProgramArguments = [ + "${homedir}/storage/.macshare/.secret/arnie.kdbx" + "${homedir}/arnie.kdbx" + ]; + StartInterval = 60 * 10; + StandardErrorPath = "/var/log/keepass-sync.error.log"; + StandardOutPath = "/var/log/keepass-sync.out.log"; + }; + }; } - -# TODO: launchd timers - -# - -# - -# - -# - -# Label - -# com.example.happybirthday - -# ProgramArguments - -# - -# happybirthday - -# - -# StartCalendarInterval - -# - -# Day - -# 11 - -# Hour - -# 0 - -# Minute - -# 0 - -# Month - -# 7 - -# Weekday - -# 0 - -# - -# - -# diff --git a/home-manager/zsh/common/02-prompt.zsh b/home-manager/zsh/common/02-prompt.zsh index d5fa3e6..9e4df1d 100755 --- a/home-manager/zsh/common/02-prompt.zsh +++ b/home-manager/zsh/common/02-prompt.zsh @@ -61,4 +61,4 @@ function printAwsVault { fi } -PROMPT='${PR_BOLD_WHITE}%* $(printUser)$(printAwsVault)${PR_CYAN}%~%<< $(git_prompt_info)${PR_BOLD_WHITE}>%{${reset_color}%} ' +# PROMPT='${PR_BOLD_WHITE}%* $(printUser)$(printAwsVault)${PR_CYAN}%~%<< $(git_prompt_info)${PR_BOLD_WHITE}>%{${reset_color}%} '