Guest User

config.nix/znc.nix

a guest
Aug 22nd, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.48 KB | None | 0 0
  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.  
  5. { config, pkgs, ... }:
  6.  
  7. {
  8. imports =
  9. [ # Include the results of the hardware scan.
  10. ./hardware-configuration.nix
  11. ./znc.nix
  12. ];
  13.  
  14. # Use the GRUB 2 boot loader.
  15. # boot.loader.grub.enable = true;
  16. # boot.loader.grub.version = 2;
  17. boot.loader.systemd-boot.enable = true;
  18. boot.loader.efi.canTouchEfiVariables = true;
  19. # boot.loader.grub.useOSProber = true;
  20. # boot.loader.grub.efiSupport = true;
  21. # boot.loader.grub.efiInstallAsRemovable = true;
  22. # boot.loader.efi.efiSysMountPoint = "/boot/efi";
  23. # Define on which hard drive you want to install Grub.
  24. # boot.loader.grub.device = "/dev/nvme0n1p5"; # or "nodev" for efi
  25. #only
  26.  
  27. # networking.hostName = "nixos"; # Define your hostname.
  28. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  29. networking.networkmanager.enable = true;
  30. networking.defaultMailServer.directDelivery = true;
  31. networking.defaultMailServer.hostName = "smtp.gmail.com";
  32. networking.defaultMailServer.useSTARTTLS = true;
  33.  
  34. # Configure network proxy if necessary
  35. # networking.proxy.default = "http://user:password@proxy:port/";
  36. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  37.  
  38. # Select internationalisation properties.
  39. # i18n = {
  40. # consoleFont = "Lat2-Terminus16";
  41. # consoleKeyMap = "us";
  42. # defaultLocale = "en_US.UTF-8";
  43. # };
  44.  
  45. # Set your time zone.
  46. time.timeZone = "Asia/Kolkata";
  47.  
  48. # List packages installed in system profile. To search, run:
  49. # $ nix search wget
  50. environment.systemPackages = with pkgs; [
  51. wget vim git google-authenticator zsh postman
  52. ];
  53.  
  54. # Allow unfree packages
  55. nixpkgs.config.allowUnfree = true;
  56.  
  57. # Allow packages overlay
  58. # nixpkgs.overlays = [
  59. # (import self: super: {
  60. # postman = super.postman.overrideAttrs (old: rec {
  61. # name = "postman-${version}";
  62. # version = "7.5.0";
  63.  
  64. # src = self.fetchurl {
  65. # name = "${name}.tar.gz";
  66. # url = "https://dl.pstmn.io/download/version/${version}/linux64";
  67. # sha256 = "1g1lg3pba1gqkfj7s4s50qyzl0j7i1wk4fsgwmk6rzmy714bwgg0";
  68. # };
  69. #});
  70. #}) ];
  71.  
  72.  
  73. # Some programs need SUID wrappers, can be configured further or are
  74. # started in user sessions.
  75. programs.mtr.enable = true;
  76. # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
  77.  
  78.  
  79. # List services that you want to enable:
  80.  
  81. # Enable the OpenSSH daemon.
  82. services.openssh.enable = true;
  83.  
  84. # Open ports in the firewall.
  85. # networking.firewall.allowedTCPPorts = [ ... ];
  86. # networking.firewall.allowedUDPPorts = [ ... ];
  87. # Or disable the firewall altogether.
  88. # networking.firewall.enable = false;
  89.  
  90. networking.extraHosts = "13.228.237.116 api.k8s.staging.juspay.net";
  91.  
  92. #Enable IRC Bouncer
  93. services.znc.enable = true;
  94.  
  95. # Enable CUPS to print documents.
  96. # services.printing.enable = true;
  97.  
  98. # Enable sound.
  99. sound.enable = true;
  100. hardware.pulseaudio = {
  101. enable = true;
  102. extraModules = [ pkgs.pulseaudio-modules-bt ];
  103. package = pkgs.pulseaudioFull;
  104. };
  105. hardware.bluetooth.enable = true;
  106. hardware.bluetooth.extraConfig = "
  107. [General]
  108. Enable=Source,Sink,Media,Socket
  109. ";
  110.  
  111. # Enable the X11 windowing system.
  112. services.xserver.enable = true;
  113. services.xserver.layout = "us";
  114. services.xserver.dpi = 100;
  115. fonts.fontconfig.dpi = 100;
  116. services.xserver.videoDrivers = ["nvidia"];
  117. hardware.nvidia.optimus_prime.enable = true;
  118. hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:1:0:0";
  119. hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
  120. hardware.nvidia.modesetting.enable = true;
  121. hardware.opengl.enable = true;
  122. hardware.opengl.driSupport32Bit = true;
  123. # services.xserver.xkbOptions = "eurosign:e";
  124.  
  125. # Enable touchpad support.
  126. services.xserver.libinput.enable = true;
  127.  
  128. # Enable the KDE Desktop Environment.
  129. services.xserver.displayManager.sddm.enable = true;
  130. services.xserver.desktopManager.plasma5.enable = true;
  131. services.xserver.windowManager.i3.enable = true;
  132.  
  133. # Enable WeeChat
  134. services.weechat.enable = true;
  135.  
  136. # Define a user account. Don't forget to set a password with ‘passwd’.
  137. users.users.chr15 = {
  138. isNormalUser = true;
  139. extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
  140. };
  141.  
  142. # Enabling PAM for Google Authenticator
  143. security.pam.services.gdm.googleAuthenticator.enable = true;
  144.  
  145.  
  146. #users.users.chr15.shell = {
  147. programs.zsh.enable = true;
  148. #};
  149.  
  150. programs.zsh.ohMyZsh = {
  151. enable = true;
  152. plugins = [ "git" "sudo" "docker" "kubectl" ];
  153. theme = "robbyrussell";
  154. };
  155.  
  156. # This value determines the NixOS release with which your system is to be
  157. # compatible, in order to avoid breaking some software such as database
  158. # servers. You should change this only after NixOS release notes say you
  159. # should.
  160. system.stateVersion = "19.03";
  161.  
  162. }
  163.  
  164. -----------------------------------------------------------------------------------------------------
  165. # znc.nix file
  166.  
  167. services.znc = {
  168. enable = true;
  169. mutable = false;
  170. dataDir = "/home/znc/.znc";
  171. openFirewall = true;
  172. useLegacyConfig = false;
  173. config = {
  174. SSLCertFile = "/home/znc/.znc/znc.pem";
  175. Listener.l = {
  176. Port = 6697;
  177. AllowIRC = true;
  178. AllowWeb = false;
  179. IPv4 = true;
  180. IPv6 = true;
  181. SSL = true;
  182. };
  183.  
  184. User.Zer0xp = {
  185. Admin = true;
  186. Allow = "*";
  187. AltNick = "Zer0xp_";
  188. AppendTimestamp = true;
  189. AutoClearChanBuffer = false;
  190. AutoClearQueryBuffer = false;
  191. Buffer = 500;
  192. ChanModes = "+stn";
  193. DenyLoadMod = false;
  194. DenySetBindHost = false;
  195. Ident = "Zer0xp";
  196. JoinTries = 10;
  197. LoadModule = [ "chansaver"
  198. "controlpanel"
  199. "cert"
  200. "clearbufferonmsg"
  201. ];
  202. MaxJoins = 0;
  203. MaxNetworks = 0;
  204. MaxQueryBuffers = 0;
  205. MultiClients = true;
  206. Nick = "Zer0xp";
  207. NoTrafficTimeout = 120;
  208. PrependTimestamp = true;
  209. QuitMsg = "Bye!";
  210. RealName = "Zer0xp";
  211. StatusPrefix = "*";
  212. TimestampFormat = "[%H:%M:%S]";
  213. TimeZone = "Asia/Kolkata";
  214.  
  215. Network.freenode = {
  216. IRCConnectEnabled = true;
  217. JoinDelay = 0;
  218. LoadModule = [ "simple_away"
  219. "watch"
  220. "sasl"
  221. "cert"
  222. ];
  223. Server = "chat.freenode.net +6697";
  224. Chan = {
  225. "#nixos" = { Disabled = false; };
  226. "#haskell" = { Disabled = false; };
  227. "#linux" = { Disabled = false; };
  228. "#haskell-blah" = { Disabled = false; };
  229. "#haskell-offtopic" = { Disabled = false; };
  230. "#haskell-beginners" = { Disabled = false; };
  231. };
  232. };
  233.  
  234. Pass.password = {
  235. Hash = "removed";
  236. Method = "SHA256";
  237. Salt = "removed";
  238. };
  239. };
  240. };
  241. };
Add Comment
Please, Sign In to add comment