1
0

default.nix 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {
  2. config,
  3. lib,
  4. pkgs,
  5. outputs,
  6. ...
  7. }:
  8. {
  9. imports = [
  10. # TODO: auto-import via `outputs.modules.nixos`
  11. outputs.modules.global.nix-config
  12. ./containers
  13. ./system
  14. ./services
  15. ./users
  16. ]
  17. ++ (builtins.attrValues outputs.modules.nixos);
  18. security.sudo.wheelNeedsPassword = false;
  19. # Services configuration
  20. services = {
  21. openssh = {
  22. enable = true;
  23. openFirewall = true;
  24. settings = {
  25. PasswordAuthentication = false;
  26. PermitRootLogin = "no";
  27. X11Forwarding = false;
  28. };
  29. };
  30. nullmailer = {
  31. enable = true;
  32. setSendmail = true;
  33. remotesFile = config.age.secrets."odin/services/nullmailer".path;
  34. config = {
  35. me = "odin.t5.st";
  36. defaulthost = "odin.t5.st";
  37. defaultdomain = "odin.t5.st";
  38. allmailfrom = "[email protected]";
  39. adminaddr = "[email protected]";
  40. };
  41. };
  42. };
  43. programs.fish = {
  44. enable = true;
  45. vendor = {
  46. completions.enable = true;
  47. config.enable = true;
  48. functions.enable = true;
  49. };
  50. };
  51. environment.shells = [
  52. config.programs.fish.package
  53. ];
  54. # System packages
  55. # nixos-container create grist --flake .#grist --host-address "192.168.1.1" --local-address
  56. environment.systemPackages = with pkgs; [
  57. # System utilities
  58. git
  59. htop
  60. btop
  61. iotop
  62. powertop
  63. lsof
  64. pciutils
  65. usbutils
  66. # Network tools
  67. curl
  68. wget
  69. rsync
  70. # File system tools
  71. btrfs-progs
  72. xfsprogs
  73. smartmontools
  74. hdparm
  75. # # Container tools
  76. # docker-compose
  77. # Monitoring
  78. lm_sensors
  79. nvme-cli
  80. ];
  81. # System identification
  82. networking.hostName = "odin";
  83. networking.useDHCP = lib.mkDefault true;
  84. # Time synchronization
  85. services.timesyncd.enable = true;
  86. time.timeZone = "Europe/Vienna";
  87. # System state version
  88. system.stateVersion = "25.05";
  89. }