aboutsummaryrefslogblamecommitdiff
path: root/machines/darwin/aarch64-darwin/mba-m2.nix
blob: df56e99578e895d08bb2b22e9b61d309d4ae5172 (plain) (tree)
1
2
3
4
5
6
7
8
9
                         
 


                            
                                                       
        

      
 
             
                                
                                      
                                        
    





                                                        


                                        
                        




                                     
                              






                                                                            




                                                    

                                
             
      
               

                                      
                                         


                                 
 
{ adminUser, pkgs, ... }:
{
  age = {
    secrets = {
      ssh-remote-builder = {
        file = ../../../secrets/ssh-remote-builder.age;
      };
    };
  };

  imports = [
    ../../../profiles/darwin.nix
    ../../../profiles/home-manager.nix
    ../../../profiles/remote-builder.nix
  ];

  # https://github.com/nix-darwin/nix-darwin/issues/1339
  ids.gids.nixbld = 30000;

  networking.hostName = "mba-m2";

  users = {
    users.${adminUser.name} = {
      home = "/Users/${adminUser.name}";
      shell = pkgs.fish;
    };
  };

  environment.shells = [ pkgs.fish ];

  programs.fish.enable = true;
  programs.fish.shellInit = ''
    # Nix
    if test -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish'
      source '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish'
    end
    # End Nix
  '';

  home-manager.users.${adminUser.name} = {
    home.stateVersion = "23.05";
    home.username = "${adminUser.name}";
    home.homeDirectory = "/Users/${adminUser.name}";
    home.packages = with pkgs; [
      element-desktop
      hledger
    ];
    imports = [
      ../../../home/profiles/mac.nix
      ../../../home/profiles/media.nix
      ../../../home/profiles/security.nix
    ];
    inherit (adminUser) userinfo;
  };
}