From 42743afe59bbb7535d8a7ec30ce206f89a3c7a55 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 30 Nov 2020 19:56:11 -0500 Subject: helium: use urxvt, fix xmonad, and pin nixpkgs --- lib/common.nix | 6 +++++- lib/packages.nix | 1 + lib/xmonad.hs | 13 ++++++++----- linux.nix | 7 +++++++ machines/helium.nix | 34 +++++++++++++++++++++++++++++++--- 5 files changed, 52 insertions(+), 9 deletions(-) diff --git a/lib/common.nix b/lib/common.nix index 4e1bb18..47a2124 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -75,9 +75,13 @@ in urxvt = { enable = true; - fonts = []; + fonts = [ + "xft:Fira Mono:size=8:ant" + "xfg:Noto Emoji" + ]; iso14755 = true; # unicode chars transparent = true; + shading = 20; }; ssh = { diff --git a/lib/packages.nix b/lib/packages.nix index 25e5eef..358b0bd 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -43,6 +43,7 @@ material-icons mononoki ncdu nix-prefetch-scripts +noto-fonts-emoji ormolu pass pianobar diff --git a/lib/xmonad.hs b/lib/xmonad.hs index 0c616e5..bc206d3 100644 --- a/lib/xmonad.hs +++ b/lib/xmonad.hs @@ -66,6 +66,9 @@ nixBin = "/home/ben/.nix-profile/bin/" altMask :: KeyMask altMask = mod1Mask +brighter = "brightnessctl s 5%+" +dimmer = "brightnessctl s 5%-" + insKeys :: XConfig l -> [((KeyMask, KeySym), X ())] insKeys conf@(XConfig {modMask = modMask}) = [ ((modMask, xK_y), spawn $ nixBin <> "passmenu") @@ -82,10 +85,10 @@ insKeys conf@(XConfig {modMask = modMask}) = -- media/ function keys -- backlight - , ((0, xK_F5), spawn "xbacklight -dec 5") - , ((0, xK_F6), spawn "xbacklight -inc 5") - , ((0, xF86XK_KbdBrightnessDown), spawn "xbacklight -dec 5") - , ((0, xF86XK_KbdBrightnessUp), spawn "xbacklight -inc 5") + , ((0, xK_F5), spawn dimmer) + , ((0, xK_F6), spawn brighter) + , ((0, xF86XK_KbdBrightnessDown), spawn dimmer) + , ((0, xF86XK_KbdBrightnessUp), spawn brighter) -- volume controls , ((0, xK_F1), amixer "toggle") , ((0, xK_F2), amixer "2%+") @@ -153,7 +156,7 @@ myConf theme = additionalKeys c (insKeys c) , borderWidth = 3 , manageHook = manageDocks <+> manageHook def , layoutHook = myLayout theme - , terminal = "/home/ben/.nix-profile/bin/xterm" + , terminal = "/home/ben/.nix-profile/bin/urxvt" , workspaces = myWorkspaces } diff --git a/linux.nix b/linux.nix index a6e3a52..9d4e7e4 100644 --- a/linux.nix +++ b/linux.nix @@ -343,6 +343,13 @@ in }; }; + random-background = { + enable = true; + enableXinerama = true; + imageDirectory = "%h/wallpaper"; + interval = "5m"; + }; + gpg-agent = { enable = true; enableScDaemon = true; diff --git a/machines/helium.nix b/machines/helium.nix index 0f49443..9c75b18 100644 --- a/machines/helium.nix +++ b/machines/helium.nix @@ -1,6 +1,14 @@ { config, lib, pkgs, ... }: -{ +let + nixpkgs = builtins.fetchTarball (import ../nixpkgs.nix); +in { + + security = { + sudo = { + wheelNeedsPassword = false; + }; + }; networking = { hostName = "helium"; @@ -14,6 +22,10 @@ fira fira-code fira-code-symbols ]; + environment.systemPackages = [ + pkgs.brightnessctl + ]; + nixpkgs = { config = { allowUnfree = true; @@ -25,7 +37,6 @@ enableAllFirmware = true; bluetooth.enable = true; bluetooth.package = pkgs.bluezFull; - brightnessctl.enable = true; opengl.enable = true; pulseaudio = { enable = true; @@ -80,6 +91,18 @@ displayManager.sddm.enable = true; + #session = [ + # { + # manage = "desktop"; + # name = "home-manager"; + # start = '' + # ${pkgs.runtimeShell} $HOME/.hm-xsession & + # waitPID=$! + # ''; + # } + #]; + + windowManager.xmonad.enable = true; desktopManager = { xterm.enable = true; }; @@ -102,8 +125,13 @@ powerManagement.enable = true; nix = { + nixPath = [ + "nixpkgs=${nixpkgs}" + "nixos-config=/etc/nixos/configuration.nix" + "/nix/var/nix/profiles/per-user/root/channels" + ]; gc = { - automatic = true; + automatic = false; dates = "03:15"; }; binaryCaches = [ "https://cache.nixos.org/" ]; -- cgit v1.2.3