From ce84f71eb0a561560e9b12d4fd5aaece72e217e6 Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Tue, 21 Jun 2022 22:57:53 -0400 Subject: [PATCH] Update darwin configuration to use aarch64 --- common/packages.nix | 69 ++++++------------- flake.nix | 8 +-- home/default.nix | 1 + machines/{demeter => zelus}/configuration.nix | 2 +- modules/darwin/brew.nix | 6 +- modules/overlays/aws-connect/default.nix | 28 -------- modules/overlays/aws-role-play/default.nix | 55 --------------- .../tmux-sessionizer/tmux-sessionizer | 2 +- 8 files changed, 31 insertions(+), 140 deletions(-) rename machines/{demeter => zelus}/configuration.nix (91%) delete mode 100644 modules/overlays/aws-connect/default.nix delete mode 100644 modules/overlays/aws-role-play/default.nix diff --git a/common/packages.nix b/common/packages.nix index c3c4bc8..6af2783 100644 --- a/common/packages.nix +++ b/common/packages.nix @@ -24,13 +24,13 @@ in { xdg_utils zip - # automation - ansible + # ansible + # ansible + # ansible-lint - # dev productivity - ansible-lint + # # dev productivity bat - checkov + # checkov colordiff drone-cli exa @@ -40,7 +40,7 @@ in { go-jira hadolint hey - httpie + # httpie nodePackages.eslint pre-commit shellcheck @@ -48,7 +48,6 @@ in { starship tldr tmux-sessionizer - vscodium # containers docker @@ -57,36 +56,22 @@ in { kubernetes-helm kustomize minikube - podman # language servers nodePackages.bash-language-server nodePackages.pyright nodePackages.yaml-language-server - rubyPackages.solargraph sumneko-lua-language-server - # blog - hugo - - # printing - ghostscript - # monitoring ctop - glances + # glances htop - iotop procs # data tools dbeaver - # password managers - _1password - gopass - rbw - # lua lua53Packages.luacheck stylua @@ -102,11 +87,11 @@ in { nodePackages.yarn # video - youtube-dl + # youtube-dl # networking arp-scan - dnsutils + # dnsutils iperf nmap openssl @@ -119,14 +104,11 @@ in { rclone restic - # infra tools + # infra terraform-ls terraformer tflint - tfsec - /* - tfswitch - */ + tfswitch infracost # nix @@ -138,39 +120,28 @@ in { nixpkgs-review rnix-lsp - ## aws - aws-connect - aws-role-play - aws-vault - awscli2 - awslogs - ssm-session-manager-plugin + # aws + # awscli2 + # ssm-session-manager-plugin # python - mypy python310 - python310Packages.black + # python310Packages.black python310Packages.ipython python310Packages.pip - python310Packages.poetry + # python310Packages.poetry python310Packages.setuptools python310Packages.virtualenv - # ruby - rbenv - rubocop - ruby_2_7 - ruby_3_1 - rufo + # blog + hugo # news srv ] ++ lib.optionals stdenv.isLinux [ - _1password-gui albert authy - aws-sam-cli bitwarden brave calibre @@ -178,6 +149,7 @@ in { deluge discord firefox + ghostscript gimp-with-plugins glibcLocales gnome3.gnome-tweaks @@ -185,6 +157,7 @@ in { google-chrome guake i3lock-fancy-rapid + iotop kazam keyleds linuxPackages.perf @@ -194,6 +167,7 @@ in { nvfancontrol pavucontrol pinentry-curses + podman postman qemu rfd @@ -208,6 +182,7 @@ in { usbutils virtmanager vlc + vscodium wireshark-qt xautolock yaru-theme diff --git a/flake.nix b/flake.nix index ee25cbb..6316bac 100644 --- a/flake.nix +++ b/flake.nix @@ -91,15 +91,15 @@ }; darwinConfigurations = { - demeter = darwin.lib.darwinSystem { - system = "x86_64-darwin"; + zelus = darwin.lib.darwinSystem { + system = "aarch64-darwin"; modules = [ home-manager.darwinModules.home-manager ./common/darwin.nix ./common/packages.nix - ./machines/demeter/configuration.nix + ./machines/zelus/configuration.nix ./modules/darwin/default.nix @@ -112,7 +112,7 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - users.dave.imports = [./home/default.nix]; + users."dave.gallant".imports = [./home/default.nix]; }; }; }) diff --git a/home/default.nix b/home/default.nix index c53f0b6..4665d85 100644 --- a/home/default.nix +++ b/home/default.nix @@ -114,6 +114,7 @@ in { export PATH=$PATH:~/.cargo/bin export PATH=$PATH:~/.local/bin export PATH=$PATH:~/.npm-packages/bin + export PATH=$PATH:/opt/homebrew/bin/ export PATH=$PATH:~/bin export GOPATH=~/go export GOBIN=$GOPATH/bin diff --git a/machines/demeter/configuration.nix b/machines/zelus/configuration.nix similarity index 91% rename from machines/demeter/configuration.nix rename to machines/zelus/configuration.nix index a616022..81a76c3 100644 --- a/machines/demeter/configuration.nix +++ b/machines/zelus/configuration.nix @@ -3,7 +3,7 @@ environment = {variables = {LANG = "en_US.UTF-8";};}; - networking = {hostName = "demeter";}; + networking = {hostName = "zelus";}; # Auto upgrade nix package and the daemon service. services.nix-daemon.enable = true; diff --git a/modules/darwin/brew.nix b/modules/darwin/brew.nix index f4ec07a..2b7b573 100644 --- a/modules/darwin/brew.nix +++ b/modules/darwin/brew.nix @@ -20,7 +20,6 @@ in { }; brews = [ - "aws-sam-cli" "coreutils" "fabianishere/personal/pam_reattach" "gnu-sed" @@ -31,18 +30,17 @@ in { ]; casks = [ - "1password" "dbeaver-community" "font-fira-code-nerd-font" "font-hack-nerd-font" "lulu" "maccy" - "osxfuse" + # "osxfuse" "rectangle" + "vscodium" ]; taps = [ - "aws/tap" "homebrew/bundle" "homebrew/cask" "homebrew/cask-fonts" diff --git a/modules/overlays/aws-connect/default.nix b/modules/overlays/aws-connect/default.nix deleted file mode 100644 index 00f379d..0000000 --- a/modules/overlays/aws-connect/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - stdenv, - lib, - fetchFromGitHub, -}: -stdenv.mkDerivation rec { - pname = "aws-connect"; - version = "1.0.19"; - - src = fetchFromGitHub { - owner = "rewindio"; - repo = "aws-connect"; - rev = "v${version}"; - sha256 = "sha256-xS5eRVjbjK/qzaZhNApwghNqnHGqVGWJ4hvgDu4dfDQ="; - }; - - installPhase = '' - mkdir -p $out/bin - cp ./aws-connect $out/bin - ''; - - meta = with lib; { - description = "Wrapper script around AWS session manager connections"; - homepage = "https://github.com/rewindio/aws-connect"; - license = licenses.mit; - platforms = platforms.unix; - }; -} diff --git a/modules/overlays/aws-role-play/default.nix b/modules/overlays/aws-role-play/default.nix deleted file mode 100644 index a5fc4cc..0000000 --- a/modules/overlays/aws-role-play/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - lib, - fetchFromGitHub, - python3, -}: let - py = python3.override { - packageOverrides = self: super: { - prettycolors = super.buildPythonPackage rec { - pname = "pretty-colors"; - version = "1.2.23"; - doCheck = false; - src = fetchFromGitHub { - owner = "onelivesleft"; - repo = "PrettyErrors"; - rev = "8b58260f00b0aab789e940f5ee190fa9c3c10925"; - sha256 = "sha256-ICFwaRkQ30/sml4GuzXF8TyJAg+ZXnLmKGil18KisUw="; - }; - propagatedBuildInputs = [py.pkgs.colorama]; - }; - }; - }; -in - with py.pkgs; - buildPythonApplication rec { - pname = "aws-role-play"; - version = "419e0de612554bfce467da4896e1abcadb78c406"; - format = "pyproject"; - - src = fetchFromGitHub { - owner = "rewindio"; - repo = "aws-role-play"; - rev = version; - hash = "sha256-o+u/ixL48J2WMWFRkOlWGvXMVwn+BrofzlspOVwmnCo="; - }; - - # No tests included - doCheck = false; - - nativeBuildInputs = [poetry]; - - propagatedBuildInputs = with py.pkgs; [ - boto3 - click - colorama - prettycolors - ]; - - passthru.python3 = python3; - - meta = with lib; { - homepage = "https://www.rewind.com/"; - description = "A CLI tool that makes assuming IAM roles and exporting temporary credentials easier"; - license = licenses.mit; - }; - } diff --git a/modules/overlays/tmux-sessionizer/tmux-sessionizer b/modules/overlays/tmux-sessionizer/tmux-sessionizer index d9e70e6..508c475 100755 --- a/modules/overlays/tmux-sessionizer/tmux-sessionizer +++ b/modules/overlays/tmux-sessionizer/tmux-sessionizer @@ -6,7 +6,7 @@ if [[ $# -eq 1 ]]; then selected=$1 else - selected=$(find ~/src/github.com/davegallant ~/src/github.com/rewindio -mindepth 1 -maxdepth 1 -type d | fzf --exact) + selected=$(find ~/src/github.com/davegallant -mindepth 1 -maxdepth 1 -type d | fzf --exact) fi if [[ -z $selected ]]; then