1
0

default.nix 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. users.groups.keys = { };
  20. # Services configuration
  21. services = {
  22. openssh = {
  23. enable = true;
  24. openFirewall = true;
  25. settings = {
  26. PasswordAuthentication = false;
  27. PermitRootLogin = "no";
  28. X11Forwarding = false;
  29. };
  30. };
  31. nullmailer = {
  32. enable = true;
  33. setSendmail = true;
  34. remotesFile = config.age.secrets."odin/services/nullmailer".path;
  35. config = {
  36. me = "odin.t5.st";
  37. defaulthost = "odin.t5.st";
  38. defaultdomain = "odin.t5.st";
  39. allmailfrom = "[email protected]";
  40. adminaddr = "[email protected]";
  41. };
  42. };
  43. };
  44. systemd.tmpfiles.rules = [
  45. # Format: type path mode user group age argument
  46. "z /etc/ssh/ssh_host_rsa_key 0640 root keys - -"
  47. "z /etc/ssh/ssh_host_ed25519_key 0640 root keys - -"
  48. ];
  49. programs.fish = {
  50. enable = true;
  51. vendor = {
  52. completions.enable = true;
  53. config.enable = true;
  54. functions.enable = true;
  55. };
  56. };
  57. environment.shells = [
  58. config.programs.fish.package
  59. ];
  60. # System packages
  61. # nixos-container create grist --flake .#grist --host-address "192.168.1.1" --local-address
  62. environment.systemPackages = with pkgs; [
  63. # System utilities
  64. git
  65. htop
  66. btop
  67. iotop
  68. powertop
  69. lsof
  70. pciutils
  71. usbutils
  72. # Network tools
  73. curl
  74. wget
  75. rsync
  76. # File system tools
  77. btrfs-progs
  78. xfsprogs
  79. smartmontools
  80. hdparm
  81. # # Container tools
  82. # docker-compose
  83. # Monitoring
  84. lm_sensors
  85. nvme-cli
  86. ];
  87. # System identification
  88. networking.hostName = "odin";
  89. networking.useDHCP = lib.mkDefault true;
  90. # Time synchronization
  91. services.timesyncd.enable = true;
  92. time.timeZone = "Europe/Vienna";
  93. # System state version
  94. system.stateVersion = "25.05";
  95. }