This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

machines.icarus: switch from xmonad to sway

+4 -412
+4 -7
machines/icarus/config.nix
··· 1 - { pkgs, ... }: 1 + { self, pkgs, ... }: 2 2 3 3 { 4 4 imports = [ 5 5 ../../configs 6 6 ../../configs/mouse.nix 7 7 ../../configs/retiolum.nix 8 - ../../configs/desktops/xmonad 8 + ../../configs/desktops/sway/default.nix 9 + self.wrapperModules.workspace-manager 9 10 ../../configs/pipewire.nix 10 11 ../../configs/network-manager.nix 11 12 ../../configs/red-host.nix ··· 16 17 ../../configs/rad.nix 17 18 ]; 18 19 19 - # services.xrdp = { 20 - # enable = true; 21 - # defaultWindowManager = "xmonad"; 22 - # }; 23 - # networking.firewall.allowedTCPPorts = [ 3389 ]; # xrdp 20 + lass.workspace-manager.enable = true; 24 21 25 22 environment.systemPackages = [ pkgs.chromium ]; 26 23
-2
machines/ignavia/config.nix
··· 12 12 ../../configs/retiolum.nix 13 13 ../../configs/tpm2.nix 14 14 ../../configs/phonetpm.nix 15 - # ../../configs/baseX.nix 16 15 ../../configs/desktops/sway/default.nix 17 16 self.wrapperModules.workspace-manager 18 - # ../../configs/desktops/xmonad 19 17 ../../configs/power-action.nix 20 18 ../../configs/yubikey.nix 21 19 ../../configs/pipewire.nix
-162
configs/desktops/lib/x11.nix
··· 1 - { 2 - self, 3 - config, 4 - lib, 5 - pkgs, 6 - ... 7 - }: 8 - let 9 - stockholmPkgs = self.inputs.stockholm.packages.${pkgs.stdenv.hostPlatform.system}; 10 - in 11 - { 12 - imports = [ 13 - ../../alacritty.nix 14 - ../../xdg-open.nix 15 - ../../yubikey.nix 16 - ../../pipewire.nix 17 - ../../themes.nix 18 - ../../fonts.nix 19 - { 20 - users.users.mainUser.packages = [ 21 - pkgs.sshuttle 22 - self.packages.${pkgs.system}.mpv 23 - ]; 24 - security.sudo.extraConfig = '' 25 - lass ALL= (root) NOPASSWD:SETENV: ${pkgs.sshuttle}/bin/.sshuttle-wrapped 26 - ''; 27 - } 28 - { 29 - #font magic 30 - options.lass.fonts = { 31 - regular = lib.mkOption { 32 - type = lib.types.str; 33 - default = "xft:Iosevka Term SS15:style=regular"; 34 - }; 35 - bold = lib.mkOption { 36 - type = lib.types.str; 37 - default = "xft:Iosevka Term SS15:style=bold"; 38 - }; 39 - italic = lib.mkOption { 40 - type = lib.types.str; 41 - default = "xft:Iosevka Term SS15:style=italic"; 42 - }; 43 - }; 44 - config.services.xserver.displayManager.sessionCommands = 45 - let 46 - xres = pkgs.writeText "xreources" '' 47 - *.font: ${config.lass.fonts.regular} 48 - *.boldFont: ${config.lass.fonts.bold} 49 - *.italicFont: ${config.lass.fonts.italic} 50 - ''; 51 - in 52 - '' 53 - ${pkgs.xorg.xrdb}/bin/xrdb -merge ${xres} 54 - ''; 55 - } 56 - ]; 57 - 58 - users.users.mainUser.extraGroups = [ 59 - "audio" 60 - "video" 61 - ]; 62 - 63 - time.timeZone = "Europe/Berlin"; 64 - 65 - programs.ssh.agentTimeout = "10m"; 66 - programs.ssh.startAgent = false; 67 - services.openssh.forwardX11 = true; 68 - 69 - environment.systemPackages = with pkgs; [ 70 - acpi 71 - acpilight 72 - ripgrep 73 - dmenu 74 - stockholmPkgs.fzfmenu 75 - dconf 76 - libarchive 77 - ncdu 78 - nix-index 79 - nixpkgs-review 80 - nmap 81 - pavucontrol 82 - sxiv 83 - nsxiv 84 - wirelesstools 85 - x11vnc 86 - xclip 87 - xorg.xmodmap 88 - xorg.xhost 89 - xdotool 90 - xsel 91 - zathura 92 - flameshot 93 - (pkgs.writers.writeDashBin "screenshot" '' 94 - ${pkgs.flameshot}/bin/flameshot gui 95 - '') 96 - (pkgs.writers.writeDashBin "deploy_hm" '' 97 - target=$1 98 - shift 99 - 100 - hm_profile=$(${pkgs.home-manager}/bin/home-manager -f ~/sync/stockholm/lass/2configs/home-manager.nix build "$@") 101 - nix-copy-closure --to "$target" "$hm_profile" 102 - ssh "$target" -- "$hm_profile"/activate 103 - '') 104 - zbar 105 - ]; 106 - 107 - services.udev.extraRules = '' 108 - SUBSYSTEM=="backlight", ACTION=="add", \ 109 - RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness", \ 110 - RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness" 111 - ''; 112 - 113 - services.xserver = { 114 - enable = true; 115 - layout = "us"; 116 - display = lib.mkForce 0; 117 - xkbVariant = "altgr-intl"; 118 - xkbOptions = "caps:escape"; 119 - libinput.enable = true; 120 - exportConfiguration = true; 121 - displayManager = { 122 - lightdm.enable = true; 123 - defaultSession = "none+xmonad"; 124 - sessionCommands = '' 125 - ${pkgs.xorg.xhost}/bin/xhost +LOCAL: 126 - ''; 127 - }; 128 - }; 129 - 130 - nixpkgs.config.packageOverrides = _super: { 131 - dmenu = pkgs.writers.writeDashBin "dmenu" '' 132 - ${stockholmPkgs.fzfmenu}/bin/fzfmenu "$@" 133 - ''; 134 - }; 135 - 136 - services.clipmenu.enable = true; 137 - 138 - # synchronize all the clipboards 139 - systemd.user.services.autocutsel = { 140 - enable = true; 141 - wantedBy = [ "graphical-session.target" ]; 142 - after = [ "graphical-session.target" ]; 143 - serviceConfig = { 144 - Type = "forking"; 145 - ExecStart = pkgs.writers.writeDash "autocutsel" '' 146 - ${pkgs.autocutsel}/bin/autocutsel -fork -selection PRIMARY 147 - ${pkgs.autocutsel}/bin/autocutsel -fork -selection CLIPBOARD 148 - ''; 149 - }; 150 - }; 151 - systemd.services.xsettingsd = { 152 - wantedBy = [ "multi-user.target" ]; 153 - after = [ "display-manager.service" ]; 154 - environment.DISPLAY = ":0"; 155 - serviceConfig = { 156 - ExecStart = "${pkgs.xsettingsd}/bin/xsettingsd -c /var/theme/config/xsettings.conf"; 157 - User = "lass"; 158 - Restart = "always"; 159 - RestartSec = "15s"; 160 - }; 161 - }; 162 - }
-241
configs/desktops/xmonad/default.nix
··· 1 - { 2 - config, 3 - lib, 4 - pkgs, 5 - ... 6 - }: 7 - 8 - { 9 - imports = [ 10 - ../lib/x11.nix 11 - ]; 12 - services.xserver.windowManager.xmonad = { 13 - enable = true; 14 - extraPackages = hs: [ 15 - hs.extra 16 - hs.xmonad-contrib 17 - ]; 18 - config = # haskell 19 - '' 20 - {-# LANGUAGE LambdaCase #-} 21 - 22 - 23 - module Main where 24 - import XMonad 25 - 26 - import qualified XMonad.StackSet as W 27 - import Control.Monad.Extra (whenJustM) 28 - import Data.List (isInfixOf) 29 - import Data.Monoid (Endo) 30 - import System.Environment (getArgs, lookupEnv) 31 - import System.Exit (exitFailure) 32 - import System.IO (hPutStrLn, stderr) 33 - import System.Posix.Process (executeFile) 34 - import Data.Ratio 35 - 36 - import XMonad.Actions.Commands (defaultCommands, runCommand) 37 - import XMonad.Actions.CopyWindow (copy, copyToAll, kill1) 38 - import XMonad.Actions.CycleWS (toggleWS) 39 - import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace, removeEmptyWorkspace) 40 - import XMonad.Actions.DynamicWorkspaces (withWorkspace) 41 - import XMonad.Actions.GridSelect (GSConfig(..), gridselectWorkspace, navNSearch) 42 - import XMonad.Actions.Minimize (minimizeWindow, maximizeWindow, withLastMinimized) 43 - import XMonad.Hooks.EwmhDesktops (ewmh) 44 - import XMonad.Hooks.FloatNext (floatNext) 45 - import XMonad.Hooks.FloatNext (floatNextHook) 46 - import XMonad.Hooks.ManageDocks (avoidStruts, ToggleStruts(ToggleStruts)) 47 - import XMonad.Hooks.ManageHelpers (doCenterFloat, doRectFloat, (-?>)) 48 - import XMonad.Hooks.Place (placeHook, smart) 49 - import XMonad.Hooks.UrgencyHook (focusUrgent) 50 - import XMonad.Hooks.UrgencyHook (withUrgencyHook, UrgencyHook(..)) 51 - import XMonad.Layout.BoringWindows (boringWindows, focusDown, focusUp) 52 - import XMonad.Layout.FixedColumn (FixedColumn(..)) 53 - import XMonad.Layout.Grid (Grid(..)) 54 - import XMonad.Layout.Minimize (minimize) 55 - import XMonad.Layout.NoBorders (smartBorders, noBorders) 56 - import XMonad.Layout.MouseResizableTile (mouseResizableTile) 57 - import XMonad.Layout.SimplestFloat (simplestFloat) 58 - import XMonad.Layout.StateFull 59 - import XMonad.ManageHook (composeAll) 60 - import XMonad.Prompt (autoComplete, font, height, searchPredicate, XPConfig) 61 - import XMonad.Util.EZConfig (additionalKeysP) 62 - import XMonad.Util.NamedWindows (getName) 63 - import XMonad.Util.Run (safeSpawn) 64 - import XMonad.Util.Ungrab (unGrab) 65 - import XMonad.Util.Paste (sendKey) 66 - 67 - data LibNotifyUrgencyHook = LibNotifyUrgencyHook deriving (Read, Show) 68 - 69 - instance UrgencyHook LibNotifyUrgencyHook where 70 - urgencyHook LibNotifyUrgencyHook w = do 71 - name <- getName w 72 - Just idx <- fmap (W.findTag w) $ gets windowset 73 - 74 - safeSpawn "${pkgs.libnotify}/bin/notify-send" [show name, "workspace " ++ idx] 75 - 76 - myTerm :: FilePath 77 - myTerm = "/run/current-system/sw/bin/alacritty" 78 - 79 - myFont :: String 80 - myFont = "${config.lass.fonts.regular}" 81 - 82 - main :: IO () 83 - main = do 84 - xmonad $ ewmh 85 - $ withUrgencyHook LibNotifyUrgencyHook 86 - $ def 87 - { terminal = myTerm 88 - , modMask = mod4Mask 89 - , layoutHook = myLayoutHook 90 - , manageHook = floatHooks 91 - , startupHook = 92 - whenJustM (liftIO (lookupEnv "XMONAD_STARTUP_HOOK")) 93 - (\path -> forkFile path [] Nothing) 94 - , normalBorderColor = "#1c1c1c" 95 - , focusedBorderColor = "#ff0000" 96 - , workspaces = [ "dashboard", "sys", "wp" ] 97 - } `additionalKeysP` myKeyMap 98 - 99 - myLayoutHook = defLayout 100 - where 101 - defLayout = smartBorders $ 102 - minimize . 103 - boringWindows $ 104 - ( 105 - noBorders StateFull ||| 106 - (avoidStruts $ Mirror (Tall 1 (3/100) (1/2))) ||| 107 - FixedColumn 2 80 80 1 ||| 108 - Tall 1 (3/100) (1/2) ||| 109 - simplestFloat ||| 110 - mouseResizableTile ||| 111 - Grid 112 - ) 113 - 114 - floatHooks = composeAll 115 - [ className =? "Pinentry" --> doCenterFloat 116 - , className =? "Pager" --> doCenterFloat 117 - , title =? "pager" --> doCenterFloat 118 - , title =? "fzfmenu" --> doCenterFloat 119 - , title =? "glxgears" --> doCenterFloat 120 - , resource =? "Dialog" --> doFloat 121 - , title =? "Upload to Imgur" --> 122 - doRectFloat (W.RationalRect 0 0 (1 % 8) (1 % 8)) 123 - , placeHook (smart (1,0)) 124 - , floatNextHook 125 - ] 126 - 127 - myKeyMap :: [([Char], X ())] 128 - myKeyMap = 129 - [ ("M4-p", forkFile "${pkgs.writers.writeDashBin "passmenu" '' 130 - set -efux 131 - export TERM=dumb 132 - ${pkgs.pass}/bin/passmenu --type 133 - ''}" [] Nothing) 134 - 135 - , ("M4-S-q", restart "xmonad" True) 136 - 137 - , ("<XF86AudioMute>", spawn "${pkgs.pulseaudio.out}/bin/pactl -- set-sink-mute @DEFAULT_SINK@ toggle") 138 - , ("<XF86AudioRaiseVolume>", spawn "${pkgs.pulseaudio.out}/bin/pactl -- set-sink-volume @DEFAULT_SINK@ +4%") 139 - , ("<XF86AudioLowerVolume>", spawn "${pkgs.pulseaudio.out}/bin/pactl -- set-sink-volume @DEFAULT_SINK@ -4%") 140 - , ("<XF86MonBrightnessDown>", spawn "${pkgs.acpilight}/bin/xbacklight -time 0 -dec 1") 141 - , ("<XF86MonBrightnessUp>", spawn "${pkgs.acpilight}/bin/xbacklight -time 0 -inc 1") 142 - , ("M4-C-k", spawn "${pkgs.xorg.xkill}/bin/xkill") 143 - 144 - , ("M4-<Tab>", focusDown) 145 - , ("M4-S-<Tab>", focusUp) 146 - , ("M4-j", focusDown) 147 - , ("M4-k", focusUp) 148 - 149 - , ("M4-a", focusUrgent) 150 - , ("M4-S-r", renameWorkspace myXPConfig) 151 - , ("M4-S-a", addWorkspacePrompt myXPConfig) 152 - , ("M4-S-<Backspace>", removeEmptyWorkspace) 153 - , ("M4-S-c", kill1) 154 - , ("M4-<Esc>", toggleWS) 155 - , ("M4-S-<Enter>", spawn myTerm) 156 - , ("M4-x", floatNext True >> spawn myTerm) 157 - , ("M4-c", spawn "/run/current-system/sw/bin/emacsclient -c") 158 - -- , ("M4-c", unGrab) 159 - , ("M4-f", floatNext True) 160 - 161 - , ("M4-c", defaultCommands >>= runCommand) 162 - , ("M4-v", withWorkspace autoXPConfig (windows . W.greedyView)) 163 - , ("M4-S-v", withWorkspace autoXPConfig (windows . W.shift)) 164 - , ("M4-C-v", withWorkspace autoXPConfig (windows . copy)) 165 - 166 - , ("M4-m", withFocused minimizeWindow) 167 - , ("M4-S-m", withLastMinimized maximizeWindow) 168 - 169 - , ("M4-S-q", return ()) 170 - 171 - , ("M4-d", floatNext True >> spawn "${pkgs.writers.writeDash "clipmenu" '' 172 - PATH=${ 173 - lib.makeBinPath [ 174 - pkgs.coreutils 175 - pkgs.gawk 176 - pkgs.dmenu 177 - ] 178 - } 179 - ${pkgs.clipmenu}/bin/clipmenu 180 - ''}") 181 - 182 - , ("M4-<Insert>", spawn "${pkgs.writers.writeDash "paste" '' 183 - ${pkgs.coreutils}/bin/sleep 0.4 184 - ${pkgs.xclip}/bin/xclip -o | ${pkgs.xdotool}/bin/xdotool type -f - 185 - ''}") 186 - 187 - , ("M4-<F1>", spawn "/run/current-system/sw/bin/gamepad_mouse_toggle") 188 - , ("M4-<F2>", windows copyToAll) 189 - , ("M4-<F5>", spawn "${pkgs.acpilight}/bin/xbacklight -set 1") 190 - , ("M4-<F6>", spawn "${pkgs.acpilight}/bin/xbacklight -set 10") 191 - , ("M4-<F7>", spawn "${pkgs.acpilight}/bin/xbacklight -set 33") 192 - , ("M4-<F8>", spawn "${pkgs.acpilight}/bin/xbacklight -set 100") 193 - 194 - , ("M4-<F9>", spawn "${pkgs.redshift}/bin/redshift -O 4000 -g 0.9:0.8:0.8") 195 - , ("M4-<F10>", spawn "${pkgs.redshift}/bin/redshift -x") 196 - 197 - , ("M4-<F11>", spawn "${config.lass.screenlock.command}") 198 - 199 - , ("M4-u", spawn "${pkgs.xcalib}/bin/xcalib -invert -alter") 200 - , ("M4-y", spawn "/run/current-system/sw/bin/switch-theme toggle") 201 - 202 - ${lib.optionalString (builtins.hasAttr "warpd" pkgs) '', ("M4-s", spawn "${pkgs.warpd}/bin/warpd --hint")''} 203 - , ("M4-i", spawn "/run/current-system/sw/bin/screenshot") 204 - 205 - --, ("M4-w", screenWorkspace 0 >>= (windows . W.greedyView)) 206 - --, ("M4-e", screenWorkspace 1 >>= (windows . W.greedyView)) 207 - --, ("M4-r", screenWorkspace 2 >>= (windows . W.greedyView)) 208 - ] 209 - 210 - forkFile :: FilePath -> [String] -> Maybe [(String, String)] -> X () 211 - forkFile path args env = 212 - xfork (executeFile path True args env) >> return () 213 - 214 - myXPConfig :: XPConfig 215 - myXPConfig = def 216 - { font = myFont 217 - , height = 40 218 - } 219 - 220 - autoXPConfig :: XPConfig 221 - autoXPConfig = myXPConfig 222 - { autoComplete = Just 5000 223 - } 224 - 225 - infixAutoXPConfig :: XPConfig 226 - infixAutoXPConfig = autoXPConfig 227 - { searchPredicate = isInfixOf 228 - } 229 - 230 - gridConfig :: GSConfig WorkspaceId 231 - gridConfig = def 232 - { gs_cellwidth = 100 233 - , gs_cellheight = 30 234 - , gs_cellpadding = 2 235 - , gs_navigate = navNSearch 236 - , gs_font = myFont 237 - } 238 - 239 - ''; 240 - }; 241 - }