2023-12-16 15:38:36 -08:00
|
|
|
{
|
|
|
|
description = "Soothing pastel theme for Nix";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
2024-05-20 21:34:42 -07:00
|
|
|
nixpkgs-stable.url = "nixpkgs/release-23.11";
|
2023-12-16 15:38:36 -08:00
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-05-20 21:34:42 -07:00
|
|
|
|
|
|
|
home-manager-stable = {
|
|
|
|
url = "github:nix-community/home-manager/release-23.11";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-stable";
|
|
|
|
};
|
2023-12-16 15:38:36 -08:00
|
|
|
};
|
|
|
|
|
2024-05-21 14:53:46 -07:00
|
|
|
outputs =
|
2024-05-21 15:08:11 -07:00
|
|
|
{
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
nixpkgs-stable,
|
|
|
|
home-manager,
|
|
|
|
home-manager-stable,
|
2024-05-21 14:53:46 -07:00
|
|
|
}:
|
2023-12-16 15:38:36 -08:00
|
|
|
let
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"aarch64-darwin"
|
|
|
|
];
|
|
|
|
|
2024-05-20 21:34:42 -07:00
|
|
|
nixpkgsFor = nixpkgs.lib.genAttrs systems (system: {
|
|
|
|
unstable = nixpkgs.legacyPackages.${system};
|
|
|
|
stable = nixpkgs-stable.legacyPackages.${system};
|
|
|
|
});
|
|
|
|
|
|
|
|
forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: fn nixpkgsFor.${system}.unstable);
|
2023-12-16 15:38:36 -08:00
|
|
|
in
|
|
|
|
{
|
2024-05-21 14:53:46 -07:00
|
|
|
apps = forAllSystems (
|
2024-05-21 15:08:11 -07:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
system,
|
|
|
|
...
|
2024-05-21 14:53:46 -07:00
|
|
|
}:
|
|
|
|
{
|
|
|
|
add-source = {
|
|
|
|
type = "app";
|
|
|
|
program = lib.getExe (
|
|
|
|
pkgs.runCommand "add-source"
|
|
|
|
{
|
|
|
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
|
|
|
meta.mainProgram = "add-source";
|
|
|
|
}
|
|
|
|
''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -Dm755 ${./add_source.sh} $out/bin/add-source
|
|
|
|
wrapProgram $out/bin/add-source \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ pkgs.npins ]}
|
|
|
|
''
|
|
|
|
);
|
|
|
|
};
|
2024-05-21 13:57:51 -07:00
|
|
|
|
2024-05-21 14:53:46 -07:00
|
|
|
serve = {
|
|
|
|
type = "app";
|
|
|
|
program = lib.getExe self.packages.${system}.site.serve;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
2024-05-13 13:33:16 -07:00
|
|
|
|
2024-05-21 14:53:46 -07:00
|
|
|
checks = forAllSystems (
|
2024-05-21 15:08:11 -07:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
system,
|
|
|
|
...
|
2024-05-21 14:53:46 -07:00
|
|
|
}:
|
|
|
|
lib.optionalAttrs pkgs.stdenv.isLinux {
|
|
|
|
module-test-unstable = pkgs.callPackage ../test.nix { inherit home-manager; };
|
|
|
|
module-test-stable = nixpkgsFor.${system}.stable.callPackage ../test.nix {
|
|
|
|
home-manager = home-manager-stable;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
2023-12-16 15:38:36 -08:00
|
|
|
|
2024-05-21 14:53:14 -07:00
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
2023-12-16 15:38:36 -08:00
|
|
|
|
2024-05-21 14:53:46 -07:00
|
|
|
packages = forAllSystems (
|
2024-05-21 15:08:11 -07:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
system,
|
|
|
|
...
|
2024-05-21 14:53:46 -07:00
|
|
|
}:
|
2023-12-16 15:38:36 -08:00
|
|
|
let
|
2024-04-29 13:21:14 -07:00
|
|
|
version = self.shortRev or self.dirtyShortRev or "unknown";
|
2024-05-21 13:57:51 -07:00
|
|
|
mkOptionDoc = pkgs.callPackage ../docs/options-doc.nix { };
|
|
|
|
mkSite = pkgs.callPackage ../docs/mk-site.nix { };
|
|
|
|
packages' = self.packages.${system};
|
2023-12-16 15:38:36 -08:00
|
|
|
in
|
|
|
|
{
|
2024-04-29 13:21:14 -07:00
|
|
|
nixos-doc = mkOptionDoc {
|
2024-05-21 13:57:51 -07:00
|
|
|
inherit version;
|
2024-05-28 01:15:28 -07:00
|
|
|
moduleRoot = ../modules/nixos;
|
2024-04-29 13:21:14 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
home-manager-doc = mkOptionDoc {
|
2024-05-21 13:57:51 -07:00
|
|
|
inherit version;
|
2024-05-28 01:15:28 -07:00
|
|
|
moduleRoot = ../modules/home-manager;
|
2024-04-29 13:21:14 -07:00
|
|
|
};
|
2023-12-16 15:38:36 -08:00
|
|
|
|
2024-05-21 13:57:51 -07:00
|
|
|
site = mkSite {
|
|
|
|
pname = "catppuccin-nix-website";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = lib.fileset.toSource {
|
|
|
|
root = ../docs;
|
|
|
|
fileset = lib.fileset.unions [
|
|
|
|
../docs/src
|
|
|
|
../docs/book.toml
|
|
|
|
../docs/theme
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosDoc = packages'.nixos-doc;
|
|
|
|
homeManagerDoc = packages'.home-manager-doc;
|
|
|
|
};
|
|
|
|
|
|
|
|
default = packages'.site;
|
2024-05-21 14:53:46 -07:00
|
|
|
}
|
|
|
|
);
|
2023-12-16 15:38:36 -08:00
|
|
|
};
|
|
|
|
}
|