Initial commit

This commit is contained in:
Payas Relekar 2019-11-20 22:19:31 +05:30
commit 5b4caa9884
2 changed files with 326 additions and 0 deletions

294
configuration.nix Normal file
View file

@ -0,0 +1,294 @@
# 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" ];
boot.loader = {
efi = {
canTouchEfiVariables = true;
# assuming /boot is the mount point of the EFI partition in NixOS (as the installation section recommends).
# efiSysMountPoint = "/boot";
};
grub = {
# despite what the configuration.nix manpage seems to indicate,
# as of release 17.09, setting device to "nodev" will still call
# `grub-install` if efiSupport is true
# (the devices list is not used by the EFI grub install,
# but must be set to some value in order to pass an assert in grub.nix)
devices = [ "nodev" ];
efiSupport = true;
enable = true;
version = 2;
# efiInstallAsRemovable = true;
useOSProber = true;
fsIdentifier = "label";
# 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--uid --set=root $FS_UUID
# chainloader /EFI/Microsoft/Boot/bootmgfw.efi
# }
menuentry "Reboot" {
reboot
}
menuentry "Poweroff" {
halt
}
'';
};
};
boot.kernelPackages = pkgs.linuxPackages_latest;
# boot.extraModulePackages = [ pkgs.linuxPackages.nvidia_x11 ];
fileSystems."/mnt/Data" =
{ device = "/dev/sda4";
fsType = "ntfs";
options = [ "rw" "uid=1000"];
};
# fileSystems."/mnt/Win" =
# { device = "/dev/nvme0n14";
# fsType = "ntfs";
# options = ["rw" "uuid=1000"];
# }
networking.hostName = "enterprise"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.extraConfig = "
[General]
Enable=Source,Sink,Media,Socket
";
# 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.enp3s0.useDHCP = true;
networking.interfaces.wlo1.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 = {
# consoleFont = "Lat2-Terminus16";
# consoleKeyMap = "us";
# defaultLocale = "en_US.UTF-8";
# };
# Set your time zone.
time.timeZone = "Asia/Kolkata";
# List packages installed in system profile. To search, run:
# $ nix search wget
# environment.systemPackages = with pkgs; [
# wget vim
# ];
# 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; };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.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 sound.
sound.enable = true;
hardware.pulseaudio = {
enable = true;
extraModules = [ pkgs.pulseaudio-modules-bt ];
package = pkgs.pulseaudioFull;
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e";
services.xserver.videoDrivers = [ "intel" "nvidia" ];
hardware.opengl.driSupport32Bit = true;
hardware.nvidia.optimus_prime.enable = false;
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:1:0:0";
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
hardware.nvidia.modesetting.enable = true;
# 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;
# Activate and set fish shell as default
programs.fish.enable = true;
users.extraUsers.payas = {
shell = "/run/current-system/sw/bin/fish";
};
# Define a user account. Don't forget to set a password with passwd.
users.users.payas = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "adbusers"]; # Enable sudo for the user.
# uuid = 1000; # match Ubuntu's default uuid
home = "/home/payas";
description = "Payas Relekar";
# allowUnfree = true;
};
# 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?
nixpkgs.config.allowUnfree = true; #Allow searching and installing proprietory packages
# Accelerated playback, proprietory codecs etc
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver # only available starting nixos-19.03 or the current nixos-unstable
];
};
# kde wallet
security.pam.services = [
{ name = "kwallet";
enableKwallet = true;
}
];
# Automated gabrage collection
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
# Auto-optimize nix-store, create hard-links to save space on /nix/store
nix.autoOptimiseStore = true;
environment = {
shells = [
"${pkgs.fish}/bin/fish"
"${pkgs.bash}/bin/bash"
];
variables = {
BROWSER = pkgs.lib.mkOverride 0 "firefox";
EDITOR = pkgs.lib.mkOverride 0 "vim";
};
systemPackages = with pkgs; [
# $ nix-env -qaP | grep wget to find packages
# dev
tree
git
bat
ripgrep
fd
exa
htop
broot
fzf
vim
kakoune
# sublime3
jetbrains.idea-community
android-studio
jetbrains.jdk
# email
aerc
keepassxc
# apps
vlc
firefox
soulseekqt
appimage-run
inkscape
gimp
# utilities
restic
rsync
kdeconnect
youtube-dl
qbittorrent
digikam5
kate
okular
ark
p7zip
syncthing
syncthingtray
libreoffice
# System
parted
gparted
pciutils
];
};
programs.adb.enable = true;
programs.java.enable = true;
# programs.java.package = nixos.jetbrains.jdk;
environment.variables.JAVA_HOME = "${pkgs.jdk.home}/lib/jetbrains.jdk";
# virtualBox
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "payas" ];
virtualisation.virtualbox.host.enableExtensionPack = true;
# services.syncthing = {
# enable = true;
# user = "payas";
# dataDir = "/home/anders/Syncthing";
# openDefaultPorts = true;
# };
}

View file

@ -0,0 +1,32 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/79dd69ba-ea56-4479-a104-14f0ba6776b0";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/15A2-FD75";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/fc70026b-8b25-47b1-8190-d6c3d0f12975"; }
];
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}