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 dmenu 71 fzfmenu 72 dconf 73 libarchive 74 ncdu 75 nix-index 76 nixpkgs-review 77 nmap 78 pavucontrol 79 sxiv 80 nsxiv 81 wirelesstools 82 x11vnc 83 xclip 84 xorg.xmodmap 85 xorg.xhost 86 xdotool 87 xsel 88 zathura 89 flameshot 90 (pkgs.writers.writeDashBin "screenshot" '' 91 set -efu 92 93 ${pkgs.flameshot}/bin/flameshot gui && 94 ${pkgs.klem}/bin/klem 95 '') 96 (pkgs.writers.writeDashBin "IM" '' 97 ${pkgs.mosh}/bin/mosh green.r -- tmux new-session -A -s IM -- weechat 98 '') 99 (pkgs.writers.writeDashBin "deploy_hm" '' 100 target=$1 101 shift 102 103 hm_profile=$(${pkgs.home-manager}/bin/home-manager -f ~/sync/stockholm/lass/2configs/home-manager.nix build "$@") 104 nix-copy-closure --to "$target" "$hm_profile" 105 ssh "$target" -- "$hm_profile"/activate 106 '') 107 zbar 108 ]; 109 110 services.udev.extraRules = '' 111 SUBSYSTEM=="backlight", ACTION=="add", \ 112 RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness", \ 113 RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness" 114 ''; 115 116 services.xserver = { 117 enable = true; 118 layout = "us"; 119 display = lib.mkForce 0; 120 xkbVariant = "altgr-intl"; 121 xkbOptions = "caps:escape"; 122 libinput.enable = true; 123 exportConfiguration = true; 124 displayManager = { 125 lightdm.enable = true; 126 defaultSession = "none+xmonad"; 127 sessionCommands = '' 128 ${pkgs.xorg.xhost}/bin/xhost +LOCAL: 129 ''; 130 }; 131 }; 132 133 nixpkgs.config.packageOverrides = _super: { 134 dmenu = pkgs.writers.writeDashBin "dmenu" '' 135 ${pkgs.fzfmenu}/bin/fzfmenu "$@" 136 ''; 137 }; 138 139 lass.klem = { 140 kpaste.script = pkgs.writeDash "kpaste-wrapper" '' 141 ${pkgs.kpaste}/bin/kpaste \ 142 | ${pkgs.coreutils}/bin/tail -1 \ 143 | ${pkgs.coreutils}/bin/tr -d '\r\n' 144 ''; 145 go = { 146 target = "STRING"; 147 script = "${pkgs.goify}/bin/goify"; 148 }; 149 "go.lassul.us" = { 150 target = "STRING"; 151 script = pkgs.writeDash "go.lassul.us" '' 152 export GO_HOST='go.lassul.us' 153 ${pkgs.goify}/bin/goify 154 ''; 155 }; 156 qrcode = { 157 target = "image"; 158 script = pkgs.writeDash "zbar" '' 159 ${pkgs.zbar}/bin/zbarimg -q --raw - 160 ''; 161 }; 162 ocr = { 163 target = "image"; 164 script = pkgs.writeDash "gocr" '' 165 ${pkgs.netpbm}/bin/pngtopnm - \ 166 | ${pkgs.gocr}/bin/gocr - 167 ''; 168 }; 169 }; 170 171 services.clipmenu.enable = true; 172 173 # synchronize all the clipboards 174 systemd.user.services.autocutsel = { 175 enable = true; 176 wantedBy = [ "graphical-session.target" ]; 177 after = [ "graphical-session.target" ]; 178 serviceConfig = { 179 Type = "forking"; 180 ExecStart = pkgs.writers.writeDash "autocutsel" '' 181 ${pkgs.autocutsel}/bin/autocutsel -fork -selection PRIMARY 182 ${pkgs.autocutsel}/bin/autocutsel -fork -selection CLIPBOARD 183 ''; 184 }; 185 }; 186 systemd.services.xsettingsd = { 187 wantedBy = [ "multi-user.target" ]; 188 after = [ "display-manager.service" ]; 189 environment.DISPLAY = ":0"; 190 serviceConfig = { 191 ExecStart = "${pkgs.xsettingsd}/bin/xsettingsd -c /var/theme/config/xsettings.conf"; 192 User = "lass"; 193 Restart = "always"; 194 RestartSec = "15s"; 195 }; 196 }; 197}