📦 add fission overlay
This commit is contained in:
parent
7bb0ca2d52
commit
07130a5a41
1123
flake.lock
generated
1123
flake.lock
generated
File diff suppressed because it is too large
Load Diff
@ -46,6 +46,8 @@
|
||||
url = "github:walkah/workon";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
fission.url = "github:fission-codes/nix-overlay";
|
||||
};
|
||||
|
||||
outputs =
|
||||
@ -59,6 +61,7 @@
|
||||
, devenv
|
||||
, dotfiles
|
||||
, workon
|
||||
, fission
|
||||
, ...
|
||||
}@inputs:
|
||||
let
|
||||
@ -67,6 +70,7 @@
|
||||
workon = workon.packages.${self.system}.default;
|
||||
inherit (devenv.packages.${self.system}) devenv;
|
||||
})
|
||||
fission.overlay
|
||||
];
|
||||
|
||||
mkSystem = hostName: system: modules:
|
||||
|
@ -25,7 +25,10 @@
|
||||
};
|
||||
|
||||
services.lorri.enable = true;
|
||||
services.ipfs.enable = true;
|
||||
services.ipfs = {
|
||||
enable = true;
|
||||
package = pkgs.kubo_carmirror;
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh = {
|
||||
|
@ -40,5 +40,7 @@
|
||||
|
||||
# My stuff
|
||||
workon
|
||||
fission-cli
|
||||
carmirror
|
||||
];
|
||||
}
|
||||
|
@ -9,23 +9,39 @@ in
|
||||
options = {
|
||||
services.ipfs = {
|
||||
enable = mkEnableOption "Enable kubo on darwin";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.kubo_carmirror;
|
||||
defaultText = literalExpression "pkgs.kubo";
|
||||
description = "The package to use for kubo";
|
||||
};
|
||||
|
||||
logFile = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = "/var/tmp/ipfs.log";
|
||||
description = "Absolute path to log stderr / stdout";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.ipfs ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
launchd.user.agents.ipfs = {
|
||||
path = [ pkgs.ipfs ];
|
||||
path = [ cfg.package ];
|
||||
script = ''
|
||||
if ! test -e $HOME/.ipfs/version; then
|
||||
ipfs init
|
||||
${cfg.package}/bin/ipfs init
|
||||
fi
|
||||
ipfs daemon --migrate
|
||||
${cfg.package}/bin/ipfs daemon --migrate
|
||||
'';
|
||||
serviceConfig = {
|
||||
KeepAlive = true;
|
||||
RunAtLoad = true;
|
||||
ProcessType = "Background";
|
||||
StandardErrorPath = cfg.logFile;
|
||||
StandardOutPath = cfg.logFile;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user