Skip to content

Commit

Permalink
refactor(config): migrate to catppuccin/nix
Browse files Browse the repository at this point in the history
  • Loading branch information
zakuciael committed May 26, 2024
1 parent 29a04e5 commit 6ae28c3
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 10 deletions.
1 change: 1 addition & 0 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
sharedModules = [
inputs.nix-colors.homeManagerModule
inputs.sops-nix.homeManagerModule
inputs.catppuccin.homeManagerModule
];
useUserPackages = true;
useGlobalPkgs = true;
Expand Down
16 changes: 16 additions & 0 deletions flake.lock

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

13 changes: 13 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nix-colors.url = "github:misterio77/nix-colors";
catppuccin.url = "github:catppuccin/nix";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down Expand Up @@ -98,6 +99,16 @@
packages = flakeInputs.stylix.packages.${system};
nixosModules = flakeInputs.stylix.nixosModules // {default = flakeInputs.stylix.nixosModules.stylix;};
};
catppuccin =
flakeInputs.catppuccin
// {
homeManagerModule = flakeInputs.catppuccin.homeManagerModules.catppuccin;
nixosModules =
flakeInputs.catppuccin.nixosModules
// {
default = flakeInputs.catppuccin.nixosModules.catppuccin;
};
};
};

lib = nixpkgs.lib.extend (self: super: {
Expand All @@ -115,5 +126,7 @@
mappedHosts;

devShells.${system}.default = pkgs.callPackage ./shell.nix {};

inherit pkgs unstable inputs lib;
};
}
7 changes: 4 additions & 3 deletions hosts/pc/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,23 @@ in {
};
};

# Color theme configuration
catppuccin.flavor = "mocha";
home-manager.users.${username} = {
inherit colorScheme;
stylix.base16Scheme = colorScheme.palette;
stylix.autoEnable = false;
};

stylix.image = ""; # Workaround for Stylix requirement for this to be set.
stylix.base16Scheme = colorScheme.palette;
stylix.autoEnable = false;

# Configure Secret Managment through sops-nix.
# Secret management configuration
sops.age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
sops.defaultSopsFile = ./secrets.yaml;
sops.defaultSopsFormat = "yaml";

# Configure ZSA keyboards
# ZSA keyboard configuration
hardware.keyboard.zsa.enable = true;
environment.systemPackages = with pkgs; [wally-cli];

Expand Down
1 change: 1 addition & 0 deletions lib/hosts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ with lib.my; {
inputs.home-manager.nixosModules.default
inputs.sops-nix.nixosModules.default
inputs.stylix.nixosModules.default
inputs.catppuccin.nixosModules.default
]
++ (utils.recursiveReadDir ./../modules {
ignoredDirs = ["apps"];
Expand Down
1 change: 0 additions & 1 deletion modules/desktop/apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ in {
libsForQt5.ark
gnome-text-editor
gnome.eog
btop
];
};
};
Expand Down
3 changes: 2 additions & 1 deletion modules/desktop/apps/alacritty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
...
}: {
home-manager.users.${username} = {
stylix.targets.alacritty.enable = true;
# stylix.targets.alacritty.enable = true;

programs.alacritty = {
enable = true;
catppuccin.enable = true;
settings = {
general = {
shell = "${pkgs.fish}/bin/fish";
Expand Down
14 changes: 14 additions & 0 deletions modules/desktop/apps/btop.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
config,
lib,
pkgs,
username,
...
}:
with lib;
with lib.my; {
home-manager.users.${username} = {
home.packages = with pkgs; [btop];
programs.btop.catppuccin.enable = true;
};
}
1 change: 1 addition & 0 deletions modules/desktop/wm/hyprland.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ in
"qt"
"grimblast"
"steam"
"btop"
];

extraConfig = {
Expand Down
3 changes: 1 addition & 2 deletions modules/shell/fish.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ in {
environment.shells = mkIf cfg.default (with pkgs; [fish]);

home-manager.users.${username} = {
stylix.targets.fish.enable = true;

programs = {
direnv = {
enable = cfg.direnv.enable;
Expand All @@ -45,6 +43,7 @@ in {

fish = {
enable = true;
catppuccin.enable = true;
shellAliases = {
re = "nh os switch -H ${hostname} && echo -e '\\033[32m>\\033[0m Done!'";
nfu = "nix flake update";
Expand Down
5 changes: 2 additions & 3 deletions modules/shell/tmux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ in {

config = mkIf cfg.enable {
home-manager.users.${username} = {
stylix.targets.tmux.enable = true;

programs.tmux = {
enable = true;
catppuccin.enable = true;
mouse = true;
newSession = false;
plugins = with pkgs.tmuxPlugins; [sensible yank catppuccin];
plugins = with pkgs.tmuxPlugins; [sensible yank];
shell = "${pkgs.fish}/bin/fish";
prefix = "C-Space";
baseIndex = 1;
Expand Down

0 comments on commit 6ae28c3

Please sign in to comment.