From 0c6aff047075512a8c523c3877b6a8201cc8729c Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Sat, 9 Nov 2024 12:45:25 +0100 Subject: [PATCH] Clean up lapetus a bit --- common/themes/default.nix | 2 +- flake.lock | 6 +-- .../neovim/config/lua/my/helpers/wrap.lua | 4 ++ home/features/neovim/config/lua/my/themes.lua | 3 -- home/features/neovim/default.nix | 15 ++++-- home/features/neovim/snippets/tex.miros | 4 +- home/features/wayland/hyprland/hyprland.conf | 2 +- hosts/nixos/calypso/default.nix | 1 + hosts/nixos/lapetus/default.nix | 5 -- hosts/nixos/lapetus/services/commafeed.nix | 36 ------------- hosts/nixos/lapetus/services/ddclient.nix | 36 ------------- hosts/nixos/lapetus/services/forgejo.nix | 8 ++- hosts/nixos/lapetus/services/homer.nix | 26 ++------- hosts/nixos/lapetus/services/intray.nix | 33 ------------ hosts/nixos/lapetus/services/invidious.nix | 4 +- hosts/nixos/lapetus/services/smos.nix | 53 ------------------- 16 files changed, 34 insertions(+), 204 deletions(-) delete mode 100644 hosts/nixos/lapetus/services/commafeed.nix delete mode 100644 hosts/nixos/lapetus/services/ddclient.nix delete mode 100644 hosts/nixos/lapetus/services/intray.nix delete mode 100644 hosts/nixos/lapetus/services/smos.nix diff --git a/common/themes/default.nix b/common/themes/default.nix index 156629b..3c34a35 100644 --- a/common/themes/default.nix +++ b/common/themes/default.nix @@ -84,7 +84,7 @@ let }; # Select your current theme here! - currentTheme = themes.catppuccin-mocha; + currentTheme = themes.catppuccin-latte; in { # We apply the current theme here. diff --git a/flake.lock b/flake.lock index f2b3856..9fcf136 100644 --- a/flake.lock +++ b/flake.lock @@ -1473,11 +1473,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1728492678, - "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=", + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", "type": "github" }, "original": { diff --git a/home/features/neovim/config/lua/my/helpers/wrap.lua b/home/features/neovim/config/lua/my/helpers/wrap.lua index ac219d1..d95f453 100644 --- a/home/features/neovim/config/lua/my/helpers/wrap.lua +++ b/home/features/neovim/config/lua/my/helpers/wrap.lua @@ -15,6 +15,8 @@ function M.enable() swap("j") swap("k") + swap("") + swap("") swap("0") swap("$") end @@ -24,6 +26,8 @@ function M.disable() unswap("j") unswap("k") + unswap("") + unswap("") unswap("0") unswap("$") end diff --git a/home/features/neovim/config/lua/my/themes.lua b/home/features/neovim/config/lua/my/themes.lua index 21614b1..626c4a8 100644 --- a/home/features/neovim/config/lua/my/themes.lua +++ b/home/features/neovim/config/lua/my/themes.lua @@ -41,9 +41,6 @@ table.insert(M, { }, }) - vim.cmd([[highlight NotifyINFOIcon guifg=#d6b20f]]) - vim.cmd([[highlight NotifyINFOTitle guifg=#d6b20f]]) - vim.cmd("colorscheme catppuccin") end), }) diff --git a/home/features/neovim/default.nix b/home/features/neovim/default.nix index a50b222..5255f00 100644 --- a/home/features/neovim/default.nix +++ b/home/features/neovim/default.nix @@ -150,6 +150,7 @@ let # Use global clipboard using *cp* (keymap "nv" "" ''"+'' "Use global clipboard") + # Save using *ji* (nmap "" (thunk '' -- If we don't do this, the statusbar will flash for a second... @@ -181,8 +182,6 @@ let } # }}} # {{{ Diagnostics - (dmap "[d" "goto_prev" "Goto previous [d]iagnostic") - (dmap "]d" "goto_next" "Goto next [d]iagnostic") (dmap "J" "open_float" "Open current diagnostic") (dmap "D" "setloclist" "[D]iagnostic loclist") (nmap "qj" "J" "join lines") @@ -197,7 +196,9 @@ let # lua thunk "vim.opt.spell = not vim.o.spell" ) "toggle [s]pell checker") - (nmap "yp" "!curl --data-binary @% https://paste.rs" "[y]ank [p]aste.rs link") + (nmap "yp" "!curl --data-binary @% https://paste.rs | wl-copy" + "[y]ank [p]aste.rs link to clipboard" + ) # }}} ]; # }}} @@ -1072,7 +1073,7 @@ let }; }; - # tinymist.settings.exportPdf = "onType"; + tinymist.settings.exportPdf = "onSave"; tinymist.offset_encoding = "utf-8"; cssls = { }; @@ -1490,6 +1491,12 @@ let }; }; # }}} + # {{{ justfile support + just = { + package = "NoahTheDuke/vim-just"; + event = "VeryLazy"; + }; + # }}} # }}} # {{{ external # These plugins integrate neovim with external services diff --git a/home/features/neovim/snippets/tex.miros b/home/features/neovim/snippets/tex.miros index 50f00a2..e33ecc2 100644 --- a/home/features/neovim/snippets/tex.miros +++ b/home/features/neovim/snippets/tex.miros @@ -182,7 +182,7 @@ block math -- {{{ Constants for constkind <- @⟨default,shortened⟩ for constant <- @⟨@constkind: - @⟨star,delta,Delta,pi,tau,psi,phi,rho,sigma,alpha,beta,theta,gamma,omega,Omega,half,ordop,land,lor⟩, + @⟨star,delta,Delta,pi,tau,psi,Psi,phi,rho,sigma,alpha,beta,theta,gamma,omega,Omega,half,ordop,land,lor⟩, @⟨lam,eps,iinf⟩ ⟩ for expansion <- @⟨@constkind: @@ -248,7 +248,7 @@ block math for noperator <- @⟨ordop,land,lor,equiv,pmod,ldots,cdots,perp,angle,sup⟩ abbr @noperator \\@noperator - for operator <- @⟨overline,hat,bar,abs,norm,prob,diprod,sin,cos,sqrt,ln,lrb,zmod,gen,diam,prob⟩ + for operator <- @⟨overline,hat,bar,abs,norm,prob,diprod,sin,cos,sqrt,ln,lrb,zmod,gen,pmob⟩ string @operator snip \\@operator$|1⟨{$1}, $0⟩ diff --git a/home/features/wayland/hyprland/hyprland.conf b/home/features/wayland/hyprland/hyprland.conf index e73b567..84cb0d9 100644 --- a/home/features/wayland/hyprland/hyprland.conf +++ b/home/features/wayland/hyprland/hyprland.conf @@ -93,7 +93,7 @@ bind = $mod, L, exec, loginctl lock-session # Lock screen bind = $mod, P, exec, anyrun bind = $mod, B, exec, wlsunset-toggle # Toggle blue light filter thingy bind = $mod, V, exec, foot vimclip # Vim anywhere! -# bind = $mod, W, exec, ~/projects/form-filler/type.sh +bind = $mod, W, exec, ~/projects/form-filler/type.sh # Work with the special workspace bind = $mod, x, togglespecialworkspace, diff --git a/hosts/nixos/calypso/default.nix b/hosts/nixos/calypso/default.nix index 16bd07f..6c512be 100644 --- a/hosts/nixos/calypso/default.nix +++ b/hosts/nixos/calypso/default.nix @@ -53,6 +53,7 @@ programs.kdeconnect.enable = true; programs.firejail.enable = true; programs.nix-ld.enable = true; # Useful for running non-nix executables + services.mullvad-vpn.enable = true; # }}} # {{{ SSH keys users.users.pilot.openssh.authorizedKeys.keyFiles = [ ../tethys/keys/id_ed25519.pub ]; diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index 0da105c..8ba2606 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -17,11 +17,6 @@ ../common/optional/services/restic ../common/optional/services/wpa_supplicant.nix - # ./services/commafeed.nix - # ./services/ddclient.nix - # ./services/guacamole - # ./services/intray.nix - # ./services/smos.nix ./services/5d-diplomacy ./services/actual.nix ./services/cloudflared.nix diff --git a/hosts/nixos/lapetus/services/commafeed.nix b/hosts/nixos/lapetus/services/commafeed.nix deleted file mode 100644 index 296ac3d..0000000 --- a/hosts/nixos/lapetus/services/commafeed.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, ... }: -let - port = config.satellite.ports.commafeed; - dataDir = "/persist/state/var/lib/commafeed"; -in -{ - systemd.tmpfiles.rules = [ "d ${dataDir}" ]; - satellite.nginx.at.rss.port = port; - - virtualisation.oci-containers.containers.commafeed = { - image = "athou/commafeed:latest"; - - ports = [ "${toString port}:8082" ]; # server:docker - volumes = [ "${dataDir}:/commafeed/data" ]; # server:docker - - # the JVM is way too hungry - entrypoint = builtins.toJSON [ - "java" - "-Xmx64m" - "-jar" - "commafeed.jar" - "server" - "config.yml" - ]; - - # https://github.com/Athou/commafeed/blob/master/commafeed-server/config.yml.example - environment = { - CF_APP_PUBLICURL = "https://${config.satellite.nginx.at.rss.host}"; - CF_APP_ALLOWREGISTRATIONS = "false"; # I already made an account - CF_APP_MAXENTRIESAGEDAYS = "0"; # Fetch old entries - - # I randomly generated an user agent for this - CF_APP_USERAGENT = "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0_6; like Mac OS X) AppleWebKit/533.48 (KHTML, like Gecko) Chrome/49.0.2557.162 Mobile Safari/602.0"; - }; - }; -} diff --git a/hosts/nixos/lapetus/services/ddclient.nix b/hosts/nixos/lapetus/services/ddclient.nix deleted file mode 100644 index aee905f..0000000 --- a/hosts/nixos/lapetus/services/ddclient.nix +++ /dev/null @@ -1,36 +0,0 @@ -# DDClient is a dynamic dns service -{ config, pkgs, ... }: -{ - services.ddclient = { - enable = true; - interval = "1m"; - configFile = config.sops.templates."ddclient.conf".path; - - # REASON: latest release doesn't support explicit root-domain annotations for porkbun - package = pkgs.ddclient.overrideAttrs (_: { - src = pkgs.fetchFromGitHub { - owner = "ddclient"; - repo = "ddclient"; - rev = "9885d55a3741363ad52d3463cb846d5782efb073"; - sha256 = "0zyi8h13y18vrlxavx1vva4v0ya5v08bxdxlr3is49in3maz2n37"; - }; - }); - }; - - sops.templates."ddclient.conf".content = '' - # General settings - cache=/var/lib/ddclient/ddclient.cache # See the nixos module for details - foreground=YES - - # Routers - use=web, web=checkip.dyndns.com/, web-skip='Current IP Address: ' - - # Protocols - protocol=porkbun - apikey=${config.sops.placeholder.porkbun_api_key} - secretapikey=${config.sops.placeholder.porkbun_secret_api_key} - root-domain=moonythm.dev # The root domain detection doesn't work properly - real.lapetus.moonythm.dev - ''; -} - diff --git a/hosts/nixos/lapetus/services/forgejo.nix b/hosts/nixos/lapetus/services/forgejo.nix index 7153a34..b0fecbf 100644 --- a/hosts/nixos/lapetus/services/forgejo.nix +++ b/hosts/nixos/lapetus/services/forgejo.nix @@ -29,8 +29,11 @@ HTTP_PORT = config.satellite.cloudflared.at.git.port; ROOT_URL = config.satellite.cloudflared.at.git.url; LANDING_PAGE = "prescientmoon"; # Make my profile the landing page + + START_SSH_SERVER = true; + BUILTIN_SSH_SERVER_USER = "git"; SSH_DOMAIN = config.satellite.cloudflared.at."ssh.git".host; - SSH_PORT = config.satellite.ports.forgejo-ssh; + SSH_LISTEN_PORT = config.satellite.ports.forgejo-ssh; }; cron.ENABLED = true; @@ -46,8 +49,9 @@ repository = { DISABLE_STARS = true; - DISABLED_REPO_UNITS = ""; DEFAULT_REPO_UNITS = lib.strings.concatStringsSep "," [ "repo.code" ]; + ENABLE_PUSH_CREATE_USER = true; + ENABLE_PUSH_CREATE_ORG = true; }; }; }; diff --git a/hosts/nixos/lapetus/services/homer.nix b/hosts/nixos/lapetus/services/homer.nix index b7a1883..debeb85 100644 --- a/hosts/nixos/lapetus/services/homer.nix +++ b/hosts/nixos/lapetus/services/homer.nix @@ -92,37 +92,17 @@ in ]; } # }}} - # {{{ Productivity + # {{{ Tooling { - name = "Productivity"; - icon = fa "rocket"; + name = "Tooling"; + icon = fa "toolbox"; items = [ - { - name = "Intray"; - subtitle = "GTD capture tool"; - icon = fa "inbox"; - url = "https://intray.moonythm.dev"; - } - { - name = "Smos"; - subtitle = "A comprehensive self-management system."; - icon = fa "cubes-stacked"; - url = "https://smos.moonythm.dev"; - } { name = "Actual"; subtitle = "Budgeting tool"; logo = icon "actual.png"; url = "https://actual.moonythm.dev"; } - ]; - } - # }}} - # {{{ Tooling - { - name = "Tooling"; - icon = fa "toolbox"; - items = [ { name = "Vaultwarden"; subtitle = "Password manager"; diff --git a/hosts/nixos/lapetus/services/intray.nix b/hosts/nixos/lapetus/services/intray.nix deleted file mode 100644 index 29163f9..0000000 --- a/hosts/nixos/lapetus/services/intray.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ inputs, config, ... }: -let - username = "prescientmoon"; - apiPort = config.satellite.ports.intray-api; - webPort = config.satellite.ports.intray-client; -in -{ - imports = [ inputs.intray.nixosModules.x86_64-linux.default ]; - - # {{{ Configure intray - services.intray.production = { - enable = true; - api-server = { - enable = true; - port = apiPort; - admins = [ username ]; - }; - web-server = { - enable = true; - port = webPort; - api-url = config.satellite.nginx.at."api.intray".url; - }; - }; - # }}} - # {{{ Networking & storage - satellite.nginx.at."intray".port = webPort; - satellite.nginx.at."api.intray".port = apiPort; - - environment.persistence."/persist/state".directories = [ - "/www/intray/production/data" - ]; - # }}} -} diff --git a/hosts/nixos/lapetus/services/invidious.nix b/hosts/nixos/lapetus/services/invidious.nix index 54b2612..06b0b14 100644 --- a/hosts/nixos/lapetus/services/invidious.nix +++ b/hosts/nixos/lapetus/services/invidious.nix @@ -37,8 +37,8 @@ owner = "iv-org"; repo = "invidious"; fetchSubmodules = true; - rev = "a88a723de3a3d96d8ff748cb117ae48265ee552c"; - sha256 = "0v5fmz6dm7s94kw7ilblad95mfydsmk5dr3f1wwgxzzynvigy2bc"; + rev = "b173d4acf21563d47d26718eca7932878fb424e6"; + sha256 = "04z11yai4yrjpd9im38dgx1p2qnh8px1zq28m1ay9jjk2s143j4r"; }; }); }; diff --git a/hosts/nixos/lapetus/services/smos.nix b/hosts/nixos/lapetus/services/smos.nix deleted file mode 100644 index d149846..0000000 --- a/hosts/nixos/lapetus/services/smos.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ inputs, config, ... }: -let username = "prescientmoon"; -in -{ - imports = [ inputs.smos.nixosModules.x86_64-linux.default ]; - - # {{{ Configure smos - services.smos.production = { - enable = true; - - # {{{ Docs server - docs-site = { - enable = true; - openFirewall = false; - port = config.satellite.nginx.at."docs.smos".port; - api-url = config.satellite.nginx.at."api.smos".url; - web-url = config.satellite.nginx.at."smos".url; - }; - # }}} - # {{{ Api server - api-server = { - enable = true; - openFirewall = false; - port = config.satellite.nginx.at."api.smos".port; - admin = username; - - max-backups-per-user = 5; - backup-interval = 3600; - local-backup.enable = true; - }; - # }}} - # {{{ Web server - web-server = { - enable = true; - openFirewall = false; - port = config.satellite.nginx.at."smos".port; - docs-url = config.satellite.nginx.at."docs.smos".url; - api-url = config.satellite.nginx.at."api.smos".url; - web-url = config.satellite.nginx.at."smos".url; - }; - # }}} - }; - # }}} - # {{{ Networking & storage - satellite.nginx.at."docs.smos".port = config.satellite.ports.smos-docs; - satellite.nginx.at."api.smos".port = config.satellite.ports.smos-api; - satellite.nginx.at."smos".port = config.satellite.ports.smos-client; - - environment.persistence."/persist/state".directories = [ - "/www/smos/production" - ]; - # }}} -}