-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
188 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,57 @@ | ||
{ lib, nixosOptionsDoc }: | ||
{ version, modules }: | ||
(nixosOptionsDoc { | ||
options = | ||
builtins.removeAttrs | ||
(lib.evalModules { | ||
modules = modules ++ [ | ||
{ | ||
options.system.nixos.release = lib.mkOption { | ||
type = lib.types.str; | ||
default = lib.trivial.release; | ||
readOnly = true; | ||
}; | ||
{ | ||
version, | ||
modules ? [ moduleRoot ], | ||
moduleRoot, | ||
}: | ||
let | ||
baseDeclarationUrl = "https://github.com/catppuccin/nix/blob/main"; | ||
declarationIsOurs = declaration: lib.hasPrefix (toString moduleRoot) (toString declaration); | ||
declarationSubpath = declaration: lib.removePrefix (toString ../. + "/") (toString declaration); | ||
|
||
config = { | ||
_module.check = false; | ||
}; | ||
} | ||
]; | ||
}).options | ||
[ | ||
"_module" | ||
"system" | ||
]; | ||
toGithubDeclaration = | ||
declaration: | ||
let | ||
subpath = declarationSubpath declaration; | ||
in | ||
{ | ||
url = "${baseDeclarationUrl}/${subpath}"; | ||
name = "<catppuccin/${subpath}>"; | ||
}; | ||
|
||
transformOptions = opt: builtins.removeAttrs opt [ "declarations" ]; | ||
evaluated = lib.evalModules { | ||
modules = modules ++ [ | ||
{ | ||
options.system.nixos.release = lib.mkOption { | ||
type = lib.types.str; | ||
default = lib.trivial.release; | ||
readOnly = true; | ||
}; | ||
|
||
documentType = "none"; | ||
revision = version; | ||
}).optionsCommonMark | ||
config = { | ||
_module.check = false; | ||
}; | ||
} | ||
]; | ||
}; | ||
|
||
optionsDoc = nixosOptionsDoc { | ||
options = builtins.removeAttrs evaluated.options [ | ||
"_module" | ||
"system" | ||
]; | ||
|
||
transformOptions = | ||
opt: | ||
opt | ||
// { | ||
declarations = map ( | ||
declaration: if declarationIsOurs declaration then toGithubDeclaration declaration else declaration | ||
) opt.declarations; | ||
}; | ||
|
||
documentType = "none"; | ||
revision = version; | ||
}; | ||
in | ||
optionsDoc.optionsCommonMark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[ | ||
./alacritty.nix | ||
./bat.nix | ||
./bottom.nix | ||
./btop.nix | ||
./cava.nix | ||
./delta.nix | ||
./dunst.nix | ||
./fcitx5.nix | ||
./fish.nix | ||
./foot.nix | ||
./fzf.nix | ||
./gh-dash.nix | ||
./gitui.nix | ||
./glamour.nix | ||
./globals.nix | ||
./gtk.nix | ||
./helix.nix | ||
./hyprland.nix | ||
./imv.nix | ||
./k9s.nix | ||
./kitty.nix | ||
./kvantum.nix | ||
./lazygit.nix | ||
./mako.nix | ||
./micro.nix | ||
./mpv.nix | ||
./neovim.nix | ||
./polybar.nix | ||
./rio.nix | ||
./rofi.nix | ||
./skim.nix | ||
./starship.nix | ||
./swaylock.nix | ||
./sway.nix | ||
./tmux.nix | ||
./tofi.nix | ||
./waybar.nix | ||
./yazi.nix | ||
./zathura.nix | ||
./zellij.nix | ||
./zsh-syntax-highlighting.nix | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
{ lib, pkgs, ... }@args: | ||
{ | ||
imports = import ../lib/mkImports.nix args ./.; | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
{ | ||
imports = import ../lib/import-modules.nix { | ||
inherit config lib pkgs; | ||
modules = import ./all-modules.nix; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
modules, | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
let | ||
toModule = file: { | ||
_file = file; | ||
imports = [ | ||
(import file { | ||
inherit config pkgs; | ||
lib = import ./mk-ext-lib.nix { inherit config lib pkgs; }; | ||
}) | ||
]; | ||
}; | ||
in | ||
map toModule modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
lib.extend ( | ||
final: _: { | ||
ctp = import ./. { | ||
inherit config pkgs; | ||
lib = final; | ||
}; | ||
} | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
./console.nix | ||
./globals.nix | ||
./grub.nix | ||
./plymouth.nix | ||
./sddm.nix | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
{ lib, pkgs, ... }@args: | ||
{ | ||
imports = import ../lib/mkImports.nix args ./.; | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
{ | ||
imports = import ../lib/import-modules.nix { | ||
inherit config lib pkgs; | ||
modules = import ./all-modules.nix; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters