default.nix 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. ./system
  13. ./services
  14. ./users
  15. ]
  16. ++ (builtins.attrValues outputs.modules.nixos);
  17. security.sudo.wheelNeedsPassword = false;
  18. # Services configuration
  19. services = {
  20. openssh = {
  21. enable = true;
  22. openFirewall = true;
  23. settings = {
  24. PasswordAuthentication = false;
  25. PermitRootLogin = "no";
  26. X11Forwarding = false;
  27. };
  28. };
  29. nullmailer = {
  30. enable = true;
  31. setSendmail = true;
  32. remotesFile = config.age.secrets."odin/services/nullmailer".path;
  33. config = {
  34. me = "odin.t5.st";
  35. defaulthost = "odin.t5.st";
  36. defaultdomain = "odin.t5.st";
  37. allmailfrom = "[email protected]";
  38. adminaddr = "[email protected]";
  39. };
  40. };
  41. };
  42. # # Container runtime
  43. # virtualisation = {
  44. # docker = {
  45. # enable = true;
  46. # storageDriver = "btrfs";
  47. # autoPrune = {
  48. # enable = true;
  49. # dates = "weekly";
  50. # flags = [ "--all" "--force" "--volumes" ];
  51. # };
  52. # };
  53. # };
  54. programs.fish = {
  55. enable = true;
  56. vendor = {
  57. completions.enable = true;
  58. config.enable = true;
  59. functions.enable = true;
  60. };
  61. };
  62. environment.shells = [
  63. config.programs.fish.package
  64. ];
  65. # System packages
  66. environment.systemPackages = with pkgs; [
  67. # System utilities
  68. git
  69. htop
  70. btop
  71. iotop
  72. powertop
  73. lsof
  74. pciutils
  75. usbutils
  76. # Network tools
  77. curl
  78. wget
  79. rsync
  80. # File system tools
  81. btrfs-progs
  82. xfsprogs
  83. smartmontools
  84. hdparm
  85. # # Container tools
  86. # docker-compose
  87. # Monitoring
  88. lm_sensors
  89. nvme-cli
  90. ];
  91. # System identification
  92. networking.hostName = "odin";
  93. networking.useDHCP = lib.mkDefault true;
  94. # Time synchronization
  95. services.timesyncd.enable = true;
  96. time.timeZone = "Europe/Vienna";
  97. # System state version
  98. system.stateVersion = "25.05";
  99. }