Skip to content

Instantly share code, notes, and snippets.

@cpappen
Created April 15, 2020 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpappen/3d9f2d381d123c17140ac6cc343d46c6 to your computer and use it in GitHub Desktop.
Save cpappen/3d9f2d381d123c17140ac6cc343d46c6 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 = [./hardware-configuration.nix];
#bootloader
boot.loader = {
systemmd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub = {
devices = [ "nodev" ];
efiSupport = true;
enable = true;
# set $FS_UUID to the UUID of the EFI partition
extraEntries = ''
menuentry "Windows" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root 191420B0-5F7D-4365-805A-167B5875B08B
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
'';
version = 2;
};
};
#network
networking = {
hostName = "nixos";
useDHCP = false;
interfaces.enp4s0.useDHCP = true;
};
#sound
sound.enable = true;
hardware.pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
};
#3d acceleration for 32bit applications
hardware.opengl.driSupport32Bit = true;
hardware.opengl.driSupport = true;
hardware.opengl.enable = true;
#packages
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
#audio
apulse # allows ALSA applications to use pulse
pavucontrol # PulseAudio volume control
#tools
p7zip
sudo
zip
unzip
zsh
wget
usbutils
vim
curl
killall
git
htop
firefox
];
#time
time.timeZone = "America/Cuiaba"
#x11
services.xserver = {
enable = true;
# nvidia
videoDrivers = [ "nvidia" ];
# i3-gaps
desktopManager = {
default = "none";
xterm.enable = false;
};
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
extraPackages = with pkgs; [
rofi
dmenu
feh # for background image
i3lock # screen lock
i3status # sys info
scrot # for screenshot
];
};
displayManager = {
sessionCommands = "i3status &";
};
};
# user
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.cpappen = {
createHome = true;
extraGroups = ["wheel" "networkmanager" "audio" "networkmanager" "users" "video" "vboxusers" ];
group = "users";
home = "/home/cpappen";
isNormalUser = true;
shell = pkgs.zsh;
uid = 1000;
};
# 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 = "19.09"; # Did you read the comment?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment