This repository has no description
0

Configure Feed

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

1{ 2 self, 3 config, 4 lib, 5 pkgs, 6 ... 7}: 8{ 9 imports = [ 10 ../../alacritty.nix 11 ../../xdg-open.nix 12 ../../yubikey.nix 13 ../../pipewire.nix 14 ../../themes.nix 15 ../../fonts.nix 16 { 17 users.users.mainUser.packages = [ 18 pkgs.sshuttle 19 self.packages.${pkgs.system}.mpv 20 ]; 21 security.sudo.extraConfig = '' 22 lass ALL= (root) NOPASSWD:SETENV: ${pkgs.sshuttle}/bin/.sshuttle-wrapped 23 ''; 24 } 25 { 26 #font magic 27 options.lass.fonts = { 28 regular = lib.mkOption { 29 type = lib.types.str; 30 default = "xft:Iosevka Term SS15:style=regular"; 31 }; 32 bold = lib.mkOption { 33 type = lib.types.str; 34 default = "xft:Iosevka Term SS15:style=bold"; 35 }; 36 italic = lib.mkOption { 37 type = lib.types.str; 38 default = "xft:Iosevka Term SS15:style=italic"; 39 }; 40 }; 41 config.services.xserver.displayManager.sessionCommands = 42 let 43 xres = pkgs.writeText "xreources" '' 44 *.font: ${config.lass.fonts.regular} 45 *.boldFont: ${config.lass.fonts.bold} 46 *.italicFont: ${config.lass.fonts.italic} 47 ''; 48 in 49 '' 50 ${pkgs.xorg.xrdb}/bin/xrdb -merge ${xres} 51 ''; 52 } 53 ]; 54 55 users.users.mainUser.extraGroups = [ 56 "audio" 57 "video" 58 ]; 59 60 time.timeZone = "Europe/Berlin"; 61 62 programs.ssh.agentTimeout = "10m"; 63 programs.ssh.startAgent = false; 64 services.openssh.forwardX11 = true; 65 66 environment.systemPackages = with pkgs; [ 67 acpi 68 acpilight 69 ripgrep 70 dic 71 dmenu 72 fzfmenu 73 dconf 74 libarchive 75 ncdu 76 nix-index 77 nixpkgs-review 78 nmap 79 pavucontrol 80 sxiv 81 nsxiv 82 wirelesstools 83 x11vnc 84 xclip 85 xorg.xmodmap 86 xorg.xhost 87 xdotool 88 xsel 89 zathura 90 flameshot 91 (pkgs.writers.writeDashBin "screenshot" '' 92 set -efu 93 94 ${pkgs.flameshot}/bin/flameshot gui && 95 ${pkgs.klem}/bin/klem 96 '') 97 (pkgs.writers.writeDashBin "IM" '' 98 ${pkgs.mosh}/bin/mosh green.r -- tmux new-session -A -s IM -- weechat 99 '') 100 (pkgs.writers.writeDashBin "deploy_hm" '' 101 target=$1 102 shift 103 104 hm_profile=$(${pkgs.home-manager}/bin/home-manager -f ~/sync/stockholm/lass/2configs/home-manager.nix build "$@") 105 nix-copy-closure --to "$target" "$hm_profile" 106 ssh "$target" -- "$hm_profile"/activate 107 '') 108 zbar 109 ]; 110 111 services.udev.extraRules = '' 112 SUBSYSTEM=="backlight", ACTION=="add", \ 113 RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness", \ 114 RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness" 115 ''; 116 117 services.xserver = { 118 enable = true; 119 layout = "us"; 120 display = lib.mkForce 0; 121 xkbVariant = "altgr-intl"; 122 xkbOptions = "caps:escape"; 123 libinput.enable = true; 124 exportConfiguration = true; 125 displayManager = { 126 lightdm.enable = true; 127 defaultSession = "none+xmonad"; 128 sessionCommands = '' 129 ${pkgs.xorg.xhost}/bin/xhost +LOCAL: 130 ''; 131 }; 132 }; 133 134 nixpkgs.config.packageOverrides = _super: { 135 dmenu = pkgs.writers.writeDashBin "dmenu" '' 136 ${pkgs.fzfmenu}/bin/fzfmenu "$@" 137 ''; 138 }; 139 140 lass.klem = { 141 kpaste.script = pkgs.writeDash "kpaste-wrapper" '' 142 ${pkgs.kpaste}/bin/kpaste \ 143 | ${pkgs.coreutils}/bin/tail -1 \ 144 | ${pkgs.coreutils}/bin/tr -d '\r\n' 145 ''; 146 go = { 147 target = "STRING"; 148 script = "${pkgs.goify}/bin/goify"; 149 }; 150 "go.lassul.us" = { 151 target = "STRING"; 152 script = pkgs.writeDash "go.lassul.us" '' 153 export GO_HOST='go.lassul.us' 154 ${pkgs.goify}/bin/goify 155 ''; 156 }; 157 qrcode = { 158 target = "image"; 159 script = pkgs.writeDash "zbar" '' 160 ${pkgs.zbar}/bin/zbarimg -q --raw - 161 ''; 162 }; 163 ocr = { 164 target = "image"; 165 script = pkgs.writeDash "gocr" '' 166 ${pkgs.netpbm}/bin/pngtopnm - \ 167 | ${pkgs.gocr}/bin/gocr - 168 ''; 169 }; 170 }; 171 172 services.clipmenu.enable = true; 173 174 # synchronize all the clipboards 175 systemd.user.services.autocutsel = { 176 enable = true; 177 wantedBy = [ "graphical-session.target" ]; 178 after = [ "graphical-session.target" ]; 179 serviceConfig = { 180 Type = "forking"; 181 ExecStart = pkgs.writers.writeDash "autocutsel" '' 182 ${pkgs.autocutsel}/bin/autocutsel -fork -selection PRIMARY 183 ${pkgs.autocutsel}/bin/autocutsel -fork -selection CLIPBOARD 184 ''; 185 }; 186 }; 187 systemd.services.xsettingsd = { 188 wantedBy = [ "multi-user.target" ]; 189 after = [ "display-manager.service" ]; 190 environment.DISPLAY = ":0"; 191 serviceConfig = { 192 ExecStart = "${pkgs.xsettingsd}/bin/xsettingsd -c /var/theme/config/xsettings.conf"; 193 User = "lass"; 194 Restart = "always"; 195 RestartSec = "15s"; 196 }; 197 }; 198}