dev.fron.io nixrc / live
profiles(ipfs): fix ipfs-init Tony Olagbaiye 17 days ago
1 changed file(s) with 11 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
132132 };
133133 };
134134
135 systemd.services.ipfs-init.serviceConfig.User = "ipfs";
136 systemd.services.ipfs-init.serviceConfig.Group = "ipfs";
135137 systemd.services.ipfs-init.serviceConfig.TimeoutStartSec = "20s";
136 systemd.services.ipfs-init.serviceConfig.ExecStartPre = pkgs.writeShellScript "ipfs-init-pre" ''
137 echo Migrating
138 ${pkgs.ipfs-migrator}/bin/fs-repo-migrations -y
139 echo Clearing MFS
140 ${mfs-replace-root}/bin/mfs-replace-root QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn
141 '';
138 systemd.services.ipfs-init.serviceConfig.Type = "oneshot";
139 systemd.services.ipfs-init.serviceConfig.RemainAfterExit = true;
140 systemd.services.ipfs-init.serviceConfig.Environment = ''IPFS_PATH=${config.services.ipfs.dataDir}'';
141 systemd.services.ipfs-init.serviceConfig.ExecStart = [
142 "${pkgs.coreutils}/bin/echo Migrating"
143 "${pkgs.ipfs-migrator}/bin/fs-repo-migrations -y"
144 "${pkgs.coreutils}/bin/echo Clearing MFS"
145 "${mfs-replace-root}/bin/mfs-replace-root QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn"
146 ];
142147
143148 systemd.services.ipfs = builtins.trace "${config.networking.hostName} - ipfs config permissions still broken" {
144149 serviceConfig.ExecStartPost = "${pkgs.coreutils}/bin/chmod g+r /var/lib/ipfs/config";