diff options
author | jjanzen <jjanzen@jjanzen.ca> | 2025-03-05 22:17:31 -0600 |
---|---|---|
committer | jjanzen <jjanzen@jjanzen.ca> | 2025-03-05 22:17:31 -0600 |
commit | e6edbad14d8255743c7b259a1985db5fb5bd4e91 (patch) | |
tree | ab535ebf7942b3935b8ec35158291c09226faf73 /macos.local/flake/home/programs | |
parent | c1f8c535d59658dd29d199c62326b9436a489ecf (diff) |
system changes
Diffstat (limited to 'macos.local/flake/home/programs')
-rw-r--r-- | macos.local/flake/home/programs/.DS_Store | bin | 0 -> 6148 bytes | |||
-rw-r--r-- | macos.local/flake/home/programs/core.nix.org | 68 | ||||
-rw-r--r-- | macos.local/flake/home/programs/emacs/core.nix.org | 14 | ||||
l--------- | macos.local/flake/home/programs/emacs/early-init.el.org | 1 | ||||
l--------- | macos.local/flake/home/programs/emacs/feed.org.org | 1 | ||||
l--------- | macos.local/flake/home/programs/emacs/init.el.org | 1 | ||||
l--------- | macos.local/flake/home/programs/fastfetch.nix.org | 1 | ||||
-rw-r--r-- | macos.local/flake/home/programs/ghostty.nix.org | 23 | ||||
l--------- | macos.local/flake/home/programs/git.nix.org | 1 | ||||
-rw-r--r-- | macos.local/flake/home/programs/ncmpcpp.nix.org | 28 | ||||
l--------- | macos.local/flake/home/programs/neovim.nix.org | 1 | ||||
-rw-r--r-- | macos.local/flake/home/programs/ssh.nix.org | 44 | ||||
-rw-r--r-- | macos.local/flake/home/programs/zsh/core.nix.org | 36 | ||||
-rw-r--r-- | macos.local/flake/home/programs/zsh/init-extra.sh.org | 28 | ||||
-rw-r--r-- | macos.local/flake/home/programs/zsh/profile-extra.sh.org | 10 |
15 files changed, 257 insertions, 0 deletions
diff --git a/macos.local/flake/home/programs/.DS_Store b/macos.local/flake/home/programs/.DS_Store Binary files differnew file mode 100644 index 0000000..668825b --- /dev/null +++ b/macos.local/flake/home/programs/.DS_Store diff --git a/macos.local/flake/home/programs/core.nix.org b/macos.local/flake/home/programs/core.nix.org new file mode 100644 index 0000000..24b2555 --- /dev/null +++ b/macos.local/flake/home/programs/core.nix.org @@ -0,0 +1,68 @@ +#+title: Core Program Configuration + +Import configurations for programs and install programs with no configuration. +#+begin_src nix + { config, pkgs, ... }: + + { + imports = [ + ./emacs/core.nix + ./fastfetch.nix + ./ghostty.nix + ./git.nix + ./ncmpcpp.nix + ./neovim.nix + ./ssh.nix + ./zsh/core.nix + ]; + + home.packages = with pkgs; [ + aescrypt + bash-language-server + bear + bison + cmake + cmake-language-server + curl + dos2unix + eza + ffmpeg + fzf + gnutls + go + gopls + gpgme + htop + hunspell + hyfetch # TODO: configure + inetutils + ispell + lesspipe + marksman + mailutils + meson + mpv + ninja + nodejs_23 + notcurses + p7zip + pandoc + python312 + python312Packages.black + python312Packages.pylint + python312Packages.python-lsp-server + ripgrep + rsync + rustup + shellcheck + shfmt + texliveFull + typescript-language-server + vscode-langservers-extracted + wget + yt-dlp + zig + zls + ]; + } +#+end_src diff --git a/macos.local/flake/home/programs/emacs/core.nix.org b/macos.local/flake/home/programs/emacs/core.nix.org new file mode 100644 index 0000000..2bb4237 --- /dev/null +++ b/macos.local/flake/home/programs/emacs/core.nix.org @@ -0,0 +1,14 @@ +#+title: Emacs Configuration + +Here is my Emacs configuration. This file just defines configurations that should exist. Emacs is installed with Homebrew. +#+begin_src nix + { config, pkgs, ... }: + + { + home.file = { + "./.config/emacs/early-init.el".source = ./early-init.el; + "./.config/emacs/feed.org".source = ./feed.org; + "./.config/emacs/init.el".source = ./init.el; + }; + } +#+end_src diff --git a/macos.local/flake/home/programs/emacs/early-init.el.org b/macos.local/flake/home/programs/emacs/early-init.el.org new file mode 120000 index 0000000..7c20436 --- /dev/null +++ b/macos.local/flake/home/programs/emacs/early-init.el.org @@ -0,0 +1 @@ +../../../../../common/.config/emacs/early-init.el.org
\ No newline at end of file diff --git a/macos.local/flake/home/programs/emacs/feed.org.org b/macos.local/flake/home/programs/emacs/feed.org.org new file mode 120000 index 0000000..d074855 --- /dev/null +++ b/macos.local/flake/home/programs/emacs/feed.org.org @@ -0,0 +1 @@ +../../../../../common/.config/emacs/feed.org.org
\ No newline at end of file diff --git a/macos.local/flake/home/programs/emacs/init.el.org b/macos.local/flake/home/programs/emacs/init.el.org new file mode 120000 index 0000000..6b2f721 --- /dev/null +++ b/macos.local/flake/home/programs/emacs/init.el.org @@ -0,0 +1 @@ +../../../../../common/.config/emacs/init.el.org
\ No newline at end of file diff --git a/macos.local/flake/home/programs/fastfetch.nix.org b/macos.local/flake/home/programs/fastfetch.nix.org new file mode 120000 index 0000000..25e2716 --- /dev/null +++ b/macos.local/flake/home/programs/fastfetch.nix.org @@ -0,0 +1 @@ +../../../../common/.flake/home/programs/fastfetch.nix.org
\ No newline at end of file diff --git a/macos.local/flake/home/programs/ghostty.nix.org b/macos.local/flake/home/programs/ghostty.nix.org new file mode 100644 index 0000000..29bc15a --- /dev/null +++ b/macos.local/flake/home/programs/ghostty.nix.org @@ -0,0 +1,23 @@ +#+title: ghostty Configuration + +I use =ghostty= as a terminal emulator on macOS. I disable auto-update and set some sensible options. +#+begin_src nix + { config, pkgs, ... }: + + { + home.file."./.config/ghostty/config".text = '' + auto-update = "off" + background-blur-radius = 20 + background-opacity = 0.8 + clipboard-trim-trailing-spaces = true + font-family = "SauceCodePro Nerd Font" + font-thicken = true + macos-option-as-alt = true + macos-window-shadow = false + mouse-hide-while-typing = true + quit-after-last-window-closed = true + theme = "Builtin Light" + window-decoration = true + ''; + } +#+end_src diff --git a/macos.local/flake/home/programs/git.nix.org b/macos.local/flake/home/programs/git.nix.org new file mode 120000 index 0000000..e8ddd28 --- /dev/null +++ b/macos.local/flake/home/programs/git.nix.org @@ -0,0 +1 @@ +../../../../common/.flake/home/programs/git.nix.org
\ No newline at end of file diff --git a/macos.local/flake/home/programs/ncmpcpp.nix.org b/macos.local/flake/home/programs/ncmpcpp.nix.org new file mode 100644 index 0000000..6c697ef --- /dev/null +++ b/macos.local/flake/home/programs/ncmpcpp.nix.org @@ -0,0 +1,28 @@ +#+title: =ncmpcpp= Configuration + +Enable =vi=-like controls and specify directories and =mpd= address. +#+begin_src nix + { 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 = "/Volumes/Media/Music"; + settings = { + ncmpcpp_directory = "~/.config/nmcpcpp"; + mpd_host = "localhost"; + mpd_port = "6600"; + }; + }; + } +#+end_src diff --git a/macos.local/flake/home/programs/neovim.nix.org b/macos.local/flake/home/programs/neovim.nix.org new file mode 120000 index 0000000..871eafa --- /dev/null +++ b/macos.local/flake/home/programs/neovim.nix.org @@ -0,0 +1 @@ +../../../../common/.flake/home/programs/neovim.nix.org
\ No newline at end of file diff --git a/macos.local/flake/home/programs/ssh.nix.org b/macos.local/flake/home/programs/ssh.nix.org new file mode 100644 index 0000000..28f779f --- /dev/null +++ b/macos.local/flake/home/programs/ssh.nix.org @@ -0,0 +1,44 @@ +#+title: SSH Configuration + +Configure SSH. Keys should be added to the SSH agent. Use the system keychain on all configurations. +#+begin_src nix + { config, pkgs, ... }: + { + programs.ssh = { + enable = true; + addKeysToAgent = "yes"; + matchBlocks = { + "*" = { + identityFile = "~/.ssh/id_ed25519"; + extraOptions = { + "UseKeychain" = "yes"; + }; + }; + + "aviary" = { + hostname = "aviary.cs.umanitoba.ca"; + user = "janzenj2"; + setEnv = { + "TERM" = "xterm"; + }; + }; + + "jjanzen.ca" = { + setEnv = { + "TERM" = "xterm"; + }; + }; + + "oracle" = { + setEnv = { + "TERM" = "xterm"; + }; + hostname = "jjanzen.ca"; + identityFile = "~/.ssh/oracle"; + identitiesOnly = true; + user = "opc"; + }; + }; + }; + } +#+end_src diff --git a/macos.local/flake/home/programs/zsh/core.nix.org b/macos.local/flake/home/programs/zsh/core.nix.org new file mode 100644 index 0000000..84e9aff --- /dev/null +++ b/macos.local/flake/home/programs/zsh/core.nix.org @@ -0,0 +1,36 @@ +#+title: ZSH Configuration + +Open =zsh= configuration. +#+begin_src nix + { config, pkgs, ... }: + + { + programs.zsh = { + enable = true; + + autocd = true; + + autosuggestion.enable = true; + + defaultKeymap = "emacs"; + + history = { + append = true; + ignoreAllDups = true; + }; + + shellAliases = { + "ll" = "ls -alF"; + "la" = "ls -a"; + "l" = "ls -F"; + "sl" = "ls"; + }; + + syntaxHighlighting.enable = true; + + initExtra = builtins.readFile ./init-extra.sh; + + profileExtra = builtins.readFile ./profile-extra.sh; + }; + } +#+end_src diff --git a/macos.local/flake/home/programs/zsh/init-extra.sh.org b/macos.local/flake/home/programs/zsh/init-extra.sh.org new file mode 100644 index 0000000..8255ce1 --- /dev/null +++ b/macos.local/flake/home/programs/zsh/init-extra.sh.org @@ -0,0 +1,28 @@ +#+title: ZSH Extra Initialization Code + +Define optional aliases. +#+begin_src sh + which lesspipe.sh &> /dev/null && export LESSOPEN="|lesspipe.sh %s" + which eza &> /dev/null && alias ls=eza +#+end_src + +Enable =fzf= extensions for =zsh=. +#+begin_src sh + which zsh &> /dev/null && source <(fzf --zsh) +#+end_src + +Enable git status in =zsh= prompt. +#+begin_src sh + 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) $ ' +#+end_src diff --git a/macos.local/flake/home/programs/zsh/profile-extra.sh.org b/macos.local/flake/home/programs/zsh/profile-extra.sh.org new file mode 100644 index 0000000..64457ed --- /dev/null +++ b/macos.local/flake/home/programs/zsh/profile-extra.sh.org @@ -0,0 +1,10 @@ +#+title: Profile Extra Code + +Enable =ssh-agent= at login. +#+begin_src sh + 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 +#+end_src |