Guest User

Nixos configuration

a guest
Nov 12th, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ];
  12.  
  13. # Bootloader.
  14. boot.loader.systemd-boot.enable = false;
  15. boot.loader.efi.canTouchEfiVariables = true;
  16. boot.loader.grub.enable = true;
  17. boot.loader.grub.devices = [ "nodev" ];
  18. boot.loader.grub.efiSupport = true;
  19. boot.loader.grub.useOSProber = false;
  20.  
  21.  
  22.  
  23. networking.hostName = "nixos"; # Define your hostname.
  24. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  25.  
  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.  
  30. # Enable networking
  31. networking.networkmanager.enable = true;
  32.  
  33. # Set your time zone.
  34. time.timeZone = "Asia/Kolkata";
  35.  
  36. # Select internationalisation properties.
  37. i18n.defaultLocale = "en_IN";
  38.  
  39. i18n.extraLocaleSettings = {
  40. LC_ADDRESS = "en_IN";
  41. LC_IDENTIFICATION = "en_IN";
  42. LC_MEASUREMENT = "en_IN";
  43. LC_MONETARY = "en_IN";
  44. LC_NAME = "en_IN";
  45. LC_NUMERIC = "en_IN";
  46. LC_PAPER = "en_IN";
  47. LC_TELEPHONE = "en_IN";
  48. LC_TIME = "en_IN";
  49. };
  50.  
  51. # Enable the X11 windowing system.
  52. services.xserver.enable = true;
  53.  
  54.  
  55. # Enable the Cinnamon Desktop Environment.
  56. services.xserver.displayManager.lightdm.enable = true;
  57. services.xserver.desktopManager.cinnamon.enable = true;
  58.  
  59.  
  60.  
  61.  
  62. # Configure keymap in X11
  63. services.xserver.xkb = {
  64. layout = "us";
  65. variant = "";
  66. };
  67.  
  68. # Enable CUPS to print documents.
  69. services.printing.enable = true;
  70.  
  71. # Enable sound with pipewire.
  72. hardware.pulseaudio.enable = false;
  73. security.rtkit.enable = true;
  74. services.pipewire = {
  75. enable = true;
  76. alsa.enable = true;
  77. alsa.support32Bit = true;
  78. pulse.enable = true;
  79. # If you want to use JACK applications, uncomment this
  80. #jack.enable = true;
  81.  
  82. # use the example session manager (no others are packaged yet so this is enabled by default,
  83. # no need to redefine it in your config for now)
  84. #media-session.enable = true;
  85. };
  86.  
  87. # Enable touchpad support (enabled default in most desktopManager).
  88. # services.xserver.libinput.enable = true;
  89.  
  90. # Define a user account. Don't forget to set a password with ‘passwd’.
  91. users.users.harshit = {
  92. isNormalUser = true;
  93. description = "Harshit";
  94. extraGroups = [ "networkmanager" "wheel" ];
  95. packages = with pkgs; [
  96. spotify
  97. thunderbird
  98. ];
  99. };
  100.  
  101. # Install firefox.
  102. programs.firefox.enable = true;
  103.  
  104. # Allow unfree packages
  105. nixpkgs.config.allowUnfree = true;
  106.  
  107. # List packages installed in system profile. To search, run:
  108. # $ nix search wget
  109. environment.systemPackages = with pkgs; [
  110. # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  111. # wget
  112. fastfetch
  113. ];
  114.  
  115. # Some programs need SUID wrappers, can be configured further or are
  116. # started in user sessions.
  117. # programs.mtr.enable = true;
  118. # programs.gnupg.agent = {
  119. # enable = true;
  120. # enableSSHSupport = true;
  121. # };
  122.  
  123. # List services that you want to enable:
  124.  
  125. # Enable the OpenSSH daemon.
  126. # services.openssh.enable = true;
  127.  
  128. # Open ports in the firewall.
  129. # networking.firewall.allowedTCPPorts = [ ... ];
  130. # networking.firewall.allowedUDPPorts = [ ... ];
  131. # Or disable the firewall altogether.
  132. # networking.firewall.enable = false;
  133.  
  134. # This value determines the NixOS release from which the default
  135. # settings for stateful data, like file locations and database versions
  136. # on your system were taken. It‘s perfectly fine and recommended to leave
  137. # this value at the release version of the first install of this system.
  138. # Before changing this value read the documentation for this option
  139. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  140. system.stateVersion = "24.05"; # Did you read the comment?
  141.  
  142. }
Add Comment
Please, Sign In to add comment