DerekGraham78

configuration.nix

Dec 26th, 2023 (edited)
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.68 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. { config, pkgs, ... }:
  5.  
  6. {
  7. imports =
  8. [ # Include the results of the hardware scan.
  9. ./hardware-configuration.nix
  10. # inputs.home-manager.nixosModules.home-manager
  11. # <home-manager/nixos>
  12. ];
  13. # Home Manager
  14. users.users.dgraham.isNormalUser = true;
  15. #home-manager.users.dgraham = { pkgs, ... }: {
  16. # home.packages = [ pkgs.atool pkgs.httpie pkgs.oh-my-zsh ];
  17. # The state version is required and should stay at the version you
  18. # originally installed.
  19. # home.stateVersion = "23.11";
  20. #};
  21. users.defaultUserShell = pkgs.zsh;
  22.  
  23. programs.zsh.enable = true;
  24. programs.zsh = {
  25. # Your zsh config
  26. ohMyZsh = {
  27. enable = true;
  28. plugins = [ "git" "python" "man" "1password" ];
  29. theme = "agnoster";
  30. };
  31. };
  32. nix.settings.experimental-features = [ "nix-command" "flakes" ];
  33. # Bootloader.
  34. boot.loader.systemd-boot.enable = true;
  35. boot.loader.efi.canTouchEfiVariables = true;
  36. boot.kernelPackages = pkgs.linuxPackages_zen;
  37. boot.kernelParams = [ "reboot=acpi" "coretemp" ];
  38. systemd.watchdog.rebootTime = "15s";
  39. networking.hostName = "Mulder"; # Define your hostname.
  40. #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  41. # Printer
  42. services.printing.drivers = [pkgs.brlaser ];
  43. services.dbus.packages = with pkgs; [
  44. xfce.xfconf
  45. ];
  46. # Configure network proxy if necessary
  47. # networking.proxy.default = "http://user:password@proxy:port/";
  48. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  49. virtualisation.docker.enable = true;
  50. # Enable networking
  51. networking.networkmanager.enable = true;
  52.  
  53. # Set your time zone.
  54. time.timeZone = "America/Chicago";
  55.  
  56. # Select internationalisation properties.
  57. i18n.defaultLocale = "en_US.UTF-8";
  58.  
  59. i18n.extraLocaleSettings = {
  60. LC_ADDRESS = "en_US.UTF-8";
  61. LC_IDENTIFICATION = "en_US.UTF-8";
  62. LC_MEASUREMENT = "en_US.UTF-8";
  63. LC_MONETARY = "en_US.UTF-8";
  64. LC_NAME = "en_US.UTF-8";
  65. LC_NUMERIC = "en_US.UTF-8";
  66. LC_PAPER = "en_US.UTF-8";
  67. LC_TELEPHONE = "en_US.UTF-8";
  68. LC_TIME = "en_US.UTF-8";
  69. };
  70. services.xserver.desktopManager.plasma6.enable = true;
  71. # Enable the X11 windowing system.
  72. services.xserver.enable = true;
  73. services.flatpak.enable = true;
  74. xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
  75. xdg.portal.config.common.default = "gtk";
  76. # Enable the KDE Plasma Desktop Environment.
  77. services.xserver.displayManager.sddm.enable = true;
  78.  
  79. # Configure keymap in X11
  80. services.xserver = {
  81. layout = "us";
  82. xkbVariant = "";
  83. };
  84.  
  85. # Enable CUPS to print documents.
  86. services.printing.enable = true;
  87. services.fwupd.enable = true;
  88. services.avahi = {
  89. enable = true;
  90. nssmdns = true;
  91. openFirewall = true;
  92. };
  93. nixpkgs.config.permittedInsecurePackages = [
  94. "python-2.7.18.7"
  95. ];
  96. # Enable sound with pipewire.
  97. sound.enable = true;
  98. hardware.pulseaudio.package = pkgs.pulseaudioFull;
  99. hardware.pulseaudio.enable = true;
  100. hardware.pulseaudio.extraConfig = "load-module module-equalizer-sink";
  101. nixpkgs.config.pulseaudio = true;
  102. programs.dconf.enable = true;
  103. security.rtkit.enable = true;
  104. services.pipewire = {
  105. enable = false;
  106. alsa.enable = true;
  107. alsa.support32Bit = true;
  108. pulse.enable = true;
  109. # If you want to use JACK applications, uncomment this
  110. jack.enable = true;
  111. # use the example session manager (no others are packaged yet so this is enabled by default,
  112. # no need to redefine it in your config for now)
  113. };
  114.  
  115. # Enable touchpad support (enabled default in most desktopManager).
  116. services.xserver.libinput.enable = true;
  117. # hardware.opengl = {
  118. # enable = true;
  119. # Enable 32-bit dri support for steam
  120. # driSupport32Bit = true;
  121. # extraPackages32 = with pkgs.intel-vaapi-driver; [ ];
  122. # setLdLibraryPath = true;
  123. # };
  124.  
  125. #hardware.opengl.enable = true;
  126. #hardware.opengl.setLdLibraryPath = true;
  127. #hardware.opengl.driSupport = true;
  128. #hardware.opengl.extraPackages = [ intel-vaapi-driver ];
  129. #hardware.opengl.driSupport32Bit = true;
  130. #hardware.opengl.extraPackages32 = [ intel-vaapi-driver ];
  131.  
  132. # Define a user account. Don't forget to set a password with ‘passwd’.
  133.  
  134.  
  135. users.users.dgraham = {
  136. # isNormalUser = true;
  137. description = "Derek Graham";
  138. extraGroups = [ "networkmanager" "rslsync" "docker" "wheel" "video" ];
  139. packages = with pkgs; [
  140. #firefox
  141. kate
  142. #thunderbird
  143. ];
  144. };
  145. # Auto Upgrade
  146. system.autoUpgrade = {
  147. enable = true;
  148. flake = "/etc/nixos#papalpenguin";
  149. flags = [
  150. "--update-input"
  151. "nixpkgs"
  152. "-L" # print build logs
  153. ];
  154. dates = "02:00";
  155. randomizedDelaySec = "45min";
  156. };
  157. # system.autoUpgrade.allowReboot = true;
  158.  
  159. # Enable automatic login for the user.
  160. services.xserver.displayManager.autoLogin.enable = true;
  161. services.xserver.displayManager.autoLogin.user = "dgraham";
  162. services.xserver.displayManager.defaultSession = "plasma";
  163. # Allow unfree packages
  164. nixpkgs.config.allowUnfree = true;
  165.  
  166. # List packages installed in system profile. To search, run:
  167. # $ nix search wget
  168. environment.systemPackages = with pkgs; [
  169. # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  170. git
  171. neofetch
  172. xwayland
  173. inxi
  174. # Install Helix from the `helix` input
  175. # helix.packages."${pkgs.system}".helix
  176. ];
  177. # Some programs need SUID wrappers, can be configured further or are
  178. # started in user sessions.
  179. programs.mtr.enable = true;
  180. programs.gnupg.agent = {
  181. enable = true;
  182. #enableSSHSupport = true;
  183. };
  184.  
  185. # List services that you want to enable:
  186. #services.httpd.enable = true;
  187.  
  188. # Enable the OpenSSH daemon.
  189. services.openssh.enable = true;
  190. services.teamviewer.enable = true;
  191. # Open ports in the firewall.
  192. #networking.firewall.allowedTCPPorts = [ 8581 ];
  193. #networking.firewall.allowedUDPPorts = [ 8581 ];
  194. # Or disable the firewall altogether.
  195. networking.firewall.enable = false;
  196.  
  197. # This value determines the NixOS release from which the default
  198. # settings for stateful data, like file locations and database versions
  199. # on your system were taken. It‘s perfectly fine and recommended to leave
  200. # this value at the release version of the first install of this system.
  201. # Before changing this value read the documentation for this option
  202. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  203.  
  204. system.stateVersion = "23.11"; # Did you read the comment?
  205. }
  206.  
Add Comment
Please, Sign In to add comment