···428 # Rewrite dates for everything in the FS
429 find . -exec touch --date=2000-01-01 {} +
430431- usage_size=$(du -sb --apparent-size . | tr -cd '[:digit:]')
0432 # Make the image 110% as big as the files need to make up for FAT overhead
433 image_size=$(( ($usage_size * 110) / 100 ))
434 # Make the image fit blocks of 1M
···438 echo "Image size: $image_size"
439 truncate --size=$image_size "$out"
440 faketime "2000-01-01 00:00:00" mkfs.vfat -i 12345678 -n EFIBOOT "$out"
441- mcopy -psvm -i "$out" ./EFI ./boot ::
000000000442 # Verify the FAT partition.
443 fsck.vfat -vn "$out"
444 ''; # */
···428 # Rewrite dates for everything in the FS
429 find . -exec touch --date=2000-01-01 {} +
430431+ # Round up to the nearest multiple of 1MB, for more deterministic du output
432+ usage_size=$(( $(du -s --block-size=1M --apparent-size . | tr -cd '[:digit:]') * 1024 * 1024 ))
433 # Make the image 110% as big as the files need to make up for FAT overhead
434 image_size=$(( ($usage_size * 110) / 100 ))
435 # Make the image fit blocks of 1M
···439 echo "Image size: $image_size"
440 truncate --size=$image_size "$out"
441 faketime "2000-01-01 00:00:00" mkfs.vfat -i 12345678 -n EFIBOOT "$out"
442+443+ # Force a fixed order in mcopy for better determinism, and avoid file globbing
444+ for d in $(find EFI boot -type d | sort); do
445+ faketime "2000-01-01 00:00:00" mmd -i "$out" "::/$d"
446+ done
447+448+ for f in $(find EFI boot -type f | sort); do
449+ mcopy -pvm -i "$out" "$f" "::/$f"
450+ done
451+452 # Verify the FAT partition.
453 fsck.vfat -vn "$out"
454 ''; # */
···1+{ config, pkgs, lib, ... }:
2+with lib;
3+{
4+ options.programs.kdeconnect = {
5+ enable = mkEnableOption ''
6+ kdeconnect.
7+8+ Note that it will open the TCP and UDP port from
9+ 1714 to 1764 as they are needed for it to function properly.
10+ You can use the <option>package</option> to use
11+ <code>gnomeExtensions.gsconnect</code> as an alternative
12+ implementation if you use Gnome.
13+ '';
14+ package = mkOption {
15+ default = pkgs.kdeconnect;
16+ defaultText = "pkgs.kdeconnect";
17+ type = types.package;
18+ example = literalExample "pkgs.gnomeExtensions.gsconnect";
19+ description = ''
20+ The package providing the implementation for kdeconnect.
21+ '';
22+ };
23+ };
24+ config =
25+ let
26+ cfg = config.programs.kdeconnect;
27+ in
28+ mkIf cfg.enable {
29+ environment.systemPackages = [ cfg.package ];
30+ networking.firewall = rec {
31+ allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
32+ allowedUDPPortRanges = allowedTCPPortRanges;
33+ };
34+ };
35+}
···1+--- a/run.sh 2021-06-24 22:30:20.764897745 +0900
2++++ b/run.sh 2021-06-24 22:29:47.211210142 +0900
3+@@ -1,12 +1,6 @@
4+ #!/usr/bin/env bash
5+6+-SOURCE="${BASH_SOURCE[0]}"
7+-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
8+- DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
9+- SOURCE="$(readlink "$SOURCE")"
10+- [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
11+-done
12+-cd "$( cd -P "$( dirname "$SOURCE" )" && pwd )"
13++cd @out@/protege
14+15+ java -Xmx500M -Xms200M \
16+ -Xss16M \