Advertisement
Guest User

my nixos configuration

a guest
Dec 19th, 2020
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.88 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. ];
  12.  
  13. nixpkgs.config.allowUnfree = true;
  14.  
  15. # Use the systemd-boot EFI boot loader.
  16. boot.loader.systemd-boot.enable = true;
  17. boot.loader.efi.canTouchEfiVariables = true;
  18. boot.loader.efi.efiSysMountPoint = "/boot/efi";
  19. boot.loader.grub = {
  20. enable = true;
  21. device = "nodev";
  22. version = 2;
  23. efiSupport = true;
  24. enableCryptodisk = true;
  25. };
  26.  
  27. boot.initrd.secrets = {
  28. "keyfile.bin" = "/etc/secrets/initrd/keyfile.bin";
  29. };
  30.  
  31. boot.initrd.luks.devices = {
  32. "encrypted-root" = {
  33. name = "encrypted-root";
  34. device = "/dev/disk/by-uuid/ba525d6a-3930-4809-85bb-7b6905940e03";
  35. preLVM = true;
  36. keyFile = "/keyfile.bin";
  37. allowDiscards = true;
  38. };
  39. };
  40.  
  41. boot.initrd.availableKernelModules = [ "aes_x86_64" "aesni_intel" "cryptd" ];
  42.  
  43. users.mutableUsers = true;
  44. users.users.i = {
  45. isNormalUser = true;
  46. home = "/home/i";
  47. description = "I";
  48. extraGroups = [ "wheel" "networkmanager" "dialout" ];
  49. uid = 1000;
  50. };
  51.  
  52. # networking.hostName = "nixos"; # Define your hostname.
  53. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  54. networking.networkmanager.enable = true;
  55. boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
  56.  
  57. # Set your time zone.
  58. # time.timeZone = "Europe/Amsterdam";
  59.  
  60. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  61. # Per-interface useDHCP will be mandatory in the future, so this generated config
  62. # replicates the default behaviour.
  63. networking.useDHCP = false;
  64. networking.interfaces.eno1.useDHCP = true;
  65.  
  66. # Configure network proxy if necessary
  67. # networking.proxy.default = "http://user:password@proxy:port/";
  68. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  69.  
  70. # Select internationalisation properties.
  71. # i18n.defaultLocale = "en_US.UTF-8";
  72. # console = {
  73. # font = "Lat2-Terminus16";
  74. # keyMap = "us";
  75. # };
  76.  
  77. # Enable the GNOME 3 Desktop Environment.
  78. services.xserver.enable = true;
  79. services.xserver.displayManager.gdm.enable = true;
  80. services.xserver.desktopManager.gnome3.enable = true;
  81.  
  82.  
  83. # Configure keymap in X11
  84. # services.xserver.layout = "us";
  85. # services.xserver.xkbOptions = "eurosign:e";
  86.  
  87. # Enable CUPS to print documents.
  88. # services.printing.enable = true;
  89.  
  90. # Enable sound.
  91. # sound.enable = true;
  92. # hardware.pulseaudio.enable = true;
  93.  
  94. # Enable touchpad support (enabled default in most desktopManager).
  95. # services.xserver.libinput.enable = true;
  96.  
  97. # Define a user account. Don't forget to set a password with ‘passwd’.
  98. # users.users.jane = {
  99. # isNormalUser = true;
  100. # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
  101. # };
  102.  
  103. # List packages installed in system profile. To search, run:
  104. # $ nix search wget
  105. # environment.systemPackages = with pkgs; [
  106. # wget vim
  107. # firefox
  108. # ];
  109. environment.systemPackages = with pkgs; [
  110. # linuxPackages.broadcom_sta
  111. firefox zoom skype anydesk vscode tdesktop workrave # tor-browser-bundle-bin
  112. git vim wget curl rsync jq zbar lorri ghc stack opencv python38Packages.pip python38Packages.virtualenv
  113. astyle ccache cmake cppcheck gcc gdb lcov ninja shellcheck zip unzip # build-essential file g++ make python3*
  114. autoconf automake bison bzip2 flex gperf libtool pkg-config # gdb-multiarch libncurses-dev
  115. texstudio texlive.combined.scheme-full
  116. openscad cura qgroundcontrol tuxguitar tesseract4
  117. ];
  118.  
  119. # Some programs need SUID wrappers, can be configured further or are
  120. # started in user sessions.
  121. # programs.mtr.enable = true;
  122. # programs.gnupg.agent = {
  123. # enable = true;
  124. # enableSSHSupport = true;
  125. # };
  126.  
  127. # List services that you want to enable:
  128.  
  129. # Enable the OpenSSH daemon.
  130. # services.openssh.enable = true;
  131.  
  132. # Open ports in the firewall.
  133. # networking.firewall.allowedTCPPorts = [ ... ];
  134. # networking.firewall.allowedUDPPorts = [ ... ];
  135. # Or disable the firewall altogether.
  136. # networking.firewall.enable = false;
  137.  
  138. # This value determines the NixOS release from which the default
  139. # settings for stateful data, like file locations and database versions
  140. # on your system were taken. It‘s perfectly fine and recommended to leave
  141. # this value at the release version of the first install of this system.
  142. # Before changing this value read the documentation for this option
  143. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  144. system.stateVersion = "20.09"; # Did you read the comment?
  145.  
  146. }
  147.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement