1
0

default.nix 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. { outputs, config, ... }:
  2. {
  3. imports = [
  4. outputs.modules.global.nix-config
  5. ./kanata.nix
  6. ./system.nix
  7. ./software.nix
  8. ]
  9. ++ (builtins.attrValues outputs.modules.darwin);
  10. # NOTE: might be valuable to put this in it's own file
  11. nix.linux-builder = {
  12. enable = true;
  13. systems = [ "aarch64-linux" "x86_64-linux" ];
  14. ephemeral = true;
  15. supportedFeatures = [ "kvm" "benchmark" "big-parallel" "nixos-test" ];
  16. maxJobs = 4;
  17. config = {
  18. # Enable x86_64 emulation
  19. boot.binfmt.emulatedSystems = [ "x86_64-linux" ];
  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" "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 = "Europe/Vienna";
  72. system.stateVersion = 4;
  73. }