This repository has no description
0

Configure Feed

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

superconfig / 2configs / desktops / lib / wayland.nix
3.0 kB 131 lines
1{ 2 self, 3 pkgs, 4 lib, 5 ... 6}: 7{ 8 imports = [ 9 ../../alacritty.nix 10 ../../mpv.nix 11 ../../power-action.nix 12 ../../xdg-open.nix 13 ../../yubikey.nix 14 ../../tmux.nix 15 ../../themes.nix 16 ../../fonts.nix 17 # ../pipewire.nix 18 # ./tty-share.nix 19 { 20 users.users.mainUser.packages = [ 21 pkgs.sshuttle 22 ]; 23 security.sudo.extraConfig = '' 24 lass ALL= (root) NOPASSWD:SETENV: ${pkgs.sshuttle}/bin/.sshuttle-wrapped 25 ''; 26 } 27 ]; 28 29 services.earlyoom = { 30 enable = true; 31 freeMemThreshold = 5; 32 }; 33 34 users.users.mainUser.extraGroups = [ 35 "audio" 36 "pipewire" 37 "video" 38 "input" 39 ]; 40 41 xdg.portal.enable = true; 42 xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; 43 xdg.portal.wlr.enable = true; 44 xdg.portal.config.common.default = "*"; # get old behavior back 45 fonts.enableDefaultPackages = true; 46 47 security.polkit.enable = true; 48 security.pam.services.swaylock = { }; 49 50 programs.dconf.enable = lib.mkDefault true; 51 services.gnome.gnome-keyring.enable = lib.mkDefault true; 52 programs.xwayland.enable = lib.mkDefault true; 53 54 environment.sessionVariables = { 55 MOZ_ENABLE_WAYLAND = "1"; 56 XDG_SESSION_TYPE = "wayland"; 57 SDL_VIDEODRIVER = "wayland"; 58 QT_QPA_PLATFORM = "wayland"; 59 QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; 60 _JAVA_AWT_WM_NONREPARENTING = "1"; 61 NIXOS_OZONE_WL = "1"; # Hint for electron apps to use wayland 62 }; 63 64 programs.wshowkeys.enable = true; 65 66 environment.systemPackages = with pkgs; [ 67 (gamescope.overrideAttrs (old: { 68 patches = old.patches ++ [ 69 ./gamescope_libinput.patch 70 ]; 71 72 })) 73 swaylock-effects # lockscreen 74 pavucontrol 75 swayidle 76 rofi-wayland 77 rofi-rbw 78 eog 79 libnotify 80 mako # notifications 81 kanshi # auto-configure display outputs 82 wdisplays # buggy with qtile? 83 wlr-randr 84 wl-clipboard 85 wev 86 blueberry 87 grim # screenshots 88 wtype 89 zathura 90 nsxiv 91 92 pavucontrol 93 evince 94 libnotify 95 pamixer 96 file-roller 97 xdg-utils 98 # polkit agent 99 polkit_gnome 100 101 self.packages.${pkgs.system}.wifi-qr 102 103 # gtk3 themes 104 gsettings-desktop-schemas 105 self.packages.${pkgs.system}.otpmenu 106 (pkgs.writers.writeDashBin "pass_menu" '' 107 set -efux 108 password=$( 109 (cd $HOME/.password-store; find -type f -name '*.gpg') | 110 sed -e 's/\.gpg$//' | 111 rofi -dmenu -p 'Password: ' | 112 xargs -I{} pass show {} | 113 tr -d '\n' 114 ) 115 echo -n "$password" | ${pkgs.wtype}/bin/wtype -d 10 -s 400 - 116 '') 117 (pkgs.writers.writeDashBin "screenshot" '' 118 ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.wl-clipboard}/bin/wl-copy 119 '') 120 (pkgs.writers.writeDashBin "type_paste" '' 121 ${pkgs.wl-clipboard}/bin/wl-paste | ${pkgs.wtype}/bin/wtype -d 10 -s 400 - 122 '') 123 ]; 124 125 environment.pathsToLink = [ 126 "/libexec" # for polkit 127 "/share/gsettings-schemas" # for XDG_DATA_DIRS 128 ]; 129 130 qt.platformTheme = "qt5ct"; 131}