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 4.1KB

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