summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Santiago <[email protected]>2025-07-25 11:01:46 -0300
committerLeonardo Santiago <[email protected]>2025-07-25 11:01:46 -0300
commitfed3f0de67702a27471794d362d2fd4f618a1eea (patch)
tree408a7458cc5206d8d91b194f5b283bde4e74f705
parent07e1b844732785aab02858ec5ca1352547d9918c (diff)
feat: add `nami` host
-rw-r--r--flake.nix28
-rw-r--r--hosts/nami.nix6
2 files changed, 28 insertions, 6 deletions
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";
+}