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