diff options
| -rw-r--r-- | flake.nix | 136 | ||||
| -rw-r--r-- | home.nix | 1401 | ||||
| -rw-r--r-- | hosts/demiurge/default.nix | 290 | ||||
| -rw-r--r-- | hosts/demiurge/hardware.nix | 97 | ||||
| -rw-r--r-- | hosts/hastur/default.nix | 99 | ||||
| -rw-r--r-- | hosts/hastur/hardware.nix | 82 | ||||
| -rw-r--r-- | hosts/saklas/default.nix | 158 | ||||
| -rw-r--r-- | secrets/secrets.nix | 5 |
8 files changed, 1255 insertions, 1013 deletions
| @@ -1,20 +1,20 @@ | |||
| 1 | { | 1 | { |
| 2 | description = "my nixos configuration"; | 2 | description = "my nixos configuration"; |
| 3 | 3 | ||
| 4 | inputs = { | 4 | inputs = { |
| 5 | # nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | 5 | # nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; |
| 6 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; | 6 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; |
| 7 | nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; | 7 | nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; |
| 8 | 8 | ||
| 9 | home-manager = { | 9 | home-manager = { |
| 10 | url = "github:nix-community/home-manager"; | 10 | url = "github:nix-community/home-manager"; |
| 11 | inputs.nixpkgs.follows = "nixpkgs"; | 11 | inputs.nixpkgs.follows = "nixpkgs"; |
| 12 | }; | 12 | }; |
| 13 | 13 | ||
| 14 | everblush-gtk = { | 14 | everblush-gtk = { |
| 15 | url = "github:everblush/gtk"; | 15 | url = "github:everblush/gtk"; |
| 16 | inputs.nixpkgs.follows = "nixpkgs"; | 16 | inputs.nixpkgs.follows = "nixpkgs"; |
| 17 | }; | 17 | }; |
| 18 | 18 | ||
| 19 | simple-nixos-mailserver = { | 19 | simple-nixos-mailserver = { |
| 20 | url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11"; | 20 | url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11"; |
| @@ -33,58 +33,72 @@ | |||
| 33 | url = "/data/src/clones/llm/llama.cpp"; | 33 | url = "/data/src/clones/llm/llama.cpp"; |
| 34 | inputs.nixpkgs.follows = "nixpkgs"; | 34 | inputs.nixpkgs.follows = "nixpkgs"; |
| 35 | }; | 35 | }; |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | outputs = { self, home-manager, nixpkgs, nixpkgs-stable, everblush-gtk, agenix, simple-nixos-mailserver, llama-cpp, ... }@inputs: { | 38 | outputs = |
| 39 | # TODO: deduplicate this | 39 | { |
| 40 | nixosConfigurations = { | 40 | self, |
| 41 | demiurge = nixpkgs.lib.nixosSystem { | 41 | home-manager, |
| 42 | system = "x86_64-linux"; | 42 | nixpkgs, |
| 43 | specialArgs = inputs; | 43 | nixpkgs-stable, |
| 44 | modules = [ | 44 | everblush-gtk, |
| 45 | ./hosts/demiurge | 45 | agenix, |
| 46 | agenix.nixosModules.default | 46 | simple-nixos-mailserver, |
| 47 | llama-cpp, | ||
| 48 | ... | ||
| 49 | }@inputs: | ||
| 50 | { | ||
| 51 | # TODO: deduplicate this | ||
| 52 | nixosConfigurations = { | ||
| 53 | demiurge = nixpkgs.lib.nixosSystem { | ||
| 54 | system = "x86_64-linux"; | ||
| 55 | specialArgs = inputs; | ||
| 56 | modules = [ | ||
| 57 | ./hosts/demiurge | ||
| 58 | agenix.nixosModules.default | ||
| 47 | 59 | ||
| 48 | home-manager.nixosModules.home-manager { | 60 | home-manager.nixosModules.home-manager |
| 49 | home-manager.extraSpecialArgs = { | 61 | { |
| 50 | inherit inputs; | 62 | home-manager.extraSpecialArgs = { |
| 51 | hostname = "demiurge"; | 63 | inherit inputs; |
| 52 | }; | 64 | hostname = "demiurge"; |
| 53 | home-manager.useGlobalPkgs = true; | 65 | }; |
| 54 | home-manager.useUserPackages = true; | 66 | home-manager.useGlobalPkgs = true; |
| 55 | home-manager.users.vin = import ./home.nix; | 67 | home-manager.useUserPackages = true; |
| 56 | } | 68 | home-manager.users.vin = import ./home.nix; |
| 57 | ]; | 69 | } |
| 58 | }; | 70 | ]; |
| 71 | }; | ||
| 59 | 72 | ||
| 60 | hastur = nixpkgs.lib.nixosSystem { | 73 | hastur = nixpkgs.lib.nixosSystem { |
| 61 | system = "x86_64-linux"; | 74 | system = "x86_64-linux"; |
| 62 | specialArgs = inputs; | 75 | specialArgs = inputs; |
| 63 | modules = [ | 76 | modules = [ |
| 64 | ./hosts/hastur | 77 | ./hosts/hastur |
| 65 | agenix.nixosModules.default | 78 | agenix.nixosModules.default |
| 66 | 79 | ||
| 67 | home-manager.nixosModules.home-manager { | 80 | home-manager.nixosModules.home-manager |
| 68 | home-manager.extraSpecialArgs = { | 81 | { |
| 69 | inherit inputs; | 82 | home-manager.extraSpecialArgs = { |
| 70 | hostname = "hastur"; | 83 | inherit inputs; |
| 71 | }; | 84 | hostname = "hastur"; |
| 72 | home-manager.useGlobalPkgs = true; | 85 | }; |
| 73 | home-manager.useUserPackages = true; | 86 | home-manager.useGlobalPkgs = true; |
| 74 | home-manager.users.vin = import ./home.nix; | 87 | home-manager.useUserPackages = true; |
| 75 | } | 88 | home-manager.users.vin = import ./home.nix; |
| 76 | ]; | 89 | } |
| 77 | }; | 90 | ]; |
| 91 | }; | ||
| 78 | 92 | ||
| 79 | saklas = nixpkgs-stable.lib.nixosSystem { | 93 | saklas = nixpkgs-stable.lib.nixosSystem { |
| 80 | system = "x86_64-linux"; | 94 | system = "x86_64-linux"; |
| 81 | specialArgs = inputs; | 95 | specialArgs = inputs; |
| 82 | modules = [ | 96 | modules = [ |
| 83 | ./hosts/saklas | 97 | ./hosts/saklas |
| 84 | agenix.nixosModules.default | 98 | agenix.nixosModules.default |
| 85 | simple-nixos-mailserver.nixosModule | 99 | simple-nixos-mailserver.nixosModule |
| 86 | ]; | 100 | ]; |
| 87 | }; | 101 | }; |
| 88 | }; | 102 | }; |
| 89 | }; | 103 | }; |
| 90 | } | 104 | } |
| @@ -1,48 +1,60 @@ | |||
| 1 | { config, lib, pkgs, inputs, hostname, ... }: | 1 | { |
| 2 | config, | ||
| 3 | lib, | ||
| 4 | pkgs, | ||
| 5 | inputs, | ||
| 6 | hostname, | ||
| 7 | ... | ||
| 8 | }: | ||
| 2 | 9 | ||
| 3 | let | 10 | let |
| 4 | colors = import ./colors.nix; | 11 | colors = import ./colors.nix; |
| 5 | 12 | ||
| 6 | isync-oauth2 = with pkgs; buildEnv { | 13 | isync-oauth2 = |
| 7 | # takens from: | 14 | with pkgs; |
| 8 | # https://github.com/wentasah/nix-conf/raw/master/modules/mail.nix | 15 | buildEnv { |
| 9 | # https://github.com/NixOS/nixpkgs/issues/108480#issuecomment-1115108802 | 16 | # takens from: |
| 10 | name = "isync"; | 17 | # https://github.com/wentasah/nix-conf/raw/master/modules/mail.nix |
| 11 | paths = [ pkgs.isync ]; | 18 | # https://github.com/NixOS/nixpkgs/issues/108480#issuecomment-1115108802 |
| 12 | pathsToLink = ["/bin"]; | 19 | name = "isync"; |
| 13 | nativeBuildInputs = [ makeWrapper ]; | 20 | paths = [ pkgs.isync ]; |
| 14 | postBuild = '' | 21 | pathsToLink = [ "/bin" ]; |
| 22 | nativeBuildInputs = [ makeWrapper ]; | ||
| 23 | postBuild = '' | ||
| 15 | wrapProgram "$out/bin/mbsync" \ | 24 | wrapProgram "$out/bin/mbsync" \ |
| 16 | --prefix SASL_PATH : "${cyrus_sasl}/lib/sasl2:${cyrus-sasl-xoauth2}/lib/sasl2" | 25 | --prefix SASL_PATH : "${cyrus_sasl}/lib/sasl2:${cyrus-sasl-xoauth2}/lib/sasl2" |
| 17 | ''; | 26 | ''; |
| 18 | }; | ||
| 19 | |||
| 20 | uvtools = with pkgs; appimageTools.wrapType2 rec { | ||
| 21 | pname = "UVtools"; | ||
| 22 | version = "5.0.6"; | ||
| 23 | src = fetchurl { | ||
| 24 | url = "https://github.com/sn4k3/${pname}/releases/download/v${version}/${pname}_linux-x64_v${version}.AppImage"; | ||
| 25 | hash = "sha256-T1E2+7YocWbspRrpWoexfLmm7LZSb4Nkw8WSBD6zTHs"; | ||
| 26 | }; | 27 | }; |
| 27 | extraPkgs = pkgs: [ pkgs.icu ]; | ||
| 28 | }; | ||
| 29 | in { | ||
| 30 | home = { | ||
| 31 | username = "vin"; | ||
| 32 | homeDirectory = "/home/vin"; | ||
| 33 | stateVersion = "24.05"; | ||
| 34 | 28 | ||
| 35 | packages = with pkgs; [ | 29 | uvtools = |
| 30 | with pkgs; | ||
| 31 | appimageTools.wrapType2 rec { | ||
| 32 | pname = "UVtools"; | ||
| 33 | version = "5.0.6"; | ||
| 34 | src = fetchurl { | ||
| 35 | url = "https://github.com/sn4k3/${pname}/releases/download/v${version}/${pname}_linux-x64_v${version}.AppImage"; | ||
| 36 | hash = "sha256-T1E2+7YocWbspRrpWoexfLmm7LZSb4Nkw8WSBD6zTHs"; | ||
| 37 | }; | ||
| 38 | extraPkgs = pkgs: [ pkgs.icu ]; | ||
| 39 | }; | ||
| 40 | in | ||
| 41 | { | ||
| 42 | home = { | ||
| 43 | username = "vin"; | ||
| 44 | homeDirectory = "/home/vin"; | ||
| 45 | stateVersion = "24.05"; | ||
| 46 | |||
| 47 | packages = with pkgs; [ | ||
| 36 | # normal utils | 48 | # normal utils |
| 37 | neofetch | 49 | neofetch |
| 38 | rclone | 50 | rclone |
| 39 | wcalc | 51 | wcalc |
| 40 | 52 | ||
| 41 | # programming | 53 | # programming |
| 42 | python3 | 54 | python3 |
| 43 | 55 | ||
| 44 | # CAD software | 56 | # CAD software |
| 45 | kicad | 57 | kicad |
| 46 | openscad | 58 | openscad |
| 47 | 59 | ||
| 48 | # document writing and viewing | 60 | # document writing and viewing |
| @@ -51,7 +63,7 @@ in { | |||
| 51 | zathura | 63 | zathura |
| 52 | 64 | ||
| 53 | # messaging | 65 | # messaging |
| 54 | profanity | 66 | profanity |
| 55 | vesktop | 67 | vesktop |
| 56 | 68 | ||
| 57 | 69 | ||
| @@ -64,19 +76,19 @@ in { | |||
| 64 | amdgpu_top | 76 | amdgpu_top |
| 65 | 77 | ||
| 66 | # encryption | 78 | # encryption |
| 67 | age | 79 | age |
| 68 | age-plugin-yubikey | 80 | age-plugin-yubikey |
| 69 | oathToolkit | 81 | oathToolkit |
| 70 | yubikey-agent | 82 | yubikey-agent |
| 71 | yubikey-manager | 83 | yubikey-manager |
| 72 | 84 | ||
| 73 | # system utils | 85 | # system utils |
| 74 | dmenu | 86 | dmenu |
| 75 | file | 87 | file |
| 76 | htop | 88 | htop |
| 77 | mlocate | 89 | mlocate |
| 78 | ncdu | 90 | ncdu |
| 79 | tree | 91 | tree |
| 80 | unzip | 92 | unzip |
| 81 | p7zip | 93 | p7zip |
| 82 | 94 | ||
| @@ -84,8 +96,8 @@ in { | |||
| 84 | scrot | 96 | scrot |
| 85 | sxiv | 97 | sxiv |
| 86 | xclip | 98 | xclip |
| 87 | xdotool | 99 | xdotool |
| 88 | xwallpaper | 100 | xwallpaper |
| 89 | 101 | ||
| 90 | # wayland and desktop-related | 102 | # wayland and desktop-related |
| 91 | grim | 103 | grim |
| @@ -96,36 +108,32 @@ in { | |||
| 96 | # 3d printing | 108 | # 3d printing |
| 97 | prusa-slicer | 109 | prusa-slicer |
| 98 | uvtools | 110 | uvtools |
| 99 | ]; | 111 | ]; |
| 100 | 112 | ||
| 101 | preferXdgDirectories = true; | 113 | preferXdgDirectories = true; |
| 102 | 114 | ||
| 103 | sessionPath = [ | 115 | sessionPath = [ |
| 104 | "$HOME/bin" | 116 | "$HOME/bin" |
| 105 | "$HOME/.local/bin" | 117 | "$HOME/.local/bin" |
| 106 | ]; | 118 | ]; |
| 107 | 119 | ||
| 108 | sessionVariables = { | 120 | sessionVariables = { |
| 109 | EDITOR = "nvim"; | 121 | EDITOR = "nvim"; |
| 110 | VISUAL = "nvim"; | 122 | VISUAL = "nvim"; |
| 111 | PAGER = "less"; | 123 | PAGER = "less"; |
| 112 | LESS = "-iR"; | 124 | LESS = "-iR"; |
| 113 | LESSHISTFILE = "/dev/null"; | 125 | LESSHISTFILE = "/dev/null"; |
| 114 | BROWSER = "qutebrowser"; | 126 | BROWSER = "qutebrowser"; |
| 115 | 127 | ||
| 116 | GOPROXY = "direct"; | 128 | GOPROXY = "direct"; |
| 117 | 129 | ||
| 118 | AGE_KEY = "$HOME/.ssh/id_ed25519"; | 130 | AGE_KEY = "$HOME/.ssh/id_ed25519"; |
| 119 | AGE_PUB = "$AGE_KEY.pub"; | 131 | AGE_PUB = "$AGE_KEY.pub"; |
| 120 | KASI_DIR = | 132 | KASI_DIR = if hostname == "demiurge" then "/data/kasi" else "/home/vin/.kasi"; |
| 121 | if hostname == "demiurge" then | 133 | KASI_ENCRYPT = "age -R $AGE_PUB"; |
| 122 | "/data/kasi" | 134 | KASI_DECRYPT = "age -d -i $AGE_KEY"; |
| 123 | else | 135 | KASI_EXT = "age"; |
| 124 | "/home/vin/.kasi"; | 136 | KASI_CLIPBOARD = "wl-copy -o"; |
| 125 | KASI_ENCRYPT = "age -R $AGE_PUB"; | ||
| 126 | KASI_DECRYPT = "age -d -i $AGE_KEY"; | ||
| 127 | KASI_EXT = "age"; | ||
| 128 | KASI_CLIPBOARD = "wl-copy -o"; | ||
| 129 | 137 | ||
| 130 | # w3m is only used for aerc html preview | 138 | # w3m is only used for aerc html preview |
| 131 | W3M_DIR = "/var/empty"; | 139 | W3M_DIR = "/var/empty"; |
| @@ -135,8 +143,8 @@ in { | |||
| 135 | 143 | ||
| 136 | CRAWL_DIR = "$HOME/.local/share/crawl"; | 144 | CRAWL_DIR = "$HOME/.local/share/crawl"; |
| 137 | 145 | ||
| 138 | MOZ_ACCELERATED = 1; | 146 | MOZ_ACCELERATED = 1; |
| 139 | MOZ_WEBRENDER = 1; | 147 | MOZ_WEBRENDER = 1; |
| 140 | 148 | ||
| 141 | LM_LICENSE_FILE = | 149 | LM_LICENSE_FILE = |
| 142 | if hostname == "demiurge" then | 150 | if hostname == "demiurge" then |
| @@ -146,21 +154,21 @@ in { | |||
| 146 | 154 | ||
| 147 | # broken qt6.9 rendering | 155 | # broken qt6.9 rendering |
| 148 | QTWEBENGINE_FORCE_USE_GBM = 0; | 156 | QTWEBENGINE_FORCE_USE_GBM = 0; |
| 149 | }; | 157 | }; |
| 150 | 158 | ||
| 151 | shellAliases = { | 159 | shellAliases = { |
| 152 | # shortened commands | 160 | # shortened commands |
| 153 | md = "mkdir -p"; | 161 | md = "mkdir -p"; |
| 154 | e = "$EDITOR"; | 162 | e = "$EDITOR"; |
| 155 | p = "$PAGER"; | 163 | p = "$PAGER"; |
| 156 | m = "aerc"; | 164 | m = "aerc"; |
| 157 | gc = "git clone"; | 165 | gc = "git clone"; |
| 158 | cbc = "wl-copy -c; wl-copy -cp"; | 166 | cbc = "wl-copy -c; wl-copy -cp"; |
| 159 | 167 | ||
| 160 | # default arguments to commands | 168 | # default arguments to commands |
| 161 | ls = "ls -F --color=auto"; | 169 | ls = "ls -F --color=auto"; |
| 162 | rsync = "rsync --no-inc-recursive"; | 170 | rsync = "rsync --no-inc-recursive"; |
| 163 | mpv = "mpv --save-position-on-quit"; | 171 | mpv = "mpv --save-position-on-quit"; |
| 164 | wget = "wget --no-hsts"; | 172 | wget = "wget --no-hsts"; |
| 165 | ytdl = "noglob yt-dlp"; | 173 | ytdl = "noglob yt-dlp"; |
| 166 | 174 | ||
| @@ -171,27 +179,27 @@ in { | |||
| 171 | nr = "nix run"; | 179 | nr = "nix run"; |
| 172 | ns = "nix search"; | 180 | ns = "nix search"; |
| 173 | nsh = "nix shell"; | 181 | nsh = "nix shell"; |
| 174 | }; | 182 | }; |
| 175 | }; | 183 | }; |
| 176 | 184 | ||
| 177 | fonts.fontconfig = { | 185 | fonts.fontconfig = { |
| 178 | enable = true; | 186 | enable = true; |
| 179 | defaultFonts = { | 187 | defaultFonts = { |
| 180 | emoji = []; | 188 | emoji = [ ]; |
| 181 | monospace = [ "Comic Code" ]; | 189 | monospace = [ "Comic Code" ]; |
| 182 | sansSerif = [ "Cantarell" ]; | 190 | sansSerif = [ "Cantarell" ]; |
| 183 | serif = [ "CMU Serif" ]; | 191 | serif = [ "CMU Serif" ]; |
| 184 | }; | 192 | }; |
| 185 | }; | 193 | }; |
| 186 | 194 | ||
| 187 | gtk = { | 195 | gtk = { |
| 188 | enable = true; | 196 | enable = true; |
| 189 | font.name = "monospace 11"; | 197 | font.name = "monospace 11"; |
| 190 | iconTheme.name = "rose-pine"; | 198 | iconTheme.name = "rose-pine"; |
| 191 | iconTheme.package = pkgs.rose-pine-icon-theme; | 199 | iconTheme.package = pkgs.rose-pine-icon-theme; |
| 192 | theme.name = "Everblush"; | 200 | theme.name = "Everblush"; |
| 193 | theme.package = inputs.everblush-gtk.packages.x86_64-linux.default; | 201 | theme.package = inputs.everblush-gtk.packages.x86_64-linux.default; |
| 194 | }; | 202 | }; |
| 195 | 203 | ||
| 196 | dconf.settings = { | 204 | dconf.settings = { |
| 197 | "org/virt-manager/virt-manager/connections" = { | 205 | "org/virt-manager/virt-manager/connections" = { |
| @@ -223,8 +231,13 @@ in { | |||
| 223 | expunge = "both"; | 231 | expunge = "both"; |
| 224 | remove = "both"; | 232 | remove = "both"; |
| 225 | patterns = [ | 233 | patterns = [ |
| 226 | "*" "!Calendar*" "!Contacts*" "!Conversation*" | 234 | "*" |
| 227 | "!Notes*" "!Journal*" "!Tasks*" | 235 | "!Calendar*" |
| 236 | "!Contacts*" | ||
| 237 | "!Conversation*" | ||
| 238 | "!Notes*" | ||
| 239 | "!Journal*" | ||
| 240 | "!Tasks*" | ||
| 228 | ]; | 241 | ]; |
| 229 | }; | 242 | }; |
| 230 | 243 | ||
| @@ -281,7 +294,7 @@ in { | |||
| 281 | }; | 294 | }; |
| 282 | }; | 295 | }; |
| 283 | 296 | ||
| 284 | programs = { | 297 | programs = { |
| 285 | home-manager.enable = true; | 298 | home-manager.enable = true; |
| 286 | 299 | ||
| 287 | aerc.enable = true; | 300 | aerc.enable = true; |
| @@ -300,9 +313,10 @@ in { | |||
| 300 | pad = "10x10"; | 313 | pad = "10x10"; |
| 301 | }; | 314 | }; |
| 302 | 315 | ||
| 303 | colors = let | 316 | colors = |
| 304 | rmhash = s: builtins.substring 1 (-1) s; | 317 | let |
| 305 | in | 318 | rmhash = s: builtins.substring 1 (-1) s; |
| 319 | in | ||
| 306 | { | 320 | { |
| 307 | alpha = 0.9; | 321 | alpha = 0.9; |
| 308 | 322 | ||
| @@ -330,41 +344,41 @@ in { | |||
| 330 | }; | 344 | }; |
| 331 | }; | 345 | }; |
| 332 | 346 | ||
| 333 | git = { | 347 | git = { |
| 334 | enable = true; | 348 | enable = true; |
| 335 | difftastic = { | 349 | difftastic = { |
| 336 | enable = true; | 350 | enable = true; |
| 337 | background = "dark"; | 351 | background = "dark"; |
| 338 | color = "always"; | 352 | color = "always"; |
| 339 | display = "side-by-side-show-both"; | 353 | display = "side-by-side-show-both"; |
| 340 | }; | 354 | }; |
| 341 | extraConfig = { | 355 | extraConfig = { |
| 342 | user = { | 356 | user = { |
| 343 | email = "git@vineetk.net"; | 357 | email = "git@vineetk.net"; |
| 344 | name = "vin"; | 358 | name = "vin"; |
| 345 | signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEvM0xCLziR+ZT/SYE1aZM6dklbw4fEC17TWqbADIZRH kou@demiurge"; | 359 | signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEvM0xCLziR+ZT/SYE1aZM6dklbw4fEC17TWqbADIZRH kou@demiurge"; |
| 346 | }; | 360 | }; |
| 347 | sendemail = { | 361 | sendemail = { |
| 348 | suppresscc = "self"; | 362 | suppresscc = "self"; |
| 349 | annotate = true; | 363 | annotate = true; |
| 350 | }; | 364 | }; |
| 351 | format.signOff = true; | 365 | format.signOff = true; |
| 352 | pull.rebase = true; | 366 | pull.rebase = true; |
| 353 | init.defaultBranch = "master"; | 367 | init.defaultBranch = "master"; |
| 354 | http = { | 368 | http = { |
| 355 | version = "HTTP/1.1"; | 369 | version = "HTTP/1.1"; |
| 356 | postBuffer = 524288000; | 370 | postBuffer = 524288000; |
| 357 | }; | 371 | }; |
| 358 | commit.gpgsign = false; | 372 | commit.gpgsign = false; |
| 359 | gpg.format = "ssh"; | 373 | gpg.format = "ssh"; |
| 360 | "gpg \"ssh\"".allowedSignersFile = "/home/vin/.ssh/allowed_signers"; | 374 | "gpg \"ssh\"".allowedSignersFile = "/home/vin/.ssh/allowed_signers"; |
| 361 | }; | 375 | }; |
| 362 | ignores = [ | 376 | ignores = [ |
| 363 | "*~" | 377 | "*~" |
| 364 | ".*~" | 378 | ".*~" |
| 365 | "*.swp" | 379 | "*.swp" |
| 366 | ]; | 380 | ]; |
| 367 | }; | 381 | }; |
| 368 | 382 | ||
| 369 | mbsync = { | 383 | mbsync = { |
| 370 | enable = true; | 384 | enable = true; |
| @@ -379,12 +393,18 @@ in { | |||
| 379 | bindings = { | 393 | bindings = { |
| 380 | # I wish there was a more elegant way of setting Anime4K | 394 | # I wish there was a more elegant way of setting Anime4K |
| 381 | 395 | ||
| 382 | "Ctrl+1" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode A (HQ)'"; | 396 | "Ctrl+1" = |
| 383 | "Ctrl+2" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode B (HQ)'"; | 397 | "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode A (HQ)'"; |
| 384 | "Ctrl+3" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode C (HQ)'"; | 398 | "Ctrl+2" = |
| 385 | "Ctrl+4" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode A+A (HQ)'"; | 399 | "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode B (HQ)'"; |
| 386 | "Ctrl+5" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode B+B (HQ)'"; | 400 | "Ctrl+3" = |
| 387 | "Ctrl+6" = "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode C+A (HQ)'"; | 401 | "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode C (HQ)'"; |
| 402 | "Ctrl+4" = | ||
| 403 | "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode A+A (HQ)'"; | ||
| 404 | "Ctrl+5" = | ||
| 405 | "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode B+B (HQ)'"; | ||
| 406 | "Ctrl+6" = | ||
| 407 | "no-osd change-list glsl-shaders set '~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl'; show-text 'Anime4K: Mode C+A (HQ)'"; | ||
| 388 | 408 | ||
| 389 | "Ctrl+0" = "no-osd change-list glsl-shaders clr ''; show-text 'GLSL shaders cleared'"; | 409 | "Ctrl+0" = "no-osd change-list glsl-shaders clr ''; show-text 'GLSL shaders cleared'"; |
| 390 | }; | 410 | }; |
| @@ -406,16 +426,16 @@ in { | |||
| 406 | }; | 426 | }; |
| 407 | hooks = { | 427 | hooks = { |
| 408 | postNew = '' | 428 | postNew = '' |
| 409 | notmuch tag +13f0 -- tag:new and to:"*@13f0.net" | 429 | notmuch tag +13f0 -- tag:new and to:"*@13f0.net" |
| 410 | notmuch tag +vineetk -- tag:new and to:"*@vineetk.net" | 430 | notmuch tag +vineetk -- tag:new and to:"*@vineetk.net" |
| 411 | notmuch tag +university -- tag:new and to:***REDACTED_EMAIL*** | 431 | notmuch tag +university -- tag:new and to:***REDACTED_EMAIL*** |
| 412 | notmuch tag +openbsd_announce -inbox -- tag:new and to:announce@openbsd.org | 432 | notmuch tag +openbsd_announce -inbox -- tag:new and to:announce@openbsd.org |
| 413 | notmuch tag +openbsd_arm -inbox -- tag:new and to:arm@openbsd.org | 433 | notmuch tag +openbsd_arm -inbox -- tag:new and to:arm@openbsd.org |
| 414 | notmuch tag +openbsd_misc -inbox -- tag:new and to:misc@openbsd.org | 434 | notmuch tag +openbsd_misc -inbox -- tag:new and to:misc@openbsd.org |
| 415 | notmuch tag +opensmtpd_misc -inbox -- tag:new and to:misc@opensmtpd.org | 435 | notmuch tag +opensmtpd_misc -inbox -- tag:new and to:misc@opensmtpd.org |
| 416 | notmuch tag +oss_security -inbox -- tag:new and to:oss-security@lists.openwall.com | 436 | notmuch tag +oss_security -inbox -- tag:new and to:oss-security@lists.openwall.com |
| 417 | notmuch tag +tuhs -inbox -- tag:new and to:tuhs@tuhs.org | 437 | notmuch tag +tuhs -inbox -- tag:new and to:tuhs@tuhs.org |
| 418 | ''; | 438 | ''; |
| 419 | preNew = "mbsync -a"; | 439 | preNew = "mbsync -a"; |
| 420 | }; | 440 | }; |
| 421 | }; | 441 | }; |
| @@ -437,27 +457,31 @@ in { | |||
| 437 | 457 | ||
| 438 | plugins = with pkgs.vimPlugins; [ | 458 | plugins = with pkgs.vimPlugins; [ |
| 439 | { | 459 | { |
| 440 | plugin = (pkgs.vimUtils.buildVimPlugin { | 460 | plugin = ( |
| 441 | name = "everblush-nvim"; | 461 | pkgs.vimUtils.buildVimPlugin { |
| 442 | src = pkgs.fetchFromGitHub { | 462 | name = "everblush-nvim"; |
| 443 | owner = "everblush"; | 463 | src = pkgs.fetchFromGitHub { |
| 444 | repo = "nvim"; | 464 | owner = "everblush"; |
| 445 | rev = "9a0e695fdd57b340d3ba2b72406e3ca519029f25"; | 465 | repo = "nvim"; |
| 446 | hash = "sha256-O6Erp+Tzk5TV5gpgVs73cO6v9vgeUVYpunrtf/7Ppic="; | 466 | rev = "9a0e695fdd57b340d3ba2b72406e3ca519029f25"; |
| 447 | }; | 467 | hash = "sha256-O6Erp+Tzk5TV5gpgVs73cO6v9vgeUVYpunrtf/7Ppic="; |
| 448 | }); | 468 | }; |
| 469 | } | ||
| 470 | ); | ||
| 449 | config = '' | 471 | config = '' |
| 450 | lua << END | 472 | lua << END |
| 451 | require 'everblush'.setup { | 473 | require 'everblush'.setup { |
| 452 | transparent_background = true, | 474 | transparent_background = true, |
| 453 | 475 | ||
| 454 | override = { | 476 | override = { |
| 455 | LineNr = { fg = '#b3b9b8' }, | 477 | LineNr = { fg = '#b3b9b8' }, |
| 456 | }, | 478 | }, |
| 457 | } | 479 | } |
| 458 | END | 480 | END |
| 459 | ''; | 481 | ''; |
| 460 | } | 482 | } |
| 483 | |||
| 484 | vim-nix | ||
| 461 | ]; | 485 | ]; |
| 462 | 486 | ||
| 463 | viAlias = true; | 487 | viAlias = true; |
| @@ -510,49 +534,49 @@ in { | |||
| 510 | }; | 534 | }; |
| 511 | 535 | ||
| 512 | extraConfig = '' | 536 | extraConfig = '' |
| 513 | # javascript | 537 | # javascript |
| 514 | config.set('content.javascript.enabled', True, 'chrome-devtools://*') | 538 | config.set('content.javascript.enabled', True, 'chrome-devtools://*') |
| 515 | config.set('content.javascript.enabled', True, 'devtools://*') | 539 | config.set('content.javascript.enabled', True, 'devtools://*') |
| 516 | config.set('content.javascript.enabled', True, 'chrome://*/*') | 540 | config.set('content.javascript.enabled', True, 'chrome://*/*') |
| 517 | config.set('content.javascript.enabled', True, 'qute://*/*') | 541 | config.set('content.javascript.enabled', True, 'qute://*/*') |
| 518 | 542 | ||
| 519 | config.set('content.javascript.enabled', True, 'floridapolytechnic.instructure.com') | 543 | config.set('content.javascript.enabled', True, 'floridapolytechnic.instructure.com') |
| 520 | config.set('content.javascript.enabled', True, '*.floridapoly.edu') | 544 | config.set('content.javascript.enabled', True, '*.floridapoly.edu') |
| 521 | config.set('content.javascript.enabled', True, 'login.microsoftonline.com') | 545 | config.set('content.javascript.enabled', True, 'login.microsoftonline.com') |
| 522 | config.set('content.javascript.enabled', True, 'www.microsoft365.com') | 546 | config.set('content.javascript.enabled', True, 'www.microsoft365.com') |
| 523 | config.set('content.javascript.enabled', True, 'flpoly-my.sharepoint.com') | 547 | config.set('content.javascript.enabled', True, 'flpoly-my.sharepoint.com') |
| 524 | config.set('content.javascript.enabled', True, 'flpoly.sharepoint.com') | 548 | config.set('content.javascript.enabled', True, 'flpoly.sharepoint.com') |
| 525 | config.set('content.javascript.enabled', True, 'teams.microsoft.com') | 549 | config.set('content.javascript.enabled', True, 'teams.microsoft.com') |
| 526 | config.set('content.javascript.enabled', True, 'ieeexplore.ieee.org') | 550 | config.set('content.javascript.enabled', True, 'ieeexplore.ieee.org') |
| 527 | 551 | ||
| 528 | config.set('content.javascript.enabled', True, 'gitlab.com') | 552 | config.set('content.javascript.enabled', True, 'gitlab.com') |
| 529 | config.set('content.javascript.enabled', True, 'cloud.binary.ninja') | 553 | config.set('content.javascript.enabled', True, 'cloud.binary.ninja') |
| 530 | config.set('content.javascript.enabled', True, 'console.hetzner.cloud') | 554 | config.set('content.javascript.enabled', True, 'console.hetzner.cloud') |
| 531 | config.set('content.javascript.enabled', True, '*.hetzner.com') | 555 | config.set('content.javascript.enabled', True, '*.hetzner.com') |
| 532 | config.set('content.javascript.enabled', True, '*.digikey.com') | 556 | config.set('content.javascript.enabled', True, '*.digikey.com') |
| 533 | config.set('content.javascript.enabled', True, '*.demiurge.epistemia') | 557 | config.set('content.javascript.enabled', True, '*.demiurge.epistemia') |
| 534 | 558 | ||
| 535 | # Allow locally loaded documents to access remote URLs. | 559 | # Allow locally loaded documents to access remote URLs. |
| 536 | config.set('content.local_content_can_access_remote_urls', True, 'file:///home/vin/.local/share/qutebrowser/userscripts/*') | 560 | config.set('content.local_content_can_access_remote_urls', True, 'file:///home/vin/.local/share/qutebrowser/userscripts/*') |
| 537 | config.set('content.local_content_can_access_file_urls', False, 'file:///home/vin/.local/share/qutebrowser/userscripts/*') | 561 | config.set('content.local_content_can_access_file_urls', False, 'file:///home/vin/.local/share/qutebrowser/userscripts/*') |
| 538 | 562 | ||
| 539 | # disable dark mode for some sites | 563 | # disable dark mode for some sites |
| 540 | config.set('colors.webpage.darkmode.enabled', False, 'flpoly-my.sharepoint.com') | 564 | config.set('colors.webpage.darkmode.enabled', False, 'flpoly-my.sharepoint.com') |
| 541 | config.set('colors.webpage.darkmode.enabled', False, 'flpoly.sharepoint.com') | 565 | config.set('colors.webpage.darkmode.enabled', False, 'flpoly.sharepoint.com') |
| 542 | config.set('colors.webpage.darkmode.enabled', False, 'teams.microsoft.com') | 566 | config.set('colors.webpage.darkmode.enabled', False, 'teams.microsoft.com') |
| 543 | 567 | ||
| 544 | config.set('colors.webpage.darkmode.enabled', False, 'cloud.binary.ninja') | 568 | config.set('colors.webpage.darkmode.enabled', False, 'cloud.binary.ninja') |
| 545 | config.set('colors.webpage.darkmode.enabled', False, 'git.vineetk.net') | 569 | config.set('colors.webpage.darkmode.enabled', False, 'git.vineetk.net') |
| 546 | 570 | ||
| 547 | # prevent accidental exiting | 571 | # prevent accidental exiting |
| 548 | config.unbind("<Ctrl+q>", mode="normal") | 572 | config.unbind("<Ctrl+q>", mode="normal") |
| 549 | 573 | ||
| 550 | # source theme from nixos | 574 | # source theme from nixos |
| 551 | config.source("theme.py") | 575 | config.source("theme.py") |
| 552 | 576 | ||
| 553 | # source redirectors | 577 | # source redirectors |
| 554 | config.source("redirectors.py") | 578 | config.source("redirectors.py") |
| 555 | ''; | 579 | ''; |
| 556 | }; | 580 | }; |
| 557 | 581 | ||
| 558 | tmux = { | 582 | tmux = { |
| @@ -564,80 +588,80 @@ config.source("redirectors.py") | |||
| 564 | terminal = "screen-256color"; | 588 | terminal = "screen-256color"; |
| 565 | 589 | ||
| 566 | extraConfig = '' | 590 | extraConfig = '' |
| 567 | # status bar | 591 | # status bar |
| 568 | set-option -g status-style bg=terminal | 592 | set-option -g status-style bg=terminal |
| 569 | set-option -g status-style fg=terminal | 593 | set-option -g status-style fg=terminal |
| 594 | |||
| 595 | set-option -g window-status-format "#[bg=terminal fg=terminal noreverse]#{window_index}:#{window_name}" | ||
| 596 | set-option -g window-status-current-format "#[bg=black fg=terminal]#{window_index}:#{window_name}#{window_flags}" | ||
| 570 | 597 | ||
| 571 | set-option -g window-status-format "#[bg=terminal fg=terminal noreverse]#{window_index}:#{window_name}" | 598 | set-option -g status-right "%R %b %d %Y" |
| 572 | set-option -g window-status-current-format "#[bg=black fg=terminal]#{window_index}:#{window_name}#{window_flags}" | ||
| 573 | 599 | ||
| 574 | set-option -g status-right "%R %b %d %Y" | 600 | # colorscheme stuff |
| 601 | set-option -sa terminal-features ',*:RGB' | ||
| 602 | ''; | ||
| 603 | }; | ||
| 575 | 604 | ||
| 576 | # colorscheme stuff | 605 | yt-dlp = { |
| 577 | set-option -sa terminal-features ',*:RGB' | 606 | enable = true; |
| 578 | ''; | 607 | settings = { |
| 608 | merge-output-format = "mkv"; | ||
| 609 | embed-subs = true; | ||
| 610 | embed-metadata = true; | ||
| 611 | embed-thumbnail = true; | ||
| 612 | sub-langs = "en,-livechat"; | ||
| 613 | format = "bestvideo[height<=?1440]+bestaudio/best"; | ||
| 614 | downloader = "aria2c"; | ||
| 615 | downloader-args = "aria2c:'-c -x8 -s8 -k1M'"; | ||
| 616 | }; | ||
| 579 | }; | 617 | }; |
| 580 | 618 | ||
| 581 | yt-dlp = { | 619 | zsh = { |
| 582 | enable = true; | 620 | enable = true; |
| 583 | settings = { | 621 | enableCompletion = true; |
| 584 | merge-output-format = "mkv"; | 622 | defaultKeymap = "emacs"; |
| 585 | embed-subs = true; | 623 | history = { |
| 586 | embed-metadata = true; | 624 | ignoreDups = true; |
| 587 | embed-thumbnail = true; | 625 | ignoreSpace = true; |
| 588 | sub-langs = "en,-livechat"; | 626 | }; |
| 589 | format = "bestvideo[height<=?1440]+bestaudio/best"; | 627 | initContent = '' |
| 590 | downloader = "aria2c"; | 628 | # auto-correct commands |
| 591 | downloader-args = "aria2c:'-c -x8 -s8 -k1M'"; | 629 | setopt correctall |
| 592 | }; | 630 | |
| 593 | }; | 631 | # fix meta/ctrl-backspace |
| 594 | 632 | autoload -Uz select-word-style | |
| 595 | zsh = { | 633 | select-word-style bash |
| 596 | enable = true; | 634 | ''; |
| 597 | enableCompletion = true; | 635 | syntaxHighlighting = { |
| 598 | defaultKeymap = "emacs"; | 636 | enable = true; |
| 599 | history = { | 637 | highlighters = [ |
| 600 | ignoreDups = true; | 638 | "main" |
| 601 | ignoreSpace = true; | 639 | "brackets" |
| 602 | }; | 640 | "pattern" |
| 603 | initContent = '' | 641 | ]; |
| 604 | # auto-correct commands | 642 | patterns = { |
| 605 | setopt correctall | 643 | "rm -rf *" = "fg=white,bold,bg=red"; |
| 606 | 644 | }; | |
| 607 | # fix meta/ctrl-backspace | 645 | }; |
| 608 | autoload -Uz select-word-style | 646 | }; |
| 609 | select-word-style bash | 647 | }; |
| 610 | ''; | 648 | |
| 611 | syntaxHighlighting = { | 649 | services = { |
| 612 | enable = true; | 650 | # batsignal |
| 613 | highlighters = [ | 651 | # borgmatic |
| 614 | "main" | 652 | # dunst? |
| 615 | "brackets" | 653 | # glance? |
| 616 | "pattern" | 654 | # gpg-agent with ssh? |
| 617 | ]; | 655 | # mpd and ncmpcpp? |
| 618 | patterns = { | 656 | # nextcloud-client? |
| 619 | "rm -rf *" = "fg=white,bold,bg=red"; | 657 | # pass-secret-service? |
| 620 | }; | 658 | # plan9port for plumbing? |
| 621 | }; | 659 | # recoll? |
| 622 | }; | 660 | # remmina? |
| 623 | }; | 661 | # screen-locker |
| 624 | 662 | # sxhkd if using bspwm and not i3 | |
| 625 | services = { | 663 | # unison |
| 626 | # batsignal | 664 | # vdirsyncer |
| 627 | # borgmatic | ||
| 628 | # dunst? | ||
| 629 | # glance? | ||
| 630 | # gpg-agent with ssh? | ||
| 631 | # mpd and ncmpcpp? | ||
| 632 | # nextcloud-client? | ||
| 633 | # pass-secret-service? | ||
| 634 | # plan9port for plumbing? | ||
| 635 | # recoll? | ||
| 636 | # remmina? | ||
| 637 | # screen-locker | ||
| 638 | # sxhkd if using bspwm and not i3 | ||
| 639 | # unison | ||
| 640 | # vdirsyncer | ||
| 641 | 665 | ||
| 642 | # parametric equalizer (and other stuff I don't use) in pipewire | 666 | # parametric equalizer (and other stuff I don't use) in pipewire |
| 643 | easyeffects = { | 667 | easyeffects = { |
| @@ -864,15 +888,15 @@ set-option -sa terminal-features ',*:RGB' | |||
| 864 | }; | 888 | }; |
| 865 | }; | 889 | }; |
| 866 | 890 | ||
| 867 | poweralertd.enable = true; | 891 | poweralertd.enable = true; |
| 868 | 892 | ||
| 869 | redshift = { | 893 | redshift = { |
| 870 | enable = false; | 894 | enable = false; |
| 871 | dawnTime = "07:00"; | 895 | dawnTime = "07:00"; |
| 872 | duskTime = "00:00"; | 896 | duskTime = "00:00"; |
| 873 | temperature.day = 6500; | 897 | temperature.day = 6500; |
| 874 | temperature.night = 4500; | 898 | temperature.night = 4500; |
| 875 | }; | 899 | }; |
| 876 | 900 | ||
| 877 | syncthing = { | 901 | syncthing = { |
| 878 | enable = true; | 902 | enable = true; |
| @@ -905,474 +929,485 @@ set-option -sa terminal-features ',*:RGB' | |||
| 905 | 929 | ||
| 906 | folders = { | 930 | folders = { |
| 907 | "bin" = { | 931 | "bin" = { |
| 908 | devices = [ "demiurge" "hastur" ]; | 932 | devices = [ |
| 909 | path = | 933 | "demiurge" |
| 910 | if hostname == "demiurge" then | 934 | "hastur" |
| 911 | "/data/bin" | 935 | ]; |
| 912 | else | 936 | path = if hostname == "demiurge" then "/data/bin" else "/home/vin/bin"; |
| 913 | "/home/vin/bin"; | ||
| 914 | }; | 937 | }; |
| 915 | 938 | ||
| 916 | "docs" = { | 939 | "docs" = { |
| 917 | devices = [ "demiurge" "hastur" ]; | 940 | devices = [ |
| 918 | path = | 941 | "demiurge" |
| 919 | if hostname == "demiurge" then | 942 | "hastur" |
| 920 | "/data/docs" | 943 | ]; |
| 921 | else | 944 | path = if hostname == "demiurge" then "/data/docs" else "/home/vin/docs"; |
| 922 | "/home/vin/docs"; | ||
| 923 | }; | 945 | }; |
| 924 | 946 | ||
| 925 | "emacs.d" = { | 947 | "emacs.d" = { |
| 926 | devices = [ "demiurge" "hastur" ]; | 948 | devices = [ |
| 949 | "demiurge" | ||
| 950 | "hastur" | ||
| 951 | ]; | ||
| 927 | path = "/home/vin/.emacs.d"; | 952 | path = "/home/vin/.emacs.d"; |
| 928 | }; | 953 | }; |
| 929 | 954 | ||
| 930 | "kasi" = { | 955 | "kasi" = { |
| 931 | devices = [ "demiurge" "hastur" ]; | 956 | devices = [ |
| 932 | path = | 957 | "demiurge" |
| 933 | if hostname == "demiurge" then | 958 | "hastur" |
| 934 | "/data/kasi" | 959 | ]; |
| 935 | else | 960 | path = if hostname == "demiurge" then "/data/kasi" else "/home/vin/.kasi"; |
| 936 | "/home/vin/.kasi"; | ||
| 937 | }; | 961 | }; |
| 938 | 962 | ||
| 939 | "lit" = { | 963 | "lit" = { |
| 940 | devices = [ "demiurge" "hastur" ]; | 964 | devices = [ |
| 941 | path = | 965 | "demiurge" |
| 942 | if hostname == "demiurge" then | 966 | "hastur" |
| 943 | "/data_wd/lit" | 967 | ]; |
| 944 | else | 968 | path = if hostname == "demiurge" then "/data_wd/lit" else "/home/vin/lit"; |
| 945 | "/home/vin/lit"; | ||
| 946 | }; | 969 | }; |
| 947 | 970 | ||
| 948 | "pics" = { | 971 | "pics" = { |
| 949 | devices = [ "demiurge" "hastur" ]; | 972 | devices = [ |
| 950 | path = | 973 | "demiurge" |
| 951 | if hostname == "demiurge" then | 974 | "hastur" |
| 952 | "/data_wd/pics" | 975 | ]; |
| 953 | else | 976 | path = if hostname == "demiurge" then "/data_wd/pics" else "/home/vin/pics"; |
| 954 | "/home/vin/pics"; | ||
| 955 | }; | 977 | }; |
| 956 | 978 | ||
| 957 | "iphone" = { | 979 | "iphone" = { |
| 958 | devices = [ "demiurge" "hastur" "iphonebob" ]; | 980 | devices = [ |
| 959 | path = | 981 | "demiurge" |
| 960 | if hostname == "demiurge" then | 982 | "hastur" |
| 961 | "/data_wd/iphone" | 983 | "iphonebob" |
| 962 | else | 984 | ]; |
| 963 | "/home/vin/iphone"; | 985 | path = if hostname == "demiurge" then "/data_wd/iphone" else "/home/vin/iphone"; |
| 964 | }; | 986 | }; |
| 965 | }; | 987 | }; |
| 966 | }; | 988 | }; |
| 967 | }; | 989 | }; |
| 968 | }; | 990 | }; |
| 969 | 991 | ||
| 970 | xdg = { | 992 | xdg = { |
| 971 | enable = true; | 993 | enable = true; |
| 972 | 994 | ||
| 973 | configFile = { | 995 | configFile = { |
| 974 | "qutebrowser/theme.py".text = '' | 996 | "qutebrowser/theme.py".text = '' |
| 975 | # Colors. | 997 | # Colors. |
| 976 | bg0 = "${colors.current.primary.background}" | 998 | bg0 = "${colors.current.primary.background}" |
| 977 | bg1 = "${colors.current.normal.black}" | 999 | bg1 = "${colors.current.normal.black}" |
| 978 | bg2 = "${colors.current.bright.black}" | 1000 | bg2 = "${colors.current.bright.black}" |
| 979 | fg0 = "${colors.current.primary.foreground}" | 1001 | fg0 = "${colors.current.primary.foreground}" |
| 980 | fg1 = "${colors.current.normal.white}" | 1002 | fg1 = "${colors.current.normal.white}" |
| 981 | red = "${colors.current.normal.red}" | 1003 | red = "${colors.current.normal.red}" |
| 982 | blue = "${colors.current.normal.blue}" | 1004 | blue = "${colors.current.normal.blue}" |
| 983 | green = "${colors.current.normal.green}" | 1005 | green = "${colors.current.normal.green}" |
| 984 | yellow = "${colors.current.normal.yellow}" | 1006 | yellow = "${colors.current.normal.yellow}" |
| 985 | cyan = "${colors.current.normal.cyan}" | 1007 | cyan = "${colors.current.normal.cyan}" |
| 986 | magenta = "${colors.current.normal.magenta}" | 1008 | magenta = "${colors.current.normal.magenta}" |
| 987 | 1009 | ||
| 988 | # --- Applying colors --- # | 1010 | # --- Applying colors --- # |
| 989 | 1011 | ||
| 990 | # Completion menu. | 1012 | # Completion menu. |
| 991 | c.colors.completion.category.bg = bg1 | 1013 | c.colors.completion.category.bg = bg1 |
| 992 | c.colors.completion.category.border.top = bg0 | 1014 | c.colors.completion.category.border.top = bg0 |
| 993 | c.colors.completion.category.border.bottom = bg0 | 1015 | c.colors.completion.category.border.bottom = bg0 |
| 994 | c.colors.completion.category.fg = fg0 | 1016 | c.colors.completion.category.fg = fg0 |
| 995 | c.colors.completion.even.bg = bg1 | 1017 | c.colors.completion.even.bg = bg1 |
| 996 | c.colors.completion.odd.bg = bg1 | 1018 | c.colors.completion.odd.bg = bg1 |
| 997 | c.colors.completion.item.selected.bg = bg2 | 1019 | c.colors.completion.item.selected.bg = bg2 |
| 998 | c.colors.completion.item.selected.border.bottom = bg2 | 1020 | c.colors.completion.item.selected.border.bottom = bg2 |
| 999 | c.colors.completion.item.selected.border.top = bg2 | 1021 | c.colors.completion.item.selected.border.top = bg2 |
| 1000 | c.colors.completion.item.selected.fg = blue | 1022 | c.colors.completion.item.selected.fg = blue |
| 1001 | c.colors.completion.item.selected.match.fg = blue | 1023 | c.colors.completion.item.selected.match.fg = blue |
| 1002 | c.colors.completion.match.fg = red | 1024 | c.colors.completion.match.fg = red |
| 1003 | c.colors.completion.odd.bg = bg1 | 1025 | c.colors.completion.odd.bg = bg1 |
| 1004 | c.colors.completion.scrollbar.fg = fg0 | 1026 | c.colors.completion.scrollbar.fg = fg0 |
| 1005 | c.colors.completion.scrollbar.bg = bg1 | 1027 | c.colors.completion.scrollbar.bg = bg1 |
| 1006 | 1028 | ||
| 1007 | # Statusline. | 1029 | # Statusline. |
| 1008 | c.colors.statusbar.caret.bg = bg0 | 1030 | c.colors.statusbar.caret.bg = bg0 |
| 1009 | c.colors.statusbar.caret.fg = magenta | 1031 | c.colors.statusbar.caret.fg = magenta |
| 1010 | c.colors.statusbar.caret.selection.bg = bg0 | 1032 | c.colors.statusbar.caret.selection.bg = bg0 |
| 1011 | c.colors.statusbar.caret.selection.fg = red | 1033 | c.colors.statusbar.caret.selection.fg = red |
| 1012 | c.colors.statusbar.command.bg = bg0 | 1034 | c.colors.statusbar.command.bg = bg0 |
| 1013 | c.colors.statusbar.command.fg = fg0 | 1035 | c.colors.statusbar.command.fg = fg0 |
| 1014 | c.colors.statusbar.insert.bg = bg0 | 1036 | c.colors.statusbar.insert.bg = bg0 |
| 1015 | c.colors.statusbar.insert.fg = green | 1037 | c.colors.statusbar.insert.fg = green |
| 1016 | c.colors.statusbar.normal.bg = bg0 | 1038 | c.colors.statusbar.normal.bg = bg0 |
| 1017 | c.colors.statusbar.normal.fg = fg0 | 1039 | c.colors.statusbar.normal.fg = fg0 |
| 1018 | c.colors.statusbar.passthrough.bg = bg0 | 1040 | c.colors.statusbar.passthrough.bg = bg0 |
| 1019 | c.colors.statusbar.passthrough.fg = blue | 1041 | c.colors.statusbar.passthrough.fg = blue |
| 1020 | c.colors.statusbar.private.bg = bg0 | 1042 | c.colors.statusbar.private.bg = bg0 |
| 1021 | c.colors.statusbar.private.fg = fg0 | 1043 | c.colors.statusbar.private.fg = fg0 |
| 1022 | c.colors.statusbar.progress.bg = green | 1044 | c.colors.statusbar.progress.bg = green |
| 1023 | c.colors.statusbar.url.error.fg = red | 1045 | c.colors.statusbar.url.error.fg = red |
| 1024 | c.colors.statusbar.url.fg = fg0 | 1046 | c.colors.statusbar.url.fg = fg0 |
| 1025 | c.colors.statusbar.url.hover.fg = cyan | 1047 | c.colors.statusbar.url.hover.fg = cyan |
| 1026 | c.colors.statusbar.url.success.http.fg = green | 1048 | c.colors.statusbar.url.success.http.fg = green |
| 1027 | c.colors.statusbar.url.success.https.fg = green | 1049 | c.colors.statusbar.url.success.https.fg = green |
| 1028 | c.colors.statusbar.url.warn.fg = yellow | 1050 | c.colors.statusbar.url.warn.fg = yellow |
| 1029 | 1051 | ||
| 1030 | # Tabline. | 1052 | # Tabline. |
| 1031 | c.colors.tabs.bar.bg = bg0 | 1053 | c.colors.tabs.bar.bg = bg0 |
| 1032 | c.colors.tabs.even.bg = bg1 | 1054 | c.colors.tabs.even.bg = bg1 |
| 1033 | c.colors.tabs.even.fg = fg1 | 1055 | c.colors.tabs.even.fg = fg1 |
| 1034 | c.colors.tabs.indicator.error = red | 1056 | c.colors.tabs.indicator.error = red |
| 1035 | c.colors.tabs.indicator.start = blue | 1057 | c.colors.tabs.indicator.start = blue |
| 1036 | c.colors.tabs.indicator.stop = green | 1058 | c.colors.tabs.indicator.stop = green |
| 1037 | c.colors.tabs.indicator.system = "rgb" | 1059 | c.colors.tabs.indicator.system = "rgb" |
| 1038 | c.colors.tabs.odd.bg = bg1 | 1060 | c.colors.tabs.odd.bg = bg1 |
| 1039 | c.colors.tabs.odd.fg = fg1 | 1061 | c.colors.tabs.odd.fg = fg1 |
| 1040 | c.colors.tabs.pinned.even.bg = bg2 | 1062 | c.colors.tabs.pinned.even.bg = bg2 |
| 1041 | c.colors.tabs.pinned.even.fg = fg1 | 1063 | c.colors.tabs.pinned.even.fg = fg1 |
| 1042 | c.colors.tabs.pinned.odd.bg = bg2 | 1064 | c.colors.tabs.pinned.odd.bg = bg2 |
| 1043 | c.colors.tabs.pinned.odd.fg = fg1 | 1065 | c.colors.tabs.pinned.odd.fg = fg1 |
| 1044 | c.colors.tabs.pinned.selected.even.bg = bg0 | 1066 | c.colors.tabs.pinned.selected.even.bg = bg0 |
| 1045 | c.colors.tabs.pinned.selected.even.fg = green | 1067 | c.colors.tabs.pinned.selected.even.fg = green |
| 1046 | c.colors.tabs.pinned.selected.odd.bg = bg0 | 1068 | c.colors.tabs.pinned.selected.odd.bg = bg0 |
| 1047 | c.colors.tabs.pinned.selected.odd.fg = green | 1069 | c.colors.tabs.pinned.selected.odd.fg = green |
| 1048 | c.colors.tabs.pinned.selected.even.bg = bg0 | 1070 | c.colors.tabs.pinned.selected.even.bg = bg0 |
| 1049 | c.colors.tabs.pinned.selected.even.fg = blue | 1071 | c.colors.tabs.pinned.selected.even.fg = blue |
| 1050 | c.colors.tabs.selected.odd.bg = bg0 | 1072 | c.colors.tabs.selected.odd.bg = bg0 |
| 1051 | c.colors.tabs.selected.odd.fg = fg0 | 1073 | c.colors.tabs.selected.odd.fg = fg0 |
| 1052 | c.colors.tabs.selected.even.bg = bg0 | 1074 | c.colors.tabs.selected.even.bg = bg0 |
| 1053 | c.colors.tabs.selected.even.fg = fg0 | 1075 | c.colors.tabs.selected.even.fg = fg0 |
| 1054 | 1076 | ||
| 1055 | # Hints. | 1077 | # Hints. |
| 1056 | c.colors.hints.bg = bg2 | 1078 | c.colors.hints.bg = bg2 |
| 1057 | c.colors.hints.fg = fg0 | 1079 | c.colors.hints.fg = fg0 |
| 1058 | c.colors.hints.match.fg = red | 1080 | c.colors.hints.match.fg = red |
| 1059 | c.hints.border = "2px solid " + bg1 | 1081 | c.hints.border = "2px solid " + bg1 |
| 1060 | 1082 | ||
| 1061 | # Messages. | 1083 | # Messages. |
| 1062 | c.colors.messages.error.bg = bg1 | 1084 | c.colors.messages.error.bg = bg1 |
| 1063 | c.colors.messages.error.border = bg1 | 1085 | c.colors.messages.error.border = bg1 |
| 1064 | c.colors.messages.error.fg = red | 1086 | c.colors.messages.error.fg = red |
| 1065 | c.colors.messages.info.bg = bg1 | 1087 | c.colors.messages.info.bg = bg1 |
| 1066 | c.colors.messages.info.border = bg1 | 1088 | c.colors.messages.info.border = bg1 |
| 1067 | c.colors.messages.info.fg = blue | 1089 | c.colors.messages.info.fg = blue |
| 1068 | c.colors.messages.warning.bg = bg1 | 1090 | c.colors.messages.warning.bg = bg1 |
| 1069 | c.colors.messages.warning.border = bg1 | 1091 | c.colors.messages.warning.border = bg1 |
| 1070 | c.colors.messages.warning.fg = yellow | 1092 | c.colors.messages.warning.fg = yellow |
| 1071 | 1093 | ||
| 1072 | # Download bar. | 1094 | # Download bar. |
| 1073 | c.colors.downloads.bar.bg = bg0 | 1095 | c.colors.downloads.bar.bg = bg0 |
| 1074 | c.colors.downloads.error.bg = bg2 | 1096 | c.colors.downloads.error.bg = bg2 |
| 1075 | c.colors.downloads.error.fg = red | 1097 | c.colors.downloads.error.fg = red |
| 1076 | c.colors.downloads.start.bg = bg2 | 1098 | c.colors.downloads.start.bg = bg2 |
| 1077 | c.colors.downloads.start.fg = blue | 1099 | c.colors.downloads.start.fg = blue |
| 1078 | c.colors.downloads.stop.bg = bg2 | 1100 | c.colors.downloads.stop.bg = bg2 |
| 1079 | c.colors.downloads.stop.fg = green | 1101 | c.colors.downloads.stop.fg = green |
| 1080 | 1102 | ||
| 1081 | # Keyhints. | 1103 | # Keyhints. |
| 1082 | c.colors.keyhint.bg = bg0 | 1104 | c.colors.keyhint.bg = bg0 |
| 1083 | c.colors.keyhint.fg = fg0 | 1105 | c.colors.keyhint.fg = fg0 |
| 1084 | c.colors.keyhint.suffix.fg = yellow | 1106 | c.colors.keyhint.suffix.fg = yellow |
| 1085 | 1107 | ||
| 1086 | # Default color for about:blank pages (or if the css didn't specify) | 1108 | # Default color for about:blank pages (or if the css didn't specify) |
| 1087 | #c.colors.webpage.bg = bg1 | 1109 | #c.colors.webpage.bg = bg1 |
| 1088 | 1110 | ||
| 1089 | # Context menu. | 1111 | # Context menu. |
| 1090 | c.colors.contextmenu.disabled.bg = bg1 | 1112 | c.colors.contextmenu.disabled.bg = bg1 |
| 1091 | c.colors.contextmenu.disabled.fg = fg1 | 1113 | c.colors.contextmenu.disabled.fg = fg1 |
| 1092 | c.colors.contextmenu.menu.bg = bg1 | 1114 | c.colors.contextmenu.menu.bg = bg1 |
| 1093 | c.colors.contextmenu.menu.fg = fg0 | 1115 | c.colors.contextmenu.menu.fg = fg0 |
| 1094 | c.colors.contextmenu.selected.bg = bg2 | 1116 | c.colors.contextmenu.selected.bg = bg2 |
| 1095 | c.colors.contextmenu.selected.fg = blue | 1117 | c.colors.contextmenu.selected.fg = blue |
| 1096 | 1118 | ||
| 1097 | # Prompts. | 1119 | # Prompts. |
| 1098 | c.colors.prompts.bg = bg1 | 1120 | c.colors.prompts.bg = bg1 |
| 1099 | c.colors.prompts.border = "2px solid " + bg0 | 1121 | c.colors.prompts.border = "2px solid " + bg0 |
| 1100 | c.colors.prompts.fg = fg0 | 1122 | c.colors.prompts.fg = fg0 |
| 1101 | c.colors.prompts.selected.bg = bg2 | 1123 | c.colors.prompts.selected.bg = bg2 |
| 1102 | c.colors.prompts.selected.fg = blue | 1124 | c.colors.prompts.selected.fg = blue |
| 1103 | ''; | 1125 | ''; |
| 1104 | 1126 | ||
| 1105 | "qutebrowser/redirectors.py".text = '' | 1127 | "qutebrowser/redirectors.py".text = '' |
| 1106 | # I don't remember who I took this from. probably in qutebrowser m$hub issues | 1128 | # I don't remember who I took this from. probably in qutebrowser m$hub issues |
| 1107 | 1129 | ||
| 1108 | import operator, re, typing | 1130 | import operator, re, typing |
| 1109 | from urllib.parse import urljoin | 1131 | from urllib.parse import urljoin |
| 1110 | 1132 | ||
| 1111 | from qutebrowser.api import interceptor, message | 1133 | from qutebrowser.api import interceptor, message |
| 1112 | from PyQt6.QtCore import QUrl | 1134 | from PyQt6.QtCore import QUrl |
| 1113 | 1135 | ||
| 1114 | def _pastebin_redir(url: QUrl) -> bool: | 1136 | def _pastebin_redir(url: QUrl) -> bool: |
| 1115 | p = url.path().strip('/') | 1137 | p = url.path().strip('/') |
| 1116 | if p.isalnum(): | 1138 | if p.isalnum(): |
| 1117 | url.setPath(urljoin("/raw/", p)) | 1139 | url.setPath(urljoin("/raw/", p)) |
| 1118 | return True | 1140 | return True |
| 1119 | return False | 1141 | return False |
| 1120 | 1142 | ||
| 1121 | # Any return value other than a literal 'False' means we redirected | 1143 | # Any return value other than a literal 'False' means we redirected |
| 1122 | REDIRECT_MAP = { | 1144 | REDIRECT_MAP = { |
| 1123 | "new.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), | 1145 | "new.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), |
| 1124 | "np.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), | 1146 | "np.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), |
| 1125 | "old.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), | 1147 | "old.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), |
| 1126 | "reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), | 1148 | "reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), |
| 1127 | "www.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), | 1149 | "www.reddit.com": operator.methodcaller('setHost', 'redlib.demiurge.epistemia'), |
| 1128 | 1150 | ||
| 1129 | "www.youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'), | 1151 | "www.youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'), |
| 1130 | "youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'), | 1152 | "youtube.com": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'), |
| 1131 | "youtu.be": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'), | 1153 | "youtu.be": operator.methodcaller('setHost', 'invidious.demiurge.epistemia'), |
| 1132 | 1154 | ||
| 1133 | "imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'), | 1155 | "imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'), |
| 1134 | "i.imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'), | 1156 | "i.imgur.com": operator.methodcaller('setHost', 'rimgo.bloat.cat'), |
| 1135 | 1157 | ||
| 1136 | # Causes an infinite loop if the paste does not exist... | 1158 | # Causes an infinite loop if the paste does not exist... |
| 1137 | "pastebin.com": _pastebin_redir, | 1159 | "pastebin.com": _pastebin_redir, |
| 1138 | } # type: typing.Dict[str, typing.Callable[..., typing.Optional[bool]]] | 1160 | } # type: typing.Dict[str, typing.Callable[..., typing.Optional[bool]]] |
| 1139 | 1161 | ||
| 1140 | def int_fn(info: interceptor.Request): | 1162 | def int_fn(info: interceptor.Request): |
| 1141 | """Block the given request if necessary.""" | 1163 | """Block the given request if necessary.""" |
| 1142 | if (info.resource_type != interceptor.ResourceType.main_frame or | 1164 | if (info.resource_type != interceptor.ResourceType.main_frame or |
| 1143 | info.request_url.scheme() in {"data", "blob"}): | 1165 | info.request_url.scheme() in {"data", "blob"}): |
| 1144 | return | 1166 | return |
| 1145 | url = info.request_url | 1167 | url = info.request_url |
| 1146 | redir = REDIRECT_MAP.get(url.host()) | 1168 | redir = REDIRECT_MAP.get(url.host()) |
| 1147 | if redir is not None and redir(url) is not False: | 1169 | if redir is not None and redir(url) is not False: |
| 1148 | message.info("Redirecting to " + url.toString()) | 1170 | message.info("Redirecting to " + url.toString()) |
| 1149 | info.redirect(url) | 1171 | info.redirect(url) |
| 1150 | 1172 | ||
| 1151 | interceptor.register(int_fn) | 1173 | interceptor.register(int_fn) |
| 1152 | ''; | 1174 | ''; |
| 1153 | }; | 1175 | }; |
| 1154 | 1176 | ||
| 1155 | mimeApps = { | 1177 | mimeApps = { |
| 1156 | enable = true; | 1178 | enable = true; |
| 1157 | defaultApplications = { | 1179 | defaultApplications = { |
| 1158 | "application/pdf" = [ "zathura.desktop" ]; | 1180 | "application/pdf" = [ "zathura.desktop" ]; |
| 1159 | "application/xhtml+xml" = [ "qutebrowser.desktop" "librewolf.desktop" ]; | 1181 | "application/xhtml+xml" = [ |
| 1160 | "text/html" = [ "qutebrowser.desktop" "librewolf.desktop" ]; | 1182 | "qutebrowser.desktop" |
| 1161 | "text/xml" = [ "qutebrowser.desktop" "librewolf.desktop" ]; | 1183 | "librewolf.desktop" |
| 1162 | }; | 1184 | ]; |
| 1163 | }; | 1185 | "text/html" = [ |
| 1164 | 1186 | "qutebrowser.desktop" | |
| 1165 | userDirs = { | 1187 | "librewolf.desktop" |
| 1166 | createDirectories = false; | 1188 | ]; |
| 1167 | desktop = "$HOME/"; | 1189 | "text/xml" = [ |
| 1168 | documents = "$HOME/docs"; | 1190 | "qutebrowser.desktop" |
| 1169 | download = "$HOME/tmp"; | 1191 | "librewolf.desktop" |
| 1170 | music = "$HOME/music"; | 1192 | ]; |
| 1171 | pictures = "$HOME/pics"; | 1193 | }; |
| 1172 | publicShare = "$HOME/"; | 1194 | }; |
| 1173 | templates = "$HOME/"; | 1195 | |
| 1174 | videos = "$HOME/"; | 1196 | userDirs = { |
| 1175 | }; | 1197 | createDirectories = false; |
| 1176 | }; | 1198 | desktop = "$HOME/"; |
| 1199 | documents = "$HOME/docs"; | ||
| 1200 | download = "$HOME/tmp"; | ||
| 1201 | music = "$HOME/music"; | ||
| 1202 | pictures = "$HOME/pics"; | ||
| 1203 | publicShare = "$HOME/"; | ||
| 1204 | templates = "$HOME/"; | ||
| 1205 | videos = "$HOME/"; | ||
| 1206 | }; | ||
| 1207 | }; | ||
| 1177 | 1208 | ||
| 1178 | wayland.windowManager.sway = { | 1209 | wayland.windowManager.sway = { |
| 1179 | enable = true; | 1210 | enable = true; |
| 1180 | package = pkgs.swayfx; | 1211 | package = pkgs.swayfx; |
| 1181 | 1212 | ||
| 1182 | # https://github.com/nix-community/home-manager/issues/5379#issuecomment-2096066969 | 1213 | # https://github.com/nix-community/home-manager/issues/5379#issuecomment-2096066969 |
| 1183 | checkConfig = false; | 1214 | checkConfig = false; |
| 1184 | 1215 | ||
| 1185 | config = { | 1216 | config = { |
| 1186 | input."type:pointer".accel_profile = "flat"; | 1217 | input."type:pointer".accel_profile = "flat"; |
| 1187 | output."*".background = "~/pics/wp/elite_milky_way_below.png center"; | 1218 | output."*".background = "~/pics/wp/elite_milky_way_below.png center"; |
| 1188 | 1219 | ||
| 1189 | bars = [ { | 1220 | bars = [ |
| 1190 | colors = { | 1221 | { |
| 1191 | # background = colors.current.primary.background; | 1222 | colors = { |
| 1192 | background = "#000000"; | 1223 | # background = colors.current.primary.background; |
| 1193 | statusline = colors.current.primary.foreground; | 1224 | background = "#000000"; |
| 1194 | focusedWorkspace = { | 1225 | statusline = colors.current.primary.foreground; |
| 1195 | background = colors.current.normal.black; | 1226 | focusedWorkspace = { |
| 1196 | border = colors.current.normal.black; | 1227 | background = colors.current.normal.black; |
| 1197 | text = colors.current.normal.green; | 1228 | border = colors.current.normal.black; |
| 1198 | }; | 1229 | text = colors.current.normal.green; |
| 1199 | activeWorkspace = { | 1230 | }; |
| 1200 | background = colors.current.normal.black; | 1231 | activeWorkspace = { |
| 1201 | border = colors.current.normal.black; | 1232 | background = colors.current.normal.black; |
| 1202 | text = colors.current.primary.foreground; | 1233 | border = colors.current.normal.black; |
| 1203 | }; | 1234 | text = colors.current.primary.foreground; |
| 1204 | inactiveWorkspace = { | 1235 | }; |
| 1205 | background = colors.current.primary.background; | 1236 | inactiveWorkspace = { |
| 1206 | border = colors.current.primary.background; | 1237 | background = colors.current.primary.background; |
| 1207 | text = colors.current.normal.white; | 1238 | border = colors.current.primary.background; |
| 1208 | }; | 1239 | text = colors.current.normal.white; |
| 1209 | }; | 1240 | }; |
| 1210 | command = "${pkgs.sway}/bin/swaybar"; | 1241 | }; |
| 1211 | position = "top"; | 1242 | command = "${pkgs.sway}/bin/swaybar"; |
| 1212 | statusCommand = "while date +'%Y-%m-%d %X'; do sleep 1; done"; | 1243 | position = "top"; |
| 1213 | } ]; | 1244 | statusCommand = "while date +'%Y-%m-%d %X'; do sleep 1; done"; |
| 1214 | 1245 | } | |
| 1215 | colors = { | 1246 | ]; |
| 1216 | focused = { | 1247 | |
| 1217 | background = colors.current.primary.background; | 1248 | colors = { |
| 1218 | border = colors.current.primary.background; | 1249 | focused = { |
| 1219 | childBorder = colors.current.primary.background; | 1250 | background = colors.current.primary.background; |
| 1220 | indicator = colors.current.normal.black; | 1251 | border = colors.current.primary.background; |
| 1221 | text = colors.current.normal.green; | 1252 | childBorder = colors.current.primary.background; |
| 1222 | }; | 1253 | indicator = colors.current.normal.black; |
| 1223 | focusedInactive = { | 1254 | text = colors.current.normal.green; |
| 1224 | background = colors.current.primary.background; | 1255 | }; |
| 1225 | border = colors.current.primary.background; | 1256 | focusedInactive = { |
| 1226 | childBorder = colors.current.primary.background; | 1257 | background = colors.current.primary.background; |
| 1227 | indicator = colors.current.normal.black; | 1258 | border = colors.current.primary.background; |
| 1228 | text = colors.current.primary.foreground; | 1259 | childBorder = colors.current.primary.background; |
| 1229 | }; | 1260 | indicator = colors.current.normal.black; |
| 1230 | unfocused = { | 1261 | text = colors.current.primary.foreground; |
| 1231 | background = colors.current.normal.black; | 1262 | }; |
| 1232 | border = colors.current.normal.black; | 1263 | unfocused = { |
| 1233 | childBorder = colors.current.normal.black; | 1264 | background = colors.current.normal.black; |
| 1234 | indicator = colors.current.primary.background; | 1265 | border = colors.current.normal.black; |
| 1235 | text = colors.current.normal.white; | 1266 | childBorder = colors.current.normal.black; |
| 1236 | }; | 1267 | indicator = colors.current.primary.background; |
| 1237 | }; | 1268 | text = colors.current.normal.white; |
| 1269 | }; | ||
| 1270 | }; | ||
| 1238 | 1271 | ||
| 1239 | focus = { | 1272 | focus = { |
| 1240 | mouseWarping = true; | 1273 | mouseWarping = true; |
| 1241 | wrapping = "yes"; | 1274 | wrapping = "yes"; |
| 1242 | }; | 1275 | }; |
| 1243 | 1276 | ||
| 1244 | fonts = { | 1277 | fonts = { |
| 1245 | names = [ "monospace" ]; | 1278 | names = [ "monospace" ]; |
| 1246 | size = 11.0; | 1279 | size = 11.0; |
| 1247 | }; | 1280 | }; |
| 1248 | 1281 | ||
| 1249 | gaps = { | 1282 | gaps = { |
| 1250 | inner = 15; | 1283 | inner = 15; |
| 1251 | smartGaps = true; | 1284 | smartGaps = true; |
| 1252 | }; | 1285 | }; |
| 1253 | 1286 | ||
| 1254 | keybindings = | 1287 | keybindings = |
| 1255 | let | 1288 | let |
| 1256 | left = "n"; | 1289 | left = "n"; |
| 1257 | down = "e"; | 1290 | down = "e"; |
| 1258 | up = "o"; | 1291 | up = "o"; |
| 1259 | right = "i"; | 1292 | right = "i"; |
| 1260 | modifier = config.wayland.windowManager.sway.config.modifier; | 1293 | modifier = config.wayland.windowManager.sway.config.modifier; |
| 1261 | menu = config.wayland.windowManager.sway.config.menu; | 1294 | menu = config.wayland.windowManager.sway.config.menu; |
| 1262 | terminal = config.wayland.windowManager.sway.config.terminal; | 1295 | terminal = config.wayland.windowManager.sway.config.terminal; |
| 1263 | in lib.mkOptionDefault { | 1296 | in |
| 1264 | "${modifier}+Return" = "exec ${terminal}"; | 1297 | lib.mkOptionDefault { |
| 1265 | "${modifier}+p" = "exec ${menu}"; | 1298 | "${modifier}+Return" = "exec ${terminal}"; |
| 1266 | "${modifier}+b" = "exec bm t"; | 1299 | "${modifier}+p" = "exec ${menu}"; |
| 1267 | "${modifier}+Shift+b" = "exec kasimenu"; | 1300 | "${modifier}+b" = "exec bm t"; |
| 1268 | "${modifier}+u" = "exec kasimenu user"; | 1301 | "${modifier}+Shift+b" = "exec kasimenu"; |
| 1269 | "${modifier}+Shift+u" = "exec kasimenu email"; | 1302 | "${modifier}+u" = "exec kasimenu user"; |
| 1270 | "${modifier}+Shift+t" = "exec kasimenu_totp"; | 1303 | "${modifier}+Shift+u" = "exec kasimenu email"; |
| 1271 | 1304 | "${modifier}+Shift+t" = "exec kasimenu_totp"; | |
| 1272 | "${modifier}+Shift+q" = "kill"; | 1305 | |
| 1273 | "${modifier}+Shift+c" = "reload"; | 1306 | "${modifier}+Shift+q" = "kill"; |
| 1274 | "Mod1+Mod4+Ctrl+Shift+e" = "exit"; | 1307 | "${modifier}+Shift+c" = "reload"; |
| 1275 | 1308 | "Mod1+Mod4+Ctrl+Shift+e" = "exit"; | |
| 1276 | "${modifier}+${left}" = "focus left;"; | 1309 | |
| 1277 | "${modifier}+${down}" = "focus down;"; | 1310 | "${modifier}+${left}" = "focus left;"; |
| 1278 | "${modifier}+${up}" = "focus up;"; | 1311 | "${modifier}+${down}" = "focus down;"; |
| 1279 | "${modifier}+${right}" = "focus right;"; | 1312 | "${modifier}+${up}" = "focus up;"; |
| 1280 | "${modifier}+Shift+${left}" = "move left"; | 1313 | "${modifier}+${right}" = "focus right;"; |
| 1281 | "${modifier}+Shift+${down}" = "move down"; | 1314 | "${modifier}+Shift+${left}" = "move left"; |
| 1282 | "${modifier}+Shift+${up}" = "move up"; | 1315 | "${modifier}+Shift+${down}" = "move down"; |
| 1283 | "${modifier}+Shift+${right}" = "move right"; | 1316 | "${modifier}+Shift+${up}" = "move up"; |
| 1284 | 1317 | "${modifier}+Shift+${right}" = "move right"; | |
| 1285 | # TODO do this programatically | 1318 | |
| 1286 | "${modifier}+1" = "workspace number 1"; | 1319 | # TODO do this programatically |
| 1287 | "${modifier}+2" = "workspace number 2"; | 1320 | "${modifier}+1" = "workspace number 1"; |
| 1288 | "${modifier}+3" = "workspace number 3"; | 1321 | "${modifier}+2" = "workspace number 2"; |
| 1289 | "${modifier}+4" = "workspace number 4"; | 1322 | "${modifier}+3" = "workspace number 3"; |
| 1290 | "${modifier}+5" = "workspace number 5"; | 1323 | "${modifier}+4" = "workspace number 4"; |
| 1291 | "${modifier}+6" = "workspace number 6"; | 1324 | "${modifier}+5" = "workspace number 5"; |
| 1292 | "${modifier}+7" = "workspace number 7"; | 1325 | "${modifier}+6" = "workspace number 6"; |
| 1293 | "${modifier}+8" = "workspace number 8"; | 1326 | "${modifier}+7" = "workspace number 7"; |
| 1294 | "${modifier}+9" = "workspace number 9"; | 1327 | "${modifier}+8" = "workspace number 8"; |
| 1295 | "${modifier}+0" = "workspace number 10"; | 1328 | "${modifier}+9" = "workspace number 9"; |
| 1296 | "${modifier}+Shift+1" = "move container to workspace number 1"; | 1329 | "${modifier}+0" = "workspace number 10"; |
| 1297 | "${modifier}+Shift+2" = "move container to workspace number 2"; | 1330 | "${modifier}+Shift+1" = "move container to workspace number 1"; |
| 1298 | "${modifier}+Shift+3" = "move container to workspace number 3"; | 1331 | "${modifier}+Shift+2" = "move container to workspace number 2"; |
| 1299 | "${modifier}+Shift+4" = "move container to workspace number 4"; | 1332 | "${modifier}+Shift+3" = "move container to workspace number 3"; |
| 1300 | "${modifier}+Shift+5" = "move container to workspace number 5"; | 1333 | "${modifier}+Shift+4" = "move container to workspace number 4"; |
| 1301 | "${modifier}+Shift+6" = "move container to workspace number 6"; | 1334 | "${modifier}+Shift+5" = "move container to workspace number 5"; |
| 1302 | "${modifier}+Shift+7" = "move container to workspace number 7"; | 1335 | "${modifier}+Shift+6" = "move container to workspace number 6"; |
| 1303 | "${modifier}+Shift+8" = "move container to workspace number 8"; | 1336 | "${modifier}+Shift+7" = "move container to workspace number 7"; |
| 1304 | "${modifier}+Shift+9" = "move container to workspace number 9"; | 1337 | "${modifier}+Shift+8" = "move container to workspace number 8"; |
| 1305 | "${modifier}+Shift+0" = "move container to workspace number 10"; | 1338 | "${modifier}+Shift+9" = "move container to workspace number 9"; |
| 1306 | 1339 | "${modifier}+Shift+0" = "move container to workspace number 10"; | |
| 1307 | "${modifier}+Ctrl+Shift+b" = "splith"; | 1340 | |
| 1308 | "${modifier}+Ctrl+Shift+v" = "splitv"; | 1341 | "${modifier}+Ctrl+Shift+b" = "splith"; |
| 1309 | "${modifier}+s" = "layout stacking"; | 1342 | "${modifier}+Ctrl+Shift+v" = "splitv"; |
| 1310 | "${modifier}+t" = "layout tabbed"; | 1343 | "${modifier}+s" = "layout stacking"; |
| 1311 | "${modifier}+Ctrl+Shift+t" = "layout toggle split"; | 1344 | "${modifier}+t" = "layout tabbed"; |
| 1312 | "${modifier}+Shift+f" = "fullscreen"; | 1345 | "${modifier}+Ctrl+Shift+t" = "layout toggle split"; |
| 1313 | "${modifier}+Shift+space" = "floating toggle"; | 1346 | "${modifier}+Shift+f" = "fullscreen"; |
| 1314 | "${modifier}+space" = "focus mode_toggle"; | 1347 | "${modifier}+Shift+space" = "floating toggle"; |
| 1315 | "${modifier}+a" = "focus parent"; | 1348 | "${modifier}+space" = "focus mode_toggle"; |
| 1316 | 1349 | "${modifier}+a" = "focus parent"; | |
| 1317 | "${modifier}+r" = "mode resize"; | 1350 | |
| 1318 | }; | 1351 | "${modifier}+r" = "mode resize"; |
| 1319 | 1352 | }; | |
| 1320 | menu = "${pkgs.wmenu}/bin/wmenu-run"; | 1353 | |
| 1321 | 1354 | menu = "${pkgs.wmenu}/bin/wmenu-run"; | |
| 1322 | modes.resize = | 1355 | |
| 1323 | let | 1356 | modes.resize = |
| 1324 | left = "n"; | 1357 | let |
| 1325 | down = "e"; | 1358 | left = "n"; |
| 1326 | up = "o"; | 1359 | down = "e"; |
| 1327 | right = "i"; | 1360 | up = "o"; |
| 1328 | in lib.mkOptionDefault { | 1361 | right = "i"; |
| 1329 | ${left} = "resize shrink width 10px"; | 1362 | in |
| 1330 | ${down} = "resize grow height 10px"; | 1363 | lib.mkOptionDefault { |
| 1331 | ${up} = "resize shrink width 10px"; | 1364 | ${left} = "resize shrink width 10px"; |
| 1332 | ${right} = "resize grow width 10px"; | 1365 | ${down} = "resize grow height 10px"; |
| 1333 | Escape = "mode default"; | 1366 | ${up} = "resize shrink width 10px"; |
| 1334 | }; | 1367 | ${right} = "resize grow width 10px"; |
| 1335 | 1368 | Escape = "mode default"; | |
| 1336 | modifier = "Mod4"; | 1369 | }; |
| 1337 | 1370 | ||
| 1338 | terminal = "foot"; | 1371 | modifier = "Mod4"; |
| 1339 | 1372 | ||
| 1340 | window = { | 1373 | terminal = "foot"; |
| 1341 | border = 0; | 1374 | |
| 1342 | titlebar = false; | 1375 | window = { |
| 1343 | }; | 1376 | border = 0; |
| 1377 | titlebar = false; | ||
| 1378 | }; | ||
| 1344 | 1379 | ||
| 1345 | defaultWorkspace = "workspace number 1"; | 1380 | defaultWorkspace = "workspace number 1"; |
| 1346 | workspaceAutoBackAndForth = true; | 1381 | workspaceAutoBackAndForth = true; |
| 1347 | }; | 1382 | }; |
| 1348 | 1383 | ||
| 1349 | extraConfig = '' | 1384 | extraConfig = '' |
| 1350 | mouse_warping container | 1385 | mouse_warping container |
| 1351 | 1386 | ||
| 1352 | blur enable | 1387 | blur enable |
| 1353 | blur_xray disable | 1388 | blur_xray disable |
| 1354 | blur_radius 3 | 1389 | blur_radius 3 |
| 1355 | blur_passes 5 | 1390 | blur_passes 5 |
| 1356 | 1391 | ||
| 1357 | corner_radius 10 | 1392 | corner_radius 10 |
| 1358 | 1393 | ||
| 1359 | shadows enable | 1394 | shadows enable |
| 1360 | shadow_blur_radius 10 | 1395 | shadow_blur_radius 10 |
| 1361 | 1396 | ||
| 1362 | for_window [class="Emacs"] opacity 0.9 | 1397 | for_window [class="Emacs"] opacity 0.9 |
| 1363 | for_window [app_id="qutebrowser"] opacity 0.9 | 1398 | for_window [app_id="qutebrowser"] opacity 0.9 |
| 1364 | for_window [app_id="vesktop"] opacity 0.9 | 1399 | for_window [app_id="vesktop"] opacity 0.9 |
| 1365 | 1400 | ||
| 1366 | for_window [title="profanity"] move container to workspace 9 | 1401 | for_window [title="profanity"] move container to workspace 9 |
| 1367 | for_window [app_id="vesktop"] move container to workspace 10 | 1402 | for_window [app_id="vesktop"] move container to workspace 10 |
| 1368 | 1403 | ||
| 1369 | exec ${pkgs.qutebrowser}/bin/qutebrowser | 1404 | exec ${pkgs.qutebrowser}/bin/qutebrowser |
| 1370 | exec ${pkgs.vesktop}/bin/vesktop --use-vulkan --ozone-platform=wayland --enable-features=UseOzonePlatform,Vulkan | 1405 | exec ${pkgs.vesktop}/bin/vesktop --use-vulkan --ozone-platform=wayland --enable-features=UseOzonePlatform,Vulkan |
| 1371 | exec ${config.wayland.windowManager.sway.config.terminal} -T profanity -e ${pkgs.profanity}/bin/profanity | 1406 | exec ${config.wayland.windowManager.sway.config.terminal} -T profanity -e ${pkgs.profanity}/bin/profanity |
| 1372 | 1407 | ||
| 1373 | # for elite va | 1408 | # for elite va |
| 1374 | bindsym --whole-window BTN_SIDE echo press >/tmp/elite_va.fifo | 1409 | bindsym --whole-window BTN_SIDE echo press >/tmp/elite_va.fifo |
| 1375 | bindsym --whole-window --release BTN_SIDE echo release >/tmp/elite_va.fifo | 1410 | bindsym --whole-window --release BTN_SIDE echo release >/tmp/elite_va.fifo |
| 1376 | ''; | 1411 | ''; |
| 1377 | }; | 1412 | }; |
| 1378 | } | 1413 | } |
diff --git a/hosts/demiurge/default.nix b/hosts/demiurge/default.nix index 32696c3..50839ae 100644 --- a/hosts/demiurge/default.nix +++ b/hosts/demiurge/default.nix | |||
| @@ -1,28 +1,36 @@ | |||
| 1 | { config, home-manager, lib, pkgs, inputs, llama-cpp, ... }: | 1 | { |
| 2 | config, | ||
| 3 | home-manager, | ||
| 4 | lib, | ||
| 5 | pkgs, | ||
| 6 | inputs, | ||
| 7 | llama-cpp, | ||
| 8 | ... | ||
| 9 | }: | ||
| 2 | 10 | ||
| 3 | { | 11 | { |
| 4 | imports = | 12 | imports = [ |
| 5 | [ | 13 | ./hardware.nix |
| 6 | ./hardware.nix | 14 | home-manager.nixosModules.default |
| 7 | home-manager.nixosModules.default | 15 | ]; |
| 8 | ]; | ||
| 9 | 16 | ||
| 10 | # nixpkgs stuff | 17 | # nixpkgs stuff |
| 11 | nixpkgs = { | 18 | nixpkgs = { |
| 12 | config = { | 19 | config = { |
| 13 | # selectively allow unfree packages | 20 | # selectively allow unfree packages |
| 14 | allowUnfreePredicate = pkg: | 21 | allowUnfreePredicate = |
| 22 | pkg: | ||
| 15 | builtins.elem (lib.getName pkg) [ | 23 | builtins.elem (lib.getName pkg) [ |
| 16 | /* | 24 | /* |
| 17 | "cuda_cccl" | 25 | "cuda_cccl" |
| 18 | "cuda_cudart" | 26 | "cuda_cudart" |
| 19 | "cuda_nvcc" | 27 | "cuda_nvcc" |
| 20 | "cudnn" | 28 | "cudnn" |
| 21 | "libcublas" | 29 | "libcublas" |
| 22 | "libcufile" | 30 | "libcufile" |
| 23 | "quartus-prime-lite" | 31 | "quartus-prime-lite" |
| 24 | "quartus-prime-lite-unwrapped" | 32 | "quartus-prime-lite-unwrapped" |
| 25 | */ | 33 | */ |
| 26 | "steam" | 34 | "steam" |
| 27 | "steam-unwrapped" | 35 | "steam-unwrapped" |
| 28 | ]; | 36 | ]; |
| @@ -40,11 +48,13 @@ | |||
| 40 | (self: super: { | 48 | (self: super: { |
| 41 | invidious = super.invidious.overrideAttrs (old: { | 49 | invidious = super.invidious.overrideAttrs (old: { |
| 42 | # try removing shorts by ignoring any videos shorter than 65 seconds | 50 | # try removing shorts by ignoring any videos shorter than 65 seconds |
| 43 | postPatch = old.postPatch + '' | 51 | postPatch = |
| 44 | sed -i '/GROUP BY channel/a\ AND length_seconds > 65' src/invidious/database/channels.cr | 52 | old.postPatch |
| 45 | sed -i 's/\({view_name}\) \(ORDER BY published\)/\1 WHERE length_seconds > 65 \2/' src/invidious/users.cr | 53 | + '' |
| 46 | sed -i 's/\({values})\) \(ORDER BY published\)/\1 AND length_seconds > 65 \2/' src/invidious/users.cr | 54 | sed -i '/GROUP BY channel/a\ AND length_seconds > 65' src/invidious/database/channels.cr |
| 47 | ''; | 55 | sed -i 's/\({view_name}\) \(ORDER BY published\)/\1 WHERE length_seconds > 65 \2/' src/invidious/users.cr |
| 56 | sed -i 's/\({values})\) \(ORDER BY published\)/\1 AND length_seconds > 65 \2/' src/invidious/users.cr | ||
| 57 | ''; | ||
| 48 | }); | 58 | }); |
| 49 | }) | 59 | }) |
| 50 | (self: super: { | 60 | (self: super: { |
| @@ -61,11 +71,21 @@ | |||
| 61 | }) | 71 | }) |
| 62 | (self: super: { | 72 | (self: super: { |
| 63 | alvr = super.alvr.overrideAttrs (old: { | 73 | alvr = super.alvr.overrideAttrs (old: { |
| 64 | buildInputs = old.buildInputs ++ [ super.android-tools super.usbutils ]; | 74 | buildInputs = old.buildInputs ++ [ |
| 75 | super.android-tools | ||
| 76 | super.usbutils | ||
| 77 | ]; | ||
| 65 | nativeBuildInputs = old.nativeBuildInputs ++ [ super.makeWrapper ]; | 78 | nativeBuildInputs = old.nativeBuildInputs ++ [ super.makeWrapper ]; |
| 66 | postInstall = (old.postInstall or "") + '' | 79 | postInstall = |
| 67 | wrapProgram $out/bin/alvr_dashboard --prefix PATH : "${super.lib.makeBinPath [ super.android-tools super.usbutils ]}" | 80 | (old.postInstall or "") |
| 68 | ''; | 81 | + '' |
| 82 | wrapProgram $out/bin/alvr_dashboard --prefix PATH : "${ | ||
| 83 | super.lib.makeBinPath [ | ||
| 84 | super.android-tools | ||
| 85 | super.usbutils | ||
| 86 | ] | ||
| 87 | }" | ||
| 88 | ''; | ||
| 69 | }); | 89 | }); |
| 70 | }) | 90 | }) |
| 71 | ]; | 91 | ]; |
| @@ -94,7 +114,10 @@ | |||
| 94 | efi.canTouchEfiVariables = true; | 114 | efi.canTouchEfiVariables = true; |
| 95 | }; | 115 | }; |
| 96 | 116 | ||
| 97 | zfs.extraPools = [ "data_wd" "nvme_warm" ]; | 117 | zfs.extraPools = [ |
| 118 | "data_wd" | ||
| 119 | "nvme_warm" | ||
| 120 | ]; | ||
| 98 | }; | 121 | }; |
| 99 | 122 | ||
| 100 | # disable wifi and open some ports | 123 | # disable wifi and open some ports |
| @@ -105,7 +128,11 @@ | |||
| 105 | wireless.enable = false; | 128 | wireless.enable = false; |
| 106 | 129 | ||
| 107 | firewall = { | 130 | firewall = { |
| 108 | allowedTCPPorts = [ 22 80 443 ]; | 131 | allowedTCPPorts = [ |
| 132 | 22 | ||
| 133 | 80 | ||
| 134 | 443 | ||
| 135 | ]; | ||
| 109 | allowedUDPPorts = [ 51413 ]; | 136 | allowedUDPPorts = [ 51413 ]; |
| 110 | }; | 137 | }; |
| 111 | 138 | ||
| @@ -127,11 +154,16 @@ | |||
| 127 | ip route del 100.100.100.100/32 dev tailscale0 | 154 | ip route del 100.100.100.100/32 dev tailscale0 |
| 128 | ''; | 155 | ''; |
| 129 | 156 | ||
| 130 | peers = [{ | 157 | peers = [ |
| 131 | allowedIPs = [ "0.0.0.0/0" "::0/0" ]; | 158 | { |
| 132 | endpoint = "45.134.142.206:51820"; | 159 | allowedIPs = [ |
| 133 | publicKey = "H5t7PsMDnUAHrR8D2Jt3Mh6N6w43WmCzrOHShlEU+zw="; | 160 | "0.0.0.0/0" |
| 134 | }]; | 161 | "::0/0" |
| 162 | ]; | ||
| 163 | endpoint = "45.134.142.206:51820"; | ||
| 164 | publicKey = "H5t7PsMDnUAHrR8D2Jt3Mh6N6w43WmCzrOHShlEU+zw="; | ||
| 165 | } | ||
| 166 | ]; | ||
| 135 | }; | 167 | }; |
| 136 | }; | 168 | }; |
| 137 | 169 | ||
| @@ -145,7 +177,10 @@ | |||
| 145 | }; | 177 | }; |
| 146 | 178 | ||
| 147 | # enable flakes and nix cli | 179 | # enable flakes and nix cli |
| 148 | nix.settings.experimental-features = [ "nix-command" "flakes" ]; | 180 | nix.settings.experimental-features = [ |
| 181 | "nix-command" | ||
| 182 | "flakes" | ||
| 183 | ]; | ||
| 149 | 184 | ||
| 150 | # Define a user account. | 185 | # Define a user account. |
| 151 | users.users = { | 186 | users.users = { |
| @@ -229,36 +264,38 @@ | |||
| 229 | # I prefer doas over sudo for simplicity | 264 | # I prefer doas over sudo for simplicity |
| 230 | doas = { | 265 | doas = { |
| 231 | enable = true; | 266 | enable = true; |
| 232 | extraRules = [{ | 267 | extraRules = [ |
| 233 | users = ["vin"]; | 268 | { |
| 234 | keepEnv = true; | 269 | users = [ "vin" ]; |
| 235 | persist = true; | 270 | keepEnv = true; |
| 236 | }]; | 271 | persist = true; |
| 272 | } | ||
| 273 | ]; | ||
| 237 | }; | 274 | }; |
| 238 | 275 | ||
| 239 | pki.certificates = [ | 276 | pki.certificates = [ |
| 240 | '' | 277 | '' |
| 241 | -----BEGIN CERTIFICATE----- | 278 | -----BEGIN CERTIFICATE----- |
| 242 | MIIDMDCCAhigAwIBAgIUcSUafnojcFKod3f436VELfEKoFkwDQYJKoZIhvcNAQEL | 279 | MIIDMDCCAhigAwIBAgIUcSUafnojcFKod3f436VELfEKoFkwDQYJKoZIhvcNAQEL |
| 243 | BQAwHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlhMB4XDTI1MDMwMzEwMjQw | 280 | BQAwHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlhMB4XDTI1MDMwMzEwMjQw |
| 244 | OVoXDTI2MDMwMzEwMjQwOVowHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlh | 281 | OVoXDTI2MDMwMzEwMjQwOVowHTEbMBkGA1UEAwwSZGVtaXVyZ2UuZXBpc3RlbWlh |
| 245 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwiRlreCXc7f+yWclxR2M | 282 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwiRlreCXc7f+yWclxR2M |
| 246 | 639g0+Lr/c9HrX7EM2/olavPAtZgCzqqvJsDmXq4AURlwd82wZUZxXjWFwlRji/+ | 283 | 639g0+Lr/c9HrX7EM2/olavPAtZgCzqqvJsDmXq4AURlwd82wZUZxXjWFwlRji/+ |
| 247 | WViXQBTWwnXVjc9MJlxTq2X2zfU2GIxYsrA1ZQuj0wVHlA+R/66oL0Padc/qQZfv | 284 | WViXQBTWwnXVjc9MJlxTq2X2zfU2GIxYsrA1ZQuj0wVHlA+R/66oL0Padc/qQZfv |
| 248 | sshQnrqnutvGobBWEGJXcCIDiwUGgHlIoelwY9G0GLE/rkVujNjAonyMhVGJHVUv | 285 | sshQnrqnutvGobBWEGJXcCIDiwUGgHlIoelwY9G0GLE/rkVujNjAonyMhVGJHVUv |
| 249 | lXyc3RNslQHymr4Wl6+lL6V6XfuB1taECJYSLXPx66TvJqod2Io+b7T7cWp+9g9U | 286 | lXyc3RNslQHymr4Wl6+lL6V6XfuB1taECJYSLXPx66TvJqod2Io+b7T7cWp+9g9U |
| 250 | B2jQu1YnPRpwjdPvbOCPjPbOP6UcbyHdbHAidSM0FSL5riVUmugwDwbQKXFFX2gH | 287 | B2jQu1YnPRpwjdPvbOCPjPbOP6UcbyHdbHAidSM0FSL5riVUmugwDwbQKXFFX2gH |
| 251 | hwIDAQABo2gwZjAfBgNVHREEGDAWghQqLmRlbWl1cmdlLmVwaXN0ZW1pYTATBgNV | 288 | hwIDAQABo2gwZjAfBgNVHREEGDAWghQqLmRlbWl1cmdlLmVwaXN0ZW1pYTATBgNV |
| 252 | HSUEDDAKBggrBgEFBQcDATAPBgNVHRMECDAGAQH/AgEAMB0GA1UdDgQWBBTjMVhw | 289 | HSUEDDAKBggrBgEFBQcDATAPBgNVHRMECDAGAQH/AgEAMB0GA1UdDgQWBBTjMVhw |
| 253 | zmkE6P5jFHkLVQE2gNB2ejANBgkqhkiG9w0BAQsFAAOCAQEAWvnwB83vXzQFpObF | 290 | zmkE6P5jFHkLVQE2gNB2ejANBgkqhkiG9w0BAQsFAAOCAQEAWvnwB83vXzQFpObF |
| 254 | vn/nfZ9wYpNaBsE15ab3Fwd2nDc55KDkDWgBi5Xl8fwN3OhFOU2XXBCYqbCU6asx | 291 | vn/nfZ9wYpNaBsE15ab3Fwd2nDc55KDkDWgBi5Xl8fwN3OhFOU2XXBCYqbCU6asx |
| 255 | OnSx9glbhJioORO7B5ENbEYrpB97SaWASNXrBQ2KiQT5aC+9xb52K53kkk0tTn2l | 292 | OnSx9glbhJioORO7B5ENbEYrpB97SaWASNXrBQ2KiQT5aC+9xb52K53kkk0tTn2l |
| 256 | nBb+jyLItzWX99H6EavOq69a4T2BObZaSPQAfpM8FIrKl+UZC3152+bi8wKfG4K4 | 293 | nBb+jyLItzWX99H6EavOq69a4T2BObZaSPQAfpM8FIrKl+UZC3152+bi8wKfG4K4 |
| 257 | FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | 294 | FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM |
| 258 | /ek8Rmf6DTLaFBx+raWyDTgMY23lvWTKDTT1+dZnRNcg72bFpIdqHsDrIg/IBjZ0 | 295 | /ek8Rmf6DTLaFBx+raWyDTgMY23lvWTKDTT1+dZnRNcg72bFpIdqHsDrIg/IBjZ0 |
| 259 | 3eGfkQ== | 296 | 3eGfkQ== |
| 260 | -----END CERTIFICATE----- | 297 | -----END CERTIFICATE----- |
| 261 | '' | 298 | '' |
| 262 | ]; | 299 | ]; |
| 263 | 300 | ||
| 264 | sudo.enable = false; | 301 | sudo.enable = false; |
| @@ -343,7 +380,11 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 343 | default_user_preferences = { | 380 | default_user_preferences = { |
| 344 | captions = [ "English" ]; | 381 | captions = [ "English" ]; |
| 345 | dark_mode = "dark"; | 382 | dark_mode = "dark"; |
| 346 | feed_menu = [ "Popular" "Subscriptions" "Playlists" ]; | 383 | feed_menu = [ |
| 384 | "Popular" | ||
| 385 | "Subscriptions" | ||
| 386 | "Playlists" | ||
| 387 | ]; | ||
| 347 | max_results = 100; | 388 | max_results = 100; |
| 348 | quality = "dash"; | 389 | quality = "dash"; |
| 349 | save_player_pos = true; | 390 | save_player_pos = true; |
| @@ -420,9 +461,9 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 420 | }; | 461 | }; |
| 421 | 462 | ||
| 422 | "sdui.demiurge.epistemia" = { | 463 | "sdui.demiurge.epistemia" = { |
| 423 | # addSSL = true; | 464 | # addSSL = true; |
| 424 | # sslCertificate = "/var/demiurge.epistemia.crt"; | 465 | # sslCertificate = "/var/demiurge.epistemia.crt"; |
| 425 | # sslCertificateKey = "/var/demiurge.epistemia.key"; | 466 | # sslCertificateKey = "/var/demiurge.epistemia.key"; |
| 426 | locations."/" = { | 467 | locations."/" = { |
| 427 | proxyPass = "http://127.0.0.1:7860"; | 468 | proxyPass = "http://127.0.0.1:7860"; |
| 428 | proxyWebsockets = true; | 469 | proxyWebsockets = true; |
| @@ -623,7 +664,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 623 | name = "free software directory"; | 664 | name = "free software directory"; |
| 624 | engine = "mediawiki"; | 665 | engine = "mediawiki"; |
| 625 | shortcut = "fsd"; | 666 | shortcut = "fsd"; |
| 626 | categories = ["it" "software wikis"]; | 667 | categories = [ |
| 668 | "it" | ||
| 669 | "software wikis" | ||
| 670 | ]; | ||
| 627 | base_url = "https://directory.fsf.org/"; | 671 | base_url = "https://directory.fsf.org/"; |
| 628 | search_type = "title"; | 672 | search_type = "title"; |
| 629 | timeout = 5.0; | 673 | timeout = 5.0; |
| @@ -637,7 +681,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 637 | name = "gentoo"; | 681 | name = "gentoo"; |
| 638 | engine = "mediawiki"; | 682 | engine = "mediawiki"; |
| 639 | shortcut = "ge"; | 683 | shortcut = "ge"; |
| 640 | categories = ["it" "software wikis"]; | 684 | categories = [ |
| 685 | "it" | ||
| 686 | "software wikis" | ||
| 687 | ]; | ||
| 641 | base_url = "https://wiki.gentoo.org/"; | 688 | base_url = "https://wiki.gentoo.org/"; |
| 642 | api_path = "api.php"; | 689 | api_path = "api.php"; |
| 643 | search_type = "text"; | 690 | search_type = "text"; |
| @@ -744,7 +791,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 744 | engine = "stackexchange"; | 791 | engine = "stackexchange"; |
| 745 | shortcut = "st"; | 792 | shortcut = "st"; |
| 746 | api_site = "stackoverflow"; | 793 | api_site = "stackoverflow"; |
| 747 | categories = ["it" "q&a"]; | 794 | categories = [ |
| 795 | "it" | ||
| 796 | "q&a" | ||
| 797 | ]; | ||
| 748 | } | 798 | } |
| 749 | 799 | ||
| 750 | { | 800 | { |
| @@ -752,7 +802,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 752 | engine = "stackexchange"; | 802 | engine = "stackexchange"; |
| 753 | shortcut = "ubuntu"; | 803 | shortcut = "ubuntu"; |
| 754 | api_site = "askubuntu"; | 804 | api_site = "askubuntu"; |
| 755 | categories = ["it" "q&a"]; | 805 | categories = [ |
| 806 | "it" | ||
| 807 | "q&a" | ||
| 808 | ]; | ||
| 756 | } | 809 | } |
| 757 | 810 | ||
| 758 | { | 811 | { |
| @@ -760,15 +813,21 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 760 | engine = "stackexchange"; | 813 | engine = "stackexchange"; |
| 761 | shortcut = "su"; | 814 | shortcut = "su"; |
| 762 | api_site = "superuser"; | 815 | api_site = "superuser"; |
| 763 | categories = ["it" "q&a"]; | 816 | categories = [ |
| 817 | "it" | ||
| 818 | "q&a" | ||
| 819 | ]; | ||
| 764 | } | 820 | } |
| 765 | 821 | ||
| 766 | { | 822 | { |
| 767 | name = "nixos.discourse"; | 823 | name = "nixos.discourse"; |
| 768 | engine = "discourse"; | 824 | engine = "discourse"; |
| 769 | shortcut = "dnos"; | 825 | shortcut = "dnos"; |
| 770 | base_url = "https://discourse.nixos.org"; | 826 | base_url = "https://discourse.nixos.org"; |
| 771 | categories = ["it" "q&a"]; | 827 | categories = [ |
| 828 | "it" | ||
| 829 | "q&a" | ||
| 830 | ]; | ||
| 772 | } | 831 | } |
| 773 | 832 | ||
| 774 | { | 833 | { |
| @@ -786,7 +845,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 786 | url_query = "URL"; | 845 | url_query = "URL"; |
| 787 | title_query = "Title"; | 846 | title_query = "Title"; |
| 788 | content_query = "Snippet"; | 847 | content_query = "Snippet"; |
| 789 | categories = ["general" "web"]; | 848 | categories = [ |
| 849 | "general" | ||
| 850 | "web" | ||
| 851 | ]; | ||
| 790 | shortcut = "wib"; | 852 | shortcut = "wib"; |
| 791 | about.website = "https://wiby.me/"; | 853 | about.website = "https://wiby.me/"; |
| 792 | } | 854 | } |
| @@ -796,7 +858,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 796 | engine = "mediawiki"; | 858 | engine = "mediawiki"; |
| 797 | weight = 0.5; | 859 | weight = 0.5; |
| 798 | shortcut = "wb"; | 860 | shortcut = "wb"; |
| 799 | categories = ["general" "wikimedia"]; | 861 | categories = [ |
| 862 | "general" | ||
| 863 | "wikimedia" | ||
| 864 | ]; | ||
| 800 | base_url = "https://{language}.wikibooks.org/"; | 865 | base_url = "https://{language}.wikibooks.org/"; |
| 801 | search_type = "text"; | 866 | search_type = "text"; |
| 802 | about = { | 867 | about = { |
| @@ -809,7 +874,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 809 | name = "wiktionary"; | 874 | name = "wiktionary"; |
| 810 | engine = "mediawiki"; | 875 | engine = "mediawiki"; |
| 811 | shortcut = "wt"; | 876 | shortcut = "wt"; |
| 812 | categories = ["dictionaries" "wikimedia"]; | 877 | categories = [ |
| 878 | "dictionaries" | ||
| 879 | "wikimedia" | ||
| 880 | ]; | ||
| 813 | base_url = "https://{language}.wiktionary.org/"; | 881 | base_url = "https://{language}.wiktionary.org/"; |
| 814 | search_type = "text"; | 882 | search_type = "text"; |
| 815 | about = { | 883 | about = { |
| @@ -823,7 +891,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 823 | engine = "mediawiki"; | 891 | engine = "mediawiki"; |
| 824 | weight = 0.5; | 892 | weight = 0.5; |
| 825 | shortcut = "wv"; | 893 | shortcut = "wv"; |
| 826 | categories = ["general" "wikimedia"]; | 894 | categories = [ |
| 895 | "general" | ||
| 896 | "wikimedia" | ||
| 897 | ]; | ||
| 827 | base_url = "https://{language}.wikiversity.org/"; | 898 | base_url = "https://{language}.wikiversity.org/"; |
| 828 | search_type = "text"; | 899 | search_type = "text"; |
| 829 | about = { | 900 | about = { |
| @@ -849,7 +920,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 849 | shortcut = "br"; | 920 | shortcut = "br"; |
| 850 | time_range_support = true; | 921 | time_range_support = true; |
| 851 | paging = true; | 922 | paging = true; |
| 852 | categories = ["general" "web"]; | 923 | categories = [ |
| 924 | "general" | ||
| 925 | "web" | ||
| 926 | ]; | ||
| 853 | brave_category = "search"; | 927 | brave_category = "search"; |
| 854 | } | 928 | } |
| 855 | 929 | ||
| @@ -858,7 +932,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 858 | engine = "brave"; | 932 | engine = "brave"; |
| 859 | network = "brave"; | 933 | network = "brave"; |
| 860 | shortcut = "brimg"; | 934 | shortcut = "brimg"; |
| 861 | categories = ["images" "web"]; | 935 | categories = [ |
| 936 | "images" | ||
| 937 | "web" | ||
| 938 | ]; | ||
| 862 | brave_category = "images"; | 939 | brave_category = "images"; |
| 863 | } | 940 | } |
| 864 | 941 | ||
| @@ -873,7 +950,10 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 873 | title_xpath = "./h4/a[2]"; | 950 | title_xpath = "./h4/a[2]"; |
| 874 | content_xpath = "./p"; | 951 | content_xpath = "./p"; |
| 875 | first_page_num = 1; | 952 | first_page_num = 1; |
| 876 | categories = ["it" "repos"]; | 953 | categories = [ |
| 954 | "it" | ||
| 955 | "repos" | ||
| 956 | ]; | ||
| 877 | about = { | 957 | about = { |
| 878 | website = "https://sr.ht"; | 958 | website = "https://sr.ht"; |
| 879 | wikidata_id = "Q78514485"; | 959 | wikidata_id = "Q78514485"; |
| @@ -914,12 +994,12 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 914 | udev = { | 994 | udev = { |
| 915 | enable = true; | 995 | enable = true; |
| 916 | extraRules = '' | 996 | extraRules = '' |
| 917 | # ST-Link v2.1 | 997 | # ST-Link v2.1 |
| 918 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666" | 998 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666" |
| 919 | 999 | ||
| 920 | # Oculus Quest 2 | 1000 | # Oculus Quest 2 |
| 921 | SUBSYSTEM=="usb", ATTR{idVendor}=="2833", ATTR{idProduct}=="0186", MODE="0660", | 1001 | SUBSYSTEM=="usb", ATTR{idVendor}=="2833", ATTR{idProduct}=="0186", MODE="0660", |
| 922 | GROUP="input", SYMLINK+="ocuquest%n" | 1002 | GROUP="input", SYMLINK+="ocuquest%n" |
| 923 | ''; | 1003 | ''; |
| 924 | }; | 1004 | }; |
| 925 | 1005 | ||
| @@ -928,9 +1008,9 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 928 | xserver = { | 1008 | xserver = { |
| 929 | enable = true; | 1009 | enable = true; |
| 930 | autorun = false; | 1010 | autorun = false; |
| 931 | displayManager.startx.enable = true; | 1011 | displayManager.startx.enable = true; |
| 932 | modules = [ pkgs.xf86_input_wacom ]; | 1012 | modules = [ pkgs.xf86_input_wacom ]; |
| 933 | videoDrivers = [ "amdgpu" ]; | 1013 | videoDrivers = [ "amdgpu" ]; |
| 934 | wacom.enable = true; | 1014 | wacom.enable = true; |
| 935 | }; | 1015 | }; |
| 936 | }; | 1016 | }; |
| @@ -940,26 +1020,26 @@ FQsOJMjIvhTm2IiOS8xIaZz7EJORxFjtOkLEIGGZBNK6QcnD714/nYbHSrQx4eNM | |||
| 940 | services = { | 1020 | services = { |
| 941 | invidious_token = { | 1021 | invidious_token = { |
| 942 | script = '' | 1022 | script = '' |
| 943 | set -euo pipefail | 1023 | set -euo pipefail |
| 944 | 1024 | ||
| 945 | a="$(${pkgs.podman}/bin/podman run quay.io/invidious/youtube-trusted-session-generator | sed -n 4,5p)" | 1025 | a="$(${pkgs.podman}/bin/podman run quay.io/invidious/youtube-trusted-session-generator | sed -n 4,5p)" |
| 946 | visitor_data=$(echo "$a" | sed -n 1p | cut -d' ' -f2) | 1026 | visitor_data=$(echo "$a" | sed -n 1p | cut -d' ' -f2) |
| 947 | po_token=$(echo "$a" | sed -n 2p | cut -d' ' -f2) | 1027 | po_token=$(echo "$a" | sed -n 2p | cut -d' ' -f2) |
| 948 | day=$(date +%e | tr -d ' ') | 1028 | day=$(date +%e | tr -d ' ') |
| 949 | 1029 | ||
| 950 | printf '{"visitor_data": "%s",\n"po_token": "%s",\n' \ | 1030 | printf '{"visitor_data": "%s",\n"po_token": "%s",\n' \ |
| 951 | "$visitor_data" "$po_token" \ | 1031 | "$visitor_data" "$po_token" \ |
| 952 | >/run/invidious_settings | 1032 | >/run/invidious_settings |
| 953 | 1033 | ||
| 954 | if [ $((day % 2)) -eq 0 ]; then | 1034 | if [ $((day % 2)) -eq 0 ]; then |
| 955 | printf '"force_resolve": "ipv6"}\n' >>/run/invidious_settings | 1035 | printf '"force_resolve": "ipv6"}\n' >>/run/invidious_settings |
| 956 | else | 1036 | else |
| 957 | printf '"force_resolve": "ipv4"}\n' >>/run/invidious_settings | 1037 | printf '"force_resolve": "ipv4"}\n' >>/run/invidious_settings |
| 958 | fi | 1038 | fi |
| 959 | 1039 | ||
| 960 | ${pkgs.systemd}/bin/systemctl restart invidious-sig-helper | 1040 | ${pkgs.systemd}/bin/systemctl restart invidious-sig-helper |
| 961 | ${pkgs.systemd}/bin/systemctl restart invidious | 1041 | ${pkgs.systemd}/bin/systemctl restart invidious |
| 962 | ''; | 1042 | ''; |
| 963 | serviceConfig = { | 1043 | serviceConfig = { |
| 964 | Type = "oneshot"; | 1044 | Type = "oneshot"; |
| 965 | User = "root"; | 1045 | User = "root"; |
diff --git a/hosts/demiurge/hardware.nix b/hosts/demiurge/hardware.nix index b075bb4..21d7ab3 100644 --- a/hosts/demiurge/hardware.nix +++ b/hosts/demiurge/hardware.nix | |||
| @@ -1,53 +1,70 @@ | |||
| 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ | 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ |
| 2 | # and may be overwritten by future invocations. Please make changes | 2 | # and may be overwritten by future invocations. Please make changes |
| 3 | # to /etc/nixos/configuration.nix instead. | 3 | # to /etc/nixos/configuration.nix instead. |
| 4 | { config, lib, pkgs, modulesPath, ... }: | 4 | { |
| 5 | config, | ||
| 6 | lib, | ||
| 7 | pkgs, | ||
| 8 | modulesPath, | ||
| 9 | ... | ||
| 10 | }: | ||
| 5 | 11 | ||
| 6 | { | 12 | { |
| 7 | imports = | 13 | imports = [ |
| 8 | [ (modulesPath + "/installer/scan/not-detected.nix") | 14 | (modulesPath + "/installer/scan/not-detected.nix") |
| 9 | ]; | 15 | ]; |
| 10 | 16 | ||
| 11 | boot.initrd.availableKernelModules = [ "mpt3sas" "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; | 17 | boot.initrd.availableKernelModules = [ |
| 18 | "mpt3sas" | ||
| 19 | "nvme" | ||
| 20 | "xhci_pci" | ||
| 21 | "ahci" | ||
| 22 | "usbhid" | ||
| 23 | "usb_storage" | ||
| 24 | "sd_mod" | ||
| 25 | ]; | ||
| 12 | boot.initrd.kernelModules = [ "amdgpu" ]; | 26 | boot.initrd.kernelModules = [ "amdgpu" ]; |
| 13 | boot.kernelModules = [ "kvm-amd" ]; | 27 | boot.kernelModules = [ "kvm-amd" ]; |
| 14 | boot.extraModulePackages = [ ]; | 28 | boot.extraModulePackages = [ ]; |
| 15 | 29 | ||
| 16 | fileSystems."/" = | 30 | fileSystems."/" = { |
| 17 | { device = "zroot/root"; | 31 | device = "zroot/root"; |
| 18 | fsType = "zfs"; | 32 | fsType = "zfs"; |
| 19 | options = [ "zfsutil" ]; | 33 | options = [ "zfsutil" ]; |
| 20 | }; | 34 | }; |
| 21 | 35 | ||
| 22 | fileSystems."/nix" = | 36 | fileSystems."/nix" = { |
| 23 | { device = "zroot/nix"; | 37 | device = "zroot/nix"; |
| 24 | fsType = "zfs"; | 38 | fsType = "zfs"; |
| 25 | options = [ "zfsutil" ]; | 39 | options = [ "zfsutil" ]; |
| 26 | }; | 40 | }; |
| 27 | 41 | ||
| 28 | fileSystems."/var" = | 42 | fileSystems."/var" = { |
| 29 | { device = "zroot/var"; | 43 | device = "zroot/var"; |
| 30 | fsType = "zfs"; | 44 | fsType = "zfs"; |
| 31 | options = [ "zfsutil" ]; | 45 | options = [ "zfsutil" ]; |
| 32 | }; | 46 | }; |
| 33 | 47 | ||
| 34 | fileSystems."/home" = | 48 | fileSystems."/home" = { |
| 35 | { device = "zroot/home"; | 49 | device = "zroot/home"; |
| 36 | fsType = "zfs"; | 50 | fsType = "zfs"; |
| 37 | options = [ "zfsutil" ]; | 51 | options = [ "zfsutil" ]; |
| 38 | }; | 52 | }; |
| 39 | 53 | ||
| 40 | fileSystems."/data" = | 54 | fileSystems."/data" = { |
| 41 | { device = "nvme_warm"; | 55 | device = "nvme_warm"; |
| 42 | fsType = "zfs"; | 56 | fsType = "zfs"; |
| 43 | options = [ "zfsutil" ]; | 57 | options = [ "zfsutil" ]; |
| 44 | }; | 58 | }; |
| 45 | 59 | ||
| 46 | fileSystems."/boot" = | 60 | fileSystems."/boot" = { |
| 47 | { device = "/dev/disk/by-uuid/1C01-EE5C"; | 61 | device = "/dev/disk/by-uuid/1C01-EE5C"; |
| 48 | fsType = "vfat"; | 62 | fsType = "vfat"; |
| 49 | options = [ "fmask=0022" "dmask=0022" ]; | 63 | options = [ |
| 50 | }; | 64 | "fmask=0022" |
| 65 | "dmask=0022" | ||
| 66 | ]; | ||
| 67 | }; | ||
| 51 | 68 | ||
| 52 | swapDevices = [ ]; | 69 | swapDevices = [ ]; |
| 53 | 70 | ||
diff --git a/hosts/hastur/default.nix b/hosts/hastur/default.nix index 54e1a06..29260c3 100644 --- a/hosts/hastur/default.nix +++ b/hosts/hastur/default.nix | |||
| @@ -2,14 +2,20 @@ | |||
| 2 | # your system. Help is available in the configuration.nix(5) man page, on | 2 | # your system. Help is available in the configuration.nix(5) man page, on |
| 3 | # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). | 3 | # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). |
| 4 | 4 | ||
| 5 | { config, home-manager, lib, pkgs, inputs, ... }: | 5 | { |
| 6 | config, | ||
| 7 | home-manager, | ||
| 8 | lib, | ||
| 9 | pkgs, | ||
| 10 | inputs, | ||
| 11 | ... | ||
| 12 | }: | ||
| 6 | 13 | ||
| 7 | { | 14 | { |
| 8 | imports = | 15 | imports = [ |
| 9 | [ | 16 | ./hardware.nix |
| 10 | ./hardware.nix | 17 | home-manager.nixosModules.default |
| 11 | home-manager.nixosModules.default | 18 | ]; |
| 12 | ]; | ||
| 13 | 19 | ||
| 14 | # decrypt agenix secrets | 20 | # decrypt agenix secrets |
| 15 | age.secrets = { | 21 | age.secrets = { |
| @@ -26,10 +32,12 @@ | |||
| 26 | zfsSupport = true; | 32 | zfsSupport = true; |
| 27 | efiSupport = true; | 33 | efiSupport = true; |
| 28 | efiInstallAsRemovable = true; | 34 | efiInstallAsRemovable = true; |
| 29 | mirroredBoots = [{ | 35 | mirroredBoots = [ |
| 30 | devices = [ "nodev" ]; | 36 | { |
| 31 | path = "/boot"; | 37 | devices = [ "nodev" ]; |
| 32 | }]; | 38 | path = "/boot"; |
| 39 | } | ||
| 40 | ]; | ||
| 33 | }; | 41 | }; |
| 34 | 42 | ||
| 35 | # disable wifi and open some ports | 43 | # disable wifi and open some ports |
| @@ -50,10 +58,10 @@ | |||
| 50 | phase2="auth=MSCHAPv2" | 58 | phase2="auth=MSCHAPv2" |
| 51 | identity="***REDACTED_EMAIL***" | 59 | identity="***REDACTED_EMAIL***" |
| 52 | password="***REDACTED_PASSWORD***" | 60 | password="***REDACTED_PASSWORD***" |
| 53 | ''; | 61 | ''; |
| 54 | }; | 62 | }; |
| 55 | 63 | ||
| 56 | FloridaPoly_BYOD = {}; | 64 | FloridaPoly_BYOD = { }; |
| 57 | 65 | ||
| 58 | iphonebob.pskRaw = "***REDACTED_PSK***"; | 66 | iphonebob.pskRaw = "***REDACTED_PSK***"; |
| 59 | Retreat_86WiFi.pskRaw = "***REDACTED_PSK***"; | 67 | Retreat_86WiFi.pskRaw = "***REDACTED_PSK***"; |
| @@ -85,11 +93,16 @@ | |||
| 85 | ip route del 100.100.100.100/32 dev tailscale0 | 93 | ip route del 100.100.100.100/32 dev tailscale0 |
| 86 | ''; | 94 | ''; |
| 87 | 95 | ||
| 88 | peers = [{ | 96 | peers = [ |
| 89 | allowedIPs = [ "0.0.0.0/0" "::0/0" ]; | 97 | { |
| 90 | endpoint = "45.134.142.219:51820"; | 98 | allowedIPs = [ |
| 91 | publicKey = "FVEKAMJqaJU2AwWn5Mg9TK9IAfJc4XDUmSzEeC/VXGs="; | 99 | "0.0.0.0/0" |
| 92 | }]; | 100 | "::0/0" |
| 101 | ]; | ||
| 102 | endpoint = "45.134.142.219:51820"; | ||
| 103 | publicKey = "FVEKAMJqaJU2AwWn5Mg9TK9IAfJc4XDUmSzEeC/VXGs="; | ||
| 104 | } | ||
| 105 | ]; | ||
| 93 | }; | 106 | }; |
| 94 | }; | 107 | }; |
| 95 | 108 | ||
| @@ -103,7 +116,10 @@ | |||
| 103 | }; | 116 | }; |
| 104 | 117 | ||
| 105 | # enable flakes and nix cli | 118 | # enable flakes and nix cli |
| 106 | nix.settings.experimental-features = [ "nix-command" "flakes" ]; | 119 | nix.settings.experimental-features = [ |
| 120 | "nix-command" | ||
| 121 | "flakes" | ||
| 122 | ]; | ||
| 107 | 123 | ||
| 108 | # Define a user account. | 124 | # Define a user account. |
| 109 | users.users.vin = { | 125 | users.users.vin = { |
| @@ -128,7 +144,8 @@ | |||
| 128 | }; | 144 | }; |
| 129 | 145 | ||
| 130 | # selectively allow unfree packages | 146 | # selectively allow unfree packages |
| 131 | nixpkgs.config.allowUnfreePredicate = pkg: | 147 | nixpkgs.config.allowUnfreePredicate = |
| 148 | pkg: | ||
| 132 | builtins.elem (lib.getName pkg) [ | 149 | builtins.elem (lib.getName pkg) [ |
| 133 | "quartus-prime-lite" | 150 | "quartus-prime-lite" |
| 134 | "quartus-prime-lite-unwrapped" | 151 | "quartus-prime-lite-unwrapped" |
| @@ -176,27 +193,29 @@ | |||
| 176 | # I prefer doas over sudo for simplicity | 193 | # I prefer doas over sudo for simplicity |
| 177 | doas = { | 194 | doas = { |
| 178 | enable = true; | 195 | enable = true; |
| 179 | extraRules = [{ | 196 | extraRules = [ |
| 180 | users = ["vin"]; | 197 | { |
| 181 | keepEnv = true; | 198 | users = [ "vin" ]; |
| 182 | persist = true; | 199 | keepEnv = true; |
| 183 | }]; | 200 | persist = true; |
| 201 | } | ||
| 202 | ]; | ||
| 184 | }; | 203 | }; |
| 185 | 204 | ||
| 186 | pki.certificates = [ | 205 | pki.certificates = [ |
| 187 | '' | 206 | '' |
| 188 | -----BEGIN CERTIFICATE----- | 207 | -----BEGIN CERTIFICATE----- |
| 189 | MIIBoDCCAUagAwIBAgIRANI8aOT3LE+pzmsQWjcDOIgwCgYIKoZIzj0EAwIwLjER | 208 | MIIBoDCCAUagAwIBAgIRANI8aOT3LE+pzmsQWjcDOIgwCgYIKoZIzj0EAwIwLjER |
| 190 | MA8GA1UEChMIZGVtaXVyZ2UxGTAXBgNVBAMTEGRlbWl1cmdlIFJvb3QgQ0EwHhcN | 209 | MA8GA1UEChMIZGVtaXVyZ2UxGTAXBgNVBAMTEGRlbWl1cmdlIFJvb3QgQ0EwHhcN |
| 191 | MjUwMjE4MDUzNTA5WhcNMzUwMjE2MDUzNTA5WjAuMREwDwYDVQQKEwhkZW1pdXJn | 210 | MjUwMjE4MDUzNTA5WhcNMzUwMjE2MDUzNTA5WjAuMREwDwYDVQQKEwhkZW1pdXJn |
| 192 | ZTEZMBcGA1UEAxMQZGVtaXVyZ2UgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49 | 211 | ZTEZMBcGA1UEAxMQZGVtaXVyZ2UgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqGSM49 |
| 193 | AwEHA0IABMv8weeXJSDLygVlBxxAHLCvQCdf2COCk0QffNeDaVlIU/NFo3IyPSqG | 212 | AwEHA0IABMv8weeXJSDLygVlBxxAHLCvQCdf2COCk0QffNeDaVlIU/NFo3IyPSqG |
| 194 | E3YtWEWamU/icgsJS999z3BZ5O+cTP6jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNV | 213 | E3YtWEWamU/icgsJS999z3BZ5O+cTP6jRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNV |
| 195 | HRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBRM51S3OgTxXwNhdSSHw6llz0APFzAK | 214 | HRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBRM51S3OgTxXwNhdSSHw6llz0APFzAK |
| 196 | BggqhkjOPQQDAgNIADBFAiA9alHJ1XHLlKNRUGRL4tdFC3RZYHtoN8BmBHEfDa1S | 215 | BggqhkjOPQQDAgNIADBFAiA9alHJ1XHLlKNRUGRL4tdFC3RZYHtoN8BmBHEfDa1S |
| 197 | LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i | 216 | LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i |
| 198 | -----END CERTIFICATE----- | 217 | -----END CERTIFICATE----- |
| 199 | '' | 218 | '' |
| 200 | ]; | 219 | ]; |
| 201 | 220 | ||
| 202 | sudo.enable = false; | 221 | sudo.enable = false; |
| @@ -273,8 +292,8 @@ LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i | |||
| 273 | udev = { | 292 | udev = { |
| 274 | enable = true; | 293 | enable = true; |
| 275 | extraRules = '' | 294 | extraRules = '' |
| 276 | # ST-Link v2.1 | 295 | # ST-Link v2.1 |
| 277 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666" | 296 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666" |
| 278 | ''; | 297 | ''; |
| 279 | }; | 298 | }; |
| 280 | 299 | ||
| @@ -283,8 +302,8 @@ LQIhANgsvYmyCp/Nur2RKaV25CDg3kMYVBXED2HVDy8qa+3i | |||
| 283 | xserver = { | 302 | xserver = { |
| 284 | enable = true; | 303 | enable = true; |
| 285 | autorun = false; | 304 | autorun = false; |
| 286 | displayManager.startx.enable = true; | 305 | displayManager.startx.enable = true; |
| 287 | videoDrivers = [ "modesetting" ]; | 306 | videoDrivers = [ "modesetting" ]; |
| 288 | }; | 307 | }; |
| 289 | }; | 308 | }; |
| 290 | 309 | ||
diff --git a/hosts/hastur/hardware.nix b/hosts/hastur/hardware.nix index 6a73716..91691b4 100644 --- a/hosts/hastur/hardware.nix +++ b/hosts/hastur/hardware.nix | |||
| @@ -1,47 +1,63 @@ | |||
| 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ | 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ |
| 2 | # and may be overwritten by future invocations. Please make changes | 2 | # and may be overwritten by future invocations. Please make changes |
| 3 | # to /etc/nixos/configuration.nix instead. | 3 | # to /etc/nixos/configuration.nix instead. |
| 4 | { config, lib, pkgs, modulesPath, ... }: | 4 | { |
| 5 | config, | ||
| 6 | lib, | ||
| 7 | pkgs, | ||
| 8 | modulesPath, | ||
| 9 | ... | ||
| 10 | }: | ||
| 5 | 11 | ||
| 6 | { | 12 | { |
| 7 | imports = | 13 | imports = [ |
| 8 | [ (modulesPath + "/installer/scan/not-detected.nix") | 14 | (modulesPath + "/installer/scan/not-detected.nix") |
| 9 | ]; | 15 | ]; |
| 10 | 16 | ||
| 11 | boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; | 17 | boot.initrd.availableKernelModules = [ |
| 18 | "xhci_pci" | ||
| 19 | "thunderbolt" | ||
| 20 | "nvme" | ||
| 21 | "usb_storage" | ||
| 22 | "sd_mod" | ||
| 23 | "rtsx_pci_sdmmc" | ||
| 24 | ]; | ||
| 12 | boot.initrd.kernelModules = [ ]; | 25 | boot.initrd.kernelModules = [ ]; |
| 13 | boot.kernelModules = [ "kvm-intel" ]; | 26 | boot.kernelModules = [ "kvm-intel" ]; |
| 14 | boot.extraModulePackages = [ ]; | 27 | boot.extraModulePackages = [ ]; |
| 15 | 28 | ||
| 16 | fileSystems."/" = | 29 | fileSystems."/" = { |
| 17 | { device = "zroot/root"; | 30 | device = "zroot/root"; |
| 18 | fsType = "zfs"; | 31 | fsType = "zfs"; |
| 19 | }; | 32 | }; |
| 20 | 33 | ||
| 21 | fileSystems."/nix" = | 34 | fileSystems."/nix" = { |
| 22 | { device = "zroot/nix"; | 35 | device = "zroot/nix"; |
| 23 | fsType = "zfs"; | 36 | fsType = "zfs"; |
| 24 | }; | 37 | }; |
| 25 | 38 | ||
| 26 | fileSystems."/var" = | 39 | fileSystems."/var" = { |
| 27 | { device = "zroot/var"; | 40 | device = "zroot/var"; |
| 28 | fsType = "zfs"; | 41 | fsType = "zfs"; |
| 29 | }; | 42 | }; |
| 30 | 43 | ||
| 31 | fileSystems."/home" = | 44 | fileSystems."/home" = { |
| 32 | { device = "zroot/home"; | 45 | device = "zroot/home"; |
| 33 | fsType = "zfs"; | 46 | fsType = "zfs"; |
| 34 | }; | 47 | }; |
| 35 | 48 | ||
| 36 | fileSystems."/boot" = | 49 | fileSystems."/boot" = { |
| 37 | { device = "/dev/disk/by-uuid/BCF1-95FF"; | 50 | device = "/dev/disk/by-uuid/BCF1-95FF"; |
| 38 | fsType = "vfat"; | 51 | fsType = "vfat"; |
| 39 | options = [ "fmask=0022" "dmask=0022" ]; | 52 | options = [ |
| 40 | }; | 53 | "fmask=0022" |
| 41 | 54 | "dmask=0022" | |
| 42 | swapDevices = | ||
| 43 | [ { device = "/dev/disk/by-uuid/7e66a653-5438-486f-99c6-0a1a51ef7d96"; } | ||
| 44 | ]; | 55 | ]; |
| 56 | }; | ||
| 57 | |||
| 58 | swapDevices = [ | ||
| 59 | { device = "/dev/disk/by-uuid/7e66a653-5438-486f-99c6-0a1a51ef7d96"; } | ||
| 60 | ]; | ||
| 45 | 61 | ||
| 46 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | 62 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking |
| 47 | # (the default) this is the recommended approach. When using systemd-networkd it's | 63 | # (the default) this is the recommended approach. When using systemd-networkd it's |
diff --git a/hosts/saklas/default.nix b/hosts/saklas/default.nix index 0ea3474..bd738ca 100644 --- a/hosts/saklas/default.nix +++ b/hosts/saklas/default.nix | |||
| @@ -1,4 +1,10 @@ | |||
| 1 | { config, lib, pkgs, inputs, ... }: | 1 | { |
| 2 | config, | ||
| 3 | lib, | ||
| 4 | pkgs, | ||
| 5 | inputs, | ||
| 6 | ... | ||
| 7 | }: | ||
| 2 | 8 | ||
| 3 | { | 9 | { |
| 4 | imports = [ | 10 | imports = [ |
| @@ -38,8 +44,17 @@ | |||
| 38 | wireless.enable = false; | 44 | wireless.enable = false; |
| 39 | 45 | ||
| 40 | firewall = { | 46 | firewall = { |
| 41 | allowedTCPPorts = [ 22 80 443 5222 5269 ]; | 47 | allowedTCPPorts = [ |
| 42 | allowedUDPPorts = [ 3478 51820 ]; | 48 | 22 |
| 49 | 80 | ||
| 50 | 443 | ||
| 51 | 5222 | ||
| 52 | 5269 | ||
| 53 | ]; | ||
| 54 | allowedUDPPorts = [ | ||
| 55 | 3478 | ||
| 56 | 51820 | ||
| 57 | ]; | ||
| 43 | }; | 58 | }; |
| 44 | }; | 59 | }; |
| 45 | 60 | ||
| @@ -52,10 +67,16 @@ | |||
| 52 | "95.217.18.52/32" | 67 | "95.217.18.52/32" |
| 53 | "2a01:4f9:c010:a653::1/64" | 68 | "2a01:4f9:c010:a653::1/64" |
| 54 | ]; | 69 | ]; |
| 55 | dns = [ "185.12.64.1" "185.12.64.2" ]; | 70 | dns = [ |
| 71 | "185.12.64.1" | ||
| 72 | "185.12.64.2" | ||
| 73 | ]; | ||
| 56 | routes = [ | 74 | routes = [ |
| 57 | { Destination = "172.31.1.1"; } | 75 | { Destination = "172.31.1.1"; } |
| 58 | { Gateway = "172.31.1.1"; GatewayOnLink = true; } | 76 | { |
| 77 | Gateway = "172.31.1.1"; | ||
| 78 | GatewayOnLink = true; | ||
| 79 | } | ||
| 59 | ]; | 80 | ]; |
| 60 | }; | 81 | }; |
| 61 | }; | 82 | }; |
| @@ -70,7 +91,10 @@ | |||
| 70 | }; | 91 | }; |
| 71 | 92 | ||
| 72 | # enable flakes and nix cli | 93 | # enable flakes and nix cli |
| 73 | nix.settings.experimental-features = [ "nix-command" "flakes" ]; | 94 | nix.settings.experimental-features = [ |
| 95 | "nix-command" | ||
| 96 | "flakes" | ||
| 97 | ]; | ||
| 74 | 98 | ||
| 75 | # user accounts | 99 | # user accounts |
| 76 | users.users.root.openssh.authorizedKeys.keys = [ | 100 | users.users.root.openssh.authorizedKeys.keys = [ |
| @@ -133,7 +157,11 @@ | |||
| 133 | 157 | ||
| 134 | "xmpp.vineetk.net" = { | 158 | "xmpp.vineetk.net" = { |
| 135 | group = config.services.prosody.group; | 159 | group = config.services.prosody.group; |
| 136 | extraDomainNames = [ "vineetk.net" "muc.vineetk.net" "u.vineetk.net" ]; | 160 | extraDomainNames = [ |
| 161 | "vineetk.net" | ||
| 162 | "muc.vineetk.net" | ||
| 163 | "u.vineetk.net" | ||
| 164 | ]; | ||
| 137 | reloadServices = [ "prosody" ]; | 165 | reloadServices = [ "prosody" ]; |
| 138 | }; | 166 | }; |
| 139 | }; | 167 | }; |
| @@ -142,11 +170,13 @@ | |||
| 142 | # I prefer doas over sudo for simplicity | 170 | # I prefer doas over sudo for simplicity |
| 143 | doas = { | 171 | doas = { |
| 144 | enable = true; | 172 | enable = true; |
| 145 | extraRules = [{ | 173 | extraRules = [ |
| 146 | users = [ "vin" ]; | 174 | { |
| 147 | keepEnv = true; | 175 | users = [ "vin" ]; |
| 148 | persist = true; | 176 | keepEnv = true; |
| 149 | }]; | 177 | persist = true; |
| 178 | } | ||
| 179 | ]; | ||
| 150 | }; | 180 | }; |
| 151 | 181 | ||
| 152 | sudo.enable = false; | 182 | sudo.enable = false; |
| @@ -169,12 +199,36 @@ | |||
| 169 | dns = { | 199 | dns = { |
| 170 | base_domain = "epistemia"; | 200 | base_domain = "epistemia"; |
| 171 | extra_records = [ | 201 | extra_records = [ |
| 172 | { name = "invidious.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 202 | { |
| 173 | { name = "llm.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 203 | name = "invidious.demiurge.epistemia"; |
| 174 | { name = "navidrome.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 204 | type = "A"; |
| 175 | { name = "redlib.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 205 | value = "100.64.0.2"; |
| 176 | { name = "sdui.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 206 | } |
| 177 | { name = "searx.demiurge.epistemia"; type = "A"; value = "100.64.0.2"; } | 207 | { |
| 208 | name = "llm.demiurge.epistemia"; | ||
| 209 | type = "A"; | ||
| 210 | value = "100.64.0.2"; | ||
| 211 | } | ||
| 212 | { | ||
| 213 | name = "navidrome.demiurge.epistemia"; | ||
| 214 | type = "A"; | ||
| 215 | value = "100.64.0.2"; | ||
| 216 | } | ||
| 217 | { | ||
| 218 | name = "redlib.demiurge.epistemia"; | ||
| 219 | type = "A"; | ||
| 220 | value = "100.64.0.2"; | ||
| 221 | } | ||
| 222 | { | ||
| 223 | name = "sdui.demiurge.epistemia"; | ||
| 224 | type = "A"; | ||
| 225 | value = "100.64.0.2"; | ||
| 226 | } | ||
| 227 | { | ||
| 228 | name = "searx.demiurge.epistemia"; | ||
| 229 | type = "A"; | ||
| 230 | value = "100.64.0.2"; | ||
| 231 | } | ||
| 178 | ]; | 232 | ]; |
| 179 | }; | 233 | }; |
| 180 | logtail.enabled = false; | 234 | logtail.enabled = false; |
| @@ -199,7 +253,7 @@ | |||
| 199 | ssl.cert = config.security.acme.certs."xmpp.vineetk.net".directory + "/full.pem"; | 253 | ssl.cert = config.security.acme.certs."xmpp.vineetk.net".directory + "/full.pem"; |
| 200 | ssl.key = config.security.acme.certs."xmpp.vineetk.net".directory + "/key.pem"; | 254 | ssl.key = config.security.acme.certs."xmpp.vineetk.net".directory + "/key.pem"; |
| 201 | 255 | ||
| 202 | muc = [{ domain = "muc.vineetk.net"; }]; | 256 | muc = [ { domain = "muc.vineetk.net"; } ]; |
| 203 | virtualHosts.vineetk = { | 257 | virtualHosts.vineetk = { |
| 204 | domain = "vineetk.net"; | 258 | domain = "vineetk.net"; |
| 205 | enabled = true; | 259 | enabled = true; |
| @@ -233,7 +287,7 @@ | |||
| 233 | locations."/" = { | 287 | locations."/" = { |
| 234 | proxyPass = "http://127.0.0.1:5232/"; | 288 | proxyPass = "http://127.0.0.1:5232/"; |
| 235 | extraConfig = '' | 289 | extraConfig = '' |
| 236 | proxy_pass_header Authorization; | 290 | proxy_pass_header Authorization; |
| 237 | ''; | 291 | ''; |
| 238 | }; | 292 | }; |
| 239 | }; | 293 | }; |
| @@ -321,52 +375,56 @@ | |||
| 321 | mailserver = { | 375 | mailserver = { |
| 322 | enable = true; | 376 | enable = true; |
| 323 | fqdn = "mail.vineetk.net"; | 377 | fqdn = "mail.vineetk.net"; |
| 324 | domains = [ "vineetk.net" "vinbiz.ca" "13f0.net" ]; | 378 | domains = [ |
| 379 | "vineetk.net" | ||
| 380 | "vinbiz.ca" | ||
| 381 | "13f0.net" | ||
| 382 | ]; | ||
| 325 | 383 | ||
| 326 | # A list of all login accounts. To create the password hashes, use | 384 | # A list of all login accounts. To create the password hashes, use |
| 327 | # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' | 385 | # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' |
| 328 | loginAccounts = { | 386 | loginAccounts = { |
| 329 | "vineet@vineetk.net" = { | 387 | "vineet@vineetk.net" = { |
| 330 | hashedPasswordFile = config.age.secrets.email_vineetk.path; | 388 | hashedPasswordFile = config.age.secrets.email_vineetk.path; |
| 331 | aliases = ["@vineetk.net"]; | 389 | aliases = [ "@vineetk.net" ]; |
| 332 | }; | 390 | }; |
| 333 | 391 | ||
| 334 | "kar@13f0.net" = { | 392 | "kar@13f0.net" = { |
| 335 | hashedPasswordFile = config.age.secrets.email_13f0.path; | 393 | hashedPasswordFile = config.age.secrets.email_13f0.path; |
| 336 | aliases = ["@13f0.net"]; | 394 | aliases = [ "@13f0.net" ]; |
| 337 | sieveScript = '' | 395 | sieveScript = '' |
| 338 | require [ "fileinto", "mailbox" ]; | 396 | require [ "fileinto", "mailbox" ]; |
| 339 | 397 | ||
| 340 | if address :matches [ "to", "cc" ] "announce@openbsd.org" { | 398 | if address :matches [ "to", "cc" ] "announce@openbsd.org" { |
| 341 | fileinto :create "openbsd_announce"; | 399 | fileinto :create "openbsd_announce"; |
| 342 | stop; | 400 | stop; |
| 343 | } | 401 | } |
| 344 | if address :matches [ "to", "cc" ] "arm@openbsd.org" { | 402 | if address :matches [ "to", "cc" ] "arm@openbsd.org" { |
| 345 | fileinto :create "openbsd_arm"; | 403 | fileinto :create "openbsd_arm"; |
| 346 | stop; | 404 | stop; |
| 347 | } | 405 | } |
| 348 | if address :matches [ "to", "cc" ] "misc@openbsd.org" { | 406 | if address :matches [ "to", "cc" ] "misc@openbsd.org" { |
| 349 | fileinto :create "openbsd_misc"; | 407 | fileinto :create "openbsd_misc"; |
| 350 | stop; | 408 | stop; |
| 351 | } | 409 | } |
| 352 | if address :matches [ "to", "cc" ] "misc@opensmtpd.org" { | 410 | if address :matches [ "to", "cc" ] "misc@opensmtpd.org" { |
| 353 | fileinto :create "opensmtpd_misc"; | 411 | fileinto :create "opensmtpd_misc"; |
| 354 | stop; | 412 | stop; |
| 355 | } | 413 | } |
| 356 | if address :matches [ "to", "cc" ] "oss-security@lists.openwall.com" { | 414 | if address :matches [ "to", "cc" ] "oss-security@lists.openwall.com" { |
| 357 | fileinto :create "oss_security"; | 415 | fileinto :create "oss_security"; |
| 358 | stop; | 416 | stop; |
| 359 | } | 417 | } |
| 360 | if address :matches [ "to", "cc" ] "tuhs@tuhs.org" { | 418 | if address :matches [ "to", "cc" ] "tuhs@tuhs.org" { |
| 361 | fileinto :create "tuhs"; | 419 | fileinto :create "tuhs"; |
| 362 | stop; | 420 | stop; |
| 363 | } | 421 | } |
| 364 | ''; | 422 | ''; |
| 365 | }; | 423 | }; |
| 366 | 424 | ||
| 367 | "vineet@vinbiz.ca" = { | 425 | "vineet@vinbiz.ca" = { |
| 368 | hashedPasswordFile = config.age.secrets.email_vinbiz.path; | 426 | hashedPasswordFile = config.age.secrets.email_vinbiz.path; |
| 369 | aliases = ["postmaster@vinbiz.ca"]; | 427 | aliases = [ "postmaster@vinbiz.ca" ]; |
| 370 | }; | 428 | }; |
| 371 | "suresh@vinbiz.ca".hashedPasswordFile = config.age.secrets.email_vinbiz.path; | 429 | "suresh@vinbiz.ca".hashedPasswordFile = config.age.secrets.email_vinbiz.path; |
| 372 | "revathy@vinbiz.ca".hashedPasswordFile = config.age.secrets.email_vinbiz.path; | 430 | "revathy@vinbiz.ca".hashedPasswordFile = config.age.secrets.email_vinbiz.path; |
diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 801c352..ca794fd 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix | |||
| @@ -5,7 +5,10 @@ let | |||
| 5 | demiurge = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICXDBcX7hXJCaKDRNaIAfycU83Y2J+uEB4wcALBOQpse"; | 5 | demiurge = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICXDBcX7hXJCaKDRNaIAfycU83Y2J+uEB4wcALBOQpse"; |
| 6 | hastur = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN2ZUuPSPpIRULzMscBo5DJmA0UbFtG0jaANuzHo5aSQ"; | 6 | hastur = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN2ZUuPSPpIRULzMscBo5DJmA0UbFtG0jaANuzHo5aSQ"; |
| 7 | saklas = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7RCmfdgJKPnaBi336ZcvDWboxPj8lTtW1eDTN5qR2R"; | 7 | saklas = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM7RCmfdgJKPnaBi336ZcvDWboxPj8lTtW1eDTN5qR2R"; |
| 8 | systems = [ demiurge saklas ]; | 8 | systems = [ |
| 9 | demiurge | ||
| 10 | saklas | ||
| 11 | ]; | ||
| 9 | in | 12 | in |
| 10 | { | 13 | { |
| 11 | "email_vinbiz.age".publicKeys = users ++ [ saklas ]; | 14 | "email_vinbiz.age".publicKeys = users ++ [ saklas ]; |
