Skip to content

Commit

Permalink
feat(homeProfiles): add bat
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Sep 21, 2023
1 parent d26fb2d commit dda9476
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 3 deletions.
27 changes: 27 additions & 0 deletions examples/nixos/__lock/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions examples/nixos/__lock/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
inputs = {
catppuccin-bat = {
url = "github:catppuccin/bat";
flake = false;
};
};
outputs = _: { };
}
1 change: 1 addition & 0 deletions examples/nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ in

homeSuites = [
exporter.homeProfiles.customProfiles.hyprland
exporter.homeProfiles.default.presets.bat
# super.pops.homeModules.wayland.windowManager.hyprland
];
}
9 changes: 7 additions & 2 deletions examples/nixos/pops/homeModules.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
(POS.loadHomeModules.addLoadExtender { inputs = super.inputs.outputs // { }; })
.addExporters
(POS.loadHomeModules.addLoadExtender {
inputs = {
__misc__ = {
inherit (super.inputs.outputs) catppuccin-bat;
};
};
}).addExporters
[
(POP.extendPop flops.haumea.pops.exporter (
self: super: {
Expand Down
10 changes: 9 additions & 1 deletion examples/nixos/pops/inputs.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
(POS.loadInputs.addInputsExtender (
POP.extendPop flops.flake.pops.inputsExtender (
self: super: { inputs.nixpkgs = POS.loadInputs.outputs.nixpkgs.legacyPackages; }
self: super:
let
selfInputs = POS.loadInputs.setInitInputs ../__lock;
in
{
inputs = {
nixpkgs = POS.loadInputs.outputs.nixpkgs.legacyPackages;
} // selfInputs.outputs;
}
)
)).setSystem
"x86_64-linux"
24 changes: 24 additions & 0 deletions nixos/homeModules/programs/bat.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
config =
with lib;
mkMerge [
(mkIf cfg.__profiles__.catppuccin-mocha.enable {
config = {
theme = "Catppuccin-mocha";
style = "changes,header";
};
# bat cache --build
themes = {
Catppuccin-mocha = builtins.readFile (
__misc__.catppuccin-bat + "/Catppuccin-mocha.tmTheme"
);
};
})
];

options.__profiles__ = with lib; {
catppuccin-mocha.enable =
mkEnableOption
"Whether to enable the catppuccino-mocha theme";
};
}
11 changes: 11 additions & 0 deletions nixos/homeProfiles/presets/bat.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
let
inherit (moduleArgs) pkgs;
in
{
imports = [ POS.homeModules.programs.bat ];
programs.bat = {
enable = true;
__profiles__.catppuccin-mocha.enable = true;
extraPackages = with pkgs.bat-extras; [ batman ];
};
}

0 comments on commit dda9476

Please sign in to comment.