try making nextcloud apps as flake inputs

This commit is contained in:
Noah Masur 2023-08-02 22:26:35 -04:00
parent 71e6780439
commit 9694467ba0
4 changed files with 78 additions and 15 deletions

View File

@ -215,6 +215,42 @@
"type": "github"
}
},
"nextcloud-cookbook": {
"flake": false,
"locked": {
"narHash": "sha256-XgBwUr26qW6wvqhrnhhhhcN4wkI+eXDHnNSm1HDbP6M=",
"type": "tarball",
"url": "https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz"
}
},
"nextcloud-external": {
"flake": false,
"locked": {
"narHash": "sha256-gY1nxqK/pHfoxW/9mE7DFtNawgdEV7a4OXpscWY14yk=",
"type": "tarball",
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.2.0/external-v5.2.0.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.2.0/external-v5.2.0.tar.gz"
}
},
"nextcloud-news": {
"flake": false,
"locked": {
"narHash": "sha256-hhXPEITSbCiFs0o+TOsQnSasXBpjU9mA/OFsbzuaCPw=",
"type": "tarball",
"url": "https://github.com/nextcloud/news/releases/download/22.0.0/news.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/nextcloud/news/releases/download/22.0.0/news.tar.gz"
}
},
"nil": {
"inputs": {
"flake-utils": "flake-utils",
@ -418,6 +454,9 @@
"disko": "disko",
"firefox-darwin": "firefox-darwin",
"home-manager": "home-manager",
"nextcloud-cookbook": "nextcloud-cookbook",
"nextcloud-external": "nextcloud-external",
"nextcloud-news": "nextcloud-news",
"nil": "nil",
"nix2vim": "nix2vim",
"nixos-generators": "nixos-generators",

View File

@ -146,6 +146,23 @@
flake = false;
};
# Nextcloud Apps
nextcloud-news = {
url =
"https://github.com/nextcloud/news/releases/download/22.0.0/news.tar.gz";
flake = false;
};
nextcloud-external = {
url =
"https://github.com/nextcloud-releases/external/releases/download/v5.2.0/external-v5.2.0.tar.gz";
flake = false;
};
nextcloud-cookbook = {
url =
"https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz";
flake = false;
};
};
outputs = { nixpkgs, ... }@inputs:
@ -185,6 +202,7 @@
(import ./overlays/tree-sitter.nix inputs)
(import ./overlays/caddy.nix inputs)
(import ./overlays/mpv-scripts.nix inputs)
(import ./overlays/nextcloud-apps.nix inputs)
(import ./overlays/betterlockscreen.nix)
];

View File

@ -20,21 +20,9 @@
extraAppsEnable = true;
extraApps = with config.services.nextcloud.package.packages.apps; {
inherit calendar contacts;
news = pkgs.fetchNextcloudApp {
url =
"https://github.com/nextcloud/news/releases/download/22.0.0/news.tar.gz";
sha256 = "sha256-hhXPEITSbCiFs0o+TOsQnSasXBpjU9mA/OFsbzuaCPw=";
};
external = pkgs.fetchNextcloudApp {
url =
"https://github.com/nextcloud-releases/external/releases/download/v5.2.0/external-v5.2.0.tar.gz";
sha256 = "sha256-gY1nxqK/pHfoxW/9mE7DFtNawgdEV7a4OXpscWY14yk=";
};
cookbook = pkgs.fetchNextcloudApp {
url =
"https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz";
sha256 = "sha256-XgBwUr26qW6wvqhrnhhhhcN4wkI+eXDHnNSm1HDbP6M=";
};
news = pkgs.nextcloudApps.news;
external = pkgs.nextcloudApps.external;
cookbook = pkgs.nextcloudApps.cookbook;
};
};

View File

@ -0,0 +1,18 @@
inputs: _final: prev: {
nextcloudApps = {
news = prev.fetchNextcloudApp {
url = inputs.nextcloud-news.outPath;
sha256 = inputs.nextcloud-news.sha256;
};
external = prev.fetchNextcloudApp {
url = inputs.nextcloud-external.outPath;
sha256 = inputs.nextcloud-external.sha256;
};
cookbook = prev.fetchNextcloudApp {
url = inputs.nextcloud-cookbook.outPath;
sha256 = inputs.nextcloud-cookbook.sha256;
};
};
}