diff --git a/flake.lock b/flake.lock index c1b84dd..0692e23 100644 --- a/flake.lock +++ b/flake.lock @@ -61,6 +61,26 @@ "type": "github" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1730184279, + "narHash": "sha256-6OB+WWR6gnaWiqSS28aMJypKeK7Pjc2Wm6L0MtOrTuA=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "b379bd4d872d159e5189053ce9a4adf86d56db4b", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, "nix-secrets": { "flake": false, "locked": { @@ -164,6 +184,7 @@ "root": { "inputs": { "alejandra": "alejandra", + "nix-darwin": "nix-darwin", "nix-secrets": "nix-secrets", "nixos-generators": "nixos-generators", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 31867e3..57b2598 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,9 @@ url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nix-darwin.url = "github:LnL7/nix-darwin"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = @@ -25,6 +28,7 @@ nixpkgs, sops-nix, nixos-generators, + nix-darwin, ... }@inputs: let @@ -117,5 +121,12 @@ format = "proxmox"; }; }; + + darwinConfigurations."iMac-de-Eddie" = nix-darwin.lib.darwinSystem { + modules = [ ./hosts/dadarwin/configuration.nix ]; + }; + + # Expose the package set, including overlays, for convenience. + darwinPackages = self.darwinConfigurations."iMac-de-Eddie".pkgs; }; } diff --git a/hosts/dadarwin/configuration.nix b/hosts/dadarwin/configuration.nix new file mode 100644 index 0000000..fb4ea18 --- /dev/null +++ b/hosts/dadarwin/configuration.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }: { + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + environment.systemPackages = + [ + pkgs.neovim + pkgs.kitty + pkgs.kittysay + ]; + + programs.direnv.enable = true; + # Auto upgrade nix package and the daemon service. + services.nix-daemon.enable = true; + # nix.package = pkgs.nix; + + # Necessary for using flakes on this system. + nix.settings.experimental-features = "nix-command flakes"; + + # Create /etc/zshrc that loads the nix-darwin environment. + programs.zsh.enable = true; # default shell on catalina + # programs.fish.enable = true; + + # 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 = 5; + + # The platform the configuration will be used on. + nixpkgs.hostPlatform = "x86_64-darwin"; + }