From 6e37339af6612ca66f1016d4acecf9a09a23357d Mon Sep 17 00:00:00 2001 From: jmug Date: Tue, 30 Sep 2025 10:56:43 -0700 Subject: [PATCH] Delete msft machines. --- flake.lock | 17 ------ flake.nix | 44 -------------- hosts/msft-mac/configuration.nix | 75 ----------------------- hosts/msft-mac/home.nix | 99 ------------------------------ hosts/msft-mac/hotkeys.nix | 101 ------------------------------- users/msftdevbox/home.nix | 53 ---------------- users/nixlapmsft/home.nix | 72 ---------------------- 7 files changed, 461 deletions(-) delete mode 100644 hosts/msft-mac/configuration.nix delete mode 100644 hosts/msft-mac/home.nix delete mode 100644 hosts/msft-mac/hotkeys.nix delete mode 100644 users/msftdevbox/home.nix delete mode 100644 users/nixlapmsft/home.nix diff --git a/flake.lock b/flake.lock index c55bc22..fd54d96 100644 --- a/flake.lock +++ b/flake.lock @@ -273,22 +273,6 @@ "type": "github" } }, - "nixpkgs-msft-go": { - "locked": { - "lastModified": 1725980463, - "narHash": "sha256-3ruEhwpLlccjwYTvLCyFAtPndcRxAs3XazL2lhOXucI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5ed627539ac84809c78b2dd6d26a5cebeb5ae269", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5ed627539ac84809c78b2dd6d26a5cebeb5ae269", - "type": "github" - } - }, "nixpkgs-stable": { "locked": { "lastModified": 1741992157, @@ -418,7 +402,6 @@ "nixpkgs": "nixpkgs_2", "nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-electron-32": "nixpkgs-electron-32", - "nixpkgs-msft-go": "nixpkgs-msft-go", "nixpkgs-unstable": "nixpkgs-unstable_2", "opencode-tunneler": "opencode-tunneler", "sops-nix": "sops-nix", diff --git a/flake.nix b/flake.nix index df65f9b..bdd1504 100644 --- a/flake.nix +++ b/flake.nix @@ -11,9 +11,6 @@ # Required for webcord. nixpkgs-electron-32.url = "github:NixOS/nixpkgs/782740762fb281404740b6b7084d356c3dab1173"; - # required to match on a specific version of Go for AKS dev setup. - nixpkgs-msft-go.url = "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269"; - nixgl.url = "github:nix-community/nixGL"; nixgl.inputs.nixpkgs.follows = "nixpkgs"; @@ -54,7 +51,6 @@ self, nixpkgs, nixpkgs-unstable, - nixpkgs-msft-go, nix-darwin, apple-silicon, nixos-hardware, @@ -159,25 +155,6 @@ }) ]; }; - "msft-mac" = nix-darwin.lib.darwinSystem { - system = "aarch64-darwin"; - specialArgs = { - inherit inputs ghostty self; - }; - modules = [ - ./hosts/msft-mac/configuration.nix - home-manager.darwinModules.home-manager - ({ config, ... }: { - home-manager.extraSpecialArgs = { - pkgs-unstable = pkgs-unstable_aarch64-darwin; - inherit (config) user; - }; - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.jmug.imports = [ ./hosts/msft-mac/home.nix ]; - }) - ]; - }; }; homeConfigurations = let @@ -194,27 +171,6 @@ ./users/alarm/home.nix ]; }; - msftdevbox = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages."x86_64-linux"; - extraSpecialArgs = { - pkgs-msft-go = nixpkgs-msft-go.legacyPackages."x86_64-linux"; - pkgs-unstable = pkgs-unstable_x86_64-linux; - }; - modules = [ - ./users/msftdevbox/home.nix - ]; - }; - nixlapmsft = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages."x86_64-linux"; - extraSpecialArgs = { - inherit ghostty nixgl; - pkgs-msft-go = nixpkgs-msft-go.legacyPackages."x86_64-linux"; - pkgs-unstable = pkgs-unstable_x86_64-linux; - }; - modules = [ - ./users/nixlapmsft/home.nix - ]; - }; }; }; } diff --git a/hosts/msft-mac/configuration.nix b/hosts/msft-mac/configuration.nix deleted file mode 100644 index 5abdd07..0000000 --- a/hosts/msft-mac/configuration.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ self, pkgs, config, ... }: { - - imports = [ - ../common/darwin - ../../modules/common - ./hotkeys.nix - ]; - - # To reflect hotkeys without a login cycle. - system.activationScripts.postActivation.text = '' - sudo -u ${config.user.name} /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u - ''; - - # List packages installed in system profile. To search by name, run: - # $ nix-env -qaP | grep wget - environment.systemPackages = with pkgs; [ - neofetch - git-credential-manager - ]; - - user.name = "jmug"; - - system.primaryUser = config.user.name; - - homebrew = { - enable = true; - onActivation = { - autoUpdate = true; - cleanup = "uninstall"; - upgrade = true; - }; - - caskArgs = { - no_quarantine = true; - }; - - taps = []; - brews = []; - casks = [ - "ghostty" - "secretive" - "karabiner-elements" - "raycast" - "logi-options+" - "insta360-link-controller" - "displaylink" - "yubico-authenticator" # TODO: Defer to a module that manages yubikeys for darwin. - "docker-desktop" - "spotify" - ]; - }; - - fonts.packages = with pkgs; [ - nerd-fonts.bigblue-terminal - ]; - - users.users.${config.user.name}.home = config.user.homeDirectory; - - nixpkgs.config.allowUnfree = true; - - programs.zsh.enable = true; - - # Necessary for using flakes on this system. - nix.settings.experimental-features = "nix-command flakes"; - - # Set Git commit hash for darwin-version. - system.configurationRevision = self.rev or self.dirtyRev or null; - - # Used for backwards compatibility, please read the changelog before changing. - # $ darwin-rebuild changelog - system.stateVersion = 6; - - # The platform the configuration will be used on. - nixpkgs.hostPlatform = "aarch64-darwin"; -} diff --git a/hosts/msft-mac/home.nix b/hosts/msft-mac/home.nix deleted file mode 100644 index bda2184..0000000 --- a/hosts/msft-mac/home.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ - config, - pkgs, - pkgs-unstable, - user, - ... -} : -let - username = user.name; - homeDirectory = user.homeDirectory; -in { - - imports = [ - ../../home-modules/default.nix - ../../home-modules/direnv.nix - ../../home-modules/ghostty-config.nix - ../../home-modules/homebrew.nix - ../../home-modules/karabiner.nix - ../../home-modules/lazygit.nix - ../../home-modules/nvim.nix - ../../home-modules/secretive.nix - ../../home-modules/starship.nix - ../../home-modules/tmux.nix - ../../home-modules/zsh.nix - ]; - - ghostty = { - font-size = "17.2"; - window-decoration = true; - }; - - nvim = { - enable = true; - package = pkgs-unstable.neovim; - }; - - home = { - username = username; - homeDirectory = homeDirectory; - - packages = with pkgs; [ - jq - yq - nerd-fonts.bigblue-terminal - nerd-fonts.fira-code - azure-cli - - pkgs-unstable.go - pkgs-unstable.gopls - pkgs-unstable.gotools - pkgs-unstable.mockgen - pkgs-unstable.kubernetes-controller-tools - pkgs-unstable.kubectl - pkgs-unstable.kubectl-node-shell - pkgs-unstable.kind - pkgs-unstable.kubernetes-helm - - pkgs-unstable.claude-code - (pkgs-unstable.litellm.overrideAttrs (oldAttrs: rec { - version = "1.74.9"; - src = pkgs.fetchFromGitHub { - owner = "BerriAI"; - repo = "litellm"; - tag = "v${version}-stable"; - hash = "sha256-SGZwt2jzAQbOMlvudqPWat281su6OwT7JG2CNSMjL3A="; - }; - })) - ]; - - stateVersion = "25.05"; - }; - - - programs.zsh = { - shellAliases = { - # TODO BEGIN Interpolate the name of the host here. - flakeconf = "nvim ${homeDirectory}/nixos/flake.nix"; - sysconf = "nvim ${homeDirectory}/nixos/hosts/macbook/configuration.nix"; - homeconf = "nvim ${homeDirectory}/nixos/hosts/macbook/home.nix"; - nvconf = "nvim ${homeDirectory}/nixos/home-modules/explicit-configs/nvim/init.lua"; - # TODO: Interpolate the name of the host here. - rshellconf="source ${homeDirectory}/.zshrc"; - radev = "${homeDirectory}/dev/aks-rp/bin/aksdev"; - ksc = "KUBECONFIG=${homeDirectory}/Downloads/cxkubeconfig.yaml kubectl"; - kso = "KUBECONFIG=${homeDirectory}/Downloads/overlaykubeconfig.yaml kubectl"; - k = "kubectl"; - nrsw = "sudo darwin-rebuild switch --flake ${homeDirectory}/nixos#msft-mac"; - }; - initExtra = '' - export GONOPROXY='github.com,golang.org,googlesource.com,opentelemetry.io,uber.org' - export GOPRIVATE='goms.io,*.goms.io' - export GOPROXY='https://goproxyprod.goms.io' - export PATH=$PATH:$HOME/bin - export PATH=$PATH:$HOME/go/bin - export PATH=$PATH:$HOME/.opencode/bin - export __AKS_DOCKER_BUILD_MOUNT_NETRC=1 - ''; - }; -} diff --git a/hosts/msft-mac/hotkeys.nix b/hosts/msft-mac/hotkeys.nix deleted file mode 100644 index c1edc7a..0000000 --- a/hosts/msft-mac/hotkeys.nix +++ /dev/null @@ -1,101 +0,0 @@ -# This Nix expression defines a set of Apple Symbolic HotKeys to disable. -# (Thank you!) Definitions sourced from: https://github.com/andyjakubowski/dotfiles/blob/main/AppleSymbolicHotKeys%20Mapping -{ lib, ... }: - -let - # some "Sensible" enums for AppleSymbolicHotKeys IDs based on their function. - hotkeyEnums = { - moveFocusToMenuBar = 7; # Control-fn-F2 - moveFocusToDock = 8; # Control-fn-F3 - moveFocusToActiveOrNextWindow = 9; # Control-fn-F4 - moveFocusToWindowToolbar = 10; # Control-fn-F5 - moveFocusToFloatingWindow = 11; # Control-fn-F6 - turnKeyboardAccessOnOrOff = 12; # Control-fn-F1 - changeWayTabMovesFocus = 13; # Control-fn-F7 - moveFocusToNextWindow = 27; # Command-` - saveScreenToFile = 28; # Shift-Command-3 - copyScreenToClipboard = 29; # Control-Shift-Command-3 - saveSelectionToFile = 30; # Shift-Command-4 - copySelectionToClipboard = 31; # Control-Shift-Command-4 - missionControl = 32; # Control-UpArrow (standard key combination) - missionControlDedicatedKey = 34; # Control-UpArrow (often for a dedicated key like F3, params differ) - applicationWindows = 35; # Control-DownArrow - showDesktop = 36; # fn-F11 (standard key combination) - showDesktopDedicatedKey = 37; # fn-F11 (often for a dedicated key, params differ) - moveFocusToWindowDrawer = 51; # Option-Command-' - turnDockHidingOnOff = 52; # Option-Command-D - decreaseDisplayBrightness = 53; # fn-F14 (standard key combination) - increaseDisplayBrightness = 54; # fn-F15 (standard key combination) - decreaseDisplayBrightnessDedicatedKey = 55; # fn-F14 (dedicated key, params differ) - increaseDisplayBrightnessDedicatedKey = 56; # fn-F15 (dedicated key, params differ) - moveFocusToStatusMenus = 57; # Control-fn-F8 - selectPreviousInputSource = 60; # Control-Space bar (if multiple inputs) - showSpotlightSearch = 64; # Command-Space bar - moveLeftASpace = 79; # Control-LeftArrow (standard key combination) - moveLeftASpaceDedicatedKey = 80; # Control-LeftArrow (dedicated key, params differ) - moveRightASpace = 81; # Control-RightArrow (standard key combination) - moveRightASpaceDedicatedKey = 82; # Control-RightArrow (dedicated key, params differ) - switchToDesktop1 = 118; # Control-1 - switchToDesktop2 = 119; # Control-2 - switchToDesktop3 = 120; # Control-3 - switchToDesktop4 = 121; # Control-4 - switchToDesktop5 = 122; # Control-5 - switchToDesktop6 = 123; # Control-6 - switchToDesktop7 = 124; # Control-7 - switchToDesktop8 = 125; # Control-8 - switchToDesktop9 = 126; # Control-9 - showLaunchpad = 160; # None (default is disabled) - showNotificationCenter = 163; # None (default is disabled) - turnDoNotDisturbOnOff = 175; # None (default is disabled) - saveTouchBarToFile = 181; # Shift-Command-6 (Touch Bar specific) - copyTouchBarToClipboard = 182; # Control-Shift-Command-6 (Touch Bar specific) - screenshotAndRecordingOptions = 184; # Shift-Command-5 - }; - - # Define which hotkeys you want to disable - # If you want to disable all hotkeys, you can use the `hotkeyEnums` directly - # If you want to keep some hotkeys enabled, simply comment them out or remove them from the following list. - disableHotKeys = with hotkeyEnums; [ - selectPreviousInputSource - ]; - - enabledHotKeys = with hotkeyEnums; [ - moveLeftASpace - moveRightASpace - switchToDesktop1 - switchToDesktop2 - switchToDesktop3 - switchToDesktop4 - switchToDesktop5 - switchToDesktop6 - switchToDesktop7 - switchToDesktop8 - switchToDesktop9 - ]; - - uniqueSortedHotkeyIntegerIdsToDisable = lib.sort lib.lessThan disableHotKeys; - uniqueSortedHotkeyIntegerIdsToEnable = lib.sort lib.lessThan enabledHotKeys; - - # Construct the target attribute set for the AppleSymbolicHotKeys dictionary. - disabledSymbolicHotKeys = lib.listToAttrs ( - map (id: { - name = builtins.toString id; # Hotkey ID as a string key - value = { enabled = false; }; - }) uniqueSortedHotkeyIntegerIdsToDisable - ); - enabledSymbolicHotKeys = lib.listToAttrs ( - map (id: { - name = builtins.toString id; # Hotkey ID as a string key - value = { enabled = true; }; - }) uniqueSortedHotkeyIntegerIdsToEnable - ); - symbolicHotkeys = disabledSymbolicHotKeys // enabledSymbolicHotKeys; - -in -{ - system.defaults.CustomUserPreferences = { - "com.apple.symbolichotkeys" = { - AppleSymbolicHotKeys = symbolicHotkeys; - }; - }; -} diff --git a/users/msftdevbox/home.nix b/users/msftdevbox/home.nix deleted file mode 100644 index ff7adce..0000000 --- a/users/msftdevbox/home.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ pkgs, pkgs-msft-go, pkgs-unstable, ... } : - -{ - imports = [ - ../../home-modules/default.nix - ../../home-modules/nvim.nix - ../../home-modules/tmux.nix - ../../home-modules/lazygit.nix - ../../home-modules/starship.nix - ../../home-modules/direnv.nix - ../../home-modules/zsh.nix - ]; - - home = { - username = "juva"; - homeDirectory = "/home/juva"; - - packages = with pkgs; [ - pkgs-msft-go.go_1_23 - pkgs-msft-go.gopls - pkgs-msft-go.gotools - pkgs-msft-go.mockgen - pkgs-unstable.kubernetes-controller-tools - jq - yq - kind - kubernetes-helm - fzf - ripgrep - ]; - - stateVersion = "24.11"; - }; - - programs.zsh = { - shellAliases = { - homesw = "home-manager --flake /home/juva/nixos#msftdevbox --extra-experimental-features nix-command --extra-experimental-features flakes switch"; - adev = "/home/juva/dev/aks-rp/bin/aksdev"; - ksc = "KUBECONFIG=/home/juva/Downloads/cxkubeconfig.yaml kubectl"; - kso = "KUBECONFIG=/home/juva/Downloads/overlaykubeconfig.yaml kubectl"; - k = "kubectl"; - }; - initExtra = '' - export GONOPROXY='github.com,golang.org,googlesource.com,opentelemetry.io,uber.org' - export GOPRIVATE='goms.io,*.goms.io' - export GOPROXY='https://goproxyprod.goms.io' - export PATH=$PATH:$HOME/bin - ''; - }; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; -} diff --git a/users/nixlapmsft/home.nix b/users/nixlapmsft/home.nix deleted file mode 100644 index daa4de3..0000000 --- a/users/nixlapmsft/home.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ config, lib, nixgl, pkgs, pkgs-msft-go, pkgs-unstable, ghostty, ... } : - -{ - imports = [ - ../../home-modules/default.nix - ../../home-modules/direnv.nix - ../../home-modules/ghostty-mac-config.nix - ../../home-modules/lazygit.nix - ../../home-modules/nvim.nix - ../../home-modules/starship.nix - ../../home-modules/tmux.nix - ../../home-modules/zsh.nix - ]; - - nixGL.packages = nixgl.packages; - nixGL.defaultWrapper = "mesa"; - nixGL.installScripts = [ "mesa" ]; - - # Effort to make applications show up in Gnome's "show applications" - targets.genericLinux.enable = true; - programs.bash.enable = true; - - home = { - username = "jmug"; - homeDirectory = "/home/jmug"; - - packages = with pkgs; [ - pkgs-msft-go.go_1_23 - pkgs-msft-go.gopls - pkgs-msft-go.gotools - pkgs-msft-go.mockgen - pkgs-unstable.kubernetes-controller-tools - azure-cli - kubectl - kubectl-node-shell - jq - yq - kind - kubernetes-helm - fzf - ripgrep - (config.lib.nixGL.wrap ghostty.packages.x86_64-linux.default) - nerd-fonts.bigblue-terminal - nerd-fonts.fira-code - - pkgs-unstable.nodejs_24 - pkgs-unstable.claude-code - ]; - - stateVersion = "24.11"; - }; - - programs.zsh = { - shellAliases = { - homesw = "home-manager --flake /home/jmug/nixos#nixlapmsft --extra-experimental-features nix-command --extra-experimental-features flakes switch"; - radev = "/home/jmug/dev/aks-rp/bin/aksdev"; - ksc = "KUBECONFIG=/home/jmug/Downloads/cxkubeconfig.yaml kubectl"; - kso = "KUBECONFIG=/home/jmug/Downloads/overlaykubeconfig.yaml kubectl"; - k = "kubectl"; - }; - initExtra = '' - export GONOPROXY='github.com,golang.org,googlesource.com,opentelemetry.io,uber.org' - export GOPRIVATE='goms.io,*.goms.io' - export GOPROXY='https://goproxyprod.goms.io' - export PATH=$PATH:$HOME/bin - export PATH=$PATH:$HOME/go/bin - ''; - }; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; -}