Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Edit this configuration file to define what should be installed on
- # your system. Help is available in the configuration.nix(5) man page
- # and in the NixOS manual (accessible by running ‘nixos-help’).
- { config, pkgs, lib, ... }:
- #{ config ? null, pkgs ? null, ... }:
- /*let
- unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
- in {
- environment.systemPackages = [ unstable.PACKAGE_NAME ];
- }
- */
- let
- list = map (x: x + 1714) (builtins.genList (x: x + 1) (1764 - 1714));
- in {
- imports =
- [ # Include the results of the hardware scan.
- ./hardware-configuration.nix
- ];
- # Use the GRUB 2 boot loader.
- boot = {
- loader.grub = {
- enable = true;
- version = 2;
- # grub.efiSupport = true;
- # grub.efiInstallAsRemovable = true;
- # efi.efiSysMountPoint = "/boot/efi";
- device = "/dev/sda"; # or "nodev" for efi only
- };
- # Define on which hard drive you want to install Grub.
- initrd.luks.devices = [{
- name = "root";
- device = "/dev/sda3";
- preLVM = true;
- }];
- kernelPackages = pkgs.linuxPackages_latest;
- };
- # Select internationalisation properties.
- # i18n = {
- # consoleFont = "Lat2-Terminus16";
- # consoleKeyMap = "us";
- # defaultLocale = "en_US.UTF-8";
- # };
- # Set your time zone.
- time.timeZone = "America/New_York";
- powerManagement.enable = true;
- # List packages installed in system profile. To search by name, run:
- # $ nix-env -qaP | grep wget
- # nixpkgs.config.allowUnfree = true;
- nixpkgs.config = {
- allowUnfree = true;
- packageOverrides = pkgs: with pkgs.stdenv.lib;
- let
- libdrm = pkgs.libdrm.overrideAttrs(attrs: rec {
- name = "libdrm-2.4.79";
- src = pkgs.fetchurl {
- url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
- sha256 = "15xiwnicf7vl1l37k8nj0z496p7ln1qp8qws7q13ikiv54cz7an6";
- };
- });
- mesa = ((pkgs.mesa_noglu.override {
- # this is probably the default by now in nixpkgs
- # without it you get opengl 2.1 contexts
- enableTextureFloats = true;
- enableRadv = true; # this isn't really needed when setting 'vulkanDrivers'
- galliumDrivers = [ "radeonsi" ];
- driDrivers = [ "radeon" ];
- vulkanDrivers = [ "radeon" ];
- llvmPackages =
- let
- rev = "299814";
- fetch = name: sha256: pkgs.fetchsvn {
- url = "http://llvm.org/svn/llvm-project/${name}/trunk/";
- inherit rev sha256;
- };
- src = fetch "llvm" "0x5l9ryr209wpmcrkb5yn35g88sfvwswljd0k9q6ymyxh3hrydw9";
- compiler-rt_src = fetch "compiler-rt" "0smfm4xw0m8l49lzlqvxf0407h6nqgy0ld74qx8yw7asvyzldjsl";
- in {
- llvm = pkgs.llvmPackages_4.llvm.overrideAttrs(attrs: {
- name = "llvm-git";
- unpackPhase = ''
- unpackFile ${src}
- chmod -R u+w llvm-*
- mv llvm-* llvm
- sourceRoot=$PWD/llvm
- unpackFile ${compiler-rt_src}
- chmod -R u+w compiler-rt-*
- mv compiler-rt-* $sourceRoot/projects/compiler-rt
- '';
- # this was the quickest hack to deal with the existing postPatch
- # script deleting these files later on
- postPatch = ''
- touch test/CodeGen/AMDGPU/invalid-opencl-version-metadata1.ll
- touch test/CodeGen/AMDGPU/invalid-opencl-version-metadata2.ll
- touch test/CodeGen/AMDGPU/invalid-opencl-version-metadata3.ll
- touch test/CodeGen/AMDGPU/runtime-metadata.ll
- '' + attrs.postPatch;
- });
- };
- libdrm = libdrm;
- }).overrideAttrs(attrs: {
- name = "mesa-git";
- src = pkgs.fetchgit {
- url = "https://anongit.freedesktop.org/git/mesa/mesa.git";
- rev = "098ca9949db35cbad92728b5d216aa37685b33ba";
- sha256 = "1pw2ymphmpxyjqk141vx2wxmkgh2scd3wdfkzwj0ggdf9jwl7fvm";
- };
- # this nixpkg version of this patch didn't apply cleanly
- # we should probably find a less fragile way of doing this
- # patches = [ ./mesa-symlink-drivers.patch ];
- patches = [ ];
- nativeBuildInputs = attrs.nativeBuildInputs ++ [ pkgs.bison pkgs.flex ];
- }));
- in {
- steam = pkgs.steam.override {
- # newStdcpp = true;
- };
- mesa_drivers = mesa.drivers;
- };
- };
- sound.mediaKeys.enable = true;
- hardware.opengl.driSupport32Bit = true;
- hardware.opengl.s3tcSupport = true; # use patented texture compressor
- hardware.pulseaudio.support32Bit = true;
- fonts = {
- enableFontDir = true;
- enableGhostscriptFonts = true;
- fontconfig = {
- defaultFonts.monospace = [ "Fira Mono" ];
- defaultFonts.sansSerif = [ "Fira Sans" ];
- ultimate.enable = true;
- };
- fonts = with pkgs; [
- fira-code fira-mono font-droid
- ];
- };
- hardware.pulseaudio.enable = true;
- # Some programs need SUID wrappers, can be configured further or are
- # started in user sessions.
- programs.bash.enableCompletion = true;
- # programs.mtr.enable = true;
- # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
- # List services that you want to enable:
- # Enable the OpenSSH daemon.
- services = {
- postgresql.enable = true;
- postgresql.package = pkgs.postgresql94;
- postgresql.authentication = lib.mkForce ''
- # Generated file; do not edit!
- # TYPE DATABASE USER ADDRESS METHOD
- local all all trust
- host all all 127.0.0.1/32 trust
- host all all ::1/128 trust
- '';
- openssh.enable = true;
- xserver = {
- enable = true;
- videoDrivers = [ "mesa" ];
- displayManager.sddm.enable = true;
- windowManager.dwm.enable = true;
- windowManager.i3.enable = true;
- windowManager.i3.package = pkgs.i3-gaps;
- windowManager.default = "i3";
- # NEVER DO THIS desktopManager.plasma5.enable = true;
- libinput.enable = true;
- };
- nixosManual.showManual = true;
- cron.enable = true;
- cron.systemCronJobs = [
- ];
- };
- # Open ports in the firewall.
- networking = {
- firewall.allowedTCPPorts = list ++ [ 22 ];
- firewall.allowedUDPPorts = list ++ [ 22 ];
- firewall.enable = false;
- hostName = "4th";
- networkmanager.enable = true;
- };
- # Or disable the firewall altogether.
- # networking.firewall.enable = false;
- # Enable CUPS to print documents.
- # services.printing.enable = true;
- # Enable the X11 windowing system.
- # services.xserver.enable = true;
- # services.xserver.layout = "us";
- # services.xserver.xkbOptions = "eurosign:e";
- # Enable touchpad support.
- # services.xserver.libinput.enable = true;
- # Enable the KDE Desktop Environment.
- # services.xserver.displayManager.sddm.enable = true;
- # services.xserver.desktopManager.plasma5.enable = true;
- # Define a user account. Don't forget to set a password with 'passwd’.
- users.extraUsers.trev = {
- isNormalUser = true;
- name = "trev";
- group = "users";
- createHome = true;
- home = "/home/trev";
- shell = "/run/current-system/sw/bin/bash";
- uid = 1000;
- extraGroups = [ "networkmanager" "wheel" "audio" "video" ];
- packages = with pkgs; [
- libGLU_combined
- # languages
- gcc
- gforth
- #Lisps
- chez
- chicken
- clisp
- pltScheme
- texlive.combined.scheme-full
- go
- jdk8
- # terminals
- terminator termite st tmux
- screen
- #Python Tools
- pywal python36Packages.pip python36Full
- #Image Manipulation
- gimp
- krita
- # General Purpose Tools
- vimHugeX calcurse
- firefox mpd
- scim ncmpcpp
- neovim
- unzip scrot
- codeblocks ffmpeg-full
- blender
- #Chat
- weechat
- tdesktop
- telegram-cli
- signal-desktop
- #Gaming
- openmw openmw-tes3mp
- bsdgames
- steam
- kdeconnect
- mupdf i3blocks
- openshot-qt
- pandoc ncpamixer imagemagick
- multimarkdown odpdown rubber openssh
- kvm tdesktop
- gmpc playonlinux
- ];
- };
- # This value determines the NixOS release with which your system is to be
- # compatible, in order to avoid breaking some software such as database
- # servers. You should change this only after NixOS release notes say you
- # should.
- system = {
- stateVersion = "18.03"; # Did you read the comment?
- autoUpgrade.enable = true;
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement