diff --git a/.Xresources b/.Xresources index 4e5dead..cd29a62 100644 --- a/.Xresources +++ b/.Xresources @@ -1,3 +1,6 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!! URXVT !!!!!!!!!!!!!!!! + !!!!!!Setup env.!!!!!! URxvt.*foreground: #FFFFFF URxvt.*background: #262626 @@ -8,7 +11,7 @@ URxvt.matcher.button: 1 URxvt*scrollBar: false !!!!!!Font!!!!!! -URxvt.font: xft:sourcecodepro:size=10 +URxvt.font: xft:saucecodepowerline:size=11 URxvt.letterSpace: -1 !!!!!!tango color scheme!!!!!! @@ -28,3 +31,10 @@ URxvt.*color12: #729fcf URxvt.*color13: #ad7fa8 URxvt.*color14: #00f5e9 URxvt.*color15: #eeeeec + +!!!!!!!!!!!!!! ROFI !!!!!!!!!!!!!!!! + +rofi.fuzzy: true +rofi.key-window: MetaL+w +rofi.key-run: MetaL+p +rofi.key-ssh: MetaL+s \ No newline at end of file diff --git a/.xmobarrc b/.xmobarrc new file mode 100644 index 0000000..d5dd77c --- /dev/null +++ b/.xmobarrc @@ -0,0 +1,29 @@ +Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*" + , lowerOnStart = True + , borderColor = "black" + , border = TopB + , bgColor = "black" + , fgColor = "grey" + , position = TopW L 100 + , commands = [ + Run Weather "KFUL" ["-t", "KFUL: F/"] 36000 + , Run Network "wlp3s0" ["-L","0","-H","32","--normal","green","--high","red"] 10 + , Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 + , Run Memory ["-t","Mem: %"] 10 + , Run Battery [ + "-t", ": %", + "--", + --"-c", "energy_full", + "-O", "AC", + "-o", "Bat", + "-h", "green", + "-l", "red" + ] 10 + , Run Com "uname" ["-s","-r"] "" 36000 + , Run Date "%a %b %_d %H:%M" "date" 10 + , Run StdinReader + ] + , sepChar = "%" + , alignSep = "}{" + , template = "%StdinReader% | %cpu% | %memory% | %wlp3s0% | %KFUL% }{%date% | %uname% | %battery% " + } \ No newline at end of file diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs new file mode 100644 index 0000000..bef66b9 --- /dev/null +++ b/.xmonad/xmonad.hs @@ -0,0 +1,28 @@ +import System.IO +import XMonad +import XMonad.Hooks.DynamicLog +import XMonad.Hooks.EwmhDesktops +import XMonad.Hooks.ManageDocks +import XMonad.Layout.IndependentScreens +import XMonad.Util.EZConfig(additionalKeys) +import XMonad.Util.Run(spawnPipe) + +main = do + xmproc <- spawnPipe "xmobar" + xmonad $ ewmh defaultConfig + { handleEventHook = + handleEventHook defaultConfig <+> fullscreenEventHook + , manageHook = manageDocks <+> manageHook defaultConfig + , modMask = mod4Mask + , workspaces = withScreens 2 ["web", "skype", "emacs"] + , terminal = "urxvtc" + , layoutHook = avoidStruts $ layoutHook defaultConfig + , logHook = dynamicLogWithPP xmobarPP + { ppOutput = hPutStrLn xmproc + , ppTitle = xmobarColor "green" "" . shorten 50 + } + } `additionalKeys` + [ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock; xset dpms force off") + , ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s") + , ((0, xK_Print), spawn "scrot") + ] diff --git a/nixos/configuration.nix b/nixos/configuration.nix new file mode 100644 index 0000000..fc98654 --- /dev/null +++ b/nixos/configuration.nix @@ -0,0 +1,176 @@ +# 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 + ]; + + nix = { + gc = { + automatic = true; + dates = "12:00"; + }; + }; + + nixpkgs.config.allowUnfree = true; + + boot = { + initrd = { + availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + kernelModules = [ "fbcon" "wl" "kvm-intel" ]; + luks.devices = [{ + name = "rootfs"; + device = "/dev/sda2"; + preLVM = true; + }]; + }; + loader = { + gummiboot.enable = true; + efi.canTouchEfiVariables = true; + }; + extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + extraModprobeConfig = '' + options hid_apple iso_layout=0 + ''; + }; + + networking = { + hostName = "Logan_MacBookAir_NixOS"; + networkmanager.enable = true; + firewall.enable = true; + }; + + powerManagement.enable = true; + + virtualisation.docker.enable = true; + + # Set your time zone. + time.timeZone = "America/Los_Angeles"; + + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + + programs.zsh.enable = true; + + environment.systemPackages = with pkgs; [ + cabal-install + dropbox-cli + emacs + feh + ghc + git + google-chrome-beta + haskellPackages.xmobar + htop + networkmanagerapplet + nox + rofi + rxvt_unicode + silver-searcher + sudo + unzip + vim + wget + xflux + ]; + + # List services that you want to enable: + services = { + tlp.enable = true; + openssh.enable = true; + printing.enable = true; + xserver = { + enable = true; + layout = "us"; + displayManager = { + sessionCommands = '' + xrandr --output HDMI1 --auto --right-of eDP1 + dropbox start + urxvtd + xrdb /home/gigavinyl/.Xresources + rofi + feh --bg-scale -z Dropbox/blookGalaxy.jpg & + xmonad + ''; + lightdm = { + enable = true; + background = "/home/gigavinyl/Pictures/blook.png"; + }; + }; + windowManager = { + xmonad = { + enable = true; + enableContribAndExtras = true; + }; + default = "xmonad"; + }; + synaptics = { + enable = true; + dev = "/dev/input/event*"; + twoFingerScroll = true; + tapButtons = false; + accelFactor = "0.001"; + buttonsMap = [ 1 3 2 ]; + palmDetect = true; + additionalOptions = '' + Option "VertScrollDelta" "-180" # scroll sensitivity, the bigger the negative number = less sensitive + Option "HorizScrollDelta" "-180" + Option "FingerLow" "40" + Option "FingerHigh" "70" + Option "Resolution" "270" # Pointer sensitivity, this is for a retina screen, so you'll probably need to change this for an air + ''; + }; + }; + }; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.extraUsers.gigavinyl = { + isNormalUser = true; + home = "/home/gigavinyl"; + shell = "/run/current-system/sw/bin/zsh"; + extraGroups = [ "wheel" "networkmanager" "docker" ]; + }; + + # Enable Emacs Daemon + systemd.user.services.emacs = { + description = "Emacs Daemon"; + environment = { + GTK_DATA_PREFIX = config.system.path; + SSH_AUTH_SOCK = "%t/ssh-agent"; + GTK_PATH = "${config.system.path}/lib/gtk-3.0:${config.system.path}/lib/gtk-2.0"; + NIX_PROFILES = "${pkgs.lib.concatStringsSep " " config.environment.profiles}"; + TERMINFO_DIRS = "/run/current-system/sw/share/terminfo"; + ASPELL_CONF = "dict-dir /run/current-system/sw/lib/aspell"; + }; + serviceConfig = { + Type = "forking"; + ExecStart = "${pkgs.emacs}/bin/emacs --daemon"; + ExecStop = "${pkgs.emacs}/bin/emacsclient --eval (kill-emacs)"; + Restart = "always"; + }; + wantedBy = [ "default.target" ]; + }; + + systemd.services.emacs.enable = true; + + # Setup custom fonts + fonts = { + enableFontDir = true; + enableGhostscriptFonts = true; + fonts = with pkgs; [ + corefonts + ubuntu_font_family + source-code-pro + powerline-fonts + ]; + }; + + # The NixOS release to be compatible with for stateful data such as databases. + system.stateVersion = "16.03"; + +} diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix new file mode 100644 index 0000000..628a911 --- /dev/null +++ b/nixos/hardware-configuration.nix @@ -0,0 +1,37 @@ +# 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 = + [ + ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/42a13316-4343-4d0b-98d9-fdedd8a6ad92"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/AE28-30CF"; + fsType = "vfat"; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/d499f710-532f-4d4d-bb10-dd080a93f95b"; } + ]; + + nix.maxJobs = lib.mkDefault 4; + + hardware = { + pulseaudio = { + enable = true; + support32Bit = true; + }; + opengl.driSupport32Bit = true; + facetimehd.enable = true; + cpu.intel.updateMicrocode = true; + bluetooth.enable = true; + }; +}