From e29d880f86443313f74a0db4f1cb2aa3d2619c9e Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 15 Jun 2018 09:36:00 -0700 Subject: Reorganize and reformat --- home.nix | 148 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 75 insertions(+), 73 deletions(-) diff --git a/home.nix b/home.nix index 77bc9c1..bf3b13f 100644 --- a/home.nix +++ b/home.nix @@ -30,65 +30,70 @@ in extraConfig = builtins.readFile(solarized-xresources + "/Xresources.light"); }; - services.network-manager-applet.enable = true; + services = { + network-manager-applet.enable = true; - services.polybar = { - enable = true; - - config = { - "bar/top" = { - font-0 = "mononoki:size-10"; - monitor = "\${env:MONITOR:eDP1}"; - monitor-fallback = "HDMI1"; - width = "100%"; - height = "2%"; - radius = 0; - background = "#fdf6e3"; # solarized base3 - foreground = "#657b83"; # solarized base00 - tray-position = "right"; - tray-detached = false; - tray-maxsize = 16; - tray-transparent = false; - tray-background = "#fdf6e3"; - tray-offset-x = 0; - tray-offset-y = 0; - tray-padding = 0; - tray-scale = 1.0; - module-margin = 4; - modules-center = "date"; - modules-right = "battery"; - }; - - "module/date" = { - type = "internal/date"; - internal = 5; - date = "%Y.%m.%d"; - time = "%H.%M"; - label = "%date%..%time%"; + polybar = { + enable = true; + config = { + "bar/top" = { + font-0 = "mononoki:size-10"; + monitor = "\${env:MONITOR:eDP1}"; + monitor-fallback = "HDMI1"; + width = "100%"; + height = "2%"; + radius = 0; + background = "#fdf6e3"; # solarized base3 + foreground = "#657b83"; # solarized base00 + tray-position = "right"; + tray-detached = false; + tray-maxsize = 16; + tray-transparent = false; + tray-background = "#fdf6e3"; + tray-offset-x = 0; + tray-offset-y = 0; + tray-padding = 0; + tray-scale = 1.0; + module-margin = 4; + modules-center = "date"; + modules-right = "battery"; + }; + "module/date" = { + type = "internal/date"; + internal = 5; + date = "%Y.%m.%d"; + time = "%H.%M"; + label = "%date%..%time%"; + }; + "module/battery" = { + type = "internal/battery"; + battery = "BAT0"; + adapter = "AC"; + full-at = 99; + }; }; + script = '' + #!/usr/bin/env sh + systemctl --user daemon-reload + polybar top & + ''; + }; - "module/battery" = { - type = "internal/battery"; - battery = "BAT0"; - adapter = "AC"; - full-at = 99; - }; + taffybar = { + enable = false; }; - script = '' - #!/usr/bin/env sh - systemctl --user daemon-reload - polybar top & - ''; - }; - services.taffybar = { - enable = false; - }; + redshift = { + enable = true; + latitude = "33.044444"; + longitude = "-117.271667"; + }; - services.redshift = { - enable = true; - latitude = "33.044444"; - longitude = "-117.271667"; + gpg-agent = { + enable = true; + defaultCacheTtl = 600; + enableSshSupport = true; + }; }; xsession = { @@ -98,9 +103,9 @@ in enable = true; extraPackages = hpkgs: [ hpkgs.xmonad-contrib - hpkgs.xmonad-extras - hpkgs.monad-logger - hpkgs.taffybar + hpkgs.xmonad-extras + hpkgs.monad-logger + hpkgs.taffybar ]; enableContribAndExtras = true; config = ./xmonad.hs; @@ -114,7 +119,10 @@ in path = https://github.com/rycee/home-manager/archive/release-18.03.tar.gz; }; - vim = import ./vim.nix { inherit pkgs; inherit (pkgs) vimUtils fetchFromGitHub; }; + vim = import ./vim.nix { + inherit pkgs; + inherit (pkgs) vimUtils fetchFromGitHub; + }; git = { enable = true; @@ -124,9 +132,9 @@ in extraConfig = '' [push] default = simple - [commit] - template = ~/.config/nixpkgs/git-commit-template - ''; + [commit] + template = ~/.config/nixpkgs/git-commit-template + ''; }; bash = { @@ -137,16 +145,16 @@ in [[ -f "$DIR/hm-session-vars.sh" ]] && . "$DIR/hm-session-vars.sh" ''; shellAliases = { - #z = "fasd_cd -d"; # cd, same functionality as j in autojump + #z = "fasd_cd -d"; # cd, same functionality as j in autojump #zz = "fasd_cd -d -i"; # cd with interactive selection - a = "fasd -a"; # any + a = "fasd -a"; # any add = "git add --ignore-removal"; ci = "git commit"; - d = "fasd -d"; # directory + d = "fasd -d"; # directory day = "date +%a"; ddate = "date +%Y.%m.%d"; dday = "date +%A"; - f = "fasd -f"; # file + f = "fasd -f"; # file fetch = "git fetch"; g = "grep -in"; ga = "git add -A"; @@ -164,9 +172,9 @@ in pull = "git pull"; push = "git push"; rm = "rm -i"; - s = "fasd -si"; # show / search / select - sd = "fasd -sid"; # interactive directory selection - sf = "fasd -sif"; # interactive file selection + s = "fasd -si"; # show / search / select + sd = "fasd -sid"; # interactive directory selection + sf = "fasd -sif"; # interactive file selection tdate = "date +%Y.%m.%d..%H.%M"; ttime = "date +%H.%M"; }; @@ -183,10 +191,4 @@ in }; }; - services.gpg-agent = { - enable = true; - defaultCacheTtl = 600; - enableSshSupport = true; - }; - } -- cgit v1.2.3