Let's see if this makes auto-mount work now
This commit is contained in:
parent
bc7c3f803a
commit
67cdc3600e
|
@ -16,7 +16,7 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.services."external-drive-mount@" = {
|
systemd.services."external-drive-mount@" = {
|
||||||
path = with pkgs; [jq coreutils udisks bash util-linux toybox auto-mount steam];
|
path = with pkgs; [udisks bash auto-mount steam];
|
||||||
enable = true;
|
enable = true;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.auto-mount}/bin/auto-mount add %i";
|
ExecStart = "${pkgs.auto-mount}/bin/auto-mount add %i";
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
../../../disko/shodan
|
../../../disko/shodan
|
||||||
|
|
||||||
# ./auto-mount.nix
|
./auto-mount.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
|
|
@ -3,11 +3,6 @@
|
||||||
stdenv,
|
stdenv,
|
||||||
system,
|
system,
|
||||||
pkgs,
|
pkgs,
|
||||||
jq,
|
|
||||||
coreutils,
|
|
||||||
udisks,
|
|
||||||
toybox,
|
|
||||||
util-linux,
|
|
||||||
writeShellApplication,
|
writeShellApplication,
|
||||||
}:
|
}:
|
||||||
writeShellApplication
|
writeShellApplication
|
||||||
|
@ -16,7 +11,7 @@ writeShellApplication
|
||||||
|
|
||||||
name = "auto-mount";
|
name = "auto-mount";
|
||||||
|
|
||||||
runtimeInputs = [jq coreutils udisks util-linux toybox pkgs.steam pkgs.extest];
|
runtimeInputs = [pkgs.steam];
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
@ -76,7 +71,7 @@ writeShellApplication
|
||||||
# TODO use -ifrunning and check return value - if there was a steam process and it returns -1, the message wasn't sent
|
# TODO use -ifrunning and check return value - if there was a steam process and it returns -1, the message wasn't sent
|
||||||
# need to retry until either steam process is gone or -ifrunning returns 0, or timeout i guess
|
# need to retry until either steam process is gone or -ifrunning returns 0, or timeout i guess
|
||||||
echo "Sent URL to steam: steam://''${command}/''${arg} (steam://''${command}/''${encoded})" >> /home/lillian/steam.txt
|
echo "Sent URL to steam: steam://''${command}/''${arg} (steam://''${command}/''${encoded})" >> /home/lillian/steam.txt
|
||||||
systemd-run -M 1000@ --user --collect --wait sh -c "export LD_PRELOAD=${pkgs.extest}/lib/libextest.so:$LD_PRELOAD ${pkgs.steam}/bin/steam steam://''${command}/''${encoded@Q}"
|
systemd-run -M 1000@ --user --collect --wait sh -c "${pkgs.steam}/bin/steam steam://''${command}/''${encoded@Q}"
|
||||||
else
|
else
|
||||||
echo "Could not send steam URL steam://''${command}/''${arg} (steam://''${command}/''${encoded}) -- steam not running"
|
echo "Could not send steam URL steam://''${command}/''${arg} (steam://''${command}/''${encoded}) -- steam not running"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue