Skip to content

Instantly share code, notes, and snippets.

@SandwichChef
Last active June 10, 2020 08:19
Show Gist options
  • Select an option

  • Save SandwichChef/433f61efdb4da3da66a15ed04d7bec17 to your computer and use it in GitHub Desktop.

Select an option

Save SandwichChef/433f61efdb4da3da66a15ed04d7bec17 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
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = [ "ntfs" "zfs" ];
boot.kernelPatches = [ {
name = "Broadcom-workaround";
patch = null;
extraConfig = "BRCMFMAC_PCIE y";
} ];
virtualisation.libvirtd.enable = true;
networking.hostName = "Vajra"; # Define your hostname.
networking.networkmanager.enable = true; # As retarded as it seems, enabling networkmanager also takes care of wireless, so if you're using that, you don't need to use wpa_supplicant
networking.wireless.enable = false; # Enables wireless support via wpa_supplicant.
networking.wireless.networks = {
ATTpQzNV3A = {
psk = "REDACTED"; # I swear this is the fucking password, why doesn't it work!?
};
};
networking.enableB43Firmware = true; # Enables reverse engineered Broadcom drivers, not sure if this is necessary with the extra kernel settings or not
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
# networking.interfaces.enp5s0.useDHCP = true;
# networking.interfaces.enp9s0f3u4.useDHCP = true;
networking.interfaces.wlp7s0.useDHCP = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# };
# Enable oriental input methods
i18n.inputMethod = {
enabled = "ibus";
ibus.engines = with pkgs.ibus-engines; [ anthy hangul mozc ];
};
# Set your time zone.
time.timeZone = "America/Chicago";
# List packages installed in system profile. To search, run:
# $ nix search wget
programs.adb.enable = true;
nixpkgs.config = {
# Allow proprietary packages
allowUnfree = true;
# Allow 7z
permittedInsecurePackages = [
"p7zip-16.02"
];
};
environment.systemPackages = with pkgs; [
kitty # Terminal emulator of choice
brave # Web browser of choice, to trigger Libs
wget # Download shit
neovim # Edit shit (Honestly, I don't know how to use vim, but I want to learn)
curl # Download shit and test things on the web
tmux # tmux is my terminal multiplexer of choice
zsh # zsh is my shell of choice
ahoviewer # Pretty nice for viewing images quickly, and browsing boorus. I prefer imgbrd-grabber, but there's not a NixOS package for it
yacreader # Pretty nice for reading doujinshi/eromanga/manga
scrcpy # I use this to play mobage on my phone, especially at work
screen # I don't use screen that often, but sometimes it fits situations better than tmux
weechat # My IRC client of choice, though I don't run it locally these days
sublime3-dev # My editor of choice
sublime-merge # My git client of choice, if I don't use regular git for some reason
firefox # Web browser of choice, aside from Brave
thunderbird # Email client of choice
htop # Process manager
strace # Debugger that works well with htop
neofetch # Speccy alternative
ranger # File manager
lshw # Lists hardware
pciutils # For lspci
steam # Games
discord # Dicksword
# slack # For work
# zoom-us # For work
gparted # Graphical partition manager
parted # Command line partition manager
polkit_gnome # To make mounting flashdrives and shit work in XFCE
### Below is a copy of Arch's base-devel group ###
autoconf automake binutils bison fakeroot file findutils flex gawk gcc gettext gnugrep groff gzip libtool m4 gnumake patch pkgconf gnused texinfo which
];
programs.zsh.enable = true;
programs.zsh.ohMyZsh = { # You know what it is
enable = true;
plugins = [ "git" "python" "man" ];
theme = "agnoster";
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# pinentryFlavor = "gnome3";
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
programs.ssh.startAgent = true; # What's the bloody point if it's not started, eh
networking.firewall.allowedTCPPorts = [
# 139 # Samba
# 445 # Samba
];
networking.firewall.allowedUDPPorts = [
# 137 # Samba
# 138 # Samba
];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware = {
pulseaudio.enable = true; # Enable pulseaudio so we can make use of sound
pulseaudio.support32Bit = true; # Support 32bit for legacy applications and some games
opengl.driSupport32Bit = true; # Support 32bit for legacy applications and some games
opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ]; # Possible workaround for some Steam related stuff?
};
# Enable Samba
# services.samba.enable = true;
# Enable the X11 windowing system.
services.xserver.enableCtrlAltBackspace = true; # Gotta have my zaps
services.xserver.enable = true;
services.xserver.layout = "us";
# 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.defaultUserShell = "/run/current-system/sw/bin/zsh";
users.users.jwmonet = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "adbusers" "libvirtd" ];
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.03"; # Did you read the comment?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment