2020-08-19 18:35:23 +00:00
# My NixOS config...
# This is where the specific setup go from setting environment variables, specific aliases, installing specific packages (e.g., muh games), and so forth.
2020-08-16 08:33:44 +00:00
{ config , pkgs , lib , . . . }:
{
2020-08-19 18:35:23 +00:00
nixpkgs . overlays = import ./modules/overlays.nix ;
2020-08-16 08:33:44 +00:00
# Use the systemd-boot EFI boot loader.
boot . loader . systemd-boot . enable = true ;
boot . loader . efi . canTouchEfiVariables = true ;
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# 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 . enp4s0 . useDHCP = true ;
# Enable XDG conventions.
my . home . xdg . enable = true ;
environment . variables = {
XDG_CONFIG_HOME = " $ H O M E / . c o n f i g " ;
XDG_CACHE_HOME = " $ H O M E / . c a c h e " ;
XDG_DATA_HOME = " $ H O M E / . l o c a l / s h a r e " ;
XDG_BIN_HOME = " $ H O M E / . l o c a l / b i n " ;
} ;
2020-08-24 15:56:31 +00:00
# Moving all of the host-specific configurations into its appropriate place.
my . home . xdg . dataFile =
let insertXDGDataFolder = name : {
source = ./config + " / ${ name } " ;
recursive = true ;
} ; in {
" r e c o l l " = insertXDGDataFolder " r e c o l l " ;
" u n i s o n " = insertXDGDataFolder " u n i s o n " ;
} ;
2020-08-16 08:33:44 +00:00
# Install documentations for tools and whatnot.
documentation = {
enable = true ;
dev . enable = true ;
man . enable = true ;
} ;
# Enable virutialization.
virtualisation = {
docker = {
enable = true ;
} ;
libvirtd = {
enable = true ;
} ;
} ;
# Module configurations.
modules = {
desktop = {
browsers = {
brave . enable = true ;
firefox . enable = true ;
} ;
2020-09-01 15:10:44 +00:00
cad . enable = true ;
2020-08-16 08:33:44 +00:00
fonts . enable = true ;
files . enable = true ;
graphics = {
raster . enable = true ;
vector . enable = true ;
_3d . enable = true ;
} ;
multimedia . enable = true ;
music = {
composition . enable = true ;
production . enable = true ;
} ;
2020-09-01 15:10:44 +00:00
research . enable = true ;
2020-08-16 08:33:44 +00:00
} ;
dev = {
android . enable = true ;
base . enable = true ;
documentation = {
enable = true ;
latex . enable = true ;
} ;
2020-08-19 18:35:23 +00:00
game-dev = {
2020-08-18 16:48:02 +00:00
godot . enable = true ;
unity3d . enable = true ;
} ;
2020-08-16 08:33:44 +00:00
java . enable = true ;
javascript = {
deno . enable = true ;
node . enable = true ;
} ;
lisp = {
guile . enable = true ;
racket . enable = true ;
} ;
rust . enable = true ;
2020-09-05 20:50:16 +00:00
vcs . enable = true ;
2020-08-16 08:33:44 +00:00
} ;
editors = {
default = " n v i m " ;
emacs . enable = true ;
neovim . enable = true ;
2020-08-30 21:58:22 +00:00
vscode . enable = true ;
2020-08-16 08:33:44 +00:00
} ;
services = {
recoll . enable = true ;
2020-08-24 15:56:31 +00:00
unison = {
enable = true ;
flags =
let
homeDirectory = " / h o m e / ${ config . my . username } " ;
backupDrive = " / r u n / m e d i a / ${ config . my . username } / S e a g a t e B a c k u p P l u s D r i v e " ;
in ''
- root $ { homeDirectory } - root $ { backupDrive } - auto - batch - fat - force $ { homeDirectory } - mountpoint $ { backupDrive } - ignorearchives
'' ;
} ;
2020-08-16 08:33:44 +00:00
} ;
shell = {
base . enable = true ;
lf . enable = true ;
zsh . enable = true ;
} ;
themes . fair-and-square . enable = true ;
} ;
# Additional programs that doesn't need much configuration (or at least personally configured).
# It is pointless to create modules for it, anyways.
environment . systemPackages = with pkgs ; [
nim # Jack the nimble, jack jumped over the nightstick, and got over not being the best pick.
python # *insert Monty Python quote here*
2020-08-18 16:48:02 +00:00
] ;
2020-08-16 08:33:44 +00:00
2020-08-18 16:48:02 +00:00
my . packages = with pkgs ; [
2020-08-16 08:33:44 +00:00
# Muh games.
2020-08-28 07:58:17 +00:00
unstable . dwarf-fortress # Losing is fun!
unstable . endless-sky # Losing is meh!
unstable . minetest # Losing?! What's that?
unstable . openmw # Losing is even more meh1
unstable . wesnoth # Losing is frustrating!
unstable . zeroad # Losing is fun and frustrating!
2020-08-19 18:35:23 +00:00
# Installing some of the dependencies required for my scripts.
ffcast
giflib
leptonica
libpng
libwebp
maim
( tesseract . override { enableLanguages = [ " e n g " ] ; } )
slop
2020-09-05 20:50:16 +00:00
virt-manager
2020-08-30 15:27:12 +00:00
xclip
2020-08-19 18:35:23 +00:00
xdg-user-dirs
2020-09-01 15:10:44 +00:00
xorg . xwininfo
2020-08-19 18:35:23 +00:00
zbar
2020-09-05 20:50:16 +00:00
# My custom packages.
# fds-nur.brl-cad
# fds-nur.hypermail
# fds-nur.wikiman
2020-08-16 08:33:44 +00:00
] ;
2020-08-19 18:35:23 +00:00
# Setting up the shell environment.
2020-08-16 08:33:44 +00:00
my . env = {
BROWSER = " f i r e f o x " ;
FILE = " l f " ;
READ = " z a t h u r a " ;
SUDO_ASKPASS = <config/bin/askpass> ;
} ;
2020-09-05 20:50:16 +00:00
# foo-dogsquared is my only alias.
my . alias = {
# Convenience alias for my NixOS config.
dots = " U S E R = ${ config . my . username } m a k e - C / e t c / d o t f i l e s " ;
# Assume you've installed Doom Emacs.
org-capture = " $ X D G _ C O N F I G _ H O M E / e m a c s / b i n / o r g - c a p t u r e " ;
} ;
2020-08-16 08:33:44 +00:00
# Set your time zone.
time . timeZone = " A s i a / M a n i l a " ;
services . openssh . enable = true ;
services . lorri . enable = true ;
2020-08-18 16:48:02 +00:00
# Setup GnuPG.
2020-08-16 08:33:44 +00:00
programs . gnupg . agent = {
enable = true ;
enableSSHSupport = true ;
pinentryFlavor = " g n o m e 3 " ;
} ;
2020-08-18 16:48:02 +00:00
# Install a proprietary Nvidia graphics driver.
2020-08-30 15:27:12 +00:00
services . xserver = {
libinput = {
middleEmulation = true ;
} ;
videoDrivers = [ " n v i d i a L e g a c y 3 9 0 " ] ;
} ;
2020-08-18 16:48:02 +00:00
2020-08-16 08:33:44 +00:00
# Enable sound.
sound . enable = true ;
hardware . pulseaudio . enable = true ;
2020-08-18 16:48:02 +00:00
# Additional host-specific program configurations.
2020-08-24 15:56:31 +00:00
my . home = {
programs = {
# My personal Git config.
git = {
enable = true ;
2020-08-16 08:33:44 +00:00
2020-08-24 15:56:31 +00:00
# Enable Large File Storage.
lfs . enable = true ;
2020-08-16 08:33:44 +00:00
2020-08-24 15:56:31 +00:00
# Use the entire suite.
package = pkgs . gitAndTools . gitFull ;
2020-08-16 08:33:44 +00:00
2020-08-24 15:56:31 +00:00
userName = " G a b r i e l A r a z a s " ;
userEmail = " ${ config . my . email } " ;
} ;
2020-08-16 08:33:44 +00:00
} ;
} ;
2020-09-05 20:50:16 +00:00
my . user . extraGroups = [ " d o c k e r " ] ;
2020-08-16 08:33:44 +00:00
}