Created
December 26, 2021 00:32
-
-
Save nixinator/51c62e85dba444248e4754a064c8240a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 loader timeout, null will never timeout | |
boot.loader.timeout = 120; | |
# Kernel modules for hardware devices are generally loaded automatically by udev | |
# You can force a module to be loaded via boot.kernelModules | |
boot.kernelModules = [ "fuse" ]; | |
boot.supportedFilesystems = [ "ntfs" ]; | |
# Filesystems | |
fileSystems."/xmnt/Bravo" = | |
{ device = "/dev/disk/by-label/Bravo"; | |
fsType = "ntfs"; | |
options = [ "ro" "nosuid" "nodev" "noexec" "nofail" "uid=1000" "gid=100" "dmask=0022" "fmask=0033"]; | |
}; | |
fileSystems."/xmnt/Alpha" = | |
{ device = "/dev/disk/by-label/Alpha"; | |
fsType = "ext4"; | |
options = [ "rw" "nosuid" "nodev" "noexec" "nofail" ]; | |
}; | |
fileSystems."/xmnt/Charlie" = | |
{ device = "/dev/disk/by-label/Charlie"; | |
fsType = "ext4"; | |
options = [ "rw" "nosuid" "nodev" "noexec" "nofail" ]; | |
}; | |
# Allow unfree packages | |
nixpkgs.config.allowUnfree = true; | |
# Set your time zone. | |
time.timeZone = "Asia/Kolkata"; | |
# System clock might be incorrect after booting Windows and going back to the NixOS. | |
# It can be fixed by either setting RTC time standard to UTC on Windows, or setting it to localtime on NixOS | |
time.hardwareClockInLocalTime = true; | |
# Select internationalisation properties. | |
i18n.defaultLocale = "en_US.UTF-8"; | |
# console = { | |
# font = "Lat2-Terminus16"; | |
# keyMap = "us"; | |
# }; | |
# Update the microCode for AMD processors | |
hardware.cpu.amd.updateMicrocode = true; | |
# Enable bluetooth | |
hardware.bluetooth = { | |
enable = true; | |
settings = { | |
# A2DP profile for Modern headsets | |
General = { | |
Enable = "Source,Sink,Media,Socket"; | |
}; | |
}; | |
}; | |
# Enable sound | |
sound.enable = true; | |
# pulseaudio | |
hardware.pulseaudio = { | |
enable = true; | |
# NixOS allows either a lightweight build (default) or full build | |
# Only the full build has Bluetooth support, so it must be selected here. | |
package = pkgs.pulseaudioFull; | |
extraModules = [ pkgs.pulseaudio-modules-bt ]; | |
extraConfig = "load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1"; | |
}; | |
# Networking | |
networking.hostName = "nixos"; # Define your hostname. | |
networking.networkmanager.enable = true; | |
# 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.enp7s0.useDHCP = false; | |
networking.interfaces.wlp6s0.useDHCP = true; | |
# enable/disable the firewall | |
networking.firewall.enable = true; | |
# Open ports in the firewall. | |
# networking.firewall.allowedTCPPorts = [ ... ]; | |
# networking.firewall.allowedUDPPorts = [ ... ]; | |
# Configure network proxy if necessary | |
# networking.proxy.default = "http://user:password@proxy:port/"; | |
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; | |
# Configure keymap in X11 | |
services.xserver.layout = "us"; | |
# Xserver | |
services.xserver = { | |
enable = true; | |
autorun = true; | |
windowManager = { | |
xmonad = { | |
enable = true; | |
enableContribAndExtras = true; | |
extraPackages = haskellPackages: [ | |
haskellPackages.xmonad-contrib # Xmonad contrib | |
haskellPackages.xmobar # A minimalistic text based status bar | |
haskellPackages.xmonad-wallpaper # Xmonad wallpaper | |
]; | |
}; | |
}; | |
desktopManager = { | |
xterm.enable = false; | |
}; | |
displayManager = { | |
sddm.enable = true; | |
}; | |
}; | |
# Xserver video drivers | |
services.xserver.videoDrivers = [ "nvidia" ]; | |
# Enable touchpad support (enabled default in most desktopManager). | |
services.xserver.libinput.enable = false; | |
# Enable CUPS to print documents. | |
# services.printing.enable = true; | |
# Location to enable day-light saving, night light functionality | |
# The location provider to use for determining your location. | |
# location = "manual" or "geoclue2" | |
# If set to manual you must also provide latitude/longitude. | |
location = { | |
provider = "manual"; | |
latitude = 24.4852; | |
longitude = 86.69; | |
}; | |
# environment.etc sysmlinking | |
environment.etc = { | |
"jdk11".source = pkgs.adoptopenjdk-bin; | |
}; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
environment.systemPackages = with pkgs; [ | |
wget # Tool for retrieving files using HTTP,HTTPS, and FTP | |
vim # The most popular clone of the VI editor | |
zsh # The Z shell | |
]; | |
# Fonts | |
fonts.fonts = with pkgs; [ | |
nerdfonts # Nerd Iconic font aggregator | |
font-awesome # Font awesome iconic font | |
noto-fonts # Beautiful and free fonts for many languages | |
]; | |
# 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; | |
# }; | |
# Programs | |
# zsh shell | |
programs.zsh.enable = true; | |
# java development kit 11 | |
programs.java = { | |
enable = true; | |
package = pkgs.adoptopenjdk-bin; | |
}; | |
# udev rules | |
services.udev.packages = with pkgs; [ | |
android-udev-rules | |
]; | |
# Services | |
# ------------------------------------------------------------------------------ | |
# Network time synchronization | |
services.chrony.enable = true; | |
# Jellyfin media server | |
services.jellyfin.enable = true; | |
# Enable the OpenSSH daemon. | |
services.openssh.enable = true; | |
# ------------------------------------------------------------------------------ | |
# | |
virtualisation. podman = { | |
enable = true; | |
dockerCompat = false; | |
}; | |
virtualisation.docker = { | |
enable = false; | |
}; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
users.users.akhilesh = { | |
name = "akhilesh"; | |
description = "Akhilesh"; | |
isNormalUser = true; | |
home = "/home/akhilesh"; | |
shell = pkgs.zsh; | |
group = "users"; | |
extraGroups = [ "wheel" "networkmanager" "audio" "video" ]; | |
packages = with pkgs; [ | |
zsh # The Z shell | |
starship # A minimal, blazing fast, and extremely customizable prompt for any shell | |
ripgrep # A utility that combines The Silver Searcher with grep | |
silver-searcher # A code-searching tool similar to ack, but faster | |
fzf # fuzzy finder | |
fasd # Quick command-line access to files and dirs for POSIX shells | |
tmux # Terminal multiplexer | |
tree # Command to produce a depth indented directory listing | |
vivid # A generator for LS_COLORS with support for multi color themes | |
pywal # Generate and change colorschemes on the fly | |
xclip # Tool to access the X clipboard from a console applicaiton | |
killall # Tool to kill multiple processes | |
alacritty # Terminal emulator | |
git # git version control | |
gparted # Graphical disk partitioning tool | |
dmenu # A generic menu for the X window System | |
rofi # Window switcher, run dialog and dmenu replacement | |
feh # Light weight image viewer, wallpaper change | |
ts # Task spooler - batch queue | |
firefox # Firefox web browser | |
chromium # Chromium web browser | |
google-chrome # Google chrome web browser | |
brave # Brave web browser | |
meld # Visual diff and merge tool | |
jetbrains.idea-community # Intellij Idea IDE | |
sublime3 # sublime text editor | |
vscode # Visual Studio Code text editor | |
drawio # A desktop application for creating diagrams (draw.io) | |
postman # Postman api development tool | |
mysql-workbench # Visual MySql database modelling, administration and querying tool | |
mysql-client # MySql client ( mariadb-client ) | |
dbeaver # Universal SQL client, Supports MySQL, PostgreSQL, Oracle and more | |
joplin-desktop # An open source note taking and To-Do application | |
mupdf # A lightweight vim inspired pdf reader | |
zathura # A lightweight pdf reader | |
qbittorrent # Torrent GUI client | |
scrot # A command line screen capture utility | |
dunst # Light-Weight notification daemon | |
sxhkd # Simple X hotkey daemon | |
wpsoffice # WPS office | |
mpv # mpv video player | |
youtube-dl # Command line youtube downloader | |
shortwave # Find and play radio stations from internet | |
picard # Official musicbrainz picard | |
gthumb # image viewer, organizer | |
jpegoptim # Optimize JPEG files | |
jpegrescan # losslessly shring any JPEG file | |
jpeginfo # Prints information and tests integrity of JPEG/JFIF files | |
imagemagick # A software suite to create,edit,compose, or convert bitmap images | |
ffmpeg # A complete sol to record,convert and stream audio and video | |
ffmpegthumbnailer # A lightweight video thumbnailer | |
playerctl # Command-line utility for controlling media players implementing MPRIS | |
jellyfin # Jellyfin media server | |
spotify # Play music from the Spotify music service | |
gnome.nautilus # Nautilus GUI file manager | |
gnome.sushi # A quick previewer for Nautilus | |
teams # Microsoft teams meetings | |
skypeforlinux # Skype Desktop client | |
zoom-us # Zoom meetings | |
slack # Slack desktop | |
calibre # e-Library manager | |
xbrightness # X11 screen brightness controller | |
haskellPackages.xmobar # A minimalistic Text Based Status Bar | |
i3lock-color # A simple screen locker like slock, enhanced version | |
xorg.xkill # xorg xkill utility | |
lxappearance # Utility to set fonts, icon themes, cursor themes, etc | |
# Themes | |
# Icon themes | |
hicolor-icon-theme # Default fallback theme | |
gnome.adwaita-icon-theme # Many programs rely heavily on having an icon theme available | |
moka-icon-theme | |
numix-icon-theme | |
numix-icon-theme-circle | |
numix-icon-theme-square | |
papirus-icon-theme | |
# cursor themes | |
bibata-cursors | |
bibata-extra-cursors | |
bibata-cursors-translucent | |
# Security and sandboxing | |
]; | |
}; | |
# Temporarily allow insecure packages | |
nixpkgs.config.permittedInsecurePackages = [ | |
]; | |
# security | |
security.sudo = { | |
enable = true; | |
}; | |
security.apparmor.enable = true; | |
# Automatic Upgrades | |
# If allowReboot is true, then the system will automatically reboot | |
# if the new generation contains a different kernel, initrd or kernel modules | |
system.autoUpgrade.enable = true; | |
system.autoUpgrade.allowReboot = false; | |
# 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.09"; # Did you read the comment? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment