From fed3f0de67702a27471794d362d2fd4f618a1eea Mon Sep 17 00:00:00 2001 From: Leonardo Santiago Date: Fri, 25 Jul 2025 11:01:46 -0300 Subject: feat: add `nami` host --- flake.nix | 28 ++++++++++++++++++++++------ hosts/nami.nix | 6 ++++++ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 hosts/nami.nix diff --git a/flake.nix b/flake.nix index 5c5b9a2..d0ea19a 100644 --- a/flake.nix +++ b/flake.nix @@ -19,14 +19,22 @@ inputs.nixpkgs.follows = "nixpkgs"; }; deploy-rs.url = "github:serokell/deploy-rs"; + nix-darwin = { + url = "github:nix-darwin/nix-darwin/master"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, deploy-rs, ... } @ inputs : let + outputs = { self, nixpkgs, deploy-rs, nix-darwin, ... } @ inputs : let inherit (builtins) readDir attrNames listToAttrs split head; - pkgs = import nixpkgs { - overlays = [ inputs.emacs-overlay.overlays.default ]; - system = "x86_64-linux"; - }; + for-all-systems = f: + nixpkgs.lib.genAttrs [ + "x86_64-linux" + "aarch64-darwin" + ] (system: f (import nixpkgs { + overlays = [ inputs.emacs-overlay.overlays.default ]; + inherit system; + })); mods = map (p: ./modules/${p}) (attrNames (readDir ./modules)); make-config-named = host: nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; @@ -40,7 +48,9 @@ nixos-configs = map (h: { name= h; value = make-config-named h;}) hosts-names; in rec { nixosConfigurations = listToAttrs nixos-configs; - packages.x86_64-linux.emacs = pkgs.callPackage ./modules/emacs/package.nix {}; + packages = for-all-systems (pkgs: { + emacs = pkgs.callPackage ./modules/emacs/package.nix; + }); deploy.nodes.iori = { hostname = "ssh.santi.net.br"; remoteBuild = true; @@ -50,5 +60,11 @@ path = deploy-rs.lib.aarch64-linux.activate.nixos nixosConfigurations.iori; }; }; + darwinConfigurations.nami = nix-darwin.lib.darwinSystem { + modules = [ + inputs.home-manager.darwinModules.home-manager + ./hosts/nami.nix + ] ++ mods; + }; }; } diff --git a/hosts/nami.nix b/hosts/nami.nix new file mode 100644 index 0000000..8991250 --- /dev/null +++ b/hosts/nami.nix @@ -0,0 +1,6 @@ +{ config, pkgs, ...}: { + santi-modules = { + desktop-environment.enable = true; + }; + nixpkgs.hostPlatform = "aarch64-darwin"; +} -- cgit v1.2.3