This section in my home.nix
file in my flake setup causes it to fail to build
gtk = {
enable = true;
theme = {
name = "Catppuccin-Mocha-Compact-Pink-Dark";
package = pkgs.catppuccin-gtk.override {
accents = ["pink"];
size = "compact";
tweaks = ["rimless" "black"];
variant = "mocha";
};
};
cursorTheme = {
name = "Catppuccin Mocha Pink";
package = pkgs.catppuccin-cursors.mochaPink;
size = 16;
};
};
with the error message
path '/home/ghoul/Documents/nix-config/home-manager' does not contain a 'flake.nix', searching up
building the system configuration...
path '/home/ghoul/Documents/nix-config/home-manager' does not contain a 'flake.nix', searching up
error: anonymous function at /nix/store/hbg5gjcr6bzya30advl28k4ynafhclhn-source/pkgs/data/themes/catppuccin-gtk/default.nix:1:1 called with unexpected argument 'variant'
at /nix/store/hbg5gjcr6bzya30advl28k4ynafhclhn-source/lib/customisation.nix:72:16:
71| let
72| result = f origArgs;
| ^
73|
(use '--show-trace' to show detailed location information)
The other packages configured in Home Manager seem to be working as intended. The weird part is that this section was directly copy pasted from my old configuration.nix
where it worked without any errors. It looks like a mistake I made while creating the flake, which I do not know how to fix.
Also I am using Home Manager as a NixOS module.
directory tree
.
├── flake.lock
├── flake.nix
├── home-manager
│ └── home.nix
└── nixos
├── configuration.nix
└── hardware-configuration.nix
2 directories, 5 files
flake.nix
{
description = "Your new nix config";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
# Home manager
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# TODO: Add any other flake you might need
hardware.url = "github:nixos/nixos-hardware";
# Shameless plug: looking for a way to nixify your themes and make
# everything match nicely? Try nix-colors!
# nix-colors.url = "github:misterio77/nix-colors";
};
outputs = {
nixpkgs,
home-manager,
...
} @ inputs: {
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
# FIXME replace with your hostname
ThinkPad = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;}; # Pass flake inputs to our config
# > Our main nixos configuration file <
modules = [./nixos/configuration.nix];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
#homeConfigurations = {
# FIXME replace with your username@hostname
# "your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
# extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
# > Our main home-manager configuration file <
# modules = [ ./home-manager/home.nix ];
# };
#};
};
}
configuration.nix
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
lib,
config,
pkgs,
...
}: {
# You can import other NixOS modules here
imports = [
# If you want to use modules from other flakes (such as nixos-hardware):
inputs.hardware.nixosModules.lenovo-thinkpad-t460
# inputs.hardware.nixosModules.common-ssd
inputs.home-manager.nixosModules.home-manager
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
];
nixpkgs = {
# You can add overlays here
overlays = [
# If you want to use overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
nix = {
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
};
# Garbage Collector
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
};
# FIXME: Add the rest of your current configuration
# Networking
networking = {
# Setting hostname
hostName = "ThinkPad";
networkmanager.enable = true;
};
# Boot loader
boot = {
# Use latest kernel
kernelPackages = pkgs.linuxPackages_latest;
loader = {
# Configure efivars
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
# Configure Grub
grub = {
devices = ["nodev"];
enable = true;
efiSupport = true;
version = 2;
# Enables OS prober to add entries for other OS on disk
useOSProber = true;
};
# Disable SystemD boot
systemd-boot.enable = false;
};
};
# Time
time.timeZone = "Asia/Kolkata";
# Locale
i18n = {
defaultLocale = "en_IN";
extraLocaleSettings = {
LC_ADDRESS = "en_IN";
LC_IDENTIFICATION = "en_IN";
LC_MEASUREMENT = "en_IN";
LC_MONETARY = "en_IN";
LC_NAME = "en_IN";
LC_NUMERIC = "en_IN";
LC_PAPER = "en_IN";
LC_TELEPHONE = "en_IN";
LC_TIME = "en_IN";
};
};
# Services
services = {
# Pipewire
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# DE Settings
xserver = {
# Enable X
enable = true;
# Enable GNOME
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
# Uninstall Xterm
excludePackages = with pkgs; [xterm];
# Configure Keymap
layout = "us";
xkbVariant = "";
};
# CUPS
printing.enable = true;
# Fingerprint Unlocking
fprintd = {
enable = true;
tod = {
enable = true;
driver = pkgs.libfprint-2-tod1-vfs0090;
};
};
};
# Sound
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
# System environment setup
environment = {
# Install system packages
systemPackages = with pkgs; [
# Fingerprint Utilites
fprintd
# Development
neovim
alejandra
nerdfonts
tree-sitter
ripgrep
lazygit
gdu
bottom
python310
python310Packages.python-lsp-server
rustup
lldb
black
clang-tools
nil
wget
];
# Remove default GNOME apps
gnome.excludePackages = with pkgs.gnome; [
baobab # disk usage analyzer
cheese # photo booth
eog # image viewer
epiphany # web browser
gedit # text editor
simple-scan # document scanner
totem # video player
yelp # help viewer
evince # document viewer
file-roller # archive manager
geary # email client
seahorse # password manager
# these should be self explanatory
gnome-calculator
gnome-calendar
gnome-characters
gnome-clocks
gnome-contacts
gnome-maps
gnome-music
pkgs.gnome-tour
pkgs.gnome-text-editor
gnome-weather
gnome-disk-utility
pkgs.gnome-console
pkgs.gnome-photos
];
};
# User setuo
users.users = {
ghoul = {
isNormalUser = true;
description = "Vishal Kalathil";
extraGroups = ["networkmanager" "wheel"];
packages = with pkgs; [gnome.gnome-tweaks gnome.gnome-boxes librewolf mangal mpv];
shell = pkgs.zsh;
};
};
# Home Manager
home-manager = {
extraSpecialArgs = {inherit inputs;};
users = {
# Import your home-manager configuration
ghoul = import ../home-manager/home.nix;
};
};
# This setups a SSH server. Very important if you're setting up a headless system.
# Feel free to remove if you don't need it.
#services.openssh = {
# enable = true;
# # Forbid root login through SSH.
# permitRootLogin = "no";
# Use keys only. Remove if you want to SSH using password (not recommended)
#passwordAuthentication = false;
#};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "22.11";
}
home.nix
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
lib,
config,
pkgs,
...
}: {
# You can import other home-manager modules here
imports = [
# If you want to use home-manager modules from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModule
# You can also split up your configuration and import pieces of it here:
# ./nvim.nix
];
nixpkgs = {
# You can add overlays here
overlays = [
# If you want to use overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
};
};
home = {
username = "ghoul";
homeDirectory = "/home/ghoul";
packages = with pkgs; [helix zsh gitFull transmission-gtk kitty];
stateVersion = "22.11";
};
gtk = {
enable = true;
theme = {
name = "Catppuccin-Mocha-Compact-Pink-Dark";
package = pkgs.catppuccin-gtk.override {
accents = ["pink"];
size = "compact";
tweaks = ["rimless" "black"];
variant = "mocha";
};
};
cursorTheme = {
name = "Catppuccin Mocha Pink";
package = pkgs.catppuccin-cursors.mochaPink;
size = 16;
};
};
# Add stuff for your user as you see fit:
# programs.neovim.enable = true;
# home.packages = with pkgs; [ steam ];
# Enable home-manager and git
programs = {
# HomeManager
home-manager.enable = true;
#Git
git = {
enable = true;
difftastic = {
enable = true;
background = "dark";
display = "side-by-side";
};
package = pkgs.gitFull;
lfs.enable = false;
userEmail = "kalathilvishal1@gmail.com";
userName = "Vishal Kalathil";
extraConfig = {
diff = {
colorMoved = "default";
age.textconv = "${pkgs.rage}/bin/rage -i ~/.ssh/id_ed25519 --decrypt";
};
difftool.prompt = true;
github.user = "SharkLava";
init.defaultBranch = "main";
merge.conflictstyle = "diff3";
mergetool.prompt = true;
pull.ff = "only";
credential = {credentialStore = "libsecret";};
aliases = {
st = "status";
co = "checkout";
ci = "commit";
br = "branch";
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
recent = "for-each-ref --sort=-committerdate --format='%(committerdate:short): %(refname:short)' refs/heads/";
};
};
};
# Zsh
zsh = {
enable = true;
shellAliases = {
ll = "ls -l";
update = "sudo nixos-rebuild switch";
};
history = {
size = 10000;
path = ".config/zsh/history";
};
oh-my-zsh = {
enable = true;
plugins = ["git"];
theme = "robbyrussell";
};
};
# Kitty
kitty = {
enable = true;
font.name = "jetbrains mono nerd font";
font.size = 11;
settings = {
italic_font = "auto";
bold_italic_font = "auto";
mouse_hide_wait = 2;
cursor_shape = "block";
url_color = "#0087bd";
url_style = "dotted";
#Close the terminal = without confirmation;
confirm_os_window_close = 0;
hide_window_decorations = "yes";
};
theme = "Catppuccin-Mocha";
};
# Helix
helix = {
enable = true;
settings = {
theme = "catppuccin_mocha";
editor = {
true-color = true;
# bufferline = "multiple";
line-number = "relative";
cursorline = true;
whitespace.render = "all";
# whitespace.render.space = "all";
# whitespace.render.tab = "all";
# whitespace.render.newline = "none";
indent-guides.render = true;
# indent-guides.character = "╎";
indent-guides.character = "|";
file-picker.hidden = false;
file-picker.git-ignore = false;
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
# It's quite helpful, but the placement is a bit annoying
# editor.lsp.auto-signature-help = false;
lsp.display-messages = true;
};
keys.insert.j = {k = "normal_mode";}; # Maps `jk` to exit insert mode
};
languages = [
{
name = "nix";
auto-format = true;
formatter = {command = "alejandra";};
}
{
name = "rust";
auto-format = true;
formatter = {command = "rustfmt";};
}
{
name = "bash";
auto-format = true;
}
{
name = "c";
auto-format = true;
}
{
name = "cpp";
auto-format = true;
}
{
name = "python";
auto-format = true;
formatter = {command = "black";};
}
];
};
};
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
}