default.nix 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. { outputs, config, ... }:
  2. {
  3. imports =
  4. [
  5. outputs.modules.global.nix-config
  6. # ./kanata.nix
  7. ./system.nix
  8. ./software.nix
  9. ]
  10. ++ (builtins.attrValues outputs.modules.darwin);
  11. # NOTE: might be valuable to put this in it's own file
  12. # nix.linux-builder = {
  13. # enable = true;
  14. # ephemeral = true;
  15. # package = pkgs.darwin.linux-builder;
  16. # supportedFeatures = [ "kvm" "benchmark" "big-parallel" "nixos-test" ];
  17. # maxJobs = 4;
  18. # config = {
  19. # # nix.settings.sandbox = false;
  20. # virtualisation = {
  21. # darwin-builder = {
  22. # diskSize = 40 * 1024;
  23. # memorySize = 8 * 1024;
  24. # };
  25. # cores = 6;
  26. # };
  27. # };
  28. # };
  29. # nix.settings.system-features = [ "nixos-test" "apple-virt" "nixos-test" "benchmark" "big-parallel" "kvm" ];
  30. # nix.settings.extra-platforms = [ "aarch64-linux" ];
  31. # launchd.daemons.linux-builder = {
  32. # serviceConfig = {
  33. # StandardOutPath = "/var/log/darwin-builder.log";
  34. # StandardErrorPath = "/var/log/darwin-builder.log";
  35. # };
  36. # };
  37. # NOTE: this seems to be needed to make nix work in fish
  38. programs.fish = {
  39. enable = true;
  40. vendor = {
  41. completions.enable = true;
  42. config.enable = true;
  43. functions.enable = true;
  44. };
  45. };
  46. environment.shells = [
  47. config.programs.fish.package
  48. ];
  49. # TODO: move into module:
  50. # system.activationScripts.extraActivation.text = lib.mkAfter ''
  51. # # disable spotlight
  52. # echo "disable spotlight..." >&2
  53. # mdutil -i off /
  54. # '';
  55. # TODO:
  56. # - Proton Mail Bridge
  57. # - Proton Drive set up home folders
  58. programs = {
  59. nix-index.enable = true;
  60. gnupg.agent.enable = true;
  61. };
  62. users.users.thomas.home = "/Users/thomas";
  63. users.users.thomas.shell = config.programs.fish.package;
  64. users.groups.nix-users.members = [ "thomas" ];
  65. ids.gids.nixbld = 350;
  66. nix.settings.trusted-users = [ "thomas" ];
  67. networking = {
  68. hostName = "meili";
  69. remote-login = true;
  70. };
  71. time.timeZone = "America/Los_Angeles";
  72. system.stateVersion = 4;
  73. }