diff options
26 files changed, 278 insertions, 92 deletions
diff --git a/jeschli/1systems/bln/config.nix b/jeschli/1systems/bln/config.nix index c5f8101ea..c06c59281 100644 --- a/jeschli/1systems/bln/config.nix +++ b/jeschli/1systems/bln/config.nix @@ -11,8 +11,22 @@ <stockholm/jeschli/2configs/xserver> ]; - boot.loader.systemd-boot.enable = true; +# boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + boot.loader.efi.efiSysMountPoint = "/boot"; + boot.loader.grub = { + devices = [ "nodev" ]; + efiSupport = true; + enable = true; + extraEntries = '' + menuentry "Debian" { + insmod ext2 + insmod chain + chainloader /EFI/debian/grubx64.efi + } + ''; + version = 2; + }; jeschliFontSize = 20; @@ -56,7 +70,6 @@ sqlite # internet thunderbird - hipchat chromium google-chrome # programming languages @@ -78,6 +91,7 @@ texlive.combined.scheme-full pandoc redis + vagrant # document viewer zathura ]; @@ -92,14 +106,23 @@ services.printing.enable = true; services.printing.drivers = [ pkgs.postscript-lexmark ]; - # Enable the X11 windowing system. - services.xserver.videoDrivers = [ "nvidia" ]; + services.xserver = { + + desktopManager.session = lib.mkForce []; + + enable = true; + display = 11; + tty = 11; + + dpi = 200; + + videoDrivers = [ "nvidia" ]; + synaptics = { + enable = false; + }; + + }; -# services.xserver.windowManager.xmonad.enable = true; -# services.xserver.windowManager.xmonad.enableContribAndExtras = true; -# services.xserver.displayManager.sddm.enable = true; -# services.xserver.dpi = 100; -# fonts.fontconfig.dpi = 100; users.extraUsers.jeschli = { isNormalUser = true; diff --git a/jeschli/1systems/bln/dcso-vpn.nix b/jeschli/1systems/bln/dcso-vpn.nix new file mode 100644 index 000000000..0a5623bf0 --- /dev/null +++ b/jeschli/1systems/bln/dcso-vpn.nix @@ -0,0 +1,44 @@ +with import <stockholm/lib>; +{ ... }: + +{ + + users.extraUsers = { + dcsovpn = rec { + name = "dcsovpn"; + uid = genid "dcsovpn"; + description = "user for running dcso openvpn"; + home = "/home/${name}"; + }; + }; + + users.extraGroups.dcsovpn.gid = genid "dcsovpn"; + + services.openvpn.servers = { + dcso = { + config = '' + client + dev tun + tun-mtu 1356 + mssfix + proto udp + float + remote 217.111.55.41 1194 + nobind + user dcsovpn + group dcsovpn + persist-key + persist-tun + ca ${toString <secrets/dcsovpn/ca.pem>} + cert ${toString <secrets/dcsovpn/cert.pem>} + key ${toString <secrets/dcsovpn/cert.key>} + verb 3 + mute 20 + auth-user-pass ${toString <secrets/dcsovpn/login.txt>} + route-method exe + route-delay 2 + ''; + updateResolvConf = true; + }; + }; +} diff --git a/jeschli/1systems/brauerei/config.nix b/jeschli/1systems/brauerei/config.nix index 49f439a06..5a6ad7652 100644 --- a/jeschli/1systems/brauerei/config.nix +++ b/jeschli/1systems/brauerei/config.nix @@ -1,5 +1,5 @@ # 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, ... }: +{ config, pkgs, lib, ... }: { imports = [ <stockholm/jeschli> @@ -8,6 +8,7 @@ <stockholm/jeschli/2configs/emacs.nix> <stockholm/jeschli/2configs/xdg.nix> <stockholm/jeschli/2configs/xserver> + <stockholm/jeschli/2configs/virtualbox.nix> ]; krebs.build.host = config.krebs.hosts.brauerei; @@ -24,9 +25,10 @@ preLVM = true; allowDiscards = true; } ]; - # networking.hostName = "nixos"; +# networking.hostName = "brauerei"; # Define your hostname. - networking.wireless.enable = true; +# networking.wireless.enable = true; + networking.networkmanager.enable = true; # Enables wireless support via wpa_supplicant. # Select internationalisation properties. # i18n = { @@ -66,12 +68,25 @@ chromium google-chrome # programming languages + elixir + elmPackages.elm exercism go gcc ghc python35 python35Packages.pip + (vagrant.override { + bundlerEnv = bundlerEnv.override { + bundler = bundler.overrideAttrs (old: { + name = "bundler-1.16.1"; + src = fetchurl { + url = "https://rubygems.org/gems/bundler-1.16.1.gem"; + sha256 = "1s2nq4qnffxg3kwrk7cnwxcvfihlhxm9absl2l6d3qckf3sy1f22"; + }; + }); + }; + }) # go tools golint gotools @@ -84,6 +99,7 @@ jetbrains.webstorm jetbrains.goland # document viewer + evince zathura # xorg xorg.xbacklight @@ -100,33 +116,29 @@ # Enable the OpenSSH daemon. services.openssh.enable = true; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; + services.xserver = { - # Enable CUPS to print documents. - # services.printing.enable = true; + # Don't install feh into systemPackages + # refs <nixpkgs/nixos/modules/services/x11/desktop-managers> + desktopManager.session = lib.mkForce []; - # Enable the X11 windowing system. - # services.xserver.enable = true; - # services.xserver.layout = "us"; - # services.xserver.xkbOptions = "eurosign:e"; + enable = true; + display = 11; + tty = 11; + + dpi = 96; - # Enable touchpad support. - # services.xserver.libinput.enable = true; +# videoDrivers = [ "nvidia" ]; + synaptics = { + enable = true; + twoFingerScroll = true; + accelFactor = "0.035"; + }; + }; - # Enable the KDE Desktop Environment. - # services.xserver.displayManager.sddm.enable = true; - # services.xserver.desktopManager.plasma5.enable = true; - # services.xserver.displayManager.sddm.enable = true; - # services.xserver.windowManager.xmonad.enable = true; - # services.xserver.windowManager.xmonad.enableContribAndExtras = true; - # - # Define a user account. Don't forget to set a password with ‘passwd’. users.extraUsers.jeschli = { # TODO: define as krebs.users isNormalUser = true; + extraGroups = ["docker" "vboxusers"]; uid = 1000; }; users.extraUsers.jamie = { diff --git a/jeschli/2configs/vim.nix b/jeschli/2configs/vim.nix index c13113f1c..586016f60 100644 --- a/jeschli/2configs/vim.nix +++ b/jeschli/2configs/vim.nix @@ -11,16 +11,24 @@ let sha256 = "08l7ricd3j5h2bj9i566byh39v9n5wj5mj75f2c8a5dsc732b2k7"; }; }; - customPlugins.vim-jsx = pkgs.vimUtils.buildVimPlugin { - name = "vim-jsx"; - src = pkgs.fetchFromGitHub { - owner = "mxw"; - repo = "vim-jsx"; - rev = "5b968dfa512c57c38ad7fe420f3e8ab75a73949a"; - sha256 = "1z3yhhbmbzfw68qjzyvpbmlyv2a1p814sy5q2knn04kcl30vx94a"; - }; - }; - + customPlugins.vim-jsx = pkgs.vimUtils.buildVimPlugin { + name = "vim-jsx"; + src = pkgs.fetchFromGitHub { + owner = "mxw"; + repo = "vim-jsx"; + rev = "5b968dfa512c57c38ad7fe420f3e8ab75a73949a"; + sha256 = "1z3yhhbmbzfw68qjzyvpbmlyv2a1p814sy5q2knn04kcl30vx94a"; + }; + }; + customPlugins.vim-fileline = pkgs.vimUtils.buildVimPlugin { + name = "file-line-1.0"; + src = pkgs.fetchFromGitHub { + owner = "bogado"; + repo = "file-line"; + rev = "1.0"; + sha256 = "0z47zq9rqh06ny0q8lpcdsraf3lyzn9xvb59nywnarf3nxrk6hx0"; + }; + }; in { environment.systemPackages = [ (pkgs.vim_configurable.customize { @@ -33,6 +41,8 @@ in { setStatements = '' set autowrite set clipboard=unnamedplus + set listchars=trail:¶ + set mouse=a set nocompatible set path+=** set ruler @@ -40,7 +50,6 @@ in { set undofile "turn on the feature set wildignore+=*.o,*.class,*.hi,*.dyn_hi,*.dyn_o set wildmenu - set listchars=trail:¶ ''; remapStatements = '' imap jk <Esc> @@ -91,13 +100,14 @@ in { { names = [ "ctrlp" "easymotion" + "elm-vim" + "vim-fileline" "molokai" "nerdtree" "snipmate" "surround" "Syntastic" "undotree" - "elm-vim" ]; } { names = [ "vim-addon-nix" ]; ft_regex = "^nix\$"; } diff --git a/jeschli/2configs/xserver/default.nix b/jeschli/2configs/xserver/default.nix index 748d12258..ec3977c7e 100644 --- a/jeschli/2configs/xserver/default.nix +++ b/jeschli/2configs/xserver/default.nix @@ -34,26 +34,6 @@ in { }; }; - services.xserver = { - - # Don't install feh into systemPackages - # refs <nixpkgs/nixos/modules/services/x11/desktop-managers> - desktopManager.session = mkForce []; - - enable = true; - display = 11; - tty = 11; - - dpi = 200; - - videoDrivers = [ "nvidia" ]; - synaptics = { - enable = true; - twoFingerScroll = true; - accelFactor = "0.035"; - }; - }; - systemd.services.display-manager.enable = false; systemd.services.xmonad = { diff --git a/jeschli/5pkgs/simple/xmonad-jeschli/default.nix b/jeschli/5pkgs/simple/xmonad-jeschli/default.nix index 60dbbc50c..5aa3c2f96 100644 --- a/jeschli/5pkgs/simple/xmonad-jeschli/default.nix +++ b/jeschli/5pkgs/simple/xmonad-jeschli/default.nix @@ -90,7 +90,7 @@ mainNoArgs = do , startupHook = do setWMName "LG3D" whenJustM (liftIO (lookupEnv "XMONAD_STARTUP_HOOK")) - (\path -> forkFile path [] Nothing) + (\path -> forkFile path [] Nothing) <+> setWMName "LG3D" , normalBorderColor = "#1c1c1c" , focusedBorderColor = "#f000b0" , handleEventHook = handleShutdownEvent @@ -130,13 +130,16 @@ spawnTermAt ws = do let env' = ("XMONAD_SPAWN_WORKSPACE", ws) : env forkFile urxvtcPath [] (Just env') + myKeys :: XConfig Layout -> Map (KeyMask, KeySym) (X ()) myKeys conf = Map.fromList $ [ ((_4 , xK_Escape ), forkFile "/run/wrappers/bin/slock" [] Nothing) , ((_4S , xK_c ), kill) - , ((_4 , xK_p ), forkFile "${pkgs.pass}/bin/passmenu" ["--type"] Nothing) - + , ((_4 , xK_p ), spawn "${pkgs.writeDash "my-dmenu" '' + export PATH=$PATH:${pkgs.dmenu}/bin + exec dmenu_run "$@" + ''}") , ((_4 , xK_x ), chooseAction spawnTermAt) , ((_4C , xK_x ), spawnRootTerm) diff --git a/krebs/5pkgs/simple/cholerab/default.nix b/krebs/5pkgs/simple/cholerab/default.nix new file mode 100644 index 000000000..94514fe44 --- /dev/null +++ b/krebs/5pkgs/simple/cholerab/default.nix @@ -0,0 +1,7 @@ +{ fetchgit, callPackage }: let + src = fetchgit { + url = "https://github.com/krebs/cholerab"; + rev = "25d7ef051d6fc74d99b155e768b3c650296a230c"; + sha256 = "1pymw7v2ql42iq825ccx98s4fp9jsz5b2hjr1qad6bamfc6i7yy9"; + }; +in callPackage src {} diff --git a/krebs/5pkgs/simple/ftb/default.nix b/krebs/5pkgs/simple/ftb/default.nix index c2e83c9f4..ab7d6e651 100644 --- a/krebs/5pkgs/simple/ftb/default.nix +++ b/krebs/5pkgs/simple/ftb/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl , jre, libX11, libXext, libXcursor, libXrandr, libXxf86vm , openjdk -, mesa, openal +, mesa_glu, openal , useAlsa ? false, alsaOss ? null }: with stdenv.lib; @@ -26,7 +26,7 @@ stdenv.mkDerivation { #!${stdenv.shell} export _JAVA_AWT_WM_NONREPARENTING=1 - export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm mesa openal ]} + export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm mesa_glu openal ]} ${if useAlsa then "${alsaOss}/bin/aoss" else "" } \ ${jre}/bin/java -jar $out/ftb.jar EOF diff --git a/krebs/5pkgs/simple/thesauron/default.nix b/krebs/5pkgs/simple/thesauron/default.nix deleted file mode 100644 index d543319f2..000000000 --- a/krebs/5pkgs/simple/thesauron/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ fetchgit, callPackage }: let - src = fetchgit { - url = "https://github.com/krebs/thesauron"; - rev = "8ac22588cf2c20465e3c9348e7ce04885599c2a5"; - "sha256"= "1ivkjl235dnm5aaqqvarnxkz7zh0gvah22b0fqwlsflrcd5wmgva"; - }; -in callPackage src {} diff --git a/krebs/krops.nix b/krebs/krops.nix index 97cd6a939..6a8a05726 100644 --- a/krebs/krops.nix +++ b/krebs/krops.nix @@ -12,7 +12,7 @@ krebs-source = { nixpkgs.git = { - ref = "7295e175bf6c6e8aa54f1b4d99256ee95d13d385"; + ref = "91b286c8935b8c5df4a99302715200d3bd561977"; url = https://github.com/NixOS/nixpkgs; }; stockholm.file = toString ../.; diff --git a/lass/1systems/mors/config.nix b/lass/1systems/mors/config.nix index 97e69146e..fd26d0b66 100644 --- a/lass/1systems/mors/config.nix +++ b/lass/1systems/mors/config.nix @@ -29,6 +29,7 @@ with import <stockholm/lib>; <stockholm/lass/2configs/c-base.nix> <stockholm/lass/2configs/br.nix> <stockholm/lass/2configs/ableton.nix> + <stockholm/lass/2configs/starcraft.nix> <stockholm/lass/2configs/dunst.nix> <stockholm/lass/2configs/rtl-sdr.nix> <stockholm/lass/2configs/backup.nix> diff --git a/lass/1systems/prism/config.nix b/lass/1systems/prism/config.nix index 780403813..2626ebf33 100644 --- a/lass/1systems/prism/config.nix +++ b/lass/1systems/prism/config.nix @@ -195,6 +195,16 @@ with import <stockholm/lib>; jeschli-bolide jeschli-brauerei ]; + repo = [ config.krebs.git.repos.xmonad-stockholm ]; + perm = with git; push "refs/heads/jeschli*" [ fast-forward non-fast-forward create delete merge ]; + } + { + user = with config.krebs.users; [ + jeschli + jeschli-bln + jeschli-bolide + jeschli-brauerei + ]; repo = [ config.krebs.git.repos.stockholm ]; perm = with git; push "refs/heads/staging/jeschli*" [ fast-forward non-fast-forward create delete merge ]; } diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index b27368613..7d04827f0 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -71,8 +71,10 @@ in { ag bank cabal2nix + cholerab dic dmenu + font-size gi gitAndTools.qgit git-preview @@ -92,7 +94,6 @@ in { sxiv taskwarrior termite - thesauron timewarrior xclip xephyrify diff --git a/lass/2configs/dcso-dev.nix b/lass/2configs/dcso-dev.nix index b985b67b3..62a601dc3 100644 --- a/lass/2configs/dcso-dev.nix +++ b/lass/2configs/dcso-dev.nix @@ -54,10 +54,14 @@ in { krebs.per-user.dev.packages = [ pkgs.go ]; + environment.variables.GOPATH = "$HOME/go"; security.sudo.extraConfig = '' ${mainUser.name} ALL=(dev) NOPASSWD: ALL ''; - services.minio.enable = true; + services.rabbitmq.enable = true; + networking.interfaces.et0.ipv4.addresses = [ + { address = "10.99.23.1"; prefixLength = 24; } + ]; } diff --git a/lass/2configs/dunst.nix b/lass/2configs/dunst.nix index 6d3d839bc..18a22e1da 100644 --- a/lass/2configs/dunst.nix +++ b/lass/2configs/dunst.nix @@ -188,21 +188,21 @@ let foreground = "#3B7C87" background = "#191311" #background = "#2B313C" - timeout = 0 + timeout = 1 [urgency_normal] frame_color = "#5B8234" foreground = "#5B8234" background = "#191311" #background = "#2B313C" - timeout = 0 + timeout = 1 [urgency_critical] frame_color = "#B7472A" foreground = "#B7472A" background = "#191311" #background = "#2B313C" - timeout = 0 + timeout = 1 # Every section that isn't one of the above is interpreted as a rules to diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix index 72cfd5e75..707796dd9 100644 --- a/lass/2configs/git.nix +++ b/lass/2configs/git.nix @@ -61,6 +61,10 @@ let cgit.desc = "krebs deployment"; cgit.section = "software"; }; + xmonad-stockholm = { + cgit.desc = "krebs xmonad modules"; + cgit.section = "configuration"; + }; } // mapAttrs make-public-repo-silent { nixos-aws = { collaborators = [ { diff --git a/lass/2configs/logf.nix b/lass/2configs/logf.nix index 24b806efa..f141a94f5 100644 --- a/lass/2configs/logf.nix +++ b/lass/2configs/logf.nix @@ -11,7 +11,7 @@ let cloudkrebs = "119"; }; urgent = [ - "\\blass@mors\\b" + "\\blass@blue\\b" ]; in { environment.systemPackages = [ diff --git a/lass/2configs/reaktor-coders.nix b/lass/2configs/reaktor-coders.nix index 0ce147acd..86877df7a 100644 --- a/lass/2configs/reaktor-coders.nix +++ b/lass/2configs/reaktor-coders.nix @@ -100,6 +100,12 @@ with import <stockholm/lib>; exec echo 'DID SOMEBODY SAY BLOCKCHAIN? https://paste.krebsco.de/r99pMoQq/+inline' ''; }) + (buildSimpleReaktorPlugin "shrug" { + pattern = "^!shrug$"; + script = pkgs.writeDash "shrug" '' + exec echo '¯\_(ツ)_/¯' + ''; + }) ]; }; } diff --git a/lass/2configs/repo-sync.nix b/lass/2configs/repo-sync.nix index 615f5a728..6a07172fe 100644 --- a/lass/2configs/repo-sync.nix +++ b/lass/2configs/repo-sync.nix @@ -27,6 +27,7 @@ let user = with config.krebs.users; [ config.krebs.users."${config.networking.hostName}-repo-sync" lass + lass-mors lass-shodan ]; repo = [ repo ]; @@ -136,5 +137,6 @@ in { (sync-retiolum "stockholm") (sync-retiolum "wai-middleware-time") (sync-retiolum "xmonad-stockholm") + (sync-retiolum "nix-writers") ]; } diff --git a/lass/2configs/starcraft.nix b/lass/2configs/starcraft.nix new file mode 100644 index 000000000..742b877e8 --- /dev/null +++ b/lass/2configs/starcraft.nix @@ -0,0 +1,53 @@ +{ config, pkgs, ... }: let + mainUser = config.users.extraUsers.mainUser; + newWine = pkgs.wineStaging; + #newWine = pkgs.wineStaging.overrideAttrs (old: { + # name = "wine-3.7"; + # buildInputs = old.buildInputs ++ [ + # pkgs.libuuid.bin + # pkgs.autoconf.out + # ]; + # src = pkgs.fetchurl { + # url = "https://dl.winehq.org/wine/source/3.x/wine-3.7.tar.xz"; + # sha256 = "1drbzk3y0m14lkq3vzwwkvain5shykgcbmyzh6gcb5r4sxh3givn"; + # }; + # postPatch = old.postPatch or "" + '' + # patchShebangs tools + # cp -r ${pkgs.fetchFromGitHub { + # sha256 = "0kam73jqhah7bzji5csxxhhfdp6byhzpcph6xnzjqz2aic5xk7xi"; + # owner = "wine-staging"; + # repo = "wine-staging"; + # rev = "v3.7"; + # }}/patches . + # chmod +w patches + # cd patches + # patchShebangs gitapply.sh + # ./patchinstall.sh DESTDIR="$PWD/.." --all + # cd .. + # ''; + + #}); + #newWine = (import (builtins.fetchGit { + # url = "https://github.com/NixOS/nixpkgs"; + # rev = "696c6bed4e8e2d9fd9b956dea7e5d49531e9d13f"; + #}) {}).wineStaging; +in { + users.users= { + starcraft = { + isNormalUser = true; + extraGroups = [ + "audio" + "video" + ]; + packages = [ + newWine + pkgs.winetricks + pkgs.mpg123 + ]; + }; + }; + security.sudo.extraConfig = '' + ${mainUser.name} ALL=(starcraft) NOPASSWD: ALL + ''; +} + diff --git a/lass/2configs/urxvt.nix b/lass/2configs/urxvt.nix index fc4537140..90d28d650 100644 --- a/lass/2configs/urxvt.nix +++ b/lass/2configs/urxvt.nix @@ -5,7 +5,7 @@ with import <stockholm/lib>; services.urxvtd.enable = true; krebs.xresources.resources.urxvt = '' - URxvt*SaveLines: 4096 + URxvt*SaveLines: 1000000 URxvt*scrollBar: false URxvt*urgentOnBell: true URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select @@ -19,6 +19,12 @@ with import <stockholm/lib>; URxvt.keysym.M-Escape: perl:keyboard-select:activate URxvt.keysym.M-s: perl:keyboard-select:search + URxvt.keysym.M-F1: command:\033]710;-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1\007\033]711;-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1\007 + URxvt.keysym.M-F2: command:\033]710;xft:Monospace:size=15\007\033]711;xft:Monospace:size=15:bold\007 + URxvt.keysym.M-F3: command:\033]710;xft:Monospace:size=20\007\033]711;xft:Monospace:size=20:bold\007 + URxvt.keysym.M-F4: command:\033]710;xft:Monospace:size=25\007\033]711;xft:Monospace:size=25:bold\007 + URxvt.keysym.M-F5: command:\033]710;xft:Monospace:size=30\007\033]711;xft:Monospace:size=30:bold\007 + URxvt.intensityStyles: false URxvt*background: #000000 diff --git a/lass/2configs/virtualbox.nix b/lass/2configs/virtualbox.nix index 8171def2d..cfb835d78 100644 --- a/lass/2configs/virtualbox.nix +++ b/lass/2configs/virtualbox.nix @@ -15,7 +15,7 @@ in { description = "user for running VirtualBox"; home = "/home/virtual"; useDefaultShell = true; - extraGroups = [ "vboxusers" "audio" ]; + extraGroups = [ "vboxusers" "audio" "video" ]; createHome = true; }; }; diff --git a/lass/2configs/websites/util.nix b/lass/2configs/websites/util.nix index 816449c14..a807f7160 100644 --- a/lass/2configs/websites/util.nix +++ b/lass/2configs/websites/util.nix @@ -194,7 +194,7 @@ rec { in { services.nginx.virtualHosts."${domain}" = { enableACME = true; - addSSL = true; + forceSSL = true; serverAliases = domains; extraConfig = '' root /srv/http/${domain}/; diff --git a/lass/2configs/wine.nix b/lass/2configs/wine.nix index dd82b34eb..71a5cdda9 100644 --- a/lass/2configs/wine.nix +++ b/lass/2configs/wine.nix @@ -17,6 +17,7 @@ in { createHome = true; packages = [ pkgs.wine + pkgs.winetricks ]; }; }; diff --git a/lass/3modules/xjail.nix b/lass/3modules/xjail.nix index 4c0023a76..8f5f05bc2 100644 --- a/lass/3modules/xjail.nix +++ b/lass/3modules/xjail.nix @@ -41,6 +41,10 @@ with import <stockholm/lib>; type = types.path; default = pkgs.writeScript "echo_lol" "echo lol"; }; + vglrun = mkOption { + type = types.bool; + default = false; + }; wm = mkOption { #TODO find type type = types.string; @@ -116,9 +120,11 @@ with import <stockholm/lib>; ${pkgs.coreutils}/bin/kill $WM_PID ${pkgs.coreutils}/bin/kill $XEPHYR_PID ''; - sudo_ = pkgs.writeDash "${cfg.name}-sudo" '' + sudo_ = pkgs.writeDash "${cfg.name}-sudo" (if cfg.vglrun then '' /var/run/wrappers/bin/sudo -u ${cfg.name} -i ${vglrun_} "$@" - ''; + '' else '' + /var/run/wrappers/bin/sudo -u ${cfg.name} -i env DISPLAY=:${cfg.display} ${cfg.script} "$@" + ''); vglrun_ = pkgs.writeDash "${cfg.name}-vglrun" '' DISPLAY=:${cfg.display} ${pkgs.virtualgl}/bin/vglrun ${cfg.extraVglrunArgs} ${cfg.script} "$@" ''; diff --git a/lass/5pkgs/custom/xmonad-lass/default.nix b/lass/5pkgs/custom/xmonad-lass/default.nix index 7180f2a69..694f3c033 100644 --- a/lass/5pkgs/custom/xmonad-lass/default.nix +++ b/lass/5pkgs/custom/xmonad-lass/default.nix @@ -48,7 +48,8 @@ import XMonad.Util.EZConfig (additionalKeysP) import XMonad.Util.NamedWindows (getName) import XMonad.Util.Run (safeSpawn) -import XMonad.Stockholm.Shutdown +import XMonad.Stockholm.Shutdown (handleShutdownEvent, sendShutdownEvent) +import XMonad.Stockholm.Pager (defaultWindowColors, pager, MatchMethod(MatchPrefix), PagerConfig(..)) data LibNotifyUrgencyHook = LibNotifyUrgencyHook deriving (Read, Show) @@ -129,8 +130,8 @@ myKeyMap = , ("M4-f", floatNext True) , ("M4-b", sendMessage ToggleStruts) - , ("M4-v", withWorkspace autoXPConfig (windows . W.greedyView)) - , ("M4-S-v", withWorkspace autoXPConfig (windows . W.shift)) + , ("M4-v", gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.view) ) + , ("M4-S-v", gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.shift) ) , ("M4-C-v", withWorkspace autoXPConfig (windows . copy)) , ("M4-m", withFocused minimizeWindow) @@ -183,6 +184,21 @@ infixAutoXPConfig = autoXPConfig { searchPredicate = isInfixOf } +pagerConfig :: PagerConfig +pagerConfig = def + { pc_font = myFont + , pc_cellwidth = 64 + , pc_matchmethod = MatchPrefix + , pc_windowColors = windowColors + } + where + windowColors _ _ _ True _ = ("#ef4242","#ff2323") + windowColors wsf m c u wf = do + let y = defaultWindowColors wsf m c u wf + if m == False && wf == True + then ("#402020", snd y) + else y + gridConfig :: GSConfig WorkspaceId gridConfig = def { gs_cellwidth = 100 @@ -191,6 + |