catppuccin / nix

❄️ Soothing pastel theme for Nix
https://nix.catppuccin.com/
MIT License
303 stars 47 forks source link

Change GTK theme? #204

Closed Krymancer closed 1 month ago

Krymancer commented 1 month ago

Hello I'm new to nix and sorry to make this a issue but this repo doesn't have the discussions tab.

I'm trying a minimal configuration with home-manager and i used catppuccin.enable = true and is working for kitty only.

falke.nix

{
  description = "Nixos config flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    catppuccin.url = "github:catppuccin/nix";
    home-manager = {
       url = "github:nix-community/home-manager";
       inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { self, nixpkgs, ... }@inputs: {
    nixosConfigurations.default = nixpkgs.lib.nixosSystem {
      specialArgs = {inherit inputs;};
      modules = [
    inputs.catppuccin.nixosModules.catppuccin
        inputs.home-manager.nixosModules.default
        ./configuration.nix
      ];
    };
  };
}

home.nix

{ config, pkgs, ... }:

{

  imports = [./theme.nix];

  home.username = "junho";
  home.homeDirectory = "/home/junho";

  home.stateVersion = "24.05"; 

  home.packages = [
  ];

  home.file = {
  };

  home.sessionVariables = {
    EDITOR = "nvim";
  };

  programs.home-manager.enable = true;

  programs.neovim.enable = true;
  programs.kitty.enable = true;
  programs.firefox.enable = true;
}

theme.nix

{inputs, ...}:
{
  imports = [inputs.catppuccin.homeManagerModules.catppuccin];

  catppuccin = {
    accent = "mauve";
    flavor = "mocha";
    enable = true;
  };

  gtk.catppuccin.enable = true;
}

configuration.nix

{ config, pkgs, inputs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      inputs.home-manager.nixosModules.default
    ];

  # Bootloader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "nixos"; # Define your hostname.
  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.

  nix.settings.experimental-features = ["nix-command" "flakes"];

  # Enable networking
  networking.networkmanager.enable = true;

  # Set your time zone.
  time.timeZone = "America/Fortaleza";

  # Select internationalisation properties.
  i18n.defaultLocale = "en_US.UTF-8";

  i18n.extraLocaleSettings = {
    LC_ADDRESS = "pt_BR.UTF-8";
    LC_IDENTIFICATION = "pt_BR.UTF-8";
    LC_MEASUREMENT = "pt_BR.UTF-8";
    LC_MONETARY = "pt_BR.UTF-8";
    LC_NAME = "pt_BR.UTF-8";
    LC_NUMERIC = "pt_BR.UTF-8";
    LC_PAPER = "pt_BR.UTF-8";
    LC_TELEPHONE = "pt_BR.UTF-8";
    LC_TIME = "pt_BR.UTF-8";
  };

  # Enable the X11 windowing system.
  services.xserver.enable = true;

  # Enable the GNOME Desktop Environment.
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome.enable = true;

  # Configure keymap in X11
  services.xserver = {
    layout = "br";
    xkbVariant = "";
  };

  # Configure console keymap
  console.keyMap = "br-abnt2";

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound with pipewire.
  sound.enable = true;
  hardware.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
  };

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.junho = {
    isNormalUser = true;
    description = "junho";
    extraGroups = [ "networkmanager" "wheel" ];
    packages = with pkgs; [
    #  thunderbird
        git
    ];
  };

  home-manager = {
      extraSpecialArgs = {inherit inputs;};
      users = {
        "junho" = import ./home.nix;
      };
  };

  # Enable automatic login for the user.
  services.xserver.displayManager.autoLogin.enable = true;
  services.xserver.displayManager.autoLogin.user = "junho";

  # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
  systemd.services."getty@tty1".enable = false;
  systemd.services."autovt@tty1".enable = false;

  # Install firefox.
  programs.firefox.enable = true;

  environment.systemPackages = with pkgs; [
  #  vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  #  wget
  ];

  system.stateVersion = "23.11";
}

I did omit the hardware-config since I belive that is not important for this problem. Hope you can help me, if this is not the place for this type of questions I'm sorry :(

isabelroses commented 1 month ago

Remember to set gtk.enable = true; too. Our modules enable from users enabling each theme (or the global enable) and app.

Krymancer commented 1 month ago

Remember to set gtk.enable = true; too. Our modules enable from users enabling each theme (or the global enable) and app.

Thanks this seems to be the problem. I tought that gtk was enabled because of gnome. Quick question I have to enable each program? I guess not because I didn't for kitty.

isabelroses commented 1 month ago

As far as I'm aware yes. Each one must be enabled.

Krymancer commented 1 month ago

As far as I'm aware yes. Each one must be enabled.

Ok, Thank you so much!