From 80cf1588bb475c8d2f0edf2131c1ca7b420547e7 Mon Sep 17 00:00:00 2001 From: yukkop Date: Sun, 19 Jul 2026 20:03:18 +0400 Subject: [PATCH] feat: +darwin config for yukkop --- darwin/system/yukkop/default.nix | 21 +++++++++++ darwin/system/yukkop/yukkop.nix | 62 ++++++++++++++++++++++++++++++++ flake.lock | 22 ++++++++++++ flake.nix | 7 ++++ 4 files changed, 112 insertions(+) create mode 100644 darwin/system/yukkop/default.nix create mode 100644 darwin/system/yukkop/yukkop.nix diff --git a/darwin/system/yukkop/default.nix b/darwin/system/yukkop/default.nix new file mode 100644 index 00000000..10d9ea02 --- /dev/null +++ b/darwin/system/yukkop/default.nix @@ -0,0 +1,21 @@ +{ + flake, + self, + inputs, + system ? "aarch64-darwin", + ... +}: let + name = builtins.baseNameOf ./.; +in inputs.nix-darwin.lib.darwinSystem { + inherit system; + specialArgs = { inherit flake self inputs; }; + modules = [ + inputs.home-manager.darwinModules.home-manager + { + networking.hostName = name; + nixpkgs.hostPlatform = system; + nixpkgs.overlays = [ self.overlays.default ]; + } + ./${name}.nix + ]; +} diff --git a/darwin/system/yukkop/yukkop.nix b/darwin/system/yukkop/yukkop.nix new file mode 100644 index 00000000..42c14a45 --- /dev/null +++ b/darwin/system/yukkop/yukkop.nix @@ -0,0 +1,62 @@ +{ + pkgs, + lib, + ... +}: let + name = "yukkop"; +in { + nix.settings.experimental-features = "nix-command flakes"; + + programs.zsh.enable = true; + + users.users.${name}.home = "/Users/${name}"; + + environment.systemPackages = with pkgs; [ + git + neovim + tmux + ]; + + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.${name} = { + home.stateVersion = "25.11"; + + programs.git = { + enable = true; + lfs.enable = true; + settings = { + user.name = name; + user.email = "hectic.yukkop@gmail.com"; + push.autoSetupRemote = true; + init.defaultBranch = "master"; + }; + }; + + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + history = { + size = 10000; + path = "$HOME/.zsh/.zsh_history"; + }; + + shellAliases = { + drs = "darwin-rebuild switch --flake ~/pj/hearth#'yukkop|aarch64-darwin'"; + nv = "nvim"; + }; + }; + + programs.tmux = { + enable = true; + keyMode = "vi"; + escapeTime = 500; + historyLimit = 50000; + newSession = true; + }; + }; + system.stateVersion = 6; +} diff --git a/flake.lock b/flake.lock index 193d05cc..18daa0da 100644 --- a/flake.lock +++ b/flake.lock @@ -688,6 +688,27 @@ "url": "ssh://git@github.com/LysmiMx/mechabellum-replay-analysis.git" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772129556, + "narHash": "sha256-Utk0zd8STPsUJPyjabhzPc5BpPodLTXrwkpXBHYnpeg=", + "owner": "nix-darwin", + "repo": "nix-darwin", + "rev": "ebec37af18215214173c98cf6356d0aca24a2585", + "type": "github" + }, + "original": { + "owner": "nix-darwin", + "ref": "nix-darwin-25.11", + "repo": "nix-darwin", + "type": "github" + } + }, "nix-minecraft": { "inputs": { "flake-compat": "flake-compat_3", @@ -967,6 +988,7 @@ "hyprland": "hyprland", "impermanence": "impermanence", "mechabellum-replay-analysis": "mechabellum-replay-analysis", + "nix-darwin": "nix-darwin", "nix-minecraft": "nix-minecraft", "nixos-anywhere": "nixos-anywhere", "nixos-hardware": "nixos-hardware", diff --git a/flake.nix b/flake.nix index 09e86921..6b58f148 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,10 @@ url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-darwin = { + url = "github:nix-darwin/nix-darwin/nix-darwin-25.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nixos-wsl = { url = "github:nix-community/NixOS-WSL"; inputs.nixpkgs.follows = "nixpkgs"; @@ -123,5 +127,8 @@ "tenix|x86_64-linux" = import ./nixos/system/tenix { inherit flake self inputs; system = "x86_64-linux"; }; "hectic-lab|x86_64-linux" = import ./nixos/system/hectic-lab { inherit flake self inputs; system = "x86_64-linux"; }; }; + darwinConfigurations = { + "yukkop|aarch64-darwin" = import ./darwin/system/yukkop { inherit flake self inputs; system = "aarch64-darwin"; }; + }; }; }