configurations of hq services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configuration.nix 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. { config, pkgs, ... }:
  2. {
  3. imports = [ ./hardware-configuration.nix ../../lib ];
  4. c3d2 = {
  5. users.k-ot = true;
  6. isInHq = true;
  7. hq.interface = "enp0s10";
  8. enableHail = true;
  9. };
  10. nixpkgs.config.allowUnfree = true;
  11. nix = {
  12. useSandbox = true;
  13. buildCores = 2;
  14. };
  15. # Use the systemd-boot EFI boot loader.
  16. boot.loader.systemd-boot.enable = true;
  17. boot.loader.efi.canTouchEfiVariables = true;
  18. boot.kernelPackages = pkgs.linuxPackages_4_19;
  19. networking.hostName = "glotzbert"; # Define your hostname.
  20. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  21. # Configure network proxy if necessary
  22. # networking.proxy.default = "http://user:password@proxy:port/";
  23. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  24. # Select internationalisation properties.
  25. i18n = {
  26. consoleFont = "Lat2-Terminus16";
  27. consoleKeyMap = "de";
  28. defaultLocale = "en_US.UTF-8";
  29. };
  30. # Set your time zone.
  31. time.timeZone = "Europe/Berlin";
  32. # List packages installed in system profile. To search, run:
  33. # $ nix search wget
  34. environment.systemPackages = with pkgs; [ wget vim x11vnc ];
  35. systemd.user.services.x11vnc = {
  36. description = "X11 VNC server";
  37. wantedBy = [ "graphical-session.target" ];
  38. partOf = [ "graphical-session.target" ];
  39. serviceConfig = {
  40. ExecStart = ''
  41. ${pkgs.x11vnc}/bin/x11vnc -shared -forever -passwd k-ot
  42. '';
  43. RestartSec = 3;
  44. Restart = "always";
  45. };
  46. };
  47. # Some programs need SUID wrappers, can be configured further or are
  48. # started in user sessions.
  49. # programs.mtr.enable = true;
  50. # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
  51. # List services that you want to enable:
  52. # Enable the OpenSSH daemon.
  53. services.openssh.enable = true;
  54. # Open ports in the firewall.
  55. # networking.firewall.allowedTCPPorts = [ ... ];
  56. # networking.firewall.allowedUDPPorts = [ ... ];
  57. # Or disable the firewall altogether.
  58. networking.firewall.enable = false;
  59. # Enable CUPS to print documents.
  60. # services.printing.enable = true;
  61. # Enable sound.
  62. sound.enable = true;
  63. hardware.pulseaudio = {
  64. enable = true;
  65. # Users must be in "audio" group
  66. systemWide = true;
  67. support32Bit = true;
  68. zeroconf.discovery.enable = true;
  69. zeroconf.publish.enable = true;
  70. tcp = {
  71. enable = true;
  72. anonymousClients.allowAll = true;
  73. };
  74. extraConfig = ''
  75. load-module module-tunnel-sink server=pulsebert.hq.c3d2.de
  76. '';
  77. extraClientConf = ''
  78. default-server = pulsebert.hq.c3d2.de
  79. '';
  80. };
  81. # Enable the X11 windowing system.
  82. services.xserver.enable = true;
  83. services.xserver.layout = "de";
  84. services.xserver.xkbOptions = "eurosign:e";
  85. services.xserver.displayManager = {
  86. lightdm = {
  87. enable = true;
  88. autoLogin = {
  89. enable = true;
  90. user = "k-ot";
  91. };
  92. };
  93. };
  94. services.xserver.desktopManager = {
  95. gnome3.enable = true;
  96. kodi.enable = true;
  97. default = "kodi";
  98. };
  99. security.sudo = {
  100. enable = true;
  101. wheelNeedsPassword = false;
  102. };
  103. # Define a user account. Don't forget to set a password with ‘passwd’.
  104. users.groups."k-ot" = { gid = 1000; };
  105. users.users."k-ot" = {
  106. password = "k-ot";
  107. isNormalUser = true;
  108. uid = 1000;
  109. group = "k-ot";
  110. extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
  111. openssh.authorizedKeys.keys = [
  112. "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGJJTSJdpDh82486uPiMhhyhnci4tScp5uUe7156MBC8 astro"
  113. ];
  114. };
  115. # This value determines the NixOS release with which your system is to be
  116. # compatible, in order to avoid breaking some software such as database
  117. # servers. You should change this only after NixOS release notes say you
  118. # should.
  119. system.stateVersion = "18.09"; # Did you read the comment?
  120. }