From 509f16b4696b492c73ed1637b036cb0a42782c7d Mon Sep 17 00:00:00 2001 From: Ich lebe mietfrei in deinem Apfel Date: Fri, 25 Jul 2025 14:02:41 +0200 Subject: [PATCH] suck my ball --- flake.nix | 5 +- hosts/mac/configuration.nix | 114 ++++++++++++++++++------------------ 2 files changed, 60 insertions(+), 59 deletions(-) diff --git a/flake.nix b/flake.nix index c57cfb3..f4ca1a6 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,7 @@ ... } @ inputs: { formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; + formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra; nixosConfigurations.goingmerry = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; modules = [ @@ -59,11 +60,11 @@ specialArgs = {inherit inputs;}; modules = [ ./hosts/mac/configuration.nix - nix-homebrew.darwinModules.nix-homebrew + nix-homebrew.darwinModules.nix-homebrew { nix-homebrew = { enable = true; - user = "admin"; + user = "ichlebemietfreiindeinemapfel"; }; } ]; diff --git a/hosts/mac/configuration.nix b/hosts/mac/configuration.nix index feff190..4550e4a 100644 --- a/hosts/mac/configuration.nix +++ b/hosts/mac/configuration.nix @@ -1,66 +1,66 @@ - { - config, - pkgs, - ... - }: { - system.primaryUser = "admin"; +{ + config, + pkgs, + ... +}: { + system.primaryUser = "ichlebemietfreiindeinemapfel"; - environment.systemPackages = with pkgs; [ - vim - neovim - alacritty - element-desktop - mkalias - flutter - pass - ]; + environment.systemPackages = with pkgs; [ + vim + neovim + alacritty + element-desktop + mkalias + flutter + pass + ]; - homebrew = { - enable = true; - casks = [ - ]; - brews = [ - ]; - #masApps = []; - onActivation.cleanup = "zap"; - onActivation.autoUpdate = true; - onActivation.upgrade = true; - }; + homebrew = { + enable = true; + casks = [ + ]; + brews = [ + ]; + #masApps = []; + onActivation.cleanup = "zap"; + onActivation.autoUpdate = true; + onActivation.upgrade = true; + }; - # Necessary for using flakes on this system. - nix.settings.experimental-features = "nix-command flakes"; - programs.zsh.enable = true; + # Necessary for using flakes on this system. + nix.settings.experimental-features = "nix-command flakes"; + programs.zsh.enable = true; - # Enable alternative shell support in nix-darwin. - # programs.fish.enable = true; + # Enable alternative shell support in nix-darwin. + # programs.fish.enable = true; - system.activationScripts.applications.text = let - env = pkgs.buildEnv { - name = "system-applications"; - paths = config.environment.systemPackages; - pathsToLink = "/Applications"; - }; - in - pkgs.lib.mkForce '' - # Set up applications. - echo "setting up /Applications..." >&2 - rm -rf /Applications/Nix\ Apps - mkdir -p /Applications/Nix\ Apps - find ${env}/Applications -maxdepth 1 -type l -exec readlink '{}' + | - while read -r src; do - app_name=$(basename "$src") - echo "copying $src" >&2 - ${pkgs.mkalias}/bin/mkalias "$src" "/Applications/Nix Apps/$app_name" - done - ''; + system.activationScripts.applications.text = let + env = pkgs.buildEnv { + name = "system-applications"; + paths = config.environment.systemPackages; + pathsToLink = "/Applications"; + }; + in + pkgs.lib.mkForce '' + # Set up applications. + echo "setting up /Applications..." >&2 + rm -rf /Applications/Nix\ Apps + mkdir -p /Applications/Nix\ Apps + find ${env}/Applications -maxdepth 1 -type l -exec readlink '{}' + | + while read -r src; do + app_name=$(basename "$src") + echo "copying $src" >&2 + ${pkgs.mkalias}/bin/mkalias "$src" "/Applications/Nix Apps/$app_name" + done + ''; - # Set Git commit hash for darwin-version. - #system.configurationRevision = self.rev or self.dirtyRev or null; + # 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; + # 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 = "x86_64-darwin"; + # The platform the configuration will be used on. + nixpkgs.hostPlatform = "aarch64-darwin"; }