|
| 1 | +{ |
| 2 | + delib, |
| 3 | + inputs, |
| 4 | + pkgs, |
| 5 | + config, |
| 6 | + lib, |
| 7 | + ... |
| 8 | +}: let |
| 9 | + system = "aarch64-darwin"; |
| 10 | +in |
| 11 | + delib.host { |
| 12 | + name = "CB14957.local"; |
| 13 | + |
| 14 | + # Work machine username |
| 15 | + username = "cohnesor"; |
| 16 | + |
| 17 | + rice = "empty"; |
| 18 | + type = "laptop"; |
| 19 | + |
| 20 | + home.home.stateVersion = "24.11"; |
| 21 | + homeManagerSystem = system; |
| 22 | + |
| 23 | + myconfig = { |
| 24 | + features = { |
| 25 | + engineer.enable = true; |
| 26 | + }; |
| 27 | + programs = { |
| 28 | + dx.enable = true; |
| 29 | + catls.enable = true; |
| 30 | + convert_img.enable = true; |
| 31 | + }; |
| 32 | + }; |
| 33 | + |
| 34 | + nixos = { |
| 35 | + imports = [ |
| 36 | + inputs.determinate.nixosModules.default |
| 37 | + ]; |
| 38 | + nixpkgs.hostPlatform = "x86_64-linux"; |
| 39 | + nixpkgs.config.allowUnfree = true; |
| 40 | + nixpkgs.config.allowUnsupportedSystem = true; |
| 41 | + system.stateVersion = "24.11"; |
| 42 | + |
| 43 | + # Minimal file system configuration to prevent assertion failures |
| 44 | + fileSystems."/" = { |
| 45 | + device = "/dev/disk/by-label/nixos"; |
| 46 | + fsType = "ext4"; |
| 47 | + }; |
| 48 | + |
| 49 | + boot.loader.systemd-boot.enable = true; |
| 50 | + boot.loader.efi.canTouchEfiVariables = true; |
| 51 | + }; |
| 52 | + |
| 53 | + darwin = {myconfig, ...}: { |
| 54 | + imports = [ |
| 55 | + # inputs.determinate.darwinModules.default |
| 56 | + ]; |
| 57 | + |
| 58 | + nixpkgs = { |
| 59 | + hostPlatform = system; |
| 60 | + config.allowUnfree = true; |
| 61 | + }; |
| 62 | + nix.enable = false; |
| 63 | + programs = { |
| 64 | + direnv = { |
| 65 | + enable = true; |
| 66 | + nix-direnv = { |
| 67 | + enable = true; |
| 68 | + package = pkgs.nix-direnv; |
| 69 | + }; |
| 70 | + }; |
| 71 | + ssh = { |
| 72 | + extraConfig = '' |
| 73 | + SetEnv TERM=xterm-256color |
| 74 | + ''; |
| 75 | + }; |
| 76 | + }; |
| 77 | + system = { |
| 78 | + stateVersion = 5; |
| 79 | + primaryUser = myconfig.constants.username; |
| 80 | + defaults = { |
| 81 | + dock.autohide = true; |
| 82 | + |
| 83 | + trackpad = { |
| 84 | + Clicking = true; |
| 85 | + TrackpadThreeFingerDrag = true; |
| 86 | + Dragging = true; |
| 87 | + }; |
| 88 | + }; |
| 89 | + }; |
| 90 | + |
| 91 | + environment = { |
| 92 | + systemPackages = [ |
| 93 | + # Macos Only |
| 94 | + pkgs.aerospace |
| 95 | + pkgs.raycast |
| 96 | + pkgs.xcodes |
| 97 | + # Shared |
| 98 | + ]; |
| 99 | + shells = [pkgs.zsh]; |
| 100 | + |
| 101 | + pathsToLink = ["/share/qemu"]; |
| 102 | + etc."containers/containers.conf.d/99-gvproxy-path.conf".text = '' |
| 103 | + [engine] |
| 104 | + helper_binaries_dir = ["${pkgs.gvproxy}/bin"] |
| 105 | + ''; |
| 106 | + }; |
| 107 | + users.users.${myconfig.constants.username} = { |
| 108 | + home = "/Users/${myconfig.constants.username}"; |
| 109 | + }; |
| 110 | + |
| 111 | + security.pam.services.sudo_local.touchIdAuth = true; |
| 112 | + }; |
| 113 | + } |
0 commit comments