configurations of hq services
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. # Edit this configuration file to define what should be installed on
  2. # your system. Help is available in the configuration.nix(5) man page
  3. # and in the NixOS manual (accessible by running ‘nixos-help’).
  4. { config, pkgs, ... }:
  5. {
  6. imports =
  7. [ # Include the results of the hardware scan.
  8. <this-host/hardware-configuration.nix>
  9. ];
  10. boot.loader.grub.enable = false;
  11. boot.loader.generic-extlinux-compatible.enable = false;
  12. boot.loader.raspberryPi = { enable = true; version = 4; uboot.enable = false; };
  13. #boot.kernelPackages = pkgs.linuxPackages_rpi4;
  14. boot.kernelPackages = pkgs.linuxPackages_latest;
  15. boot.tmpOnTmpfs = true;
  16. nix.buildCores = 4;
  17. nix.maxJobs = 4;
  18. networking.hostName = "pulsebert"; # Define your hostname.
  19. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  20. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  21. # Per-interface useDHCP will be mandatory in the future, so this generated config
  22. # replicates the default behaviour.
  23. networking.useDHCP = false;
  24. networking.interfaces.eth0.useDHCP = true;
  25. networking.interfaces.wlan0.useDHCP = true;
  26. # Configure network proxy if necessary
  27. # networking.proxy.default = "http://user:password@proxy:port/";
  28. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  29. # Select internationalisation properties.
  30. # i18n.defaultLocale = "en_US.UTF-8";
  31. # console = {
  32. # font = "Lat2-Terminus16";
  33. # keyMap = "us";
  34. # };
  35. # Set your time zone.
  36. # time.timeZone = "Europe/Amsterdam";
  37. # List packages installed in system profile. To search, run:
  38. # $ nix search wget
  39. environment.systemPackages = with pkgs; [
  40. wget vim git
  41. raspberrypi-tools
  42. ];
  43. # Some programs need SUID wrappers, can be configured further or are
  44. # started in user sessions.
  45. # programs.mtr.enable = true;
  46. # programs.gnupg.agent = {
  47. # enable = true;
  48. # enableSSHSupport = true;
  49. # pinentryFlavor = "gnome3";
  50. # };
  51. # List services that you want to enable:
  52. # Do not log to flash:
  53. services.journald.extraConfig = ''
  54. Storage=volatile
  55. '';
  56. # Enable the OpenSSH daemon.
  57. services.openssh.enable = true;
  58. services.openssh.permitRootLogin = "yes";
  59. security.sudo = {
  60. enable = true;
  61. wheelNeedsPassword = false;
  62. };
  63. users.users.k-ot = {
  64. isNormalUser = true;
  65. extraGroups = [ "wheel" ];
  66. };
  67. # Open ports in the firewall.
  68. # networking.firewall.allowedTCPPorts = [ ... ];
  69. # networking.firewall.allowedUDPPorts = [ ... ];
  70. # Or disable the firewall altogether.
  71. networking.firewall.enable = false;
  72. # Enable CUPS to print documents.
  73. # services.printing.enable = true;
  74. # Enable sound.
  75. sound.enable = true;
  76. hardware.bluetooth = {
  77. enable = true;
  78. config = {
  79. Policy.AutoEnable = true;
  80. General = {
  81. Enable = "Source,Sink,Media,Socket";
  82. #DiscoverableTimeout = 0;
  83. #Discoverable = true;
  84. };
  85. };
  86. };
  87. hardware.pulseaudio = {
  88. enable = true;
  89. systemWide = true;
  90. tcp.enable = true;
  91. tcp.anonymousClients.allowedIpRanges = [
  92. "127.0.0.0/8" "::1/128"
  93. "172.22.99.0/24" "2a02:8106:208:5201:58::/64"
  94. ];
  95. zeroconf.publish.enable = true;
  96. package = pkgs.pulseaudioFull;
  97. extraModules = [ pkgs.pulseaudio-modules-bt ];
  98. };
  99. # tell Avahi to publish CUPS and PulseAudio
  100. services.avahi = {
  101. enable = true;
  102. publish.enable = true;
  103. publish.userServices = true;
  104. };
  105. # Enable the X11 windowing system.
  106. # services.xserver.enable = true;
  107. # services.xserver.layout = "us";
  108. # services.xserver.xkbOptions = "eurosign:e";
  109. # Enable touchpad support.
  110. # services.xserver.libinput.enable = true;
  111. # Enable the KDE Desktop Environment.
  112. # services.xserver.displayManager.sddm.enable = true;
  113. # services.xserver.desktopManager.plasma5.enable = true;
  114. # Define a user account. Don't forget to set a password with ‘passwd’.
  115. # users.users.jane = {
  116. # isNormalUser = true;
  117. # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
  118. # };
  119. # This value determines the NixOS release from which the default
  120. # settings for stateful data, like file locations and database versions
  121. # on your system were taken. It‘s perfectly fine and recommended to leave
  122. # this value at the release version of the first install of this system.
  123. # Before changing this value read the documentation for this option
  124. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  125. system.stateVersion = "20.09"; # Did you read the comment?
  126. }