Skip to content

Instantly share code, notes, and snippets.

Created June 23, 2017 02:52
Show Gist options
  • Save anonymous/64676f813cd8146ffe03efff95c7951a to your computer and use it in GitHub Desktop.
Save anonymous/64676f813cd8146ffe03efff95c7951a to your computer and use it in GitHub Desktop.
# 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, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
hardware.pulseaudio.enable = true;
hardware.pulseaudio.daemon.config = { flat-volumes = "no"; };
#For steam
nixpkgs.config.allowUnfree = true;
hardware.opengl.driSupport32Bit = true;
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# boot.loader.grub.efiSupport = true;
# boot.loader.grub.efiInstallAsRemovable = true;
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
networking.hostName = "spacelike"; # Define your hostname.
networking.nameservers = [ "8.8.8.8" "8.8.4.4" ];
# networking.wireless.enable = false; # Enables wireless support via wpa_supplicant.
# networking.useDHCP = true;
# networking.extraHosts = "192.168.1.11 timelike";
# Select internationalisation properties.
i18n = {
consoleFont = "Lat2-Terminus16";
consoleKeyMap = "us";
defaultLocale = "en_US.UTF-8";
inputMethod.enabled = "ibus";
inputMethod.ibus.engines = with pkgs.ibus-engines; [ mozc ];
};
# Set your time zone.
time.timeZone = "MST7MDT";
nixpkgs.config.packageOverrides = pkgs: {
mod_wsgi = pkgs.mod_wsgi.overrideAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs ++ [ pkgs.python27Packages.pillow ];
});
};
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
binutils #For UT4 maybe?
cpufrequtils
dillo
feh
file
firefox
gimp
i3lock
i3status
imagemagick
libnotify
libreoffice
lxappearance
#mod_wsgi #For apache httpd service
mono #For UT4
mpv
neovim
ocamlPackages.unison
patchelf #To run executables not packaged with nix
pavucontrol
pciutils
python
python3
qutebrowser
rofi
rxvt_unicode
scrot
simplescreenrecorder
steam
traceroute
transmission_gtk
weechat
wget
xdg-user-dirs #For UT4
xorg.libpthreadstubs #For UT4
zip
unzip
ffmpeg
ffmpegthumbnailer
ffmpegthumbs
gstreamer
gst-ffmpeg
# gst-plugins-bad
# gst-plugins-base
# gst-plugins-good
# gst-plugins-ugly
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-ugly
];
fonts = {
fonts = with pkgs; [
#noto-fonts-cjk
symbola
terminus_font
];
fontconfig = {
enable = true;
ultimate.enable = false;
defaultFonts.monospace = [ "Terminus" ];
defaultFonts.sansSerif = [ "NotoSansCJKjp" ];
defaultFonts.serif = [ "MS PMincho" ];
};
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.cron.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable the X11 windowing system.
services.httpd = {
enable = true;
# package = pkgs.httpd_py3;
documentRoot = "/home/wwwrun/htdocs";
adminAddr = "ison111@protonmail.com";
extraModules = [ { name = "wsgi"; path = "${pkgs.mod_wsgi}/modules/mod_wsgi.so"; } ];
virtualHosts = [
{ hostName = "localhost";
documentRoot = "/home/wwwrun/htdocs";
extraConfig = ''
WSGIScriptAlias / /home/wwwrun/htdocs/server.py
Alias /res/dat/ /home/wwwrun/htdocs/dat/
'';
}
];
};
services.postgresql.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.enable = true;
services.xserver.layout = "us";
services.xserver.windowManager.i3.enable = true;
services.xserver.windowManager.default = "i3";
services.xserver.desktopManager.xfce.enable = true;
services.xserver.desktopManager.xfce.enableXfwm = true;
#services.xserver.desktopManager.xfce.thunarPlugins = with pkgs; [ xfce.tumbler xfce.thunar-archive-plugin ffmpegthumbnailer ffmpegthumbs gstreamer gst-ffmpeg gst-plugins-bad gst-plugins-base gst-plugins-good gst-plugins-ugly gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good gst_all_1.gst-plugins-ugly ];
services.xserver.desktopManager.xfce.thunarPlugins = with pkgs; [ xfce.tumbler ];
services.xserver.displayManager.session = [
{ manage = "window";
name = "i3";
start = "i3";
}
{ manage = "desktop";
name = "xfce";
start = "startxfce4";
}
];
# 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 = {
ison = {
home = "/home/ison";
extraGroups = [ "audio" "cdrom" "cron" "games" "input" "usb" "users" "video" "wheel" ];
isNormalUser = true;
uid = 1000;
};
wwwrun = {
home = "/home/wwwrun";
isNormalUser = true;
};
};
# The NixOS release to be compatible with for stateful data such as databases.
system.stateVersion = "17.03";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment