nixos-configuration/inputs.nix
2025-04-10 19:59:48 +02:00

113 lines
3.7 KiB
Nix

let self = {
lock ? import lockFile,
lockFile ? ./lock.nix,
pkgs ? throw "inputs called without pkgs",
}:
{
inherit lock;
nixos-vscode-server = rec {
url = "https://github.com/nix-community/nixos-vscode-server/archive/${lock.nixos-vscode-server.revision}.tar.gz";
updateScript = pkgs.den-http-get-updater {
fileLocation = lockFile;
previousVersion = lock.nixos-vscode-server.revision;
versionUrl = "https://api.github.com/repos/nix-community/nixos-vscode-server/commits";
contentParser = "jq -rc '.[0].sha' <<< \"$newVersion\"";
prefetchList = [{
previousHash = lock.nixos-vscode-server.sha256;
prefetchUrlLocation = {
file = ./inputs.nix;
attrpath = "nixos-vscode-server.url";
};
}];
};
outPath = builtins.fetchTarball {
inherit url;
name = "nixos-vscode-server";
sha256 = "${lock.nixos-vscode-server.sha256}";
};
};
nixpkgs = rec {
url = "https://github.com/NixOS/nixpkgs/archive/${lock.nixpkgs.revision}.tar.gz";
updateScript = pkgs.den-http-get-updater {
fileLocation = lockFile;
previousVersion = lock.nixpkgs.revision;
versionUrl = "https://channels.nixos.org/nixos-24.11/git-revision";
prefetchList = [{
previousHash = lock.nixpkgs.sha256;
prefetchUrlLocation = {
file = ./inputs.nix;
attrpath = "nixpkgs.url";
};
}];
};
outPath = builtins.fetchTarball {
inherit url;
name = "nixpkgs";
sha256 = "${lock.nixpkgs.sha256}";
};
};
nixpkgs-unstable = rec {
url = "https://github.com/NixOS/nixpkgs/archive/${lock.nixpkgs-unstable.revision}.tar.gz";
updateScript = pkgs.den-http-get-updater {
fileLocation = lockFile;
previousVersion = lock.nixpkgs-unstable.revision;
versionUrl = "https://channels.nixos.org/nixos-unstable/git-revision";
prefetchList = [{
previousHash = lock.nixpkgs-unstable.sha256;
prefetchUrlLocation = {
file = ./inputs.nix;
attrpath = "nixpkgs-unstable.url";
};
}];
};
outPath = builtins.fetchTarball {
inherit url;
name = "nixpkgs-unstable";
sha256 = "${lock.nixpkgs-unstable.sha256}";
};
};
nix-bitcoin = rec {
url = "https://github.com/fort-nix/nix-bitcoin/archive/${lock.nix-bitcoin.revision}.tar.gz";
updateScript = pkgs.den-http-get-updater {
fileLocation = lockFile;
previousVersion = lock.nix-bitcoin.revision;
versionUrl = "https://api.github.com/repos/fort-nix/nix-bitcoin/commits";
contentParser = "jq -rc '.[0].sha' <<< \"$newVersion\"";
prefetchList = [{
previousHash = lock.nix-bitcoin.sha256;
prefetchUrlLocation = {
file = ./inputs.nix;
attrpath = "nix-bitcoin.url";
};
}];
};
outPath = builtins.fetchTarball {
inherit url;
name = "nix-bitcoin";
sha256 = "${lock.nix-bitcoin.sha256}";
};
};
cosmic-modules = rec {
url = "https://github.com/lilyinstarlight/nixos-cosmic/archive/${lock.cosmic-modules.revision}.tar.gz";
updateScript = pkgs.den-http-get-updater {
fileLocation = lockFile;
previousVersion = lock.cosmic-modules.revision;
versionUrl = "https://api.github.com/repos/lilyinstarlight/nixos-cosmic/commits";
contentParser = "jq -rc '.[0].sha' <<< \"$newVersion\"";
prefetchList = [{
previousHash = lock.cosmic-modules.sha256;
prefetchUrlLocation = {
file = ./inputs.nix;
attrpath = "cosmic-modules.url";
};
}];
};
outPath = builtins.fetchTarball {
inherit url;
name = "cosmic-modules";
sha256 = "${lock.cosmic-modules.sha256}";
};
};
};
in self