Facebook
From dupa, 1 Month ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 166
  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.   environment.variables = {
  14.  CPLUS_INCLUDE_PATH = "${pkgs.gtest.dev}/include";
  15.  LIBRARY_PATH = "${pkgs.gtest}/lib";
  16.   };
  17.  
  18.   # Bootloader.
  19.   boot.loader.grub.enable = true;
  20.   boot.loader.grub.device = "/dev/sda";
  21.   boot.loader.grub.useOSProber = true;
  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.   # Enable network manager applet
  34.   programs.nm-applet.enable = true;
  35.  
  36.   # Set your time zone.
  37.   time.timeZone = "Europe/Warsaw";
  38.  
  39.   # Select internationalisation properties.
  40.   i18n.defaultLocale = "pl_PL.UTF-8";
  41.  
  42.   i18n.extraLocaleSettings = {
  43.     LC_ADDRESS = "pl_PL.UTF-8";
  44.     LC_IDENTIFICATION = "pl_PL.UTF-8";
  45.     LC_MEASUREMENT = "pl_PL.UTF-8";
  46.     LC_MONETARY = "pl_PL.UTF-8";
  47.     LC_NAME = "pl_PL.UTF-8";
  48.     LC_NUMERIC = "pl_PL.UTF-8";
  49.     LC_PAPER = "pl_PL.UTF-8";
  50.     LC_TELEPHONE = "pl_PL.UTF-8";
  51.     LC_TIME = "pl_PL.UTF-8";
  52.   };
  53.  
  54.   # Enable the X11 windowing system.
  55.   services.xserver.enable = true;
  56.  
  57.   # Enable the LXQT Desktop Environment.
  58.   services.xserver.displayManager.lightdm.enable = true;
  59.   services.xserver.desktopManager.lxqt.enable = true;
  60.  
  61.   # Configure keymap in X11
  62.   services.xserver = {
  63.     layout = "pl";
  64.     xkbVariant = "";
  65.   };
  66.  
  67.   # Configure guest
  68.   virtualisation.virtualbox.guest.enable = true;
  69.   virtualisation.virtualbox.guest.x11 = true;
  70.  
  71.   # Configure shell
  72.   programs.bash.shellAliases = {
  73.  
  74.  cls = "clear";
  75.  studentmachine = "/cpp_studentmachine-nix/client/build/studentmachine";
  76.  
  77.   };
  78.  
  79.   # programs.bash.interactiveShellInit = "nix-shell /cpp_studentmachine-nix/shell.nix";
  80.  
  81.   # Configure console keymap
  82.   console.keyMap = "pl2";
  83.  
  84.   # Enable CUPS to print documents.
  85.   services.printing.enable = true;
  86.  
  87.   # Enable sound with pipewire.
  88.   sound.enable = true;
  89.   hardware.pulseaudio.enable = false;
  90.   security.rtkit.enable = true;
  91.   services.pipewire = {
  92.     enable = true;
  93.     alsa.enable = true;
  94.     alsa.support32Bit = true;
  95.     pulse.enable = true;
  96.     # If you want to use JACK applications, uncomment this
  97.     #jack.enable = true;
  98.  
  99.     # use the example session manager (no others are packaged yet so this is enabled by default,
  100.     # no need to redefine it in your config for now)
  101.     #media-session.enable = true;
  102.   };
  103.  
  104.   # Enable touchpad support (enabled default in most desktopManager).
  105.   # services.xserver.libinput.enable = true;
  106.  
  107.   # Define a user account. Don't forget to set a password with ‘passwd’.
  108.   users.users.uczen = {
  109.     isNormalUser = true;
  110.     description = "uczeń";
  111.     extraGroups = [ "networkmanager" "wheel" ];
  112.     packages = with pkgs; [
  113.       firefox
  114.     #  thunderbird
  115.     ];
  116.   };
  117.  
  118.   # Allow unfree packages
  119.   nixpkgs.config.allowUnfree = true;
  120.  
  121.   # List packages installed in system profile. To search, run:
  122.   # $ nix search wget
  123.   environment.systemPackages = with pkgs; [
  124.  vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  125.  wget
  126.  git
  127.  gcc
  128.  gnumake
  129.  perl
  130.  vscodium
  131.  neofetch
  132.  htop
  133.  clang
  134.  ninja
  135.  meson
  136.  python3
  137.  cmake
  138.   ];
  139.  
  140.   # Some programs need SUID wrappers, can be configured further or are
  141.   # started in user sessions.
  142.   # programs.mtr.enable = true;
  143.   # programs.gnupg.agent = {
  144.   #   enable = true;
  145.   #   enableSSHSupport = true;
  146.   # };
  147.  
  148.   # List services that you want to enable:
  149.  
  150.   # Enable the OpenSSH daemon.
  151.   # services.openssh.enable = true;
  152.  
  153.   # Open ports in the firewall.
  154.   # networking.firewall.allowedTCPPorts = [ ... ];
  155.   # networking.firewall.allowedUDPPorts = [ ... ];
  156.   # Or disable the firewall altogether.
  157.   # networking.firewall.enable = false;
  158.  
  159.   # This value determines the NixOS release from which the default
  160.   # settings for stateful data, like file locations and database versions
  161.   # on your system were taken. It‘s perfectly fine and recommended to leave
  162.   # this value at the release version of the first install of this system.
  163.   # Before changing this value read the documentation for this option
  164.   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  165.   system.stateVersion = "23.11"; # Did you read the comment?
  166.  
  167. }
  168.