diff --git a/common/default.nix b/common/default.nix index 3e359ea..0e8a26f 100644 --- a/common/default.nix +++ b/common/default.nix @@ -3,9 +3,6 @@ ## Optimizations - # Clean /tmp - boot.tmp.cleanOnBoot = true; - # Link identical files nix.settings.auto-optimise-store = true; diff --git a/common/linux-specific.nix b/common/linux-specific.nix new file mode 100644 index 0000000..52e9bfd --- /dev/null +++ b/common/linux-specific.nix @@ -0,0 +1,4 @@ +{ + # Clean /tmp + boot.tmp.cleanOnBoot = true; +} diff --git a/flake.nix b/flake.nix index e7016f9..7a9908a 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-24.05"; nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable"; + nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; vampysite.url = "git+https://git.lain.faith/sorceress/vampysite"; @@ -10,6 +11,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + nix-darwin = { + url = "github:LnL7/nix-darwin"; + inputs.nixpkgs.follows = "nixpkgs-darwin"; + }; + mms = { url = "github:mkaito/nixos-modded-minecraft-servers"; inputs.nixpkgs.follows = "nixpkgs"; @@ -51,13 +57,14 @@ inputs.nixpkgs.follows = "nixpkgs-unstable"; }; }; - outputs = { nixpkgs, nixpkgs-unstable, home-manager, mms, helix, url-eater - , colorpickle, matrix-ril100, frq-friend, colmena, vampysite, ccase, ... - }: { + outputs = { nixpkgs, nixpkgs-unstable, home-manager, nix-darwin, mms, helix + , url-eater, colorpickle, matrix-ril100, frq-friend, colmena, vampysite + , ccase, ... }: { colmena = let mkDesktop = hostname: { imports = [ ./common + ./common/linux-specific.nix ./hosts/${hostname}/configuration.nix ./common/options.nix (import "${home-manager}/nixos") @@ -120,6 +127,7 @@ bloodletting = { imports = [ ./common + ./common/linux-specific.nix ./hosts/bloodletting/configuration.nix (import "${home-manager}/nixos") mms.module @@ -176,6 +184,9 @@ ritual = mkDesktop "ritual"; tears = mkDesktop "tears"; }; + darwinConfigurations."Agathas-Mac-mini" = nix-darwin.lib.darwinSystem { + modules = [ ./common ./hosts/Agathas-Mac-mini/configuration.nix ]; + }; devShells."x86_64-linux".default = let pkgs = import nixpkgs { system = "x86_64-linux"; }; in pkgs.mkShell { diff --git a/hosts/Agathas-Mac-mini/configuration.nix b/hosts/Agathas-Mac-mini/configuration.nix new file mode 100644 index 0000000..e4ba2f6 --- /dev/null +++ b/hosts/Agathas-Mac-mini/configuration.nix @@ -0,0 +1 @@ +{ nixpkgs.hostPlatform = "aarch64-darwin"; }