configurations of hq services
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

configuration.nix 4.5KB

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