2022-08-07 22:50:23 -07:00
|
|
|
{
|
|
|
|
description = "Nix and home-manager configurations for Softinio's macbook";
|
2024-04-26 12:20:53 -07:00
|
|
|
|
2022-08-07 22:50:23 -07:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2023-12-03 22:32:43 -08:00
|
|
|
nix-darwin = {
|
|
|
|
url = "github:LnL7/nix-darwin";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-08-07 22:50:23 -07:00
|
|
|
nur.url = github:nix-community/nur;
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
2024-04-26 12:20:53 -07:00
|
|
|
|
|
|
|
outputs = { self, nix-darwin, home-manager, nur, nixpkgs, ... }:
|
2022-08-07 22:50:23 -07:00
|
|
|
let
|
|
|
|
homeManagerConfFor = config: { ... }: {
|
|
|
|
nixpkgs.overlays = [ nur.overlay ];
|
|
|
|
imports = [ config ];
|
|
|
|
};
|
2024-04-26 12:20:53 -07:00
|
|
|
|
2023-12-03 22:32:43 -08:00
|
|
|
m3maxConfiguration = { pkgs, ... }: {
|
|
|
|
environment.systemPackages = with pkgs;
|
2024-04-26 12:20:53 -07:00
|
|
|
[
|
|
|
|
home-manager
|
|
|
|
];
|
|
|
|
|
|
|
|
fonts = {
|
|
|
|
fontDir.enable = true;
|
|
|
|
fonts = with pkgs; [
|
|
|
|
fira-code
|
|
|
|
];
|
2023-12-03 22:32:43 -08:00
|
|
|
};
|
2024-04-26 12:20:53 -07:00
|
|
|
|
|
|
|
services.nix-daemon.enable = true;
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
nixPath = nixpkgs.lib.mkForce [
|
|
|
|
"nixpkgs=${nixpkgs}"
|
|
|
|
];
|
|
|
|
|
2024-05-12 14:32:51 -07:00
|
|
|
package = pkgs.nixFlakes;
|
2024-04-26 12:20:53 -07:00
|
|
|
settings = {
|
|
|
|
experimental-features = "nix-command flakes";
|
|
|
|
extra-platforms = [ "x86_64-darwin" "aarch64-darwin" ];
|
|
|
|
trusted-users = [ "root" "salar" ];
|
|
|
|
};
|
|
|
|
distributedBuilds = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.fish.enable = true;
|
|
|
|
|
|
|
|
system.configurationRevision = self.rev or self.dirtyRev or null;
|
|
|
|
|
|
|
|
system.stateVersion = 4;
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = "aarch64-darwin";
|
|
|
|
|
|
|
|
users = {
|
|
|
|
users.salar = {
|
|
|
|
home = /Users/salar;
|
|
|
|
};
|
2023-12-03 22:32:43 -08:00
|
|
|
};
|
2022-08-07 22:50:23 -07:00
|
|
|
};
|
2024-04-26 12:20:53 -07:00
|
|
|
in
|
|
|
|
{
|
|
|
|
darwinConfigurations.salarm3max = nix-darwin.lib.darwinSystem {
|
|
|
|
system = "aarc64-darwin";
|
|
|
|
modules = [
|
|
|
|
m3maxConfiguration
|
|
|
|
home-manager.darwinModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.salar = homeManagerConfFor ./home.nix;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
specialArgs = { inherit nixpkgs; };
|
|
|
|
};
|
|
|
|
|
|
|
|
darwinPackages = self.darwinConfigurations.salarm3max.pkgs;
|
|
|
|
|
|
|
|
defaultPackage.aarch64-darwin = self.darwinConfigurations.salarm3max.system;
|
2022-08-07 22:50:23 -07:00
|
|
|
};
|
|
|
|
}
|