From e65e2963e6e67a26d12a7b38ab90feb6f3713658 Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Tue, 4 Feb 2025 10:44:38 -0800 Subject: [PATCH] [tarro] Adds new config for tarro-mbp --- flake.lock | 22 ++++++++++++++++++ flake.nix | 11 +++++++++ system/hosts/tarro-mbp/configuration.nix | 29 ++++++++++++++++++++++++ system/hosts/tarro-mbp/default.nix | 16 +++++++++++++ system/hosts/tarro-mbp/drew.nix | 18 +++++++++++++++ 5 files changed, 96 insertions(+) create mode 100644 system/hosts/tarro-mbp/configuration.nix create mode 100644 system/hosts/tarro-mbp/default.nix create mode 100644 system/hosts/tarro-mbp/drew.nix diff --git a/flake.lock b/flake.lock index 5018b0c..d568940 100644 --- a/flake.lock +++ b/flake.lock @@ -424,6 +424,27 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738277753, + "narHash": "sha256-iyFcCOk0mmDiv4ut9mBEuMxMZIym3++0qN1rQBg8FW0=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "49b807fa7c37568d7fbe2aeaafb9255c185412f9", + "type": "github" + }, + "original": { + "owner": "LnL7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, "nix-filter": { "locked": { "lastModified": 1693833173, @@ -483,6 +504,7 @@ "home-manager": "home-manager", "hy3": "hy3", "hyprland": "hyprland", + "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs", "split-monitor-workspaces": "split-monitor-workspaces" } diff --git a/flake.nix b/flake.nix index 4c52873..acaad1e 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,10 @@ url = "github:Duckonaut/split-monitor-workspaces"; inputs.hyprland.follows = "hyprland"; }; + nix-darwin = { + url = "github:LnL7/nix-darwin/master"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, ... }@inputs: { @@ -29,5 +33,12 @@ inherit nixpkgs; }; }; + darwinConfigurations = { + DGVGYQLQP5 = (import ./system/hosts/tarro-mbp) { + inherit inputs; + inherit self; + inherit nixpkgs; + }; + }; }; } diff --git a/system/hosts/tarro-mbp/configuration.nix b/system/hosts/tarro-mbp/configuration.nix new file mode 100644 index 0000000..df866ca --- /dev/null +++ b/system/hosts/tarro-mbp/configuration.nix @@ -0,0 +1,29 @@ +{ config, pkgs, inputs, ... }: +{ + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + environment.systemPackages = + [ pkgs.vim + ]; + + # Necessary for using flakes on this system. + nix.settings.experimental-features = "nix-command flakes"; + + # Enable alternative shell support in nix-darwin. + programs.zsh.enable = true; + + # Set Git commit hash for darwin-version. + system.configurationRevision = inputs.self.rev or inputs.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"; + + users.users.drew = { + name = "drew"; + home = "/Users/drew"; + }; +} diff --git a/system/hosts/tarro-mbp/default.nix b/system/hosts/tarro-mbp/default.nix new file mode 100644 index 0000000..8654df0 --- /dev/null +++ b/system/hosts/tarro-mbp/default.nix @@ -0,0 +1,16 @@ +{ inputs, self, ... }: + inputs.nix-darwin.lib.darwinSystem { + modules = [ + ./configuration.nix + inputs.home-manager.darwinModules.home-manager + { + home-manager.users.drew = import ./drew.nix; + home-manager.useGlobalPkgs = true; + home-manager.extraSpecialArgs = { inherit inputs; }; + } + ]; + specialArgs = { + inherit inputs; + inherit self; + }; + } diff --git a/system/hosts/tarro-mbp/drew.nix b/system/hosts/tarro-mbp/drew.nix new file mode 100644 index 0000000..a798fc8 --- /dev/null +++ b/system/hosts/tarro-mbp/drew.nix @@ -0,0 +1,18 @@ +{ pkgs, self, ... }: +{ + imports = [ + ../../../home-manager/features/shell.nix + ../../../home-manager/features/terminal.nix + ../../../home-manager/features/neovim.nix + ]; + + home.username = "drew"; + home.homeDirectory = "/Users/drew"; + + nix.settings.experimental-features = ["flakes" "nix-command"]; + + home.packages = with pkgs; [ + ]; + + home.stateVersion = "24.11"; +}