2023-03-26 18:14:56 -07:00
|
|
|
{
|
2023-03-27 15:49:50 -07:00
|
|
|
description = "Soothing pastel theme for Nix";
|
2023-11-02 10:55:47 -07:00
|
|
|
|
2023-04-13 20:35:15 -07:00
|
|
|
inputs = {
|
2023-06-02 12:25:15 -07:00
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
2023-11-02 10:55:47 -07:00
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-04-13 20:35:15 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-11-02 10:55:47 -07:00
|
|
|
outputs = { self, nixpkgs, ... }@inputs:
|
2023-06-02 12:29:08 -07:00
|
|
|
let
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"aarch64-darwin"
|
|
|
|
];
|
|
|
|
|
2023-07-29 05:40:13 -07:00
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
|
2023-11-02 10:55:47 -07:00
|
|
|
forAllSystems = fn: lib.genAttrs systems (s: fn nixpkgs.legacyPackages.${s});
|
2023-06-02 12:29:08 -07:00
|
|
|
in
|
|
|
|
{
|
2023-11-02 10:55:47 -07:00
|
|
|
checks = forAllSystems (pkgs: lib.optionalAttrs pkgs.stdenv.isLinux {
|
|
|
|
module-vm-test = pkgs.nixosTest (import ./test.nix { inherit self inputs; });
|
|
|
|
});
|
|
|
|
|
2023-07-29 05:40:13 -07:00
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixpkgs-fmt);
|
|
|
|
|
2023-11-03 15:13:02 -07:00
|
|
|
homeManagerModules.catppuccin = import ./modules/home-manager;
|
2023-07-29 05:40:13 -07:00
|
|
|
|
2023-11-03 15:13:02 -07:00
|
|
|
nixosModules.catppuccin = import ./modules/nixos;
|
2023-07-29 05:40:13 -07:00
|
|
|
|
|
|
|
packages = forAllSystems (pkgs:
|
|
|
|
let
|
2023-11-02 10:55:47 -07:00
|
|
|
eval = module: lib.evalModules {
|
2023-07-29 05:40:13 -07:00
|
|
|
modules = [
|
|
|
|
module
|
|
|
|
{
|
|
|
|
_module = {
|
|
|
|
check = false;
|
|
|
|
args.lib = import ./modules/lib/mkExtLib.nix lib;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-11-02 10:55:47 -07:00
|
|
|
mkDoc = name: module:
|
2023-07-29 05:40:13 -07:00
|
|
|
let
|
|
|
|
doc = pkgs.nixosOptionsDoc {
|
2023-11-02 10:55:47 -07:00
|
|
|
options = lib.filterAttrs (n: _: n != "_module") (eval module).options;
|
2023-07-29 05:40:13 -07:00
|
|
|
documentType = "none";
|
2023-11-03 15:13:02 -07:00
|
|
|
revision = builtins.substring 0 8 self.rev or "dirty";
|
2023-07-29 05:40:13 -07:00
|
|
|
};
|
|
|
|
in
|
|
|
|
pkgs.runCommand "${name}-module-doc.md" { } ''
|
|
|
|
cat ${doc.optionsCommonMark} > $out
|
|
|
|
'';
|
|
|
|
in
|
2023-11-02 10:55:47 -07:00
|
|
|
{
|
|
|
|
nixos-doc = mkDoc "nixos" self.nixosModules.catppuccin;
|
|
|
|
home-manager-doc = mkDoc "home-manager" self.homeManagerModules.catppuccin;
|
|
|
|
|
|
|
|
default = self.packages.${pkgs.system}.home-manager-doc;
|
2023-07-29 05:40:13 -07:00
|
|
|
});
|
2023-06-02 12:29:08 -07:00
|
|
|
};
|
2023-03-26 18:14:56 -07:00
|
|
|
}
|