From 5f89b09659f22987205d1a6c50ae40203e93c5a9 Mon Sep 17 00:00:00 2001 From: Swarsel Date: Mon, 14 Oct 2024 23:45:19 +0200 Subject: [PATCH] feat: work qol --- SwarselSystems.org | 118 ++++++++++++++----------- profiles/common/home/tmux.nix | 12 --- profiles/nbl-imba-2/default.nix | 3 +- profiles/optional/nixos/vmware.nix | 6 ++ profiles/optional/nixos/work.nix | 16 +++- profiles/server/common/paperless.nix | 1 + programs/firefox/tridactyl/tridactylrc | 10 +++ 7 files changed, 102 insertions(+), 64 deletions(-) create mode 100644 profiles/optional/nixos/vmware.nix diff --git a/SwarselSystems.org b/SwarselSystems.org index 4d51ba9..6f24ecd 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -1812,7 +1812,8 @@ My work machine. Built for more security, this is the gold standard of my config ./disk-config.nix ../optional/nixos/steam.nix - # ../optional/nixos/virtualbox.nix + ../optional/nixos/virtualbox.nix + # ../optional/nixos/vmware.nix ../optional/nixos/autologin.nix ../optional/nixos/nswitch-rcm.nix ../optional/nixos/work.nix @@ -7520,55 +7521,56 @@ Also, the system state version is set here. No need to touch it. **** paperless #+begin_src nix :tangle profiles/server/common/paperless.nix -{ pkgs, lib, config, ... }: -{ - config = lib.mkIf config.swarselsystems.server.immich { + { pkgs, lib, config, ... }: + { + config = lib.mkIf config.swarselsystems.server.immich { - users.users.paperless = { - extraGroups = [ "users" ]; - }; + users.users.paperless = { + extraGroups = [ "users" ]; + }; - sops.secrets.paperless_admin = { owner = "paperless"; }; + sops.secrets.paperless_admin = { owner = "paperless"; }; - services.paperless = { - enable = true; - mediaDir = "/Vault/Eternor/Paperless"; - dataDir = "/Vault/data/paperless"; - user = "paperless"; - port = 28981; - passwordFile = config.sops.secrets.paperless_admin.path; - address = "0.0.0.0"; - settings = { - PAPERLESS_OCR_LANGUAGE = "deu+eng"; - PAPERLESS_URL = "https://scan.swarsel.win"; - PAPERLESS_OCR_USER_ARGS = builtins.toJSON { - optimize = 1; - pdfa_image_compression = "lossless"; + services.paperless = { + enable = true; + mediaDir = "/Vault/Eternor/Paperless"; + dataDir = "/Vault/data/paperless"; + user = "paperless"; + port = 28981; + passwordFile = config.sops.secrets.paperless_admin.path; + address = "0.0.0.0"; + settings = { + PAPERLESS_OCR_LANGUAGE = "deu+eng"; + PAPERLESS_URL = "https://scan.swarsel.win"; + PAPERLESS_OCR_USER_ARGS = builtins.toJSON { + optimize = 1; + invalidate_digital_signatures = true; + pdfa_image_compression = "lossless"; + }; }; }; - }; - services.nginx = { - virtualHosts = { - "scan.swarsel.win" = { - enableACME = true; - forceSSL = true; - acmeRoot = null; - locations = { - "/" = { - proxyPass = "http://192.168.1.2:28981"; - extraConfig = '' - client_max_body_size 0; - ''; + services.nginx = { + virtualHosts = { + "scan.swarsel.win" = { + enableACME = true; + forceSSL = true; + acmeRoot = null; + locations = { + "/" = { + proxyPass = "http://192.168.1.2:28981"; + extraConfig = '' + client_max_body_size 0; + ''; + }; }; }; }; }; }; - }; -} + } #+end_src **** transmission @@ -7703,6 +7705,20 @@ This sets the VirtualBox configuration. Guest should not be enabled if not direl } #+end_src +**** VmWare + + +This sets the VirtualBox configuration. Guest should not be enabled if not direly needed, it will make rebuilds unbearably slow. + +#+begin_src nix :tangle profiles/optional/nixos/vmware.nix + _: + { + + virtualisation.vmware.host.enable = true; + virtualisation.vmware.guest.enable = true; + } +#+end_src + **** Auto-login :PROPERTIES: :CUSTOM_ID: h:fa8d9ec4-3e22-458a-9239-859cffe7f55c @@ -7759,10 +7775,24 @@ Integrates 1password mostly. There are more options at [[#h:f0b2ea93-94c8-48d8-8 }; virtualisation.docker.enable = true; environment.systemPackages = with pkgs; [ + # (python39.withPackages (ps: with ps; [ + # cryptography + # ])) + # docker python39 - docker + qemu + packer + gnumake + libisoburn + govc ]; + services.openssh = { + enable = true; + extraConfig = '' + ''; + }; + specialisation = { cgroup_v1.configuration = { boot.kernelParams = [ @@ -9087,10 +9117,7 @@ Here we set some aliases (some of them should be shellApplications instead) as w set -g mouse on - # Change splits to match nvim and easier to remember # Open new split at cwd of current split - unbind % - unbind '"' bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" @@ -9105,21 +9132,12 @@ Here we set some aliases (some of them should be shellApplications instead) as w # Escape turns on copy mode bind Escape copy-mode - # Easier reload of config - bind r source-file ~/.config/tmux/tmux.conf - set-option -g status-position top # make Prefix p paste the buffer. unbind p bind p paste-buffer - # Bind Keys - bind-key -T prefix C-g split-window \ - "$SHELL --login -i -c 'navi --print | head -c -1 | tmux load-buffer -b tmp - ; tmux paste-buffer -p -t {last} -b tmp -d'" - bind-key -T prefix C-l switch -t notes - bind-key -T prefix C-d switch -t dotfiles - bind-key e send-keys "tmux capture-pane -p -S - | nvim -c 'set buftype=nofile' +" Enter ''; }; } diff --git a/profiles/common/home/tmux.nix b/profiles/common/home/tmux.nix index 7fa6e86..dbe1dad 100644 --- a/profiles/common/home/tmux.nix +++ b/profiles/common/home/tmux.nix @@ -71,10 +71,7 @@ in set -g mouse on - # Change splits to match nvim and easier to remember # Open new split at cwd of current split - unbind % - unbind '"' bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" @@ -89,21 +86,12 @@ in # Escape turns on copy mode bind Escape copy-mode - # Easier reload of config - bind r source-file ~/.config/tmux/tmux.conf - set-option -g status-position top # make Prefix p paste the buffer. unbind p bind p paste-buffer - # Bind Keys - bind-key -T prefix C-g split-window \ - "$SHELL --login -i -c 'navi --print | head -c -1 | tmux load-buffer -b tmp - ; tmux paste-buffer -p -t {last} -b tmp -d'" - bind-key -T prefix C-l switch -t notes - bind-key -T prefix C-d switch -t dotfiles - bind-key e send-keys "tmux capture-pane -p -S - | nvim -c 'set buftype=nofile' +" Enter ''; }; } diff --git a/profiles/nbl-imba-2/default.nix b/profiles/nbl-imba-2/default.nix index a9476a5..581642f 100644 --- a/profiles/nbl-imba-2/default.nix +++ b/profiles/nbl-imba-2/default.nix @@ -9,7 +9,8 @@ ./disk-config.nix ../optional/nixos/steam.nix - # ../optional/nixos/virtualbox.nix + ../optional/nixos/virtualbox.nix + # ../optional/nixos/vmware.nix ../optional/nixos/autologin.nix ../optional/nixos/nswitch-rcm.nix ../optional/nixos/work.nix diff --git a/profiles/optional/nixos/vmware.nix b/profiles/optional/nixos/vmware.nix new file mode 100644 index 0000000..5e80c8f --- /dev/null +++ b/profiles/optional/nixos/vmware.nix @@ -0,0 +1,6 @@ +_: +{ + + virtualisation.vmware.host.enable = true; + virtualisation.vmware.guest.enable = true; +} diff --git a/profiles/optional/nixos/work.nix b/profiles/optional/nixos/work.nix index d9685ed..fc53375 100644 --- a/profiles/optional/nixos/work.nix +++ b/profiles/optional/nixos/work.nix @@ -9,10 +9,24 @@ }; virtualisation.docker.enable = true; environment.systemPackages = with pkgs; [ + # (python39.withPackages (ps: with ps; [ + # cryptography + # ])) + # docker python39 - docker + qemu + packer + gnumake + libisoburn + govc ]; + services.openssh = { + enable = true; + extraConfig = '' + ''; + }; + specialisation = { cgroup_v1.configuration = { boot.kernelParams = [ diff --git a/profiles/server/common/paperless.nix b/profiles/server/common/paperless.nix index e45b1bb..caffeb4 100644 --- a/profiles/server/common/paperless.nix +++ b/profiles/server/common/paperless.nix @@ -22,6 +22,7 @@ PAPERLESS_URL = "https://scan.swarsel.win"; PAPERLESS_OCR_USER_ARGS = builtins.toJSON { optimize = 1; + invalidate_digital_signatures = true; pdfa_image_compression = "lossless"; }; }; diff --git a/programs/firefox/tridactyl/tridactylrc b/programs/firefox/tridactyl/tridactylrc index 80c4222..b31b4fd 100644 --- a/programs/firefox/tridactyl/tridactylrc +++ b/programs/firefox/tridactyl/tridactylrc @@ -34,6 +34,16 @@ bind ? fillcmdline find -? bind n findnext 1 bind N findnext -1 +bind j scrollline 4 +bind k scrollline -4 + + + +" Make Tridactyl work on more sites at the expense of some security +sfixamo_quiet +set allowautofocus false +et csp clobber + " some pages like github break on the tridactyl quick search. have this as a fallback unbind