about summary refs log tree commit diff stats
path: root/sys/svcs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-20 16:10:21 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-20 16:14:26 +0200
commit368cb6b0d25db2ae23be42ad51584de059997e51 (patch)
tree3282e45d3ebced63c8498a47e83a255c35de620b /sys/svcs
parentrefactor(hm): Rename to `modules/home` (diff)
downloadnixos-config-368cb6b0d25db2ae23be42ad51584de059997e51.zip
refactor(sys): Modularize and move to `modules/system` or `pkgs`
Diffstat (limited to 'sys/svcs')
-rw-r--r--sys/svcs/adb/default.nix22
-rw-r--r--sys/svcs/backup/default.nix46
-rw-r--r--sys/svcs/dconf/default.nix10
-rw-r--r--sys/svcs/default.nix19
-rw-r--r--sys/svcs/fwupd/default.nix3
-rw-r--r--sys/svcs/getty/default.nix41
-rw-r--r--sys/svcs/nix/default.nix52
-rw-r--r--sys/svcs/openssh/default.nix15
-rw-r--r--sys/svcs/postgresql/default.nix5
-rw-r--r--sys/svcs/printing/default.nix31
-rw-r--r--sys/svcs/scanning/default.nix12
-rw-r--r--sys/svcs/serverphone/certificates/ca.crt10
-rw-r--r--sys/svcs/serverphone/certificates/server.crt10
-rw-r--r--sys/svcs/serverphone/default.nix49
l---------sys/svcs/serverphone/keys/key_11
l---------sys/svcs/serverphone/keys/key_21
-rw-r--r--sys/svcs/snapper/default.nix41
-rw-r--r--sys/svcs/steam/default.nix23
-rw-r--r--sys/svcs/swaylock/default.nix4
-rw-r--r--sys/svcs/xdg/default.nix58
-rwxr-xr-xsys/svcs/xdg/scripts/lf_wrapper.sh79
-rwxr-xr-xsys/svcs/xdg/scripts/ranger_wrapper.sh68
22 files changed, 0 insertions, 600 deletions
diff --git a/sys/svcs/adb/default.nix b/sys/svcs/adb/default.nix
deleted file mode 100644
index 4055dbb1..00000000
--- a/sys/svcs/adb/default.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-  lib,
-  config,
-  ...
-}: let
-  cfg = config.soispha.adb;
-in {
-  options.soispha.adb = {
-    enable = lib.mkEnableOption "Android adb bridge";
-    user = lib.mkOption {
-      type = lib.types.str;
-      example = "soispha";
-      default = "soispha";
-      description = "Username to grant access to adb bridge";
-    };
-  };
-
-  config = lib.mkIf cfg.enable {
-    programs.adb.enable = true;
-    users.users."${cfg.user}".extraGroups = ["adbusers"];
-  };
-}
diff --git a/sys/svcs/backup/default.nix b/sys/svcs/backup/default.nix
deleted file mode 100644
index 91433bf9..00000000
--- a/sys/svcs/backup/default.nix
+++ /dev/null
@@ -1,46 +0,0 @@
-{
-  lib,
-  pkgs,
-  config,
-  ...
-}: let
-  backup-script = pkgs.writeShellScriptBin "backsnap" ''
-    ${pkgs.util-linux}/bin/mount --mkdir "/dev/disk/by-uuid/${cfg.backupDiskUuid}" "/run/media/${cfg.backupDiskUuid}";
-    ${pkgs.snap-sync-forked}/bin/snap-sync-forked --UUID "${cfg.backupDiskUuid}" --noconfirm;
-    ${pkgs.util-linux}/bin/umount "/run/media/${cfg.backupDiskUuid}";
-  '';
-  cfg = config.soispha.fs.backup;
-in {
-  options.soispha.fs.backup = {
-    enable = lib.mkEnableOption (lib.mdDoc "backups with snap-sync");
-    backupDiskUuid = lib.mkOption {
-      type = lib.types.str;
-      example = lib.literalExpression "d1d20ae7-3d8a-44da-86da-677dbbb10c89";
-      description = lib.mdDoc "The UUID of the backup disk";
-    };
-  };
-  config = lib.mkIf cfg.enable {
-    systemd = {
-      services.backup = {
-        wantedBy = lib.mkForce [];
-        unitConfig = {
-          Description = "Backup the last snapshots of the persitent-storage subvolume.";
-        };
-        serviceConfig = {
-          Type = "oneshot";
-          ExecStart = "${backup-script}/bin/backsnap";
-        };
-      };
-      timers.backup = {
-        wantedBy = ["timers.target"];
-        unitConfig = {
-          Description = "Backup 15min after boot and every 8 hours";
-        };
-        timerConfig = {
-          OnBootSec = "15min";
-          OnUnitActiveSec = "8h";
-        };
-      };
-    };
-  };
-}
diff --git a/sys/svcs/dconf/default.nix b/sys/svcs/dconf/default.nix
deleted file mode 100644
index db35208e..00000000
--- a/sys/svcs/dconf/default.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  config,
-  lib,
-  pkgs,
-  ...
-}: {
-  # needed to make home-manager play nice with some apps. See:
-  # https://nix-community.github.io/home-manager/index.html#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal
-  programs.dconf.enable = true;
-}
diff --git a/sys/svcs/default.nix b/sys/svcs/default.nix
deleted file mode 100644
index 56a16055..00000000
--- a/sys/svcs/default.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{...}: {
-  imports = [
-    ./adb
-    ./backup
-    ./dconf
-    ./fwupd
-    ./getty
-    ./nix
-    ./openssh
-    ./postgresql
-    ./printing
-    ./scanning
-    #./serverphone
-    ./snapper
-    ./steam
-    ./swaylock
-    ./xdg
-  ];
-}
diff --git a/sys/svcs/fwupd/default.nix b/sys/svcs/fwupd/default.nix
deleted file mode 100644
index 999ca72b..00000000
--- a/sys/svcs/fwupd/default.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-{...}: {
-  services.fwupd.enable = true;
-}
diff --git a/sys/svcs/getty/default.nix b/sys/svcs/getty/default.nix
deleted file mode 100644
index 7e8a4e46..00000000
--- a/sys/svcs/getty/default.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{
-  lib,
-  config,
-  ...
-}: {
-  services.getty = {
-    greetingLine = lib.mkForce ''
-      [?25l[?7l                                           
-                ▗▄▄▄       ▗▄▄▄▄    ▄▄▄▖         
-                ▜███▙       ▜███▙  ▟███▛         
-                 ▜███▙       ▜███▙▟███▛          
-                  ▜███▙       ▜██████▛           
-           ▟█████████████████▙ ▜████▛     ▟▙     
-          ▟███████████████████▙ ▜███▙    ▟██▙    
-                 ▄▄▄▄▖           ▜███▙  ▟███▛    
-                ▟███▛             ▜██▛ ▟███▛     
-               ▟███▛               ▜▛ ▟███▛      
-      ▟███████████▛                  ▟██████████▙
-      ▜██████████▛                  ▟███████████▛
-            ▟███▛ ▟▙               ▟███▛         
-           ▟███▛ ▟██▙             ▟███▛          
-          ▟███▛  ▜███▙           ▝▀▀▀▀           
-          ▜██▛    ▜███▙ ▜██████████████████▛     
-           ▜▛     ▟████▙ ▜████████████████▛      
-                 ▟██████▙       ▜███▙            
-                ▟███▛▜███▙       ▜███▙           
-               ▟███▛  ▜███▙       ▜███▙          
-               ▝▀▀▀    ▀▀▀▀▘       ▀▀▀▘          
-                                                 
-        NixOS ${config.system.nixos.label} 
-        --------------
-      
-        date: \d
-        time: \t
-        ipv4: \4
-        ipv6: \6
-        tty: \l
-      
-    '';
-  };
-}
diff --git a/sys/svcs/nix/default.nix b/sys/svcs/nix/default.nix
deleted file mode 100644
index 5766fcdd..00000000
--- a/sys/svcs/nix/default.nix
+++ /dev/null
@@ -1,52 +0,0 @@
-{
-  pkgs,
-  # flakes
-  nixpkgs_as_input,
-  templates,
-  self,
-  ...
-}: {
-  nix = {
-    package = pkgs.nixVersions.latest;
-
-    # Disable nix channels  (this is a remnant of old days)
-    channel.enable = false;
-
-    registry = {
-      nixpkgs.flake = nixpkgs_as_input;
-      n.flake = self; # Otherwise the nixpkgs config is not available
-
-      t.flake = templates;
-
-      my_flake.flake = self;
-      m.flake = self;
-    };
-
-    gc = {
-      automatic = true;
-      dates = "weekly";
-      options = "--delete-older-than 7d";
-    };
-
-    settings = {
-      auto-optimise-store = true;
-      experimental-features = [
-        "nix-command"
-        "flakes"
-        #"ca-derivations"
-      ];
-
-      use-xdg-base-directories = true;
-
-      #substituters = ["https://cache.ngi0.nixos.org/"];
-      #trusted-public-keys = ["cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA="];
-
-      fallback = true; # Build from source, if binary can't be substituted
-
-      keep-failed = true; # keep failed tmp build dirs
-      pure-eval = true; # restrict file system and network access to hash
-
-      sandbox-fallback = false; # Don't disable the sandbox, if the kernel doesn't support it
-    };
-  };
-}
diff --git a/sys/svcs/openssh/default.nix b/sys/svcs/openssh/default.nix
deleted file mode 100644
index b733dbe7..00000000
--- a/sys/svcs/openssh/default.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{...}: {
-  services.openssh = {
-    enable = true;
-    hostKeys = [
-      {
-        path = "/srv/sshd/ssh_host_ed25519_key";
-        rounds = 1000;
-        type = "ed25519";
-      }
-    ];
-    settings = {
-      PasswordAuthentication = false;
-    };
-  };
-}
diff --git a/sys/svcs/postgresql/default.nix b/sys/svcs/postgresql/default.nix
deleted file mode 100644
index 09cca2ef..00000000
--- a/sys/svcs/postgresql/default.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{config, ...}: {
-  services.postgresql = {
-    enable = !config.soispha.laptop.enable;
-  };
-}
diff --git a/sys/svcs/printing/default.nix b/sys/svcs/printing/default.nix
deleted file mode 100644
index ea197bbf..00000000
--- a/sys/svcs/printing/default.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{...}: {
-  services.avahi = {
-    enable = true;
-    nssmdns4 = true;
-    nssmdns6 = true;
-    openFirewall = true;
-  };
-  services.printing = {
-    enable = true;
-    startWhenNeeded = true;
-    webInterface = true;
-
-    # deletes `/var/cache/cups`, `/var/lib/cups` and `/var/spool/cups` on cups startup
-    stateless = true;
-
-    drivers = [];
-  };
-  hardware = {
-    printers = {
-      ensurePrinters = [
-        {
-          name = "Brother";
-          description = "Brother DCP-9022CDW";
-          model = "everywhere";
-          deviceUri = "dnssd://Brother%20DCP-9022CDW._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-30055c773bcf";
-        }
-      ];
-      ensureDefaultPrinter = "Brother";
-    };
-  };
-}
diff --git a/sys/svcs/scanning/default.nix b/sys/svcs/scanning/default.nix
deleted file mode 100644
index 6621e08f..00000000
--- a/sys/svcs/scanning/default.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{pkgs, ...}: {
-  hardware = {
-    sane = {
-      enable = true;
-      extraBackends = [pkgs.sane-airscan];
-    };
-  };
-
-  users.users.soispha.extraGroups = [
-    "scanner" # for permission to access the scanner.
-  ];
-}
diff --git a/sys/svcs/serverphone/certificates/ca.crt b/sys/svcs/serverphone/certificates/ca.crt
deleted file mode 100644
index 7a4ae6f9..00000000
--- a/sys/svcs/serverphone/certificates/ca.crt
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN CERTIFICATE-----

-MIIBXDCCAQOgAwIBAgIIRQ2wXiaD5pMwCgYIKoZIzj0EAwIwGTEXMBUGA1UEAwwO

-U2VydmVycGhvbmUgQ0EwHhcNMjMwNjA2MTIzNzM3WhcNMzMwNjAzMTIzNzM3WjAZ

-MRcwFQYDVQQDDA5TZXJ2ZXJwaG9uZSBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEH

-A0IABDZMtz3liWniBedisStXDO2sxFCKBH239ezH7uADu8g5peGssmNu1rXEDrg1

-sFwVUjQeJAocYYNoUeHiVpODf1ejNTAzMB0GA1UdDgQWBBST5oMmXrANRbCLIQpN

-W7e5uSCL3DASBgNVHRMBAf8ECDAGAQH/AgEBMAoGCCqGSM49BAMCA0cAMEQCIFig

-xA3MvRNP4uXaUEWwdP1pYL/R8N46G4NZrPEfiNV4AiA+NJSTFRCOUqEsvSb7PTFx

-YuMuJF4XxWnmStz3ym7xXA==

------END CERTIFICATE-----

diff --git a/sys/svcs/serverphone/certificates/server.crt b/sys/svcs/serverphone/certificates/server.crt
deleted file mode 100644
index f994cdc8..00000000
--- a/sys/svcs/serverphone/certificates/server.crt
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN CERTIFICATE-----

-MIIBTjCB9KADAgECAgkAhKrdjsoiOrkwCgYIKoZIzj0EAwIwGTEXMBUGA1UEAwwO

-U2VydmVycGhvbmUgQ0EwHhcNMjMwNjA2MTIzOTIwWhcNMjQwNjA1MTIzOTIwWjAm

-MSQwIgYDVQQDDBtDbGllbnQgcnVubmluZyBvbiBsb2NhbGhvc3QwWTATBgcqhkjO

-PQIBBggqhkjOPQMBBwNCAAS1ILQo8ae8ydqFlt5RncUT7joQiozk6Omunb0vxVz5

-toJRDmVqc1s6KhpCTipUV5coTcaK1TBz0+fft+9VH7cwoxgwFjAUBgNVHREEDTAL

-gglsb2NhbGhvc3QwCgYIKoZIzj0EAwIDSQAwRgIhAN7ohtsBLrjlgmSe9ngovxZM

-z61n0+/7w2mtX/OrLMWIAiEAu+D2S2o0s7E9pp2Rkug8cT5T4GCWgFgEHk5x2L/E

-RVI=

------END CERTIFICATE-----

diff --git a/sys/svcs/serverphone/default.nix b/sys/svcs/serverphone/default.nix
deleted file mode 100644
index 20125a75..00000000
--- a/sys/svcs/serverphone/default.nix
+++ /dev/null
@@ -1,49 +0,0 @@
-{
-  config,
-  serverphone,
-  system,
-  lib,
-  ...
-}: {
-  config = lib.mkIf config.soispha.secrets.enable {
-    services.serverphone = {
-      package = "${serverphone.packages.${system}.default}";
-      enable = true;
-      domain = "localhost";
-      configureDoas = true;
-      acceptedSshKeys = [
-        "AAAAC3NzaC1lZDI1NTE5AAAAIGBFuTNNn71Rhfnop2cdz3r/RhWWlCePnSBOhTBbu2ME"
-      ];
-      authorized = {
-        acceptedGpgKeys = [
-          {
-            source = ./keys/key_1;
-            trust = "ultimate";
-          }
-          {
-            source = ./keys/key_2;
-            trust = "ultimate";
-          }
-        ];
-      };
-      caCertificate = "${./certificates/ca.crt}";
-      certificate = "${./certificates/server.crt}";
-      privateKey = config.age.secrets.serverphoneServer.path;
-      certificateRequest = {
-        acceptedUsers = [
-          "soispha $argon2id$v=19$m=19456,t=2,p=1$EvhPENIBqL5b1RO5waNMWA$pJ8vDrCNJKDlqwB5bVDLjHVPEXm9McQhtt9OXSD8Zkc"
-        ];
-        caPrivateKey = config.age.secrets.serverphoneCa.path;
-      };
-    };
-
-    users.users.serverphone = {
-      group = "serverphone";
-      isSystemUser = true;
-      home = "/run/serverphone";
-    };
-    users.groups.serverphone = {
-      members = ["serverphone"];
-    };
-  };
-}
diff --git a/sys/svcs/serverphone/keys/key_1 b/sys/svcs/serverphone/keys/key_1
deleted file mode 120000
index 67720882..00000000
--- a/sys/svcs/serverphone/keys/key_1
+++ /dev/null
@@ -1 +0,0 @@
-../../../../home-manager/soispha/config/gpg/keys/key_1
\ No newline at end of file
diff --git a/sys/svcs/serverphone/keys/key_2 b/sys/svcs/serverphone/keys/key_2
deleted file mode 120000
index 24df7207..00000000
--- a/sys/svcs/serverphone/keys/key_2
+++ /dev/null
@@ -1 +0,0 @@
-../../../../home-manager/soispha/config/gpg/keys/key_2
\ No newline at end of file
diff --git a/sys/svcs/snapper/default.nix b/sys/svcs/snapper/default.nix
deleted file mode 100644
index 41e4b381..00000000
--- a/sys/svcs/snapper/default.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{...}: {
-  services.snapper = {
-    configs = {
-      srv = {
-        SUBVOLUME = "/srv";
-        FSTYPE = "btrfs";
-        # users and groups allowed to work with config
-        ALLOW_GROUPS = ["wheel"];
-
-        # sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
-        # directory
-        SYNC_ACL = true;
-
-        # run daily number cleanup
-        NUMBER_CLEANUP = false;
-
-        # limit for number cleanup
-        NUMBER_MIN_AGE = 1800;
-        NUMBER_LIMIT = 50;
-        NUMBER_LIMIT_IMPORTANT = 10;
-
-        # create hourly snapshots
-        TIMELINE_CREATE = true;
-
-        # cleanup hourly snapshots after some time
-        TIMELINE_CLEANUP = true;
-
-        # limits for timeline cleanup
-        TIMELINE_MIN_AGE = 1800;
-        TIMELINE_LIMIT_HOURLY = 7;
-        TIMELINE_LIMIT_DAILY = 3;
-        TIMELINE_LIMIT_WEEKLY = 2;
-        TIMELINE_LIMIT_MONTHLY = 0;
-        TIMELINE_LIMIT_YEARLY = 2;
-
-        # cleanup empty pre-post-pairs
-        EMPTY_PRE_POST_CLEANUP = true;
-      };
-    };
-  };
-}
diff --git a/sys/svcs/steam/default.nix b/sys/svcs/steam/default.nix
deleted file mode 100644
index 54091493..00000000
--- a/sys/svcs/steam/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-  lib,
-  config,
-  pkgs,
-  ...
-}: let
-  cfg = config.soispha.services.steam;
-in {
-  options.soispha.services.steam = {
-    enable = lib.mkOption {
-      default = false;
-      description = lib.mdDoc "Steam";
-    };
-  };
-  config = lib.mkIf cfg.enable {
-    programs.steam = {
-      enable = true;
-    };
-    environment.systemPackages = [
-      pkgs.wineWowPackages.waylandFull
-    ];
-  };
-}
diff --git a/sys/svcs/swaylock/default.nix b/sys/svcs/swaylock/default.nix
deleted file mode 100644
index 6cbcef28..00000000
--- a/sys/svcs/swaylock/default.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{...}: {
-  # otherwise swaylock can't access the user password.
-  security.pam.services.swaylock = {};
-}
diff --git a/sys/svcs/xdg/default.nix b/sys/svcs/xdg/default.nix
deleted file mode 100644
index 5140a832..00000000
--- a/sys/svcs/xdg/default.nix
+++ /dev/null
@@ -1,58 +0,0 @@
-{
-  pkgs,
-  nixpkgs_open_prs,
-  sysLib,
-  system,
-  ...
-}: let
-  pkgs_tfc = nixpkgs_open_prs.nixpkgs-tfc.legacyPackages."${system}";
-in {
-  services.dbus.enable = true;
-  xdg = {
-    portal = {
-      enable = true;
-      termfilechooser = {
-        enable = true;
-        logLevel = "TRACE";
-        package = pkgs_tfc.xdg-desktop-portal-termfilechooser;
-        settings = {
-          filechooser = {
-            default_dir = "/tmp";
-            cmd = "${sysLib.writeShellScript {
-              src = ./scripts/lf_wrapper.sh;
-              name = "lf_wrapper";
-              keepPath = true;
-              dependencies = with pkgs; [
-                lf
-                alacritty
-                bash
-              ];
-            }}/bin/lf_wrapper";
-          };
-        };
-      };
-      wlr = {
-        enable = true;
-      };
-      config = {
-        common = {
-          # NOTE: The next entry is supposedly needed for gtk based apps <2023-08-31>
-          default = ["wlr" "gtk"];
-          "org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
-        };
-
-        # TODO: Also activate, when on another wlr-based compositor <2023-11-25>
-        river = {
-          default = ["wlr" "gtk"];
-          "org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
-        };
-      };
-      extraPortals = [
-        pkgs.xdg-desktop-portal-gtk
-        pkgs.xdg-desktop-portal-wlr
-        pkgs_tfc.xdg-desktop-portal-termfilechooser
-      ];
-    };
-  };
-  # TODO: mime = {};
-}
diff --git a/sys/svcs/xdg/scripts/lf_wrapper.sh b/sys/svcs/xdg/scripts/lf_wrapper.sh
deleted file mode 100755
index 16603fe4..00000000
--- a/sys/svcs/xdg/scripts/lf_wrapper.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/usr/bin/env dash
-
-# shellcheck source=/dev/null
-SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
-
-# This wrapper script is invoked by xdg-desktop-portal-termfilechooser.
-#
-# Inputs:
-# 1. "1" if multiple files can be chosen, "0" otherwise.
-# 2. "1" if a directory should be chosen, "0" otherwise.
-# 3. "0" if opening files was requested, "1" if writing to a file was
-#    requested. For example, when uploading files in Firefox, this will be "0".
-#    When saving a web page in Firefox, this will be "1".
-# 4. If writing to a file, this is recommended path provided by the caller. For
-#    example, when saving a web page in Firefox, this will be the recommended
-#    path Firefox provided, such as "~/Downloads/webpage_title.html".
-#    Note that if the path already exists, we keep appending "_" to it until we
-#    get a path that does not exist.
-# 5. The output path, to which results should be written.
-#
-# Output:
-# The script should print the selected paths to the output path (argument #5),
-# one path per line.
-# If nothing is printed, then the operation is assumed to have been canceled.
-
-multiple="$1"
-directory="$2"
-save="$3"
-recommended_path="$4"
-out="$5"
-
-# echo > /tmp/stdout
-# echo > /tmp/stderr
-#
-# exec 1>> /tmp/stdout
-# exec 2>> /tmp/stderr
-
-cmd="$(command -v lf)"
-termcmd="${TERMINAL:-$(command -v alacritty)}"
-
-if [ "$save" = "1" ]; then
-    set -- -selection-path="$out" -command='set promptfmt "Select the file to write to %S \033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\033[0m"' "$recommended_path"
-    cat <<EOF >"$recommended_path"
-xdg-desktop-portal-termfilechooser saving files tutorial
-
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!!!                 === WARNING! ===                 !!!
-!!! The contents of *whatever* file you open last in !!!
-!!!            lf will be *overwritten*!             !!!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-Instructions:
-1) Move this file wherever you want.
-2) Rename the file if needed.
-3) Confirm your selection by opening the file, for
-   example by pressing <Enter>.
-
-Notes:
-1) This file is provided for your convenience. You
-   could delete it and choose another file to overwrite
-   that, for example.
-2) If you quit lf without opening a file, this file
-   will be removed and the save operation aborted.
-EOF
-
-elif [ "$directory" = "1" ]; then
-    set -- -selection-path="$out" -command='set dironly' -command='set promptfmt "Select directory (quit in dir to select it) %S \033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\033[0m"'
-elif [ "$multiple" = "1" ]; then
-    set -- -selection-path="$out" -command='set promptfmt "Select file(s) (open file to select it; <Space> to select multiple) %S \033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\033[0m"'
-else
-    set -- -selection-path="$out" -command='set promptfmt "Select file (open file to select it) %S \033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\033[0m"'
-fi
-
-"$termcmd" --title 'floating please' -e "$cmd" "$@"
-
-if [ "$save" = "1" ] && [ ! -s "$out" ]; then
-    rm "$recommended_path"
-fi
-# vim: ft=sh
diff --git a/sys/svcs/xdg/scripts/ranger_wrapper.sh b/sys/svcs/xdg/scripts/ranger_wrapper.sh
deleted file mode 100755
index e148bf19..00000000
--- a/sys/svcs/xdg/scripts/ranger_wrapper.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env dash
-
-# shellcheck source=/dev/null
-SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
-# This wrapper script is invoked by xdg-desktop-portal-termfilechooser.
-#
-# Inputs:
-# 1. "1" if multiple files can be chosen, "0" otherwise.
-# 2. "1" if a directory should be chosen, "0" otherwise.
-# 3. "0" if opening files was requested, "1" if writing to a file was
-#    requested. For example, when uploading files in Firefox, this will be "0".
-#    When saving a web page in Firefox, this will be "1".
-# 4. If writing to a file, this is recommended path provided by the caller. For
-#    example, when saving a web page in Firefox, this will be the recommended
-#    path Firefox provided, such as "~/Downloads/webpage_title.html".
-#    Note that if the path already exists, we keep appending "_" to it until we
-#    get a path that does not exist.
-# 5. The output path, to which results should be written.
-#
-# Output:
-# The script should print the selected paths to the output path (argument #5),
-# one path per line.
-# If nothing is printed, then the operation is assumed to have been canceled.
-
-multiple="$1"
-directory="$2"
-save="$3"
-path="$4"
-out="$5"
-
-cmd="$(command -v ranger)"
-termcmd="${TERMCMD:-$(command -v kitty)}"
-
-if [ "$save" = "1" ]; then
-    set -- --choosefile="$out" --cmd='echo Select save path (see tutorial in preview pane; try pressing zv or zp if no preview)' "$path"
-    printf '%s' 'xdg-desktop-portal-termfilechooser saving files tutorial
-
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!!!                 === WARNING! ===                 !!!
-!!! The contents of *whatever* file you open last in !!!
-!!! ranger will be *overwritten*!                    !!!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-Instructions:
-1) Move this file wherever you want.
-2) Rename the file if needed.
-3) Confirm your selection by opening the file, for
-   example by pressing <Enter>.
-
-Notes:
-1) This file is provided for your convenience. You
-   could delete it and choose another file to overwrite
-   that, for example.
-2) If you quit ranger without opening a file, this file
-   will be removed and the save operation aborted.
-' >"$path"
-elif [ "$directory" = "1" ]; then
-    set -- --choosedir="$out" --show-only-dirs --cmd="echo Select directory (quit in dir to select it)"
-elif [ "$multiple" = "1" ]; then
-    set -- --choosefiles="$out" --cmd="echo Select file(s) (open file to select it; <Space> to select multiple)"
-else
-    set -- --choosefile="$out" --cmd="echo Select file (open file to select it)"
-fi
-
-"$termcmd" -- "$cmd" "$@"
-if [ "$save" = "1" ] && [ ! -s "$out" ]; then
-    rm "$path"
-fi