From 429cdbe18f59c7be459afa0ae106c106db1f482c Mon Sep 17 00:00:00 2001 From: Matthew Ess Date: Thu, 2 Jan 2020 01:23:41 -0500 Subject: [PATCH] Fix commands --- configuration.nix | 21 +++++++++++++++++++-- home.nix | 22 ++++++++++++---------- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/configuration.nix b/configuration.nix index 48c69ae..8066bc9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -46,7 +46,12 @@ fonts = { enableDefaultFonts = true; - fonts = with pkgs; [ source-code-pro fira-code fira-code-symbols font-awesome_5 ]; + fonts = with pkgs; [ + source-code-pro + fira-code + fira-code-symbols + font-awesome_5 + ]; fontconfig = { enable = true; defaultFonts = { monospace = [ "Fira Code" ]; }; @@ -84,6 +89,7 @@ programs = { fish.enable = true; seahorse.enable = true; + light.enable = true; }; # List services that you want to enable: @@ -98,6 +104,14 @@ enable = true; layout = "us"; + config = '' + Section "Device" + Identifier "Card0" + Driver "intel" + Option "Backlight" "/sys/class/backlight/intel_backlight" + EndSection + ''; + # Enable touchpad support. libinput = { enable = true; @@ -128,7 +142,9 @@ # Enable sound. sound.enable = true; - hardware.pulseaudio.enable = true; + + # Hardware switches + hardware = { pulseaudio.enable = true; }; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.mat = { @@ -138,6 +154,7 @@ "wheel" # Enable ‘sudo’ for the user. "networkmanager" "audio" + "video" ]; }; home-manager.users.mat = import ./home.nix; diff --git a/home.nix b/home.nix index 9083490..e3fa051 100644 --- a/home.nix +++ b/home.nix @@ -4,6 +4,7 @@ let name = "Matthew Ess"; email = "daringseal@gmail.com"; workEmail = "mess@yelp.com"; + lockCmd = "i3lock -i ~/.background-image"; in { home = { @@ -30,8 +31,7 @@ in { clipmenu clipnotify dmenu - i3lock-fancy - xorg.xbacklight + i3lock ]; file = { ".background-image".source = ./assets/background-image; @@ -84,7 +84,7 @@ in { volume master { format = " %volume" format_muted = " (%volume)" - device = "pulse:1" + device = "pulse:0" mixer = "Master" mixer_idx = 0 } @@ -231,7 +231,7 @@ in { }; screen-locker = { enable = true; - lockCmd = "i3lock-fancy"; + lockCmd = "${lockCmd}"; }; }; xsession = { @@ -245,12 +245,12 @@ in { "1: web" = [{ class = "Firefox"; }]; "2: devel" = [ { class = "Alacritty"; } { class = "Atom"; } ]; }; - bars = [{ fonts = ["Fira Code" "FontAwesome 10"]; }]; + bars = [{ fonts = [ "Fira Code" "FontAwesome 10" ]; }]; modifier = "Mod4"; keybindings = lib.mkOptionDefault { "${modifier}+c" = "exec CM_ONESHOT=1 clipmenud"; "${modifier}+v" = "exec clipmenu"; - "${modifier}+Escape" = "exec i3lock-fancy"; + "${modifier}+Escape" = "exec ${lockCmd}"; "${modifier}+0" = "workspace number 0"; "${modifier}+1" = "workspace number 1"; "${modifier}+2" = "workspace number 2"; @@ -261,10 +261,12 @@ in { "${modifier}+7" = "workspace number 7"; "${modifier}+8" = "workspace number 8"; "${modifier}+9" = "workspace number 9"; - "XF86AudioRaiseVolume" = "exec --no-startup-id amixer sset Master 5%+"; - "XF86AudioLowerVolume" = "exec --no-startup-id amixer sset Master 5%-"; - "XF86MonBrightnessUp" = "exec xbacklight -inc 20"; - "XF86MonBrightnessDown" = "exec xbacklight -dec 20"; + "XF86AudioRaiseVolume" = + "exec --no-startup-id amixer sset Master 5%+"; + "XF86AudioLowerVolume" = + "exec --no-startup-id amixer sset Master 5%-"; + "XF86MonBrightnessUp" = "exec light -A 20"; + "XF86MonBrightnessDown" = "exec light -U 20"; }; workspaceLayout = "tabbed"; };