From 574137b8aeb0de239a083a61c285dfc0345e05b3 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 12 Aug 2025 09:35:09 -0700 Subject: move each machine configuration to a folder This will give me a bit more flexibility to configure things per machine in the future. --- machines/darwin/aarch64-darwin/HQ-KWNY2VH41P.nix | 57 ----------------- .../aarch64-darwin/HQ-KWNY2VH41P/default.nix | 57 +++++++++++++++++ machines/darwin/aarch64-darwin/mba-m2.nix | 73 ---------------------- machines/darwin/aarch64-darwin/mba-m2/default.nix | 73 ++++++++++++++++++++++ 4 files changed, 130 insertions(+), 130 deletions(-) delete mode 100644 machines/darwin/aarch64-darwin/HQ-KWNY2VH41P.nix create mode 100644 machines/darwin/aarch64-darwin/HQ-KWNY2VH41P/default.nix delete mode 100644 machines/darwin/aarch64-darwin/mba-m2.nix create mode 100644 machines/darwin/aarch64-darwin/mba-m2/default.nix (limited to 'machines/darwin') diff --git a/machines/darwin/aarch64-darwin/HQ-KWNY2VH41P.nix b/machines/darwin/aarch64-darwin/HQ-KWNY2VH41P.nix deleted file mode 100644 index 3b8cab7..0000000 --- a/machines/darwin/aarch64-darwin/HQ-KWNY2VH41P.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - adminUser, - pkgs, - self, - ... -}: -{ - - imports = [ - "${self}/profiles/home-manager.nix" - "${self}/profiles/darwin.nix" - ]; - - system.primaryUser = adminUser.name; - - fonts.packages = with pkgs; [ - source-code-pro - ]; - - # The user should already exist, but we need to set this up so Nix knows - # what our home directory is (https://github.com/LnL7/nix-darwin/issues/423). - 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 - ''; - - programs.ssh.knownHosts = { - "github.com".publicKey = - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl"; - }; - - home-manager.users.${adminUser.name} = { - home.stateVersion = "23.05"; - home.username = "${adminUser.name}"; - home.homeDirectory = "/Users/${adminUser.name}"; - home.packages = with pkgs; [ grpcurl ]; - imports = [ - "${self}/home/profiles/mac.nix" - "${self}/home/profiles/work.nix" - ]; - inherit (adminUser) userinfo; - programs.git.userEmail = "fcuny@roblox.com"; - }; -} diff --git a/machines/darwin/aarch64-darwin/HQ-KWNY2VH41P/default.nix b/machines/darwin/aarch64-darwin/HQ-KWNY2VH41P/default.nix new file mode 100644 index 0000000..3b8cab7 --- /dev/null +++ b/machines/darwin/aarch64-darwin/HQ-KWNY2VH41P/default.nix @@ -0,0 +1,57 @@ +{ + adminUser, + pkgs, + self, + ... +}: +{ + + imports = [ + "${self}/profiles/home-manager.nix" + "${self}/profiles/darwin.nix" + ]; + + system.primaryUser = adminUser.name; + + fonts.packages = with pkgs; [ + source-code-pro + ]; + + # The user should already exist, but we need to set this up so Nix knows + # what our home directory is (https://github.com/LnL7/nix-darwin/issues/423). + 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 + ''; + + programs.ssh.knownHosts = { + "github.com".publicKey = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl"; + }; + + home-manager.users.${adminUser.name} = { + home.stateVersion = "23.05"; + home.username = "${adminUser.name}"; + home.homeDirectory = "/Users/${adminUser.name}"; + home.packages = with pkgs; [ grpcurl ]; + imports = [ + "${self}/home/profiles/mac.nix" + "${self}/home/profiles/work.nix" + ]; + inherit (adminUser) userinfo; + programs.git.userEmail = "fcuny@roblox.com"; + }; +} diff --git a/machines/darwin/aarch64-darwin/mba-m2.nix b/machines/darwin/aarch64-darwin/mba-m2.nix deleted file mode 100644 index 737c4a4..0000000 --- a/machines/darwin/aarch64-darwin/mba-m2.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ - adminUser, - pkgs, - self, - ... -}: -{ - - age = { - secrets = { - ssh-remote-builder = { - file = "${self}/secrets/ssh-remote-builder.age"; - }; - }; - }; - - imports = [ - "${self}/profiles/home-manager.nix" - "${self}/profiles/darwin.nix" - "${self}/profiles/remote-builder.nix" - ]; - - system.primaryUser = adminUser.name; - - # https://github.com/nix-darwin/nix-darwin/issues/1339 - ids.gids.nixbld = 30000; - - networking.hostName = "mba-m2"; - - fonts.packages = with pkgs; [ - source-code-pro - ]; - - # The user should already exist, but we need to set this up so Nix knows - # what our home directory is (https://github.com/LnL7/nix-darwin/issues/423). - 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 - ''; - - programs.ssh.knownHosts = { - "github.com".publicKey = - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl"; - }; - - home-manager.users.${adminUser.name} = { - home.stateVersion = "23.05"; - home.username = "${adminUser.name}"; - home.homeDirectory = "/Users/${adminUser.name}"; - home.packages = with pkgs; [ - element-desktop - zoom-us - ]; - imports = [ - "${self}/home/profiles/mac.nix" - "${self}/home/profiles/media.nix" - ]; - inherit (adminUser) userinfo; - }; -} diff --git a/machines/darwin/aarch64-darwin/mba-m2/default.nix b/machines/darwin/aarch64-darwin/mba-m2/default.nix new file mode 100644 index 0000000..737c4a4 --- /dev/null +++ b/machines/darwin/aarch64-darwin/mba-m2/default.nix @@ -0,0 +1,73 @@ +{ + adminUser, + pkgs, + self, + ... +}: +{ + + age = { + secrets = { + ssh-remote-builder = { + file = "${self}/secrets/ssh-remote-builder.age"; + }; + }; + }; + + imports = [ + "${self}/profiles/home-manager.nix" + "${self}/profiles/darwin.nix" + "${self}/profiles/remote-builder.nix" + ]; + + system.primaryUser = adminUser.name; + + # https://github.com/nix-darwin/nix-darwin/issues/1339 + ids.gids.nixbld = 30000; + + networking.hostName = "mba-m2"; + + fonts.packages = with pkgs; [ + source-code-pro + ]; + + # The user should already exist, but we need to set this up so Nix knows + # what our home directory is (https://github.com/LnL7/nix-darwin/issues/423). + 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 + ''; + + programs.ssh.knownHosts = { + "github.com".publicKey = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl"; + }; + + home-manager.users.${adminUser.name} = { + home.stateVersion = "23.05"; + home.username = "${adminUser.name}"; + home.homeDirectory = "/Users/${adminUser.name}"; + home.packages = with pkgs; [ + element-desktop + zoom-us + ]; + imports = [ + "${self}/home/profiles/mac.nix" + "${self}/home/profiles/media.nix" + ]; + inherit (adminUser) userinfo; + }; +} -- cgit v1.2.3