Guest User

gdm / Nix Config

a guest
Aug 9th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.75 KB | None | 0 0
  1. --gdm file--
  2.  
  3. # Account management.
  4. account required pam_unix.so
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. # Authentication management.
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. auth required pam_unix.so likeauth
  23.  
  24.  
  25. auth optional /nix/store/wxgkd6id1jqgig5w5wh8ncrqryrzcw1w-kwallet-pam-5.15.5/lib/security/pam_kwallet5.so kwalletd=/nix/store/wkiqkxxizlsmhl8wfsaqi7qwk78w8hz0-kwallet-5.58.0-bin/bin/kwalletd5
  26.  
  27. auth required /nix/store/w9cmv2h92y8ksl86mskfdgfizsa0r0sb-google-authenticator-libpam-1.06/lib/security/pam_google_authenticator.so no_increment_hotp
  28.  
  29. auth sufficient pam_unix.so likeauth try_first_pass
  30.  
  31.  
  32.  
  33.  
  34. auth required pam_deny.so
  35.  
  36. # Password management.
  37. password sufficient pam_unix.so nullok sha512
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46. # Session management.
  47. session required pam_env.so envfile=/nix/store/3bnzlhr9wwmrg9yc40kzansnxb83dada-pam-environment
  48.  
  49. session required pam_unix.so
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. session optional /nix/store/wxgkd6id1jqgig5w5wh8ncrqryrzcw1w-kwallet-pam-5.15.5/lib/security/pam_kwallet5.so kwalletd=/nix/store/wkiqkxxizlsmhl8wfsaqi7qwk78w8hz0-kwallet-5.58.0-bin/bin/kwalletd5
  65.  
  66.  
  67. ----------------------------------------------------------------------------------------------------------------------------
  68.  
  69. --configuration.nix file--
  70.  
  71. # Edit this configuration file to define what should be installed on
  72. # your system. Help is available in the configuration.nix(5) man page
  73. # and in the NixOS manual (accessible by running ‘nixos-help’).
  74.  
  75. { config, pkgs, ... }:
  76.  
  77. {
  78. imports =
  79. [ # Include the results of the hardware scan.
  80. ./hardware-configuration.nix
  81. ];
  82.  
  83. # Use the GRUB 2 boot loader.
  84. # boot.loader.grub.enable = true;
  85. # boot.loader.grub.version = 2;
  86. boot.loader.systemd-boot.enable = true;
  87. boot.loader.efi.canTouchEfiVariables = true;
  88. # boot.loader.grub.useOSProber = true;
  89. # boot.loader.grub.efiSupport = true;
  90. # boot.loader.grub.efiInstallAsRemovable = true;
  91. # boot.loader.efi.efiSysMountPoint = "/boot/efi";
  92. # Define on which hard drive you want to install Grub.
  93. # boot.loader.grub.device = "/dev/nvme0n1p5"; # or "nodev" for efi
  94. #only
  95.  
  96. # networking.hostName = "nixos"; # Define your hostname.
  97. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  98. networking.networkmanager.enable = true;
  99. networking.defaultMailServer.directDelivery = true;
  100. networking.defaultMailServer.hostName = "smtp.gmail.com";
  101. networking.defaultMailServer.useSTARTTLS = true;
  102.  
  103. # Configure network proxy if necessary
  104. # networking.proxy.default = "http://user:password@proxy:port/";
  105. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  106.  
  107. # Select internationalisation properties.
  108. # i18n = {
  109. # consoleFont = "Lat2-Terminus16";
  110. # consoleKeyMap = "us";
  111. # defaultLocale = "en_US.UTF-8";
  112. # };
  113.  
  114. # Set your time zone.
  115. time.timeZone = "";
  116.  
  117. # List packages installed in system profile. To search, run:
  118. # $ nix search wget
  119. environment.systemPackages = with pkgs; [
  120. wget vim git google-authenticator zsh
  121. ];
  122.  
  123. # Allow unfree packages
  124. nixpkgs.config.allowUnfree = true;
  125.  
  126. # Some programs need SUID wrappers, can be configured further or are
  127. # started in user sessions.
  128. programs.mtr.enable = true;
  129. # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
  130.  
  131.  
  132. # List services that you want to enable:
  133.  
  134. # Enable the OpenSSH daemon.
  135. services.openssh.enable = true;
  136.  
  137. # Open ports in the firewall.
  138. # networking.firewall.allowedTCPPorts = [ ... ];
  139. # networking.firewall.allowedUDPPorts = [ ... ];
  140. # Or disable the firewall altogether.
  141. # networking.firewall.enable = false;
  142.  
  143.  
  144.  
  145. # Enable CUPS to print documents.
  146. # services.printing.enable = true;
  147.  
  148. # Enable sound.
  149. sound.enable = true;
  150. hardware.pulseaudio = {
  151. enable = true;
  152. extraModules = [ pkgs.pulseaudio-modules-bt ];
  153. package = pkgs.pulseaudioFull;
  154. };
  155. hardware.bluetooth.enable = true;
  156. hardware.bluetooth.extraConfig = "
  157. [General]
  158. Enable=Source,Sink,Media,Socket
  159. ";
  160.  
  161. # Enable the X11 windowing system.
  162. services.xserver.enable = true;
  163. services.xserver.layout = "us";
  164. services.xserver.dpi = 100;
  165. fonts.fontconfig.dpi = 100;
  166. services.xserver.videoDrivers = ["nvidia"];
  167. hardware.nvidia.optimus_prime.enable = true;
  168. hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:1:0:0";
  169. hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
  170. hardware.nvidia.modesetting.enable = true;
  171. hardware.opengl.enable = true;
  172. hardware.opengl.driSupport32Bit = true;
  173. # services.xserver.xkbOptions = "eurosign:e";
  174.  
  175. # Enable touchpad support.
  176. services.xserver.libinput.enable = true;
  177.  
  178. # Enable the KDE Desktop Environment.
  179. services.xserver.displayManager.sddm.enable = true;
  180. services.xserver.desktopManager.plasma5.enable = true;
  181. services.xserver.windowManager.i3.enable = true;
  182.  
  183. # Enable WeeChat
  184. services.weechat.enable = true;
  185.  
  186. # Define a user account. Don't forget to set a password with ‘passwd’.
  187. users.users.Zer0xp = {
  188. isNormalUser = true;
  189. extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
  190. };
  191.  
  192. # Enabling PAM for Google Authenticator
  193. security.pam.services.gdm.googleAuthenticator.enable = true;
  194.  
  195.  
  196. # Enabling ZSH
  197. programs.zsh.enable = true;
  198.  
  199.  
  200. programs.zsh.ohMyZsh = {
  201. enable = true;
  202. plugins = [ "git" "sudo" "docker" "kubectl" ];
  203. theme = "robbyrussell";
  204. };
  205.  
  206. # This value determines the NixOS release with which your system is to be
  207. # compatible, in order to avoid breaking some software such as database
  208. # servers. You should change this only after NixOS release notes say you
  209. # should.
  210. system.stateVersion = "19.03";
  211.  
  212. }
Add Comment
Please, Sign In to add comment