diff options
author | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-09-25 21:30:22 -0500 |
---|---|---|
committer | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-09-25 21:30:22 -0500 |
commit | ddb9b793001e3a6eb14e81d99e90d3afcf8814ce (patch) | |
tree | 370d33b6396926cb018482564d95b98b835008ea | |
parent | 3cebee7f0fe335437f16368a1b15e841444c2f40 (diff) |
fix fonts hopefully
-rwxr-xr-x | install | 46 | ||||
-rw-r--r-- | nixos/.flake/home.nix | 1 |
2 files changed, 25 insertions, 22 deletions
@@ -48,31 +48,33 @@ fi if [ "$(uname)" = 'Linux' ] && grep -q 'ID=nixos' /etc/os-release; then echo 'installing NixOS flake' - sudo nixos-rebuild switch --flake './flake#nixos' + sudo nixos-rebuild switch --flake './.flake#nixos' fi -fonts_changed=false -echo 'installing fonts...' -mkdir -p ~/.local/share/fonts -if ! test -d ~/.local/share/fonts/ComputerModern; then - echo ' Computer Modern font missing. Installing...' - tar xf .local/share/fonts/ComputerModern.tar.gz -C ~/.local/share/fonts >> ~/.update-home.log 2>&1 - fonts_changed=true -fi -if ! test -f ~/.local/share/fonts/NFM.ttf; then - echo ' Nerd Font Mono font missing. Installing...' - tar xf .local/share/fonts/NFM.tar.gz -C ~/.local/share/fonts >> ~/.update-home.log 2>&1 - fonts_changed=true -fi -if ! test -d ~/.local/share/fonts/SauceCodePro; then - echo ' Source Code Pro Nerd Font missing. Installing...' - tar xf .local/share/fonts/SauceCodePro.tar.gz -C ~/.local/share/fonts >> ~/.update-home.log 2>&1 - fonts_changed=true -fi +if [ "$(uname)" = 'Darwin' ]; then + fonts_changed=false + echo 'installing fonts...' + mkdir -p ~/.local/share/fonts + if ! test -d ~/.local/share/fonts/ComputerModern; then + echo ' Computer Modern font missing. Installing...' + tar xf .local/share/fonts/ComputerModern.tar.gz -C ~/.local/share/fonts >> ~/.update-home.log 2>&1 + fonts_changed=true + fi + if ! test -f ~/.local/share/fonts/NFM.ttf; then + echo ' Nerd Font Mono font missing. Installing...' + tar xf .local/share/fonts/NFM.tar.gz -C ~/.local/share/fonts >> ~/.update-home.log 2>&1 + fonts_changed=true + fi + if ! test -d ~/.local/share/fonts/SauceCodePro; then + echo ' Source Code Pro Nerd Font missing. Installing...' + tar xf .local/share/fonts/SauceCodePro.tar.gz -C ~/.local/share/fonts >> ~/.update-home.log 2>&1 + fonts_changed=true + fi -if [ $fonts_changed = true ]; then - echo ' updating the font cache...' - fc-cache -f >> ~/.update-home.log + if [ $fonts_changed = true ]; then + echo ' updating the font cache...' + fc-cache -f >> ~/.update-home.log + fi fi cd "$CWD" || exit diff --git a/nixos/.flake/home.nix b/nixos/.flake/home.nix index f619e99..83ef088 100644 --- a/nixos/.flake/home.nix +++ b/nixos/.flake/home.nix @@ -24,6 +24,7 @@ mpdscribble pavucontrol mpc-cli + cm_unicode ]; programs.ssh = { |