mirror of
https://github.com/mentos1386/dotfiles.git
synced 2024-11-22 07:33:33 +00:00
feat: more macos support
This commit is contained in:
parent
75d4147dce
commit
68ff85c43f
7 changed files with 23 additions and 10 deletions
|
@ -7,6 +7,8 @@ Expected configuration:
|
||||||
```bash
|
```bash
|
||||||
# Install GUI tools with personal specialization
|
# Install GUI tools with personal specialization
|
||||||
./install --gui --env personal
|
./install --gui --env personal
|
||||||
|
# A variation for macos
|
||||||
|
./install --gui --env personal-macos
|
||||||
# Skip GUI tools and only apply work specialization
|
# Skip GUI tools and only apply work specialization
|
||||||
./install --env work
|
./install --env work
|
||||||
```
|
```
|
||||||
|
@ -21,3 +23,8 @@ to match the correct preferences.
|
||||||
|
|
||||||
To make this work, [night theme switcher](https://extensions.gnome.org/extension/2236/night-theme-switcher/)
|
To make this work, [night theme switcher](https://extensions.gnome.org/extension/2236/night-theme-switcher/)
|
||||||
extension is needed and configured to use `scripts/sunrise.sh` and `scripts/sunset.sh` as "run commands".
|
extension is needed and configured to use `scripts/sunrise.sh` and `scripts/sunset.sh` as "run commands".
|
||||||
|
|
||||||
|
### MacOS support.
|
||||||
|
|
||||||
|
Best effort. Known issues are:
|
||||||
|
- neovim has dbus dependencies (for theme switching).
|
||||||
|
|
|
@ -22,10 +22,6 @@ while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--env)
|
--env)
|
||||||
ENVIRONMENT=$2
|
ENVIRONMENT=$2
|
||||||
if [ "$ENVIRONMENT" != "personal" ] && [ "$ENVIRONMENT" != "work" ]; then
|
|
||||||
echo "Unknown environment $ENVIRONMENT"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
shift # past argument
|
shift # past argument
|
||||||
shift # past value
|
shift # past value
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -4,10 +4,12 @@ set -euo pipefail
|
||||||
source common.sh
|
source common.sh
|
||||||
echo_header "== DotFiles with GUI: $GUI and ENV: $ENVIRONMENT"
|
echo_header "== DotFiles with GUI: $GUI and ENV: $ENVIRONMENT"
|
||||||
|
|
||||||
|
LINUX="true"
|
||||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
echo_header "== Detected linux"
|
echo_header "== Detected linux"
|
||||||
./install-linux.sh
|
./install-linux.sh
|
||||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
LINUX="false"
|
||||||
echo_header "== Detected macos"
|
echo_header "== Detected macos"
|
||||||
./install-macos.sh
|
./install-macos.sh
|
||||||
else
|
else
|
||||||
|
@ -38,7 +40,10 @@ workspace_link nix/work.nix .config/home-manager/work.nix
|
||||||
NIXPKGS_ALLOW_UNFREE=1 ENVIRONMENT=$ENVIRONMENT home-manager switch
|
NIXPKGS_ALLOW_UNFREE=1 ENVIRONMENT=$ENVIRONMENT home-manager switch
|
||||||
|
|
||||||
echo_header "== Use zsh as default shell"
|
echo_header "== Use zsh as default shell"
|
||||||
|
if [ "${LINUX}" == "true" ]
|
||||||
|
then
|
||||||
sudo chsh $USER --shell=/bin/zsh
|
sudo chsh $USER --shell=/bin/zsh
|
||||||
|
fi
|
||||||
|
|
||||||
echo_header "== Plug for neovim"
|
echo_header "== Plug for neovim"
|
||||||
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||||
|
|
|
@ -72,9 +72,6 @@
|
||||||
# Kubernetes
|
# Kubernetes
|
||||||
k9s
|
k9s
|
||||||
kubectl
|
kubectl
|
||||||
|
|
||||||
# Gnome
|
|
||||||
gnomeExtensions.pop-shell
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
|
|
@ -7,5 +7,7 @@ in
|
||||||
imports =
|
imports =
|
||||||
if environment == "work"
|
if environment == "work"
|
||||||
then [ ./core.nix ./work.nix ]
|
then [ ./core.nix ./work.nix ]
|
||||||
|
else if environment == "personal-macos"
|
||||||
|
then [ ./core.nix ./personal-macos.nix ]
|
||||||
else [ ./core.nix ./personal.nix ];
|
else [ ./core.nix ./personal.nix ];
|
||||||
}
|
}
|
||||||
|
|
6
nix/personal-macos.nix
Normal file
6
nix/personal-macos.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "tine";
|
||||||
|
home.homeDirectory = "/Users/tine";
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
source common.sh
|
source common.sh
|
||||||
echo_header "== DotFiles with ENV: $ENVIRONMENT"
|
echo_header "== DotFiles with ENV: $ENVIRONMENT"
|
||||||
|
|
Loading…
Reference in a new issue