configuration.nix (4000B)
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 [ 10 # Include the results of the hardware scan. 11 ./hardware-configuration.nix 12 ]; 13 14 nix = { 15 package = pkgs.nixUnstable; 16 extraOptions = '' 17 experimental-features = nix-command flakes 18 ''; 19 }; 20 21 documentation.nixos.enable = false; 22 23 # Use the GRUB 2 boot loader. 24 boot.loader.grub.enable = true; 25 boot.loader.grub.version = 2; 26 boot.loader.grub.configurationLimit = 50; 27 # boot.loader.grub.efiSupport = true; 28 # boot.loader.grub.efiInstallAsRemovable = true; 29 # boot.loader.efi.efiSysMountPoint = "/boot/efi"; 30 # Define on which hard drive you want to install Grub. 31 boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only 32 33 networking.hostName = "laptop"; # Define your hostname. 34 #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 35 networking.networkmanager.enable = true; 36 37 # Set your time zone. 38 time.timeZone = "Australia/Brisbane"; 39 40 # The global useDHCP flag is deprecated, therefore explicitly set to false here. 41 # Per-interface useDHCP will be mandatory in the future, so this generated config 42 # replicates the default behaviour. 43 networking.useDHCP = false; 44 networking.interfaces.enp7s0.useDHCP = true; 45 networking.interfaces.wlp6s0.useDHCP = true; 46 47 # Configure network proxy if necessary 48 # networking.proxy.default = "http://user:password@proxy:port/"; 49 # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 50 51 # Select internationalisation properties. 52 # i18n.defaultLocale = "en_US.UTF-8"; 53 # console = { 54 # font = "Lat2-Terminus16"; 55 # keyMap = "us"; 56 # }; 57 58 # Enable the X11 windowing system. 59 services.xserver.enable = true; 60 services.xserver.libinput.enable = true; 61 services.xserver.videoDrivers = [ "modesetting" ]; 62 services.xserver.useGlamor = true; 63 services.xserver.displayManager.startx.enable = true; 64 65 # Configure keymap in X11 66 # services.xserver.layout = "us"; 67 # services.xserver.xkbOptions = "eurosign:e"; 68 69 # Enable CUPS to print documents. 70 # services.printing.enable = true; 71 72 # Enable sound. 73 sound.enable = true; 74 hardware.pulseaudio.enable = true; 75 76 # Enable zsh 77 programs.zsh.enable = true; 78 79 # Define a user account. Don't forget to set a password with ‘passwd’. 80 users.users.benjamin = { 81 isNormalUser = true; 82 shell = pkgs.zsh; 83 extraGroups = [ "audio" "networkmanager" "usb" "user" "video" "wheel" ]; # Enable ‘sudo’ for the user. 84 }; 85 users.users.root.initialHashedPassword = ""; 86 87 # List packages installed in system profile. To search, run: 88 # $ nix search wget 89 environment.systemPackages = with pkgs; [ 90 zsh 91 bspwm 92 sxhkd 93 ]; 94 95 services.dbus.packages = with pkgs; [ dconf ]; 96 97 # Some programs need SUID wrappers, can be configured further or are 98 # started in user sessions. 99 # programs.mtr.enable = true; 100 # programs.gnupg.agent = { 101 # enable = true; 102 # enableSSHSupport = true; 103 # }; 104 105 # List services that you want to enable: 106 107 # Enable the OpenSSH daemon. 108 # services.openssh.enable = true; 109 110 # Open ports in the firewall. 111 # networking.firewall.allowedTCPPorts = [ ... ]; 112 # networking.firewall.allowedUDPPorts = [ ... ]; 113 # Or disable the firewall altogether. 114 # networking.firewall.enable = false; 115 116 # This value determines the NixOS release from which the default 117 # settings for stateful data, like file locations and database versions 118 # on your system were taken. It‘s perfectly fine and recommended to leave 119 # this value at the release version of the first install of this system. 120 # Before changing this value read the documentation for this option 121 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 122 system.stateVersion = "20.09"; # Did you read the comment? 123 124 } 125