nextcloud: Fetch apps using nvfetcher
This commit is contained in:
parent
c4fa991b62
commit
61d3008bc3
9 changed files with 318 additions and 66 deletions
46
flake.nix
46
flake.nix
|
@ -8,6 +8,10 @@
|
|||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nvfetcher = {
|
||||
url = "github:berberman/nvfetcher";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
tlaternet-webserver = {
|
||||
url = "git+https://gitea.tlater.net/tlaternet/tlaternet.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -18,6 +22,7 @@
|
|||
self,
|
||||
nixpkgs,
|
||||
sops-nix,
|
||||
nvfetcher,
|
||||
deploy-rs,
|
||||
tlaternet-webserver,
|
||||
}: let
|
||||
|
@ -89,22 +94,35 @@
|
|||
####################
|
||||
# VM launch script #
|
||||
####################
|
||||
apps.${system}.default = let
|
||||
inherit (self.nixosConfigurations.vm.config.system.build) vm;
|
||||
apps.${system} = let
|
||||
inherit (nixpkgs.legacyPackages.${system}) writeShellScript;
|
||||
qemuNetOpts = self.lib.makeQemuNetOpts {
|
||||
"2222" = "2222";
|
||||
"3080" = "80";
|
||||
"3443" = "443";
|
||||
"21025" = "21025"; # Starbound
|
||||
};
|
||||
in {
|
||||
type = "app";
|
||||
program = builtins.toString (writeShellScript "run-vm" ''
|
||||
export QEMU_OPTS="-m 3941 -smp 2 -display curses"
|
||||
export QEMU_NET_OPTS="${qemuNetOpts}"
|
||||
"${vm}/bin/run-tlaternet-vm"
|
||||
'');
|
||||
default = let
|
||||
inherit (self.nixosConfigurations.vm.config.system.build) vm;
|
||||
qemuNetOpts = self.lib.makeQemuNetOpts {
|
||||
"2222" = "2222";
|
||||
"3080" = "80";
|
||||
"3443" = "443";
|
||||
"21025" = "21025"; # Starbound
|
||||
};
|
||||
in {
|
||||
type = "app";
|
||||
program = builtins.toString (writeShellScript "run-vm" ''
|
||||
export QEMU_OPTS="-m 3941 -smp 2 -display curses"
|
||||
export QEMU_NET_OPTS="${qemuNetOpts}"
|
||||
"${vm}/bin/run-tlaternet-vm"
|
||||
'');
|
||||
};
|
||||
|
||||
update-nextcloud-apps = let
|
||||
nvfetcher-bin = "${nvfetcher.defaultPackage.${system}}/bin/nvfetcher";
|
||||
in {
|
||||
type = "app";
|
||||
program = builtins.toString (writeShellScript "update-nextcloud-apps" ''
|
||||
cd "$(git rev-parse --show-toplevel)/pkgs"
|
||||
${nvfetcher-bin} -o _sources_nextcloud -c nextcloud-apps.toml
|
||||
'');
|
||||
};
|
||||
};
|
||||
|
||||
###########################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue